Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-03-04 12:37:04

GameLostException
Member
Registered: 2024-03-04
Posts: 3

Logout Dialog: is there a way to hook on the various options?

When shutting down or restarting my system with the XFCE4 LogoutDialog, everything's fine expect for Chrome which is systematically forced-quit: looks like it receives a SIG-KILL rather than a SIG-TERM as it looks unhappy upon next boot, i.e. it shows that it did not shutdown "properly" and offers to reopen the last known tabs.

When shutting down more "manually" with something like this, run as root:

pkill chrome
xfce4-session-logout
systemctl poweroff

Chrome looks happy upon next boot, i.e. it re-opens all its tabs automatically.

My question: is there a way I could hook my own "pre-shutdown/restart" logic when I use the Shutdown or Restart buttons of the XFCE4 Logout Dialog?


Cheers

Offline

#2 2024-03-04 13:07:54

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 528

Re: Logout Dialog: is there a way to hook on the various options?

It would help to know what distribution and version of Xfce4 you are using. I'm not seeing the behavior your describing and I find Chrome can be erratic and unstable at times.


Siduction
Debian Sid
Xfce 4.18

Offline

#3 2024-03-04 13:28:20

GameLostException
Member
Registered: 2024-03-04
Posts: 3

Re: Logout Dialog: is there a way to hook on the various options?

Thanks. It may help indeed, here you go:

--------------
OS: Arch Linux x86_64
Host: XPS 15 9520
Kernel: 6.6.20-1-lts
Packages: 1058 (pacman)
Shell: zsh 5.9
Resolution: 1920x1200, 1920x1200, 1920x1200
DE: Xfce 4.18
WM: awesome
Theme: Adwaita-dark [GTK2/3]
Icons: elementary [GTK2/3]
Terminal: kitty
CPU: 12th Gen Intel i9-12900HK (20) @ 4.900GHz
GPU: Intel Alder Lake-P GT2 [Iris Xe Graphics]
GPU: NVIDIA GeForce RTX 3050 Ti Mobile
Memory: 20753MiB / 31769MiB

My system is quite stable, apart from this Chrome glitch, no complaints.

Offline

#4 2024-03-04 18:38:37

JayGursky
Member
Registered: 2023-07-04
Posts: 21

Re: Logout Dialog: is there a way to hook on the various options?

GameLostException wrote:

My question: is there a way I could hook my own "pre-shutdown/restart" logic when I use the Shutdown or Restart buttons of the XFCE4 Logout Dialog?

With "Session and Startup" program we can add not only commands to run at the start but also at logout, shutdown etc.
Try "Add" and see drop-down options.

If that doesn't work for some case, there is a trick with
/usr/local/bin/xfce4-session-logout
https://forum.xfce.org/viewtopic.php?pid=45584#p45584

Offline

#5 2024-03-07 17:12:23

GameLostException
Member
Registered: 2024-03-04
Posts: 3

Re: Logout Dialog: is there a way to hook on the various options?

Brilliant, thanks Jay! I totally overlooked it and it completely fills my needs.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 533.85 KiB (Peak: 534.7 KiB) ]