Run a script every time my display turns on?

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








up vote
1
down vote

favorite












I'm on Ubuntu 16.04 using a Nvidia GTX 950. How would I set up a script to run every time my display turns on or wakes up?










share|improve this question





















  • You don't mean when lid open? right? So by "turns on" what do you mean? or wakeup?
    – Î±Ò“sнιη
    Mar 31 at 16:17










  • When I turn my monitor on. If it were a laptop then yeah, every time the lid opens. I don't know if there's a technical difference between pressing the power button or just waking it up by moving my mouse around after it's gone to sleep, would it affect the script?
    – lightspectra
    Mar 31 at 16:26










  • Maybe this Stack Overflow question will help.
    – devius
    Mar 31 at 16:51










  • This might be related to run a script when HDMI screen is plugged or unplugged: askubuntu.com/questions/874506/…
    – WinEunuuchs2Unix
    Mar 31 at 17:16














up vote
1
down vote

favorite












I'm on Ubuntu 16.04 using a Nvidia GTX 950. How would I set up a script to run every time my display turns on or wakes up?










share|improve this question





















  • You don't mean when lid open? right? So by "turns on" what do you mean? or wakeup?
    – Î±Ò“sнιη
    Mar 31 at 16:17










  • When I turn my monitor on. If it were a laptop then yeah, every time the lid opens. I don't know if there's a technical difference between pressing the power button or just waking it up by moving my mouse around after it's gone to sleep, would it affect the script?
    – lightspectra
    Mar 31 at 16:26










  • Maybe this Stack Overflow question will help.
    – devius
    Mar 31 at 16:51










  • This might be related to run a script when HDMI screen is plugged or unplugged: askubuntu.com/questions/874506/…
    – WinEunuuchs2Unix
    Mar 31 at 17:16












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm on Ubuntu 16.04 using a Nvidia GTX 950. How would I set up a script to run every time my display turns on or wakes up?










share|improve this question













I'm on Ubuntu 16.04 using a Nvidia GTX 950. How would I set up a script to run every time my display turns on or wakes up?







command-line scripts display






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 31 at 15:28









lightspectra

133




133











  • You don't mean when lid open? right? So by "turns on" what do you mean? or wakeup?
    – Î±Ò“sнιη
    Mar 31 at 16:17










  • When I turn my monitor on. If it were a laptop then yeah, every time the lid opens. I don't know if there's a technical difference between pressing the power button or just waking it up by moving my mouse around after it's gone to sleep, would it affect the script?
    – lightspectra
    Mar 31 at 16:26










  • Maybe this Stack Overflow question will help.
    – devius
    Mar 31 at 16:51










  • This might be related to run a script when HDMI screen is plugged or unplugged: askubuntu.com/questions/874506/…
    – WinEunuuchs2Unix
    Mar 31 at 17:16
















  • You don't mean when lid open? right? So by "turns on" what do you mean? or wakeup?
    – Î±Ò“sнιη
    Mar 31 at 16:17










  • When I turn my monitor on. If it were a laptop then yeah, every time the lid opens. I don't know if there's a technical difference between pressing the power button or just waking it up by moving my mouse around after it's gone to sleep, would it affect the script?
    – lightspectra
    Mar 31 at 16:26










  • Maybe this Stack Overflow question will help.
    – devius
    Mar 31 at 16:51










  • This might be related to run a script when HDMI screen is plugged or unplugged: askubuntu.com/questions/874506/…
    – WinEunuuchs2Unix
    Mar 31 at 17:16















You don't mean when lid open? right? So by "turns on" what do you mean? or wakeup?
– Î±Ò“sнιη
Mar 31 at 16:17




You don't mean when lid open? right? So by "turns on" what do you mean? or wakeup?
– Î±Ò“sнιη
Mar 31 at 16:17












When I turn my monitor on. If it were a laptop then yeah, every time the lid opens. I don't know if there's a technical difference between pressing the power button or just waking it up by moving my mouse around after it's gone to sleep, would it affect the script?
– lightspectra
Mar 31 at 16:26




When I turn my monitor on. If it were a laptop then yeah, every time the lid opens. I don't know if there's a technical difference between pressing the power button or just waking it up by moving my mouse around after it's gone to sleep, would it affect the script?
– lightspectra
Mar 31 at 16:26












Maybe this Stack Overflow question will help.
– devius
Mar 31 at 16:51




Maybe this Stack Overflow question will help.
– devius
Mar 31 at 16:51












This might be related to run a script when HDMI screen is plugged or unplugged: askubuntu.com/questions/874506/…
– WinEunuuchs2Unix
Mar 31 at 17:16




This might be related to run a script when HDMI screen is plugged or unplugged: askubuntu.com/questions/874506/…
– WinEunuuchs2Unix
Mar 31 at 17:16















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%2f1020857%2frun-a-script-every-time-my-display-turns-on%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%2f1020857%2frun-a-script-every-time-my-display-turns-on%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