# Suppress or fix xdg-user-dir: not found

**URL:** <https://forums.unrealengine.com/t/suppress-or-fix-xdg-user-dir-not-found/485870>\
**Category:** Platform & Builds\
**Tags:** warnings, Linux, unreal-engine, UE4, question\
**Created:** [July 7, 2021, 12:00pm UTC](https://forums.unrealengine.com/t/suppress-or-fix-xdg-user-dir-not-found/485870 "2021-07-07T12:00:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qhaas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@qhaas](https://forums.unrealengine.com/u/qhaas)\
**Post date:** [July 7, 2021, 12:00pm UTC](https://forums.unrealengine.com/t/suppress-or-fix-xdg-user-dir-not-found/485870/1 "2021-07-07T12:00:24Z")

</div>

Since this appears to be a nuance of UnrealEngine, posting a couple of questions related to [this carla issue](https://github.com/carla-simulator/carla/issues/3514). 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

---

<div class="post-metadata">

**Author:** ![MeloinUnreal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MeloinUnreal](https://forums.unrealengine.com/u/MeloinUnreal)\
**Post date:** [June 16, 2023, 1:21pm UTC](https://forums.unrealengine.com/t/suppress-or-fix-xdg-user-dir-not-found/485870/2 "2023-06-16T13:21:28Z")

</div>

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

Did you find some workaround?

---

<div class="post-metadata">

**Author:** ![xi57](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xi57/32/1194660_2.png) [@xi57](https://forums.unrealengine.com/u/xi57)\
**Post date:** [January 23, 2025, 12:21am UTC](https://forums.unrealengine.com/t/suppress-or-fix-xdg-user-dir-not-found/485870/3 "2025-01-23T00:21:45Z")

</div>

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.
