Suppress or fix xdg-user-dir: not found

Since this appears to be a nuance of UnrealEngine, posting a couple of questions related to this carla issue. When one runs the (cooked / packaged / production) UE 4.24 based CARLA simulator headless in Ubuntu 18.04 GNU/Linux without the packages xdg-user-dirs xdg-utils packages installed, one gets the warning sh: 1: xdg-user-dir: not found. This occurs in RH Enterprise Linux 7, and likely newer versions of Ubuntu and RHEL. This appears harmless, but is a red herring to many users. My question to the UE community…

  1. Is there a way to suppress this warning or compile an UE project in such a way that it does not appear?
  2. Does installing the xdg-user-dirs xdg-utils packages actually benefit the user when running the program headless (i.e. command-line only, no GUI)?
  3. Any unintended consequences to installing xdg-user-dirs xdg-utils packages into a GNU/Linux deployment without a GUI?

Thanks

1 Like

Sorry for renewing the old topic but today I get stuck on exact same issue.

Did you find some workaround?

I haven’t investigated question 1.

For question 2, it seems xdg-user-dir DOCUMENTS is the query being run, in order to support localization of directory names. There are some ThirdParty binaries/libraries that also have dependencies on xdg-user-dir, so I assume that the answer to question 1 is “No”. (I imagine it’s also extracting the config dir ~/.config from $XDG_CONFIG_HOME).

As for question 3, I did install xdg-user-dirs and xdg-utils and so far have not had any problems on my headless server. Note that I have not run this extensively in a production environment, but for dev it’s working well AFAICT.