jcnix/Desurium — comment on commit 03529fb5c8a3d6ab411d546aee83705789be7a5b
File: src/static/util/code/UtilLinux.cpp line 699
By ssokolow:

This is the wrong way to do this. Just like on Windows, the location of the Desktop folder is configurable on Linux.

The "well known" directories are configured in a file named `$XDG_CONFIG_HOME/user-dirs.dirs`. If $XDG_CONFIG_HOME is unset, you're supposed to assume `$HOME/.config`.

For more details see these two pages:
* http://freedesktop.org/wiki/Software/xdg-user-dirs
* http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

The simplest solution would probably just be to take the output from the `xdg-user-dir DESKTOP` command (case matters) and, if there are any systems which don't include it by default, add a copy alongside the copies of tools like `xdg-open` that Desurium already bundles.