Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am working on creating a workstation that multiple users will use. I automatically mount their network drive and on logout I want to automatically umount the network drive. I am able to mount the network drive fine but it seems to me that the .bash_logout file is not running on logout. My bash logout file looks as follows:
I used the mkdir command to test that the .bash_logout file was running. It was not, the test folder was not created. Does anyone have any idea why my .bash_logout file is not working?
I'm already using the /bin/bash shell. It doesn't matter if I use root or another user the .bash_logout file will not run on logout. So did I accidentally disable the .bash_logout from running some where?
I tried running the .bash_logout from another linux machine and it didn't' work either. BUT it does work when I login\logout using a command line interface (ctrl-alt-f1) my bash_logout script is run. I'm using KDE with kdm as my login manager. Is this something to do with KDE or kdm that they no longer use the .bash_logout file?
I tried xdm and gdm also so, I don't know...
I think I will try to attach a bash file to the Xsession file which(i think) runs every time that someone logs out to umount all my network drives. I just have to find the command to umount all network drives. I WILL figure out a way to run a shell script file some how when some one logs out. Any suggestions?
thanks again for all your help.
I was able to obtain my objective. I edited the file /etc/X11/xdm/Xsession which is run when ever someone logs in to the machine and I have it
umount -t ncpfs -all
which unmounts all my network drives as the new user logs in.
Thanks again to all who posted especially Tinkster.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.