Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Re: need to run shell script at gdm log out



 Mike wrote: 
> I'm looking for a way to run a shell script automatically every time a 
> user logs out of Gnome or attempts to shut down the computer. Is this 
> possible? 
> 
> What I'm trying to do is to back up the users home directory to a back 
> up directory on a server, every time the user initiates a shut down. 

That's easy, though the exaxt details depend on your OS.  Just use the 
/etc/init.d subsystem to make a K script for runlevel 5 (on my OS, that 
would mean putting a script in /etc/rc.d/rc5.d/ starting with a K. 
Whenever you exit X and return to runlevel 3 (or shut down), that script 
will be run, 

THere's also ~/.bash_logout 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 

_______________________________________________ 
Discuss mailing list 
[hidden email] 
http://lists.blu.org/mailman/listinfo/discuss
 


BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org