Page 1 of 1
running systemd terminal commands in SysVinit mode?
Posted: Wed Apr 30, 2025 11:14 pm
by retroD0d0
Hi, Happy May Day to those parts of the world where they celebrate.
I wanted to know how this systemd-shim thing works in MX in sysVinit mode. If I run a service like docker-desktop, will the usual systemd terminal commands eg. systemctl enable etc. work or do I have to boot in systemd mode?
Re: running systemd terminal commands in SysVinit mode?
Posted: Wed Apr 30, 2025 11:45 pm
by DukeComposed
retroD0d0 wrote: Wed Apr 30, 2025 11:14 pm
Hi, Happy May Day to those parts of the world where they celebrate.
I wanted to know how this systemd-shim thing works in MX in sysVinit mode. If I run a service like docker-desktop, will the usual systemd terminal commands eg. systemctl enable etc. work or do I have to boot in systemd mode?
If I sit down at an Apple machine and run "notepad.exe C:\Users\username\Desktop\my_file.txt", is that going to work?
Re: running systemd terminal commands in SysVinit mode?
Posted: Thu May 01, 2025 7:57 am
by dolphin_oracle
retroD0d0 wrote: Wed Apr 30, 2025 11:14 pm
Hi, Happy May Day to those parts of the world where they celebrate.
I wanted to know how this systemd-shim thing works in MX in sysVinit mode. If I run a service like docker-desktop, will the usual systemd terminal commands eg. systemctl enable etc. work or do I have to boot in systemd mode?
No. systemctl is nearly non-functional while running sysVinit. things like enabling or disabling, or masking and unmasking, will work, but actually starting or stopping a service will not. In addition, the application you are running will need some kind of service file or init.d script, as systemd service files are not processed by sysVinit. basically anything that requires systemd to actually be running as the init system won't work.
there is a "service" wrapper around all this that can be beneficial. for instant, to start samba (smbd), you could do
on both systemd and sysVinit.
Re: running systemd terminal commands in SysVinit mode?
Posted: Thu May 01, 2025 11:53 am
by retroD0d0
dolphin_oracle wrote: Thu May 01, 2025 7:57 am
there is a "service" wrapper around all this that can be beneficial. for instant, to start samba (smbd), you could do
on both systemd and sysVinit.
Interesting, is this service wrapper unique to MX, can i rely on it to issue typical sysV commands to systemd apps/services?
Thanks for the explanation. I guess what I wanted to better understand in detail ALL the customisations used to get systemd dependent apps/services to work in MX. I have a vague idea what the systemd-shim is doing (emulating helper functions which are otherwise native to the systemd suite) but is there more to it? like the service wrapper example above!
If anyone knows of any resource, would be glad if you could point.Thanks.
Re: running systemd terminal commands in SysVinit mode?
Posted: Thu May 01, 2025 12:11 pm
by dolphin_oracle
retroD0d0 wrote: Thu May 01, 2025 11:53 am
dolphin_oracle wrote: Thu May 01, 2025 7:57 am
there is a "service" wrapper around all this that can be beneficial. for instant, to start samba (smbd), you could do
on both systemd and sysVinit.
Interesting, is this service wrapper unique to MX, can i rely on it to issue typical sysV commands to systemd apps/services?
Thanks for the explanation. I guess what I wanted to better understand in detail ALL the customisations used to get systemd dependent apps/services to work in MX. I have a vague idea what the systemd-shim is doing (emulating helper functions which are otherwise native to the systemd suite) but is there more to it? like the service wrapper example above!
If anyone knows of any resource, would be glad if you could point.Thanks.
service is not unique, at least in the debian world.
there is a little bit of a misconception here I think. systemd services do not run. the system user session management runs, but anything else requires sysVinit service files, or be started by dbus. even pipewire, which normally is started up by user-services under systemd (which sysVinit has no concept of), are autostarted at login to the desktop rather than by a service file.
the systemd-shim and its set of patches allow that stuff to coexist with sysVinit (mostly systemd-logind), as well as allow sytemd to run when its not at PID 1, which is always held by the init system.
What you'll find out there is probably pretty old, but mostly still valid. we are the only distribution out there still using it. however, the maintainer does post his stuff up on salsa.debian.org under the unit-diveristy initiative..
https://salsa.debian.org/knelsonmeister/systemd-shim there are also required patches to systemd.
https://salsa.debian.org/knelsonmeister/systemd
Re: running systemd terminal commands in SysVinit mode?
Posted: Thu May 01, 2025 1:03 pm
by retroD0d0
dolphin_oracle wrote: Thu May 01, 2025 12:11 pm
there is a little bit of a misconception here I think. systemd services do not run.
Whoops, Sorry i confused you, I meant
Can i rely on the service wrapper to issue typical sysV commands to systemd
dependent apps/services?
Re: running systemd terminal commands in SysVinit mode?
Posted: Thu May 01, 2025 1:08 pm
by dolphin_oracle
retroD0d0 wrote: Thu May 01, 2025 1:03 pm
dolphin_oracle wrote: Thu May 01, 2025 12:11 pm
there is a little bit of a misconception here I think. systemd services do not run.
Whoops, Sorry i confused you, I meant
Can i rely on the service wrapper to issue typical sysV commands to systemd
dependent apps/services?
if you are running sysVinit, and there is an init script for what you want to run, under /etc/init.d usually, then the service wrapper will work.
Re: running systemd terminal commands in SysVinit mode?
Posted: Thu May 01, 2025 1:20 pm
by asqwerth
What do you mean by systemd-dependent?
1) you need systemd to be at PID1, ie running as the init system; or
2) the app simply requires the existence/installation of systemd packages on the system?
Re: running systemd terminal commands in SysVinit mode?
Posted: Thu May 01, 2025 5:41 pm
by retroD0d0
asqwerth wrote: Thu May 01, 2025 1:20 pm
What do you mean by systemd-dependent?
1) you need systemd to be at PID1, ie running as the init system; or
2) the app simply requires the existence/installation of systemd packages on the system?
number 2 please!