You are not logged in.
If you add a script to bl-exit, be sure not to get recursive!
ie bl-exit calls shutdown.sh which calls bl-exit...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Yep. My intention is to symlink your script at the start of this thread in those directories. No change to bl-exit.
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
^Interesting idea. One potential problem: that script in rc0.d will be executed by root, while close_all_windows is a user script, executed while X is running and with the related X environment variables and cookies for that user's session. It might not work at all run by root, and the user's X session might have been closed down by the time those rc0.d scripts sre run. Too late.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Good call! So it's not the system shut-down event we want to hook into, but the user log-out event. Maybe this is more what we're after?
Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD
Offline
i think you have to ask yourself to what event the "Close all windows" script is connected.
it is not connected to shutdown.
it isn't even necessarily connected to logout.
most appropriately it is connected to ending the graphical session.
i'm sure there's some systemd event that corresponds to that. that's where you'd have to hook the script in.
btw, it is perfectly possible to run systemd services as a particular user.
and please don't confuse sysvinit and systemd - on a curent debian stable system they are mixed together somehow, but it is all going towards systemd in the end.
Offline