proper way to execute a script at logout

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Rupertt

proper way to execute a script at logout

Post by Rupertt »

Hello,

im new to cinnamon.
What is the proper way to run a script when a user logs out or shuts down the PC?
I have an rsync which needs to copy some files regularely.

thnx
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Kalyk
Level 5
Level 5
Posts: 769
Joined: Wed Mar 12, 2014 5:29 pm
Location: The Netherlands

Re: proper way to execute a script at logout

Post by Kalyk »

Add (Solved) to the topic-title of the first post when appropriate so others know they might find a solution here.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: proper way to execute a script at logout

Post by Flemur »

Put stuff in you ~/.bash_logout file.

I'm not sure if this would run every time you close a terminal...
http://www.cyberciti.biz/faq/linux-unix ... u-log-out/

...but if it does, here's how to run something on last logout only:
http://unix.stackexchange.com/questions ... ast-logout
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Locked

Return to “Cinnamon”