Xpra: Ticket #1723: move to xdg base directory specification

Now that we've moved sockets and log files to $XDG_RUNTIME_DIR (see #1129), we could move the config files to $XDG_CONFIG_HOME (.config/.

We will probably have to support the old location for quite some time, if not indefinitely. We can load the old location first, then override with the new one - if any are present.



Wed, 13 Dec 2017 16:40:02 GMT - Antoine Martin: status, description changed


Mon, 07 May 2018 05:48:43 GMT - Antoine Martin: milestone changed


Wed, 27 Jun 2018 09:27:29 GMT - Antoine Martin: owner, status changed

Specification: XDG Base Directory Specification.

Done in r19741, we now look for paths:

Note: by being more "standards compliant", the behaviour may have changed slightly in some cases: we may load files from /usr/local if they exist whereas we would not have done so previously. This should not be a problem in most cases, as only custom installations place files there.

New output from the paths script:

$ ./xpra/platform/paths.py
* app
  - default
    - dir                         : /usr/share/xpra
* default_conf
  - dirs                          : []
* download
  - dir                           : ~/Downloads
* home                            : /home/antoine
* icons                           : /usr/share/xpra/icons
* install
  - prefix                        : /usr
* libexec
  - dir                           : /usr/libexec/
* log
  - dirs                          : /run/user/$UID/xpra, /tmp
* mmap
  - dir                           : /run/user/$UID/xpra
* nodock_command                  : xpra
* resources                       : /usr/share/xpra
* socket
  - dirs                          : /run/user/$UID/xpra, /run/xpra
* sound_command                   : xpra
* sshpass_command                 : /usr/bin/sshpass
* system_conf
  - dirs                          : /etc/xpra, /usr/local/etc/xpra, /etc/xdg/xpra
* user_conf
  - dirs                          : ~/.xpra, ~/.config/xpra
* xpra-tmp
  - dir                           : /run/user/$UID/xpra/tmp

We can now nuke ~/.xpra and it should never be re-created by running the client or the server.

Some code and scripts may still look for files there, but they should all continue to work without. (this does not apply to versions older than 0.17 which only look for run-xpra in ~/.xpra by default - but those have been EOL for a while now, see ticket:1129#comment:8)

@maxmylyn: FYI, feel free to close.


Wed, 27 Jun 2018 16:21:03 GMT - J. Max Mena: status changed; resolution set

Noted and closing.


Thu, 28 Jun 2018 07:33:45 GMT - urzds: cc set


Sat, 23 Jan 2021 05:32:04 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1723