dbus session bus initialization under openbox minimal desktop





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















everyone. Looking for some help understanding dbus in an effort to better understand what I need to do to run a minimal desktop (openbox in this case).



Goal:



Find out if openbox/dbus behavior is expected, and learn a bit more about how dbus works.



Scenario:



Clean install of Ubuntu Mate 18.10, then I installed Openbox and selected it from the LightDM Greeter, thus kicking off the openbox-session script, not just raw openbox. I observed that the tint2 systray did load but when I ran (for instance) nm_applet, the icon wouldn't show up. I did however find that when I ran nm_applet via sudo nm_applet or dbus-launch nm_applet then its icon did show up.



That's not ideal and I needed to get a session bus going that all of my session processes could use. Digging around I eventually wound up at Gentoo's wiki page for Openbox: https://wiki.gentoo.org/wiki/Openbox



It specified that in openbox's 'environment' file, one should put the following (among another couple of things that were suggested):



if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi


which I tried. Then when I started up Openbox, manually started nm_applet (without root and without dbus-launch) then its icon DID appear in systray.



The part I need help with:



I observed though (having tried it several times on several machines) that the first time that 'environment' file is used where the dbus-launch command is eval'd was the only time that it seemed to be required. On subsequent boots where I just let it use an entirely empty 'environment' file, nm_applet (and other applets - bluetooth, keepass, etc) still had their icons in the systray.



So... is that normal or expected? I've got a very flimsy grasp on dbus and how it works and I can't fathom why subsequent loads WITHOUT that eval'd dbus-launch line would still allow systray and applets to communicate across the session bus. It feels to me like the session bus wasn't "initialized" or something until after the first time that line ran, and thereafter something was cached somewhere to allow that session bus to continue to function as normal...










share|improve this question







New contributor




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



























    0















    everyone. Looking for some help understanding dbus in an effort to better understand what I need to do to run a minimal desktop (openbox in this case).



    Goal:



    Find out if openbox/dbus behavior is expected, and learn a bit more about how dbus works.



    Scenario:



    Clean install of Ubuntu Mate 18.10, then I installed Openbox and selected it from the LightDM Greeter, thus kicking off the openbox-session script, not just raw openbox. I observed that the tint2 systray did load but when I ran (for instance) nm_applet, the icon wouldn't show up. I did however find that when I ran nm_applet via sudo nm_applet or dbus-launch nm_applet then its icon did show up.



    That's not ideal and I needed to get a session bus going that all of my session processes could use. Digging around I eventually wound up at Gentoo's wiki page for Openbox: https://wiki.gentoo.org/wiki/Openbox



    It specified that in openbox's 'environment' file, one should put the following (among another couple of things that were suggested):



    if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
    eval `dbus-launch --sh-syntax --exit-with-session`
    fi


    which I tried. Then when I started up Openbox, manually started nm_applet (without root and without dbus-launch) then its icon DID appear in systray.



    The part I need help with:



    I observed though (having tried it several times on several machines) that the first time that 'environment' file is used where the dbus-launch command is eval'd was the only time that it seemed to be required. On subsequent boots where I just let it use an entirely empty 'environment' file, nm_applet (and other applets - bluetooth, keepass, etc) still had their icons in the systray.



    So... is that normal or expected? I've got a very flimsy grasp on dbus and how it works and I can't fathom why subsequent loads WITHOUT that eval'd dbus-launch line would still allow systray and applets to communicate across the session bus. It feels to me like the session bus wasn't "initialized" or something until after the first time that line ran, and thereafter something was cached somewhere to allow that session bus to continue to function as normal...










    share|improve this question







    New contributor




    scooterx3 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








      everyone. Looking for some help understanding dbus in an effort to better understand what I need to do to run a minimal desktop (openbox in this case).



      Goal:



      Find out if openbox/dbus behavior is expected, and learn a bit more about how dbus works.



      Scenario:



      Clean install of Ubuntu Mate 18.10, then I installed Openbox and selected it from the LightDM Greeter, thus kicking off the openbox-session script, not just raw openbox. I observed that the tint2 systray did load but when I ran (for instance) nm_applet, the icon wouldn't show up. I did however find that when I ran nm_applet via sudo nm_applet or dbus-launch nm_applet then its icon did show up.



      That's not ideal and I needed to get a session bus going that all of my session processes could use. Digging around I eventually wound up at Gentoo's wiki page for Openbox: https://wiki.gentoo.org/wiki/Openbox



      It specified that in openbox's 'environment' file, one should put the following (among another couple of things that were suggested):



      if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
      eval `dbus-launch --sh-syntax --exit-with-session`
      fi


      which I tried. Then when I started up Openbox, manually started nm_applet (without root and without dbus-launch) then its icon DID appear in systray.



      The part I need help with:



      I observed though (having tried it several times on several machines) that the first time that 'environment' file is used where the dbus-launch command is eval'd was the only time that it seemed to be required. On subsequent boots where I just let it use an entirely empty 'environment' file, nm_applet (and other applets - bluetooth, keepass, etc) still had their icons in the systray.



      So... is that normal or expected? I've got a very flimsy grasp on dbus and how it works and I can't fathom why subsequent loads WITHOUT that eval'd dbus-launch line would still allow systray and applets to communicate across the session bus. It feels to me like the session bus wasn't "initialized" or something until after the first time that line ran, and thereafter something was cached somewhere to allow that session bus to continue to function as normal...










      share|improve this question







      New contributor




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












      everyone. Looking for some help understanding dbus in an effort to better understand what I need to do to run a minimal desktop (openbox in this case).



      Goal:



      Find out if openbox/dbus behavior is expected, and learn a bit more about how dbus works.



      Scenario:



      Clean install of Ubuntu Mate 18.10, then I installed Openbox and selected it from the LightDM Greeter, thus kicking off the openbox-session script, not just raw openbox. I observed that the tint2 systray did load but when I ran (for instance) nm_applet, the icon wouldn't show up. I did however find that when I ran nm_applet via sudo nm_applet or dbus-launch nm_applet then its icon did show up.



      That's not ideal and I needed to get a session bus going that all of my session processes could use. Digging around I eventually wound up at Gentoo's wiki page for Openbox: https://wiki.gentoo.org/wiki/Openbox



      It specified that in openbox's 'environment' file, one should put the following (among another couple of things that were suggested):



      if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
      eval `dbus-launch --sh-syntax --exit-with-session`
      fi


      which I tried. Then when I started up Openbox, manually started nm_applet (without root and without dbus-launch) then its icon DID appear in systray.



      The part I need help with:



      I observed though (having tried it several times on several machines) that the first time that 'environment' file is used where the dbus-launch command is eval'd was the only time that it seemed to be required. On subsequent boots where I just let it use an entirely empty 'environment' file, nm_applet (and other applets - bluetooth, keepass, etc) still had their icons in the systray.



      So... is that normal or expected? I've got a very flimsy grasp on dbus and how it works and I can't fathom why subsequent loads WITHOUT that eval'd dbus-launch line would still allow systray and applets to communicate across the session bus. It feels to me like the session bus wasn't "initialized" or something until after the first time that line ran, and thereafter something was cached somewhere to allow that session bus to continue to function as normal...







      dbus openbox






      share|improve this question







      New contributor




      scooterx3 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




      scooterx3 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




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









      asked 2 days ago









      scooterx3scooterx3

      1




      1




      New contributor




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





      New contributor





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






      scooterx3 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: "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',
          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
          });


          }
          });






          scooterx3 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%2faskubuntu.com%2fquestions%2f1132293%2fdbus-session-bus-initialization-under-openbox-minimal-desktop%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








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










          draft saved

          draft discarded


















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













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












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
















          Thanks for contributing an answer to Ask Ubuntu!


          • 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%2faskubuntu.com%2fquestions%2f1132293%2fdbus-session-bus-initialization-under-openbox-minimal-desktop%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

          GameSpot

          connect to host localhost port 22: Connection refused

          Getting a Wifi WPA2 wifi connection