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
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
add a comment |
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
add a comment |
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
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
systemd pam
asked yesterday
Thomas KochThomas Koch
21614
21614
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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