How to start services (or targets) inside a session scope?I can't enable or disable a user service: Failed to execute operation: No such file or directoryAll services of a user are killed when running multiple services under this user with systemdmysql service restarted during user being connected lead to failing serviceCan't run application that depends on X as a systemd serviceWhy x0vncserver is not starting at boot?Why is systemd stopping service immediately after it is started?Instruct to execute an unit after completing another unit successfullysystemd: finish the execution of custom shell script before starting nginxCannot execute dotnet app as daemon serviceCan't properly stop SAP Hana on reboot / shutdown with systemd

Is HostGator storing my password in plaintext?

How to be diplomatic in refusing to write code that breaches the privacy of our users

Do all network devices need to make routing decisions, regardless of communication across networks or within a network?

System.debug(JSON.Serialize(o)) Not longer shows full string

Pole-zeros of a real-valued causal FIR system

when is out of tune ok?

CREATE opcode: what does it really do?

Is expanding the research of a group into machine learning as a PhD student risky?

Hostile work environment after whistle-blowing on coworker and our boss. What do I do?

What is the best translation for "slot" in the context of multiplayer video games?

Purchasing a ticket for someone else in another country?

Short story about space worker geeks who zone out by 'listening' to radiation from stars

Avoiding estate tax by giving multiple gifts

How can a function with a hole (removable discontinuity) equal a function with no hole?

Integer addition + constant, is it a group?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races

How can I kill an app using Terminal?

Term for the "extreme-extension" version of a straw man fallacy?

How does it work when somebody invests in my business?

Type int? vs type int

Is the destination of a commercial flight important for the pilot?

Why not increase contact surface when reentering the atmosphere?

What does "I’d sit this one out, Cap," imply or mean in the context?

How do we know the LHC results are robust?



How to start services (or targets) inside a session scope?


I can't enable or disable a user service: Failed to execute operation: No such file or directoryAll services of a user are killed when running multiple services under this user with systemdmysql service restarted during user being connected lead to failing serviceCan't run application that depends on X as a systemd serviceWhy x0vncserver is not starting at boot?Why is systemd stopping service immediately after it is started?Instruct to execute an unit after completing another unit successfullysystemd: finish the execution of custom shell script before starting nginxCannot execute dotnet app as daemon serviceCan't properly stop SAP Hana on reboot / shutdown with systemd













0















I use systemd to start most of my processes for a desktop session: xmonad (the window manager), emacs daemon, a tmux session, etc.



Listing my users processes with loginctl user-status consequently only shows a handful of processes under the session:



 Unit: user-1000.slice
├─session-5.scope
│ ├─4740 lightdm --session-child 13 16
│ ├─5047 systemctl --user --wait start xmonad-systemd-session.target
│ └─5497 /usr/bin/ssh-agent /usr/bin/im-launch xmonad-systemd-session
└─user@1000.service


Almost all my processes run outside of the session below user@1000.service. That means running loginctl session-status from tmux gives:



Could not get properties: Caller does not belong to any known session


I would like to tell systemd to start certain services under a particular login session. Ideally, in my session starter script I would write:



exec systemctl --user --wait --scope $MY_DESKTOP_SESSION start xmonad-systemd-session.target


However there is no --scope option nor would I know how to get the scope name.



I run systemd 240 on a Debian-ish (inhouse) distro with libpam-systemd and dbus-user-session.










share|improve this question


























    0















    I use systemd to start most of my processes for a desktop session: xmonad (the window manager), emacs daemon, a tmux session, etc.



    Listing my users processes with loginctl user-status consequently only shows a handful of processes under the session:



     Unit: user-1000.slice
    ├─session-5.scope
    │ ├─4740 lightdm --session-child 13 16
    │ ├─5047 systemctl --user --wait start xmonad-systemd-session.target
    │ └─5497 /usr/bin/ssh-agent /usr/bin/im-launch xmonad-systemd-session
    └─user@1000.service


    Almost all my processes run outside of the session below user@1000.service. That means running loginctl session-status from tmux gives:



    Could not get properties: Caller does not belong to any known session


    I would like to tell systemd to start certain services under a particular login session. Ideally, in my session starter script I would write:



    exec systemctl --user --wait --scope $MY_DESKTOP_SESSION start xmonad-systemd-session.target


    However there is no --scope option nor would I know how to get the scope name.



    I run systemd 240 on a Debian-ish (inhouse) distro with libpam-systemd and dbus-user-session.










    share|improve this question
























      0












      0








      0








      I use systemd to start most of my processes for a desktop session: xmonad (the window manager), emacs daemon, a tmux session, etc.



      Listing my users processes with loginctl user-status consequently only shows a handful of processes under the session:



       Unit: user-1000.slice
      ├─session-5.scope
      │ ├─4740 lightdm --session-child 13 16
      │ ├─5047 systemctl --user --wait start xmonad-systemd-session.target
      │ └─5497 /usr/bin/ssh-agent /usr/bin/im-launch xmonad-systemd-session
      └─user@1000.service


      Almost all my processes run outside of the session below user@1000.service. That means running loginctl session-status from tmux gives:



      Could not get properties: Caller does not belong to any known session


      I would like to tell systemd to start certain services under a particular login session. Ideally, in my session starter script I would write:



      exec systemctl --user --wait --scope $MY_DESKTOP_SESSION start xmonad-systemd-session.target


      However there is no --scope option nor would I know how to get the scope name.



      I run systemd 240 on a Debian-ish (inhouse) distro with libpam-systemd and dbus-user-session.










      share|improve this question














      I use systemd to start most of my processes for a desktop session: xmonad (the window manager), emacs daemon, a tmux session, etc.



      Listing my users processes with loginctl user-status consequently only shows a handful of processes under the session:



       Unit: user-1000.slice
      ├─session-5.scope
      │ ├─4740 lightdm --session-child 13 16
      │ ├─5047 systemctl --user --wait start xmonad-systemd-session.target
      │ └─5497 /usr/bin/ssh-agent /usr/bin/im-launch xmonad-systemd-session
      └─user@1000.service


      Almost all my processes run outside of the session below user@1000.service. That means running loginctl session-status from tmux gives:



      Could not get properties: Caller does not belong to any known session


      I would like to tell systemd to start certain services under a particular login session. Ideally, in my session starter script I would write:



      exec systemctl --user --wait --scope $MY_DESKTOP_SESSION start xmonad-systemd-session.target


      However there is no --scope option nor would I know how to get the scope name.



      I run systemd 240 on a Debian-ish (inhouse) distro with libpam-systemd and dbus-user-session.







      systemd pam






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Thomas KochThomas Koch

      21614




      21614




















          0






          active

          oldest

          votes











          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508684%2fhow-to-start-services-or-targets-inside-a-session-scope%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















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • 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%2funix.stackexchange.com%2fquestions%2f508684%2fhow-to-start-services-or-targets-inside-a-session-scope%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

          getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

          Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

          Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.