LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 08-11-2006, 11:20 AM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
How to run programs at exiting the graphical desktop


Dear friends,

How to run programs at exiting the graphical desktop ?

I know that I can put commands in ~/.bash_logout to run programs at the end of a login shell, but it does not work because my graphical session (KDE/Gnome) are started by a graphical desktop manager, and I never got a true login shell in that way.

Also, I don't want that every single shell runs a logout script at exit; only when I close the window manager.

any hints or ideas are welcome,
 
Old 08-12-2006, 06:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,139
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
If you (can) use Gdm, check out /etc/X11/gdm/PreSession and /etc/X11/gdm/PostSession.
 
Old 08-16-2006, 06:28 AM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Original Poster
Rep: Reputation: 63
Hi unSpawn !

Thanks for the hint and sorry the delay. I was busy at work and just now I had some time to play with my system.

Yes, you're right. In FC5 the file is /etc/gdm/PostSession/Default which is executed for every user at exit of the window manager.

I just had to add some code to execute a user script .
Code:
if [ -x ${HOME}/.postsession ]; then
       ${HOME}/.postsession
fi
Thank you !
 
  


Reply

Tags
logout


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run Graphical commands in remote Desktop. rktech83 Linux - Networking 7 03-09-2006 07:11 AM
Mandriva reboots when using graphical programs Diagmato Mandriva 2 07-20-2005 04:39 PM
Graphical Programs over ssh andrewguy9 Linux - Software 2 02-24-2005 08:30 AM
KDE crash handler when exiting programs Klas Mandriva 9 08-29-2004 11:03 PM
exiting x desktop karupt Linux - Newbie 6 03-06-2004 12:05 AM


All times are GMT -5. The time now is 12:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration