PDA

View Full Version : [ubuntu] run custom script on gnome3 shutdown



RikoW
January 3rd, 2012, 09:19 AM
Dear all,

how do I execute a custom script when gnome3 shuts down either via logout or shutdown of the computer?

I always have VMware virtual machines running in the background. I want to suspend them automatically before the gnome session closes. So I somehow need to tab into the gnome shutdown sequence.

Thanks and cheers,
Riko

Bobhuber
January 4th, 2012, 01:24 AM
Dear all,

how do I execute a custom script when gnome3 shuts down either via logout or shutdown of the computer?

I always have VMware virtual machines running in the background. I want to suspend them automatically before the gnome session closes. So I somehow need to tab into the gnome shutdown sequence.

Thanks and cheers,
Riko
Use cairo-dock or screenlets and create a desktop launcher to execute your script with < sudo shutdown now> as the last command in the script