running systemd terminal commands in SysVinit mode?

Message
Author
retroD0d0
Posts: 78
Joined: Sat Aug 17, 2024 4:36 pm

running systemd terminal commands in SysVinit mode?

#1 Post 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?

User avatar
DukeComposed
Posts: 1459
Joined: Thu Mar 16, 2023 1:57 pm

Re: running systemd terminal commands in SysVinit mode?

#2 Post 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?

User avatar
dolphin_oracle
Developer
Posts: 22486
Joined: Sun Dec 16, 2007 12:17 pm

Re: running systemd terminal commands in SysVinit mode?

#3 Post 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

Code: Select all

service smbd start
on both systemd and sysVinit.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

retroD0d0
Posts: 78
Joined: Sat Aug 17, 2024 4:36 pm

Re: running systemd terminal commands in SysVinit mode?

#4 Post 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

Code: Select all

service smbd start
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.

User avatar
dolphin_oracle
Developer
Posts: 22486
Joined: Sun Dec 16, 2007 12:17 pm

Re: running systemd terminal commands in SysVinit mode?

#5 Post 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

Code: Select all

service smbd start
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
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

retroD0d0
Posts: 78
Joined: Sat Aug 17, 2024 4:36 pm

Re: running systemd terminal commands in SysVinit mode?

#6 Post 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?

User avatar
dolphin_oracle
Developer
Posts: 22486
Joined: Sun Dec 16, 2007 12:17 pm

Re: running systemd terminal commands in SysVinit mode?

#7 Post 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.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

User avatar
asqwerth
Developer
Posts: 7995
Joined: Sun May 27, 2007 5:37 am

Re: running systemd terminal commands in SysVinit mode?

#8 Post 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?
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

retroD0d0
Posts: 78
Joined: Sat Aug 17, 2024 4:36 pm

Re: running systemd terminal commands in SysVinit mode?

#9 Post 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!

Post Reply

Return to “General”