dbus-monitoring loop exits automaticallygnome-terminal new tab dbusdbus signal for volume up & downHow to...

Why, historically, did Gödel think CH was false?

Can I make popcorn with any corn?

Is it possible to do 50 km distance without any previous training?

What is the offset in a seaplane's hull?

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

How to find program name(s) of an installed package?

Smoothness of finite-dimensional functional calculus

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Why are electrically insulating heatsinks so rare? Is it just cost?

Why does Kotter return in Welcome Back Kotter?

Today is the Center

How to write a macro that is braces sensitive?

Is a tag line useful on a cover?

What's the point of deactivating Num Lock on login screens?

The use of multiple foreign keys on same column in SQL Server

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

How is it possible to have an ability score that is less than 3?

Modeling an IPv4 Address

Can divisibility rules for digits be generalized to sum of digits

Risk of getting Chronic Wasting Disease (CWD) in the United States?

Which models of the Boeing 737 are still in production?

How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)



dbus-monitoring loop exits automatically


gnome-terminal new tab dbusdbus signal for volume up & downHow to play Magnatune.com songs in Amarok via DBusUbuntu RFID Screensaver lock-unlockConnection to dbus session failedmonit fails to support dbus sessionDBus over Network (TCP)How to reliably attach to session DBUS over ssh?Dbus: How can I monitor process?Use MPRIS/dbus media commands within Firefox on Linux






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I'm trying to execute a bash command on screen lock/unlock.



Following tutorials & StackExchange questions, I came up with the following code:



#!/bin/bash
while true; then #added to try to solve the issue, but alas it did not
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
while read sign; do
case "$sign" in
*"boolean false"*) echo "Screen unlocked";;
*"boolean true"*) echo "Screen locked";;
esac
done
done


I launch the program with the folloing command:



nohup myprogram.sh &


Everything works well at start, but after a while (several hours), there is no more echoed output when screen is locked/unlocked.



Checking the output of ps aux | grep mycommand, I have the following result at start:



user  <pid1> 0.0 0.0 <number> <number> pts/2 S 13:01   0.00 /bin/bash myprogram.sh
user <pid2> 0.0 0.0 <number> <number> pts/2 S 13:01 0.00 /bin/bash myprogram.sh


After it breaks and does not emit messages anymore, then the ps output only show one line.



I'm using CentOS 6.5, with Gnome 2.28.



Would you have any insight about what could be happening?










share|improve this question







New contributor




Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    I'm trying to execute a bash command on screen lock/unlock.



    Following tutorials & StackExchange questions, I came up with the following code:



    #!/bin/bash
    while true; then #added to try to solve the issue, but alas it did not
    dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
    while read sign; do
    case "$sign" in
    *"boolean false"*) echo "Screen unlocked";;
    *"boolean true"*) echo "Screen locked";;
    esac
    done
    done


    I launch the program with the folloing command:



    nohup myprogram.sh &


    Everything works well at start, but after a while (several hours), there is no more echoed output when screen is locked/unlocked.



    Checking the output of ps aux | grep mycommand, I have the following result at start:



    user  <pid1> 0.0 0.0 <number> <number> pts/2 S 13:01   0.00 /bin/bash myprogram.sh
    user <pid2> 0.0 0.0 <number> <number> pts/2 S 13:01 0.00 /bin/bash myprogram.sh


    After it breaks and does not emit messages anymore, then the ps output only show one line.



    I'm using CentOS 6.5, with Gnome 2.28.



    Would you have any insight about what could be happening?










    share|improve this question







    New contributor




    Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I'm trying to execute a bash command on screen lock/unlock.



      Following tutorials & StackExchange questions, I came up with the following code:



      #!/bin/bash
      while true; then #added to try to solve the issue, but alas it did not
      dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
      while read sign; do
      case "$sign" in
      *"boolean false"*) echo "Screen unlocked";;
      *"boolean true"*) echo "Screen locked";;
      esac
      done
      done


      I launch the program with the folloing command:



      nohup myprogram.sh &


      Everything works well at start, but after a while (several hours), there is no more echoed output when screen is locked/unlocked.



      Checking the output of ps aux | grep mycommand, I have the following result at start:



      user  <pid1> 0.0 0.0 <number> <number> pts/2 S 13:01   0.00 /bin/bash myprogram.sh
      user <pid2> 0.0 0.0 <number> <number> pts/2 S 13:01 0.00 /bin/bash myprogram.sh


      After it breaks and does not emit messages anymore, then the ps output only show one line.



      I'm using CentOS 6.5, with Gnome 2.28.



      Would you have any insight about what could be happening?










      share|improve this question







      New contributor




      Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I'm trying to execute a bash command on screen lock/unlock.



      Following tutorials & StackExchange questions, I came up with the following code:



      #!/bin/bash
      while true; then #added to try to solve the issue, but alas it did not
      dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" |
      while read sign; do
      case "$sign" in
      *"boolean false"*) echo "Screen unlocked";;
      *"boolean true"*) echo "Screen locked";;
      esac
      done
      done


      I launch the program with the folloing command:



      nohup myprogram.sh &


      Everything works well at start, but after a while (several hours), there is no more echoed output when screen is locked/unlocked.



      Checking the output of ps aux | grep mycommand, I have the following result at start:



      user  <pid1> 0.0 0.0 <number> <number> pts/2 S 13:01   0.00 /bin/bash myprogram.sh
      user <pid2> 0.0 0.0 <number> <number> pts/2 S 13:01 0.00 /bin/bash myprogram.sh


      After it breaks and does not emit messages anymore, then the ps output only show one line.



      I'm using CentOS 6.5, with Gnome 2.28.



      Would you have any insight about what could be happening?







      gnome dbus






      share|improve this question







      New contributor




      Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked yesterday









      SilverspurSilverspur

      101




      101




      New contributor




      Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Silverspur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Silverspur is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1421882%2fdbus-monitoring-loop-exits-automatically%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Silverspur is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Silverspur is a new contributor. Be nice, and check out our Code of Conduct.













          Silverspur is a new contributor. Be nice, and check out our Code of Conduct.












          Silverspur is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1421882%2fdbus-monitoring-loop-exits-automatically%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

          Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

          VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...