.bash_logout file seems to not work

Forum rules
Before you post please read how to get help
Post Reply
bzimmerly
Level 1
Level 1
Posts: 1
Joined: Wed Nov 11, 2015 11:54 am

.bash_logout file seems to not work

Post by bzimmerly » Wed Nov 11, 2015 12:02 pm

FACTS:

1. I'm using the latest Mint Linux I know of; 17.

2. I want to run a script whenever I log out of my workstation.

3. I've tried to use .bash_logout, but it doesn't work. (It doesn't run AT ALL when I logout!)

I've read many threads on this that require editing other system files to get it working - most of which differ from version to version. Example: (I have no /etc/gdm directory in mine, but some posts suggest editing a file in THAT directory to get it working! ARG! :(

Why doesn't .bash_logout work in a freshly-installed Mint Linux 17?

JusTertii
Level 3
Level 3
Posts: 171
Joined: Tue Jul 29, 2014 11:21 pm

Re: .bash_logout file seems to not work

Post by JusTertii » Thu Nov 12, 2015 9:11 am

No idea, but to get useful help from someone who does, consider posting:

1. The output of

Code: Select all

 inxi -Fxz
(gets your system info)
2. The script itself (remember to use the Code tags)
3. A description of what you did, what happened, and what you expected to happen.

Good luck!

JT

User avatar
karlchen
Level 20
Level 20
Posts: 11504
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: .bash_logout file seems to not work

Post by karlchen » Thu Nov 12, 2015 11:10 am

Hello, bzimmerly.

When you logout from Linux Mint, you will not logout from the bash, but from the graphical desktop actually, Cinnamon / Mate / KDE / xfce. This is why you do not see the effect of any .bash_logout.
If, however, you login to one of the pseudo console monitors tty1 to tty6 and logout from them, you should see what .bash_logout does, provided you put something in it which will generate some visual feedback.

HTH,
Karl
Image
Linux Mint 19.2 64-bit Cinnamon, Total Commander 9.22a 64-bit
Haß gleicht einer Krankheit, dem Miserere, wo man vorne herausgibt, was eigentlich hinten wegsollte. (Goethe)

chrisonmint
Level 3
Level 3
Posts: 143
Joined: Sun May 03, 2015 10:49 am

Re: .bash_logout file seems to not work

Post by chrisonmint » Fri Jan 15, 2016 3:46 pm

karlchen wrote:Hello, bzimmerly.

When you logout from Linux Mint, you will not logout from the bash, but from the graphical desktop actually, Cinnamon / Mate / KDE / xfce. This is why you do not see the effect of any .bash_logout.
If, however, you login to one of the pseudo console monitors tty1 to tty6 and logout from them, you should see what .bash_logout does, provided you put something in it which will generate some visual feedback.

HTH,
Karl
Hi Karl,

thanks for writing this comment - I saw that the bash_logout script wasnt run when logging out of cinnamon.

I really need to run a short script when I log out, is there something I can set up either with cinnamon or the MDM?

thanks
chris

Post Reply

Return to “Scripts & Bash”