To keep all the stuff a bit organized, I will open another "thread" for 
this.
I have read through 
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html 
and to me the standards seem sensible. Most of it is the default of most 
if not all modern desktop programs anyway.
Therefore I would like to completely comply with them in this policy. 
This involves, but is not limited to, putting the live dir in 
XDG_RUNTIME_DIR. Bercot warned me in 
https://skarnet.org/lists/supervision/3114.html that this might be 
dangerous since it could be removed to quickly upon logout.
 From the start on, I planned to have all the XDG_* env's managed by the 
s6-rc system service which sets up the user supervision tree. This means 
setting the env's and, in the case of XDG_RUNTIME_DIR, creating and 
removing the directory on demand. By implementing this directly in the 
service with correct dependencies, this becomes completely safe and 
reliable.
Another suggestion was to delegate the creation and removal of 
XDG_RUNTIME_DIR to the login monitoring program (which will most likely 
be Turnstile), see 
https://skarnet.org/lists/supervision/3117.html. I do 
not think this is the best idea. Instead, I want to push as much basic 
functionality as possible to the s6/s6-rc services, for the following 
reasons:
1) s6/s6-rc is simple, fast and reliable
2) this allows for an easier future substitution of external programs 
used (e.g. substituting Turnstile for an alternative)
3) This allows for more fine grained control by the 
sysadmins/distribution contributors.
4) The service setting up and supervising the user tree is perfectly 
suited for this, my current, working implementation of creating and 
deleting XDG_RUNTIME_DIR containing the live dir consists of two lines 
of execline
Do you all have any objections/see any issues with the XDG Base 
Directory Specification and adhering to them?
Do you see any issues with my idea of how to handle the XDG_RUNTIME_DIR?
Any input is welcome!
Paul
Received on Sat Jul 06 2024 - 01:35:23 CEST