xscreensaver: How do I run a script on unlock?

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











up vote
11
down vote

favorite












I'd like to run a screen if the XFCE session is locked and unlocked. Is there a way that I can intercept this and perform certain actions when the desktop is locked or unlocked?



I see that it is possible in Ubuntu; but I'd like to achieve this in Xubuntu.



I can't seem to find any events triggered by xscreensaver when it quits...










share|improve this question



























    up vote
    11
    down vote

    favorite












    I'd like to run a screen if the XFCE session is locked and unlocked. Is there a way that I can intercept this and perform certain actions when the desktop is locked or unlocked?



    I see that it is possible in Ubuntu; but I'd like to achieve this in Xubuntu.



    I can't seem to find any events triggered by xscreensaver when it quits...










    share|improve this question

























      up vote
      11
      down vote

      favorite









      up vote
      11
      down vote

      favorite











      I'd like to run a screen if the XFCE session is locked and unlocked. Is there a way that I can intercept this and perform certain actions when the desktop is locked or unlocked?



      I see that it is possible in Ubuntu; but I'd like to achieve this in Xubuntu.



      I can't seem to find any events triggered by xscreensaver when it quits...










      share|improve this question















      I'd like to run a screen if the XFCE session is locked and unlocked. Is there a way that I can intercept this and perform certain actions when the desktop is locked or unlocked?



      I see that it is possible in Ubuntu; but I'd like to achieve this in Xubuntu.



      I can't seem to find any events triggered by xscreensaver when it quits...







      xfce xubuntu screen-lock






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 31 at 10:44









      unhammer

      17011




      17011










      asked Jan 16 '12 at 18:10









      Martijn

      18318




      18318




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          8
          down vote



          accepted










          xscreensaver has a -watch option:




          -watch    Prints a line each time the screensaver changes state: when the screen blanks, locks, unblanks, or when the running hack is changed. This option never returns; it is intended for use by shell scripts that want to react to the screensaver in some way.1


          The UNBLANK state is what you are looking for. The manual includes an example script using these options.



          1. http://www.jwz.org/xscreensaver/man3.html






          share|improve this answer




















          • Is there a way to tell xfce4 to run xscreensaver in the described way and have a script listen to its output?
            – KB22
            Jan 2 '15 at 17:18






          • 1




            Found it, nevermind. bbs.archlinux.org/viewtopic.php?pid=1182514
            – KB22
            Jan 2 '15 at 17:24










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          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: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f29232%2fxscreensaver-how-do-i-run-a-script-on-unlock%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          8
          down vote



          accepted










          xscreensaver has a -watch option:




          -watch    Prints a line each time the screensaver changes state: when the screen blanks, locks, unblanks, or when the running hack is changed. This option never returns; it is intended for use by shell scripts that want to react to the screensaver in some way.1


          The UNBLANK state is what you are looking for. The manual includes an example script using these options.



          1. http://www.jwz.org/xscreensaver/man3.html






          share|improve this answer




















          • Is there a way to tell xfce4 to run xscreensaver in the described way and have a script listen to its output?
            – KB22
            Jan 2 '15 at 17:18






          • 1




            Found it, nevermind. bbs.archlinux.org/viewtopic.php?pid=1182514
            – KB22
            Jan 2 '15 at 17:24














          up vote
          8
          down vote



          accepted










          xscreensaver has a -watch option:




          -watch    Prints a line each time the screensaver changes state: when the screen blanks, locks, unblanks, or when the running hack is changed. This option never returns; it is intended for use by shell scripts that want to react to the screensaver in some way.1


          The UNBLANK state is what you are looking for. The manual includes an example script using these options.



          1. http://www.jwz.org/xscreensaver/man3.html






          share|improve this answer




















          • Is there a way to tell xfce4 to run xscreensaver in the described way and have a script listen to its output?
            – KB22
            Jan 2 '15 at 17:18






          • 1




            Found it, nevermind. bbs.archlinux.org/viewtopic.php?pid=1182514
            – KB22
            Jan 2 '15 at 17:24












          up vote
          8
          down vote



          accepted







          up vote
          8
          down vote



          accepted






          xscreensaver has a -watch option:




          -watch    Prints a line each time the screensaver changes state: when the screen blanks, locks, unblanks, or when the running hack is changed. This option never returns; it is intended for use by shell scripts that want to react to the screensaver in some way.1


          The UNBLANK state is what you are looking for. The manual includes an example script using these options.



          1. http://www.jwz.org/xscreensaver/man3.html






          share|improve this answer












          xscreensaver has a -watch option:




          -watch    Prints a line each time the screensaver changes state: when the screen blanks, locks, unblanks, or when the running hack is changed. This option never returns; it is intended for use by shell scripts that want to react to the screensaver in some way.1


          The UNBLANK state is what you are looking for. The manual includes an example script using these options.



          1. http://www.jwz.org/xscreensaver/man3.html







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 16 '12 at 18:37









          jasonwryan

          47.4k14128178




          47.4k14128178











          • Is there a way to tell xfce4 to run xscreensaver in the described way and have a script listen to its output?
            – KB22
            Jan 2 '15 at 17:18






          • 1




            Found it, nevermind. bbs.archlinux.org/viewtopic.php?pid=1182514
            – KB22
            Jan 2 '15 at 17:24
















          • Is there a way to tell xfce4 to run xscreensaver in the described way and have a script listen to its output?
            – KB22
            Jan 2 '15 at 17:18






          • 1




            Found it, nevermind. bbs.archlinux.org/viewtopic.php?pid=1182514
            – KB22
            Jan 2 '15 at 17:24















          Is there a way to tell xfce4 to run xscreensaver in the described way and have a script listen to its output?
          – KB22
          Jan 2 '15 at 17:18




          Is there a way to tell xfce4 to run xscreensaver in the described way and have a script listen to its output?
          – KB22
          Jan 2 '15 at 17:18




          1




          1




          Found it, nevermind. bbs.archlinux.org/viewtopic.php?pid=1182514
          – KB22
          Jan 2 '15 at 17:24




          Found it, nevermind. bbs.archlinux.org/viewtopic.php?pid=1182514
          – KB22
          Jan 2 '15 at 17:24

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f29232%2fxscreensaver-how-do-i-run-a-script-on-unlock%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?