graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Other
913 stars 88 forks source link

Create XDG_RUNTIME_DIR in /tmp if running a WM instead of a DE #343

Closed morgant closed 1 year ago

morgant commented 2 years ago

If one is running a window manager (WM) without a full desktop environment (DE), XDG_RUNTIME_DIR may not be set and so profile-sync-daemon will fail with an error.

Per the XDG Base Directory Specification:

If $XDG_RUNTIME_DIR is not set applications should fall back to a replacement directory with similar capabilities and print a warning message.

From my research, most applications fall back to creating and using /tmp/runtime-${USER} (for example: Qt. I'd suggest that profile-sync-daemon do the same.

morgant commented 2 years ago

I ran into this while working on an OpenBSD port of profile-sync-daemon as I don't generally run a full desktop environment. I will extract a patch for this feature from my WIP port and submit a PR:

https://github.com/morgant/my-openbsd-ports/blob/734ee9e5d0e03006850f3f32f638502d6f8875b8/www/profile-sync-daemon/patches/patch-common_profile-sync-daemon_in#L32

morgant commented 1 year ago

Many thanks, @graysky2!