upnort |
06-24-2018 11:52 AM |
XDG_RUNTIME_DIR and /var/run in tmpfs
By default the $XDG_RUNTIME_DIR environment variable is not set in Slackware, nor is /var/run sym linked to /run.
With many other distros the $XDG_RUNTIME_DIR defaults to /run/user/$UID. In many distros, /var/run is a sym link to /run. Both Slackware and most other distros mount /run to tmpfs, but Slackware does not create the /var/run sym link or create a default $XDG_RUNTIME_DIR variable. Using a sym link and tmpfs creates a nice way to clean the directory on reboot.
The sym link could be created in rc.S. The variable could be set in /etc/profile.d with:
Code:
if [ ! -d /run/user/$UID ]; then
mkdir -p /run/user/$UID
fi
export XDG_RUNTIME_DIR=/run/user/$UID
Possibly some people would want /var/run fixed rather than use tmpfs. Perhaps rc.S could source /etc/default/var_run to determine whether to create the sym link.
Code:
/etc/default/var_run
VAR_RUN_IN_TMPFS=true
Just a proposal. :)
|