LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-15-2012, 02:12 AM   #1
Knightron
Senior Member
 
Registered: Jan 2011
Location: Planet Earth
Distribution: Slackware.
Posts: 1,344
Blog Entries: 7

Rep: Reputation: 159Reputation: 159
how t have a command launched when ever i logoff


Hello, i would like a command to be launched so i can remove some catch files, when ever i logoff. How does one go about doing this?
 
Old 02-15-2012, 02:17 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 189Reputation: 189
This will probably vary between distro and shell..
But with bash, creating a script and calling it from ~/.bash_logout, and(or) /etc/bash_logout should work.
 
Old 02-15-2012, 03:40 PM   #3
Knightron
Senior Member
 
Registered: Jan 2011
Location: Planet Earth
Distribution: Slackware.
Posts: 1,344
Blog Entries: 7

Original Poster
Rep: Reputation: 159Reputation: 159
yes I am using bash. thanks for your help. will this work every time I logout on the GUI?
 
Old 02-15-2012, 04:51 PM   #4
PDock
Member
 
Registered: Aug 2004
Distribution: Slack10 & curr. tried numerous
Posts: 189

Rep: Reputation: 36
My experience was this did not work if your system directly [ie run level 4] boots a gui login. If you use startx after login then close the window manager and logout via bash it works fine. Now this was at least six years ago.
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
force logoff a user from the command line? cccc Debian 6 10-05-2011 05:32 PM
which command is resposible for logoff action though desktop? redhotiron Linux - Desktop 2 07-22-2007 10:12 AM
logoff scripts wwnexc Linux - Security 2 09-06-2005 04:24 PM
Problem regarding logoff anoopkv1 Linux - Software 1 03-30-2005 12:56 PM
X Windows LOGOFF anima_a_ignifer Linux - Software 0 11-06-2002 08:23 AM


All times are GMT -5. The time now is 05:51 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