You are not logged in.

#21 2016-06-03 01:44:08

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,568
Website

Re: "Close open windows" script for shutdown.

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 )

Introduction to the Bunsenlabs Boron Desktop

Offline

#22 2016-06-03 03:12:52

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: "Close open windows" script for shutdown.

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

#23 2016-06-03 05:01:10

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,568
Website

Re: "Close open windows" script for shutdown.

^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 )

Introduction to the Bunsenlabs Boron Desktop

Offline

#24 2016-06-03 05:53:10

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: "Close open windows" script for shutdown.

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

#25 2016-06-03 23:45:30

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: "Close open windows" script for shutdown.

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

Board footer

Powered by FluxBB