Skip to content

Commit

Permalink
session-management.md: Proposed way of handling $XDG_RUNTIME_DIR
Browse files Browse the repository at this point in the history
Manually setting `$XDG_RUNTIME_DIR` is not trivial to do while staying compliant to the XDG spec as noted in issue void-linux#635. This proposed way handles `$XDG_RUNTIME_DIR` properly without having to install `elogind` and should suggested as its alternative
  • Loading branch information
bermudi committed Feb 23, 2024
1 parent 10450ba commit 495befb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/config/session-management.md
Expand Up @@ -62,6 +62,8 @@ user-specific runtime files.
Install [elogind](#elogind) as your session manager to automatically set up
`XDG_RUNTIME_DIR`.

Alternatively, manually set the environment variable through the shell. Make
sure to create a dedicated user directory and set its permissions to `700`. A
good default location is `/run/user/$(id -u)`.
Alternatively, install [pam_rundir(8)](https://man.voidlinux.org/pam_rundir) and
add it to `/etc/pam.d/login` to automatically create a $XDG_RUNTIME_DIR at login.
Manually setting the environment variable can be a bit cumbersome specially if you
need $XDG_RUNTIME_DIR at the default location of `/run/user/$(id -u)` for apps that
have it hardcoded.

0 comments on commit 495befb

Please sign in to comment.