Is there a good way to run a script at logout (that is, xfce4-session-logout)?
1) Rename /usr/bin/xfce4-session-logout and replace it with a script which ends by calling the renamed xfce4-session-logout. https://forum.xfce.org/viewtopic.php?id=10859 This works, but I don't like it.
2) In /etc/lightdm/lightdm.conf, session-cleanup-script=my-script: "The script runs when I log out by restarting the machine, but it does not run when I merely log out without restarting." https://ubuntuforums.org/showthread.php?t=1918649
3) command in .bash_logout "does not run for an ordinary logout." https://superuser.com/questions/410525/ ... -commands
Thanks
How to run script at logout? (solved)
How to run script at logout? (solved)
Last edited by Vincent17 on Tue Jul 30, 2019 4:40 pm, edited 1 time in total.
Re: How to run script at logout?
MX does this with XFCE4 already, in order to run the "shutdown" sound. The file is /usr/local/bin/xfce4-session. There is another script also, /usr/local/bin/xfce4-session-logout.
You could edit one of these?
You could edit one of these?
Desktop: Mini-Box M350 with Asus H110i-plus motherboard, Pentium G4600 processor, 2TB SSD and 16Gb RAM DDR4-2133
Printer/Scanner: Brother MFC-J5335W
Laptop: Lenovo V15 ADA
Media Centre: Lenovo Q190
Printer/Scanner: Brother MFC-J5335W
Laptop: Lenovo V15 ADA
Media Centre: Lenovo Q190
- dolphin_oracle
- Developer
- Posts: 19926
- Joined: Sun Dec 16, 2007 1:17 pm
Re: How to run script at logout?
mx19 will support this feature. for 18, you will need to do as davemx says.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Re: How to run script at logout?
Yes, I should have said. XFCE is adding the feature you want to XFCE4.14, so you might want to wait until until MX19. You have to admire the MX devs for their inventiveness in adding features to XFCE via the /usr/local folders, hopefully their job will be simplified!dolphin_oracle wrote: ↑Tue Jul 30, 2019 4:26 pm mx19 will support this feature. for 18, you will need to do as davemx says.
Desktop: Mini-Box M350 with Asus H110i-plus motherboard, Pentium G4600 processor, 2TB SSD and 16Gb RAM DDR4-2133
Printer/Scanner: Brother MFC-J5335W
Laptop: Lenovo V15 ADA
Media Centre: Lenovo Q190
Printer/Scanner: Brother MFC-J5335W
Laptop: Lenovo V15 ADA
Media Centre: Lenovo Q190
Re: How to run script at logout?
Thanks to both of you. This will do nicely!