2
I'm running Linux Mint. I have a script the gets run whenever I login that remaps my mouse buttons. However, when the computer suspends, the mouse buttons revert to their default mapping.
I'd like to have my script re-run whenever the computer awakes from suspend. How can I do this? Currently I'm just calling the script from the "Startup Applications" control panel.
I already tried putting some copies of my script in subdirectories within /etc/pm
, but that didn't work.
EDIT: Actually when my computer comes out of suspend, sometimes the mouse mapping hasn't been reset. But when I turn the monitors off, then back on (using their power buttons) the mouse mapping has always been reset. How can I prevent this? (Or where can I put a script so it will run when the monitors turn back on?)
It's executable. I added
sudo -u
but that didn't fix it, though clearly I needed to add that---just forget to include that before. Thanks for pointing that out. – Jeff – 2013-08-11T21:43:17.350+1 for showing thaw|resume - the template script I was looking for only had thaw, and I needed resume to get out of a sleep, rather then suspend state. – davidgo – 2013-09-01T08:36:29.933