PDA

View Full Version : [ubuntu] run script at startup/log off/hibernation/sleeping



lucacerone
December 18th, 2010, 05:17 PM
Dear all,
I created a simple script to synchronize my Documents
folder and a folder in a remote machine (it launches
Unison with several options to perform the operation).

I now would like to configure my laptop (Ubuntu 10.04)
so that this script is run in the following situations:

1) at startup (ok this is easy, I think to just use the Startup Applications
utility in the System menu).

2) before turning off. I'd like that when all the programs have been closed
(but before to disconnect the wireless)
the script is started so that all the work I've done on my laptop
is transferred on the remote machine.

3) when I hibernate my laptop (sometimes I don't turn it off,
but simply hibernate it).

4) just as a curiosity would like to know if it's possible to launch
a script that runs before turning

Thanks to all of you in advance for all your help!
Cheers, -Luca