LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 01:12 AM   #1
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,465
Blog Entries: 6

Rep: Reputation: 200Reputation: 200Reputation: 200
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, 01:17 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
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, 02:40 PM   #3
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,465

Original Poster
Blog Entries: 6

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

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



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 04:32 PM
which command is resposible for logoff action though desktop? redhotiron Linux - Desktop 2 07-22-2007 09:12 AM
logoff scripts wwnexc Linux - Security 2 09-06-2005 03:24 PM
Problem regarding logoff anoopkv1 Linux - Software 1 03-30-2005 11:56 AM
X Windows LOGOFF anima_a_ignifer Linux - Software 0 11-06-2002 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:08 PM.

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