LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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, 12:20 PM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
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, 07:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,693
Blog Entries: 54

Rep: Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961
If you (can) use Gdm, check out /etc/X11/gdm/PreSession and /etc/X11/gdm/PostSession.
 
Old 08-16-2006, 07: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: 64
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 08:11 AM
Mandriva reboots when using graphical programs Diagmato Mandriva 2 07-20-2005 05:39 PM
Graphical Programs over ssh andrewguy9 Linux - Software 2 02-24-2005 09:30 AM
KDE crash handler when exiting programs Klas Mandriva 9 08-30-2004 12:03 AM
exiting x desktop karupt Linux - Newbie 6 03-06-2004 01:05 AM


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

Main Menu
Advertisement
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