[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Calling a script when an Xsession ends



On Thu, Dec 16, 2004 at 01:36:28PM +0100, Nicos Gollan wrote:
> is there any generic way to have a script called when an X session is 
> terminating? Like an Xsession-end or something?

If you edit your ~/.xinitrc (for startx) or ~/.xsession (for the display
managers) you can add stuff after invoking the window manager, that stuff will
get run when you log out.  (unless the server crashes or something)

for example, your .xsession might be:

  xsetroot -solid midnightblue
  x-window-manager
  killall gpg-agent

I vaguely recall someone said .xsession was deprecated or something a little
while ago, I don't know about that, I use startx and .xinitrc



Reply to: