AutoRun a Script at Screen Lock

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












How would I get this script to autorun everytime I unlock the screen after I take my computer out of standby?



#!/bin/bash



rm /tmp/.evrouter:0



/usr/local/bin/powermate



The Powermate command causes my Griffin Powermate to control volume via evrouter. For some reason, I need to remove the tmp file each time as well.



I am using Ubuntu 16.04,Cinnamon desktop



I cannot figure out how to get it to run automatically after unlocking the screen.



Thanks







share|improve this question






















  • Please edit your question and clarify what you mean by "When I take my computer out of standby..." Do you mean when you wake your computer from sleep? When your computer sleeps you are not logged out. So you don't have to log in. You just need to unlock the screen. The commands that runs at login won't run when you wake your computer from sleep.
    – user68186
    Apr 19 at 18:18














up vote
0
down vote

favorite












How would I get this script to autorun everytime I unlock the screen after I take my computer out of standby?



#!/bin/bash



rm /tmp/.evrouter:0



/usr/local/bin/powermate



The Powermate command causes my Griffin Powermate to control volume via evrouter. For some reason, I need to remove the tmp file each time as well.



I am using Ubuntu 16.04,Cinnamon desktop



I cannot figure out how to get it to run automatically after unlocking the screen.



Thanks







share|improve this question






















  • Please edit your question and clarify what you mean by "When I take my computer out of standby..." Do you mean when you wake your computer from sleep? When your computer sleeps you are not logged out. So you don't have to log in. You just need to unlock the screen. The commands that runs at login won't run when you wake your computer from sleep.
    – user68186
    Apr 19 at 18:18












up vote
0
down vote

favorite









up vote
0
down vote

favorite











How would I get this script to autorun everytime I unlock the screen after I take my computer out of standby?



#!/bin/bash



rm /tmp/.evrouter:0



/usr/local/bin/powermate



The Powermate command causes my Griffin Powermate to control volume via evrouter. For some reason, I need to remove the tmp file each time as well.



I am using Ubuntu 16.04,Cinnamon desktop



I cannot figure out how to get it to run automatically after unlocking the screen.



Thanks







share|improve this question














How would I get this script to autorun everytime I unlock the screen after I take my computer out of standby?



#!/bin/bash



rm /tmp/.evrouter:0



/usr/local/bin/powermate



The Powermate command causes my Griffin Powermate to control volume via evrouter. For some reason, I need to remove the tmp file each time as well.



I am using Ubuntu 16.04,Cinnamon desktop



I cannot figure out how to get it to run automatically after unlocking the screen.



Thanks









share|improve this question













share|improve this question




share|improve this question








edited Apr 20 at 3:04

























asked Apr 19 at 18:12









kellyvotrenom

364




364











  • Please edit your question and clarify what you mean by "When I take my computer out of standby..." Do you mean when you wake your computer from sleep? When your computer sleeps you are not logged out. So you don't have to log in. You just need to unlock the screen. The commands that runs at login won't run when you wake your computer from sleep.
    – user68186
    Apr 19 at 18:18
















  • Please edit your question and clarify what you mean by "When I take my computer out of standby..." Do you mean when you wake your computer from sleep? When your computer sleeps you are not logged out. So you don't have to log in. You just need to unlock the screen. The commands that runs at login won't run when you wake your computer from sleep.
    – user68186
    Apr 19 at 18:18















Please edit your question and clarify what you mean by "When I take my computer out of standby..." Do you mean when you wake your computer from sleep? When your computer sleeps you are not logged out. So you don't have to log in. You just need to unlock the screen. The commands that runs at login won't run when you wake your computer from sleep.
– user68186
Apr 19 at 18:18




Please edit your question and clarify what you mean by "When I take my computer out of standby..." Do you mean when you wake your computer from sleep? When your computer sleeps you are not logged out. So you don't have to log in. You just need to unlock the screen. The commands that runs at login won't run when you wake your computer from sleep.
– user68186
Apr 19 at 18:18















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026484%2fautorun-a-script-at-screen-lock%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1026484%2fautorun-a-script-at-screen-lock%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491