Re: Command-Q and third party window managers
Re: Command-Q and third party window managers
- Subject: Re: Command-Q and third party window managers
- From: Cameron Simpson <email@hidden>
- Date: Fri, 29 May 2009 08:45:17 +1000
On 28May2009 16:53, Ken Preslan <email@hidden> wrote:
| When I'm using QuartzWM and hit Command-Q, a nice window pops up asking
| me if I'm sure I want to quit X11. When I'm using another window
| manager (fvwm) and accidentally hit Command-Q, all 20 of my X11 windows
| disappear and I end up swearing very loudly.
|
| Is there a way to get that pop-up to appear for other window managers?
Warning: totally untested speculation below. Will test sometime...
I'm presuming that Command-Q sends a SIGTERM to the main process associated
with the X11 session. When that exits, the X11 server exits.
Usually a session is written to wait for the window manager (or, more
efficiently, the exec the window manager, such that the WM lifespan becomes
the session lifespan).
So...
Make your session catch SIGTERM (or whatever signal it is, possibly
SIGHUP), and get FVWM to ask.
trap 'FvwmCommand "Popup QuitMenu"' 1 15
fvwm &
wait
Of course, QuitMenu will be a small menu you define to offer to Quit
(or perhaps restart FVWM etc).
I think such an approach should work.
Cheers,
--
Cameron Simpson <email@hidden> DoD#743
http://www.cskk.ezoshosting.com/cs/
We had the experience, but missed the meaning. - T.S. Eliot
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden