Questions tagged [systemd]

systemd is an alternative approach to SystemV and Upstart init daemons for Linux. It is intended to provide a better framework for expressing services' dependencies, allow more work to be done in parallel at system startup, and to reduce shell overhead.

Filter by
Sorted by
Tagged with
6 votes
1 answer
2k views

Make OpenVPN restart upon new network connection on systemd

How would you go about making OpenVPN automatically restart upon connecting to a network? The issue is that every time a network connection is lost, or if the computer is booted without a network ...
1 vote
0 answers
51 views

How to get symbolized call-stacks with coredumpctl info?

I am trying to enable systemd coredumps containing call stacks with function names when printed with coredumpctl info, so that I can get a call stack without using gdb and/or coredumpctl debug (since ...
0 votes
0 answers
11 views

systemd-coredump service fills /run/systemd/propagate until out of inodes

On my SUSE Linux, huge amount of coredump service directories were observed under /run/systemd/propagate/, sample as below, as of now /run has been totally filled with those folders without any free ...
0 votes
1 answer
3k views

how to disable LLMNR on ubuntu 17.10

My understanding is that if i am using third party dns (google, etc) or dns provided by my ISP(comcast, etc) i do not need this feature on. I am attempting to disable it but setting LLMNR=no in /etc/...
0 votes
0 answers
61 views

How to force fullscreen image at startup on DEBIAN 12

Under Debian 12 I use a script at startup via systemd, the latter launches a script. And it performs the following functionality: waiting for a removable device to be mounted, if detected, launching ...
0 votes
1 answer
17 views

Quadlet containers not starting on boot - problem with network-online.target?

I've created quadlets to launch two different containers in an opensuse environment (microOS, to be specific). The quadlets get planted in /etc/containers/systemd during an automated install. I expect ...
0 votes
1 answer
41 views

How can you pass hyphenated arguments (flags) to a template service unit?

[email protected] is my template service unit. [Unit] Description=my service unit [Service] Type=oneshot ExecStart=/home/username/scripts/myprogram.py %I I want %I to be --arg1 --arg2=/path/to/...
2 votes
1 answer
3k views

Systemd ProtectHome & Allowing access to specific home directory

I'm having trouble with a systemd service with the following definition: [Unit] Description=Test After=network.target [Service] WorkingDirectory=/home/testuser/testdir User=testuser Group=testuser ...
1 vote
1 answer
32 views

Applications fail when started too early via Systemd--what dependency is required?

RPI 3b+, Debian Stretch I want to start a Qt applicaton via systemd. The app uses X and needs to open a display. It always fails due to an Invalid MIT_MAGIC-COOKIE. But then systemd restarts it (on-...
1 vote
0 answers
11 views

Why would systemd start a service before a defined "After="?

So I have a raspberry PI OS lite running bookworm, and I have installed PulseAudio onto it. The pi is setup to be a moonlight device for my TV (thanks Samsung for EoL SteamLink!). All it has to do ...
2 votes
0 answers
114 views

systemd fills /run/systemd/propagate until out of inodes

I have configured Pyzor for rspamd following these instructions: https://www.rspamd.com/doc/modules/external_services.html#pyzor-specific-details The instructions also have some systemd configs for ...
0 votes
0 answers
16 views

SystemD doesn't automount folder in subdirectory of another mount, how to fix?

I have local file server which exports two places over SMB: \media and \something I want to have them mounted as /media/MEDIA (\media export) and /media/MEDIA/something (\something). To do it I ...
6 votes
1 answer
3k views

X2Go: How to enable/disable

Documentation and various internet answers suggest x2goserver will have a service on systemd systems which can be started (or stopped, etc) with systemctl start x2goserver. However, there is no such ...
2 votes
1 answer
39 views

Why systemctl status shows a time in the future and the amount of time left?

When we issue "systemctl status", we usually get in the output, a line showing the status and for how long it has been in that status. Like: (I issued that few minutes ago) Active: active (...
0 votes
1 answer
26 views

How to set static IP for 2 network interfaces in systemd linux

I have a Yocto distro that uses systemd (like ArchLinux) to allow static IP configuration via /etc/systemd/network/20-wired.network file. I need to set a static IP for 2 network interfaces (eth0 & ...
0 votes
1 answer
27 views

Systemd killed my vetcore service: "Deactivated succesfully"

So I created a systemd file for my netcore bash script on Linux. But when I start the service file, systemd keep killing it with the result "service: Deactivated successfully." I tried to ...
0 votes
1 answer
39 views

Nested variables in systemd EnvironmentFile

#File: /home/miles/temp/foo.env ONE=/one TWO=${ONE}/two FULL_PATH=${TWO}/three #File: ~/.config/systemd/user/foo.service [Service] EnvironmentFile=/home/miles/temp/foo.env # prints ${TWO}/three # ...
0 votes
0 answers
13 views

Systemd service not restarting after VM reboot

I have a systemd service with the following unit file [Unit] Description=Custom service After=network.target [Service] ExecStart=/usr/local/bin/my-script Restart=always Environment=FOO=BAR ...
0 votes
0 answers
22 views

Delay restart on failure for systemd service

My systemd service file correctly restarts my executable if it fails with a non-success exit code. My service file contains: SuccessExitStatus=0 129 200 Restart=on-failure Since my executable ...
0 votes
0 answers
19 views

How to get consistent ethernet device numbering on a Raspberry pi?

I have a Raspberry pi 3B+ with a custom Yocto Linux image. I want the onboard Ethernet to be eth0 and a USB Ethernet dongle to be eth1 or something else such as usb_eth0. One pi consistently numbered ...
3 votes
3 answers
2k views

Best practices for running a rootless container as a systemd service with User= or --user?

I'm experimenting with running rootless containers with Podman as systemd services. I'd also like to run the services themselves with non-root privileges, either: a) as a system service, but with User=...
0 votes
1 answer
21 views

Unable to start service, auth could not identify password for

Im trying to start a linux service, however im getting the below issue when im trying to start the service. Please help with a solution of how to fix this issue The user Test_user is set with ALL=(...
47 votes
7 answers
249k views

systemd "status=203/EXEC" error when creating new service

I've created a new service for a Python script that works when running standalone but gives errors below when run through systemd : Oct 02 12:17:09 raspberrypi systemd[1]: Started Read pressure And ...
0 votes
0 answers
26 views

migrating app from upstart to systemctl failing with 'dead'

new to this area, and trying to setup this project on Ubuntu 20.04.6 LTS https://github.com/thoukydides/heatmiser-wifi the project is no longer maintained, but the instructions talk about using ...
17 votes
5 answers
28k views

Setting console font in vconsole.conf does not work (systemd)

I am trying to set a different default console font for my new Arch Linux installation (using systemd). I set up my vconsole.conf in /etc as so: KEYMAP=us FONT=Lat2-Terminus16 I rebooted and saw my ...
1 vote
1 answer
3k views

High CPU Usage from systemd-udevd

I have a dell studio 1569 and just installed linux onto it. I noticed that the cpu has been running high due to systemd-udevd. Going though different posts on the web including this one, I used "...
0 votes
0 answers
12 views

how to configure kata containers to work with systemd

I am trying to run kata containers with systemd using containerd on my ubuntu 22.04 machine, but I cannot manage to make it work. My expectation is to be able to run all the processes inside the ...
0 votes
1 answer
2k views

systemd & python logging

I wrote a simple python3 skript and want to make a service from it. Here are the two files #!/bin/python3 while True: print('True') Systemd Service: [Unit] Description=True Service [Service] ...
2 votes
1 answer
84 views

systemd does not consistently capture and log stdout

I have a minimal script managed by a oneshot systemd service. Sometimes the stdout echoed by this script appears in the systemd logs. Sometimes it does not. It randomly appears about 50% of the time. ...
1 vote
1 answer
4k views

VNC Server immediately crashes

So, I recently installed the tigervnc package on Arch Linux (uname -r 4.18.10-arch1-1-ARCH). I'm trying to get the VNC server to run trough SSH tunnels, so I'm starting the server on localhost only ...
2 votes
1 answer
64 views

Is the systemd instance name specifier %i redundant when referring to templated dependencies?

Do we need to use the instance name specifier (%i) in templates when referring to other templated services, or can we assume the instance name is inferred? Many examples follow this pattern (e.g. ...
2 votes
3 answers
77 views

How can I make a systemd service start after the *completion* of another service?

I always run into cases where I need a program associated with service A to run to completion before service B. "After" does not scratch this itch. After says Most importantly, for service ...
0 votes
0 answers
23 views

Reverse tunnel using systemd

I have this service file to make a reverse SSH, works fine, on the other server I can see it, problem is I left it over night, in the morning I've checked the service was active but on the other ...
1 vote
1 answer
103 views

nfs unmount on shutdown

I have a laptop with debian that I am mainly using on my home wifi. To access some network disks, I have a few lines like these in /etc/fstab: disk:/media/vol0 /home/disk0 nfs4 noauto,x-systemd....
1 vote
2 answers
99 views

How to avoid systemd periodic realtime timer running at boot

I have a realtime timer with Persistent=false running immediately after boot although my objective is to run it periodically! I saw it is a rather common question but none of the answers I found in ...
0 votes
0 answers
38 views

tmpfiles.d glob for directories only

According to the documentation, I should be able to use globs to specify a path, however it seems that using /*/ glob for directories isn't supported, is this because this type of glob is part of an &...
1 vote
1 answer
66 views

CentOS systemd places service subprocesses started with `sudo` in `user.slice` (instead of `system.slice`)

Subprocesses that are created using sudo within a systemd service are placed in the user.slice. This behavior has been observed only on CentOS 8 (x86_64 20230606) and not on Ubuntu 20.04.5 LTS, where ...
0 votes
0 answers
59 views

I get permission denied for a command in an sh script, but same command works from terminal

I have a service run by systemctl in RedHat 8.8. The service itself is relatively simple: cat /etc/systemd/system/myservice.service [Unit] Description=My service After=network-online.target [Service]...
1 vote
1 answer
29 views

How to disable core dump of a specific process (Syslog-ng in my case) of Systemd

I want to permanent disable generating core-dump of a specific process/service of systemd.
0 votes
0 answers
30 views

Put user's unit file in non-default location

My distro is RHEL 8.6. By default, all user's unit files are put in the /home/myuser/.config/systemd/user directory, then systemctl --user daemon-reload make them available. My question is how I ...
1 vote
2 answers
2k views

running a Bash script within its working folder

I have a script done in Bash which runs a file on the folder where the script is located, passes a few config files and outputs a log on the same folder. For example this would be the structure: /...
11 votes
4 answers
11k views

Print only timestamp and message in journalctl

I'm trying to get the last few lines from journalctl so I can feed them into my conky. However journalctl by default provides too much crap that wastes space: With journalctl -u PROCESS -n 5 --no-...
8 votes
3 answers
3k views

journalctl list until last unit start

A common task one wishes to do, when debugging a service that fails to load, is to look at all log from the last time the service was started. For example, given Jul 25 08:18:20 raspberrypi ngrok[...
0 votes
1 answer
2k views

On systemctl start, "Failed to start gitlab-runner.service: Unit is not loaded properly: Bad message."

Whenever I run systemctl start gitlab-runner.service I get, systemctl start gitlab-runner.service Failed to start gitlab-runner.service: Unit is not loaded properly: Bad message. See system logs and ...
181 votes
3 answers
524k views

What does "systemctl daemon-reload" do?

I have a service that stopped suddenly. I tried to restart that service but failed and was asked to run: systemctl daemon-reload. What does it exactly do? What is a daemon-reload?
0 votes
0 answers
24 views

systemd[1]: syslog-ng@default.service: Main process exited, code=dumped, status=7/BUS

I am using arch-linux. After running 24hr I am getting [email protected] core dump. Log: systemd[1]: [email protected]: Deactivated successfully. systemd[1]: syslog-ng@default....
0 votes
0 answers
51 views

Forking from a systemd service [duplicate]

I have a python program that runs as a systemd user service. From that program, I launch external commands via subprocess.Popen(cmd, close_fds=True, start_new_session=True). My intention is for these ...
11 votes
2 answers
5k views

How to write systemd user service that runs only as part of a graphical session?

There are programs that I want to automatically start after a successful graphical desktop login (e.g. to Gnome or Xmonad) and stop when I logout. How can I change the ~/.config/systemd/user/synergys....
1 vote
0 answers
45 views

Timed out waiting for device /dev/ttyNVT0

I want to make a physical remote serial port for my server that lets me use this port as a server serial console (this is for retro computer related hobby). I'm using a MikroTik router with its serial ...
0 votes
1 answer
25 views

Reset systemd from deactivating state

I have stopped the D3 dababase via command line instead due to systemd have issues stopping the service. When this happens, I have to restart the server each time which takes 30 minutes at least due ...

1
2 3 4 5
90