Originally posted by zer0halo
Thanks so much. Exactly what I needed.
I presume that scripts placed in rc6.d execute on logoff even if the computer isn't rebooted?
I'm fairly new to linux myself so I don't know. It depends if linux goes into runlevel 6 when you logout. I don't think it does (can someone else confirm this?).
I just remembered another way to execute scripts. Add a .logout file to your home directory. I believe you must make it executable for it to work (use chmod +x .logout
). Scripts inside the .logout file will get executed whenever you logout. You might want to put scripts there instead of rc6.d. (sorry I didn't remember it before). Hope this helps.