LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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,499
Blog Entries: 2

Rep: Reputation: 68
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: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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,499

Original Poster
Blog Entries: 2

Rep: Reputation: 68
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:39 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
Open Source Consulting | Domain Registration