Questions tagged [systemd-user]
Questions relevant to running systemd user units via `systemctl --user ...`.
20 questions
0
votes
0
answers
1k
views
Why systemd fails to kill user process? "Failed to kill control group" "ignoring: Operation not permitted"
I start qemu as a user scope task sytemd-run --user qemu-system... -pidfile pidfile
on shutdown, systemd claims it failed to kill it (without ever trying) and sends a SIGKILL, which doesn't terminate ...
0
votes
1
answer
411
views
Can't start nginx podman container with user service file
I have an nginx container that runs as part of a service. This is the function code used to start all the containers including nginx:
if [[ ! -s ${SCRIPT_DIR}/.container-info-patches.txt ]]; then
...
0
votes
1
answer
464
views
How do you create a systemd user timer that will start only after X has started?
I currently have this timer:
[Unit]
Description=Schedule wallpaper rotation
[Timer]
OnCalendar=*-*-* *:00:00
Persistent=true
[Install]
WantedBy=graphical-session.target
Which runs this service:
[...
1
vote
0
answers
1k
views
How do variables exported in `/etc/profile.d` end up in the systemd user environment on Gnome?
On Gnome with Systemd, systemd user environment variables are configured using the systemd environment.d mechanism, which doesn't rely on shell scripts, but on configuration files.
In parallel, many ...
1
vote
0
answers
205
views
systemctl --user enable won't create directories, errors as a result
Whenever I run systemctl --user enable <some-unit>, it complains:
/xdg/config/home/systemd/user/<install-section.wants-or-requires>/<some-unit>.service does not exist
to which my ...
0
votes
1
answer
683
views
After= directive of systemd unit not working as expected
So, I started breaking up my system init and creating some service files for things I want to be loaded after I login. It's the usual stuff like polybar, dunst and the rest of the things. Things do ...
0
votes
1
answer
1k
views
Should i use default.target or timers.target value for WantedBy for a systemd user timer? [duplicate]
My .timer file located in ~/.config/systemd/user doesn't show in output of systemctl --user list-timers --all command unless i enable it. Is it normal for this command to not show disabled .timers ...
2
votes
0
answers
2k
views
In a user service, it possible to inherit environment variables from the user session?
Normally, services started with Systemd are given a "clean" environment that does not inherit from the user session. This is by design and it is a good default.
However, I've written some ...
1
vote
1
answer
1k
views
How do I setup an Ubuntu package to start a user service and only start it when the user logs in?
I am trying to setup a service which requires access to X-Windows and DBus. First I tried it as a background application, but that just doesn't work. I use the "auto-log user" feature. Now I ...
0
votes
0
answers
158
views
Stop systemd from running user unit for user jenkins
I just installed jenkins on my pop-os following the instruction and install several plugins in jenkins when I found that several gnome user unit is started for user jenkins
I tried restarting my ...
4
votes
0
answers
802
views
How to configure environment variables per graphical session
Consider the following setup:
I have GDM installed
I have multiple graphical sessions configured, both X11 and Wayland: i3, sway, gnome(x11).
I want to export different sets of environment variables ...
13
votes
1
answer
7k
views
Start a systemd user service at system boot instead of at user login
Given a service definition at ~/.config/systemd/user/do-something.service for UID 1000, which is installed, enabled, and starts automatically at login, I would like the do-something.service to start ...
0
votes
0
answers
1k
views
Systemd doesn't use the specified user in the app.service to run the service; what could be wrong?
I have a .Net Core 3 app that I want to run as a system service:
[Unit]
Description=app-prod
[Service]
WorkingDirectory=/var/www/app-prod
ExecStart=/usr/bin/dotnet /var/www/app-prod/app
Restart=...
0
votes
1
answer
2k
views
Why does systemctl asks for a sudo password in user mode?
I am currently trying to start my ssh-agent every time I login by starting it as a user service with systemd as explained in the arch wiki.
However, when I execute systemctl --user start ssh-agent, ...
0
votes
0
answers
2k
views
Systemd User services not starting
I am trying to get a user service to start at boot.
This is for Tableau on Linux (Ubuntu 19.04 Server, no gui)
Tableau creates a non-admin user to run it's services. and creates a systemd service ...