Booting MX-19 with runit
Re: Booting MX-19 with runit
Just a hey cool, it's interesting to see nixers playing with their systems and doing this type of thing. Someone is bound to have some fun and learn things in the process. Also gone with getting rid of any display manager and auto-login/startx for awhile now. Dang it, was hoping to see less system overhead by a wider margin here. But considering runit vs sysV, what they do, makes sense it's not by much and lightdm is all of like 8mbs-RAM or so anyway. Cool how-to Head_on and thanks for posting your findings other nixers. Nothing ventured, nothing gained. :)
Re: Booting MX-19 with runit
It looks like Artix has a runit service to start lightdm.
-
- Posts: 3602
- Joined: Tue Jun 14, 2016 2:02 pm
Re: Booting MX-19 with runit
I've always been wanting to play more with runit, it is lighter and faster than OpenRC.
I haven't tried Artix yet, but I did like Manjaro-OpenRC.
I don;t know if the Gentoo wiki is still accurate:
https://wiki.gentoo.org/wiki/Comparison_of_init_systems
What's the downside (if any) or "so what" of Per-service configuration being no?
I haven't tried Artix yet, but I did like Manjaro-OpenRC.
I don;t know if the Gentoo wiki is still accurate:
https://wiki.gentoo.org/wiki/Comparison_of_init_systems
What's the downside (if any) or "so what" of Per-service configuration being no?
NEW USERS START HERE FAQS, MX Manual, and How to Break Your System - Don't use Ubuntu PPAs! Always post your Quick System Info (QSI) when asking for help.
Re: Booting MX-19 with runit
Yes. Maybe there's a way to adapt..
Meanwhile I learned that Slim and LXDM also don't work.
_____________________________________________________________________________
Also found this: https://github.com/mat8913/runit-script ... ightdm/run
And http://smarden.org/runit/faq.html#run :
How do I run a service under runit service supervision ?
I want a service to be run under runit service supervision, so that it's automatically started on system boot, and supervised while system uptime. How does that work?
Answer: runit doesn't use the usual /etc/init.d/ init script interface, but uses a directory per service. To integrate a service into the runit init scheme, create a service directory for the service, and tell runit about it.
How do I create a service directory for the use with runit ?
Answer: Service directories usually are placed into the /etc/sv/ directory. Create a new directory for your service in /etc/sv/, put a ./run script into it, and make the script executable. Note that for the use with runit, service daemons must not put themself into the background, but must run in the foreground. Here's a simple example for a getty service:
$ cat /etc/sv/getty-2/run
#!/bin/sh
exec getty 38400 tty2 linux
$
Note the exec in the last line, it tells the shell that interprets the script to replace itself with the service daemon getty; this is necessary to make controlling the service work properly.
How do I tell runit about a new service ?
I created a service directory for a service that should run under runit service supervision. How do I tell runit about the new service directory, so that it picks up and runs the service by default?
Answer: Create a symbolic link in /service/ pointing to the service directory, runit will pick up the service within the next five seconds, and automatically start it on system boot. E.g.:
# ln -s /etc/sv/getty-2 /service/
- anticapitalista
- Developer
- Posts: 4282
- Joined: Sat Jul 15, 2006 10:40 am
Re: Booting MX-19 with runit
slim works with runit on antiX-19. You have to edit /etc/slim.conf.
Uncomment this line:
Comment this one:
Uncomment this line:
Code: Select all
# login_cmd exec /bin/bash -login /etc/X11/Xsession %session
Comment this one:
Code: Select all
login_cmd setsid /usr/local/bin/desktop-session %session
anticapitalista
Reg. linux user #395339.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - lean and mean.
https://antixlinux.com
Reg. linux user #395339.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - lean and mean.
https://antixlinux.com
- Head_on_a_Stick
- Posts: 919
- Joined: Sun Mar 17, 2019 3:37 pm
Re: Booting MX-19 with runit
How are you checking the init system? I use this:
Code: Select all
cat /proc/1/comm
Code: Select all
apt policy systemd{,-shim} runit{,-init}
Do you have a link to that? I can't find it in the live ISO or their LightDM package.
The display manager can be started manually with
Code: Select all
sudo /etc/init,d/lightdm start
Code: Select all
sudo service lightdm start
Not entirely sure what that means tbh, the Gentoo wiki doesn't elaborate furtherSwampRabbit wrote: ↑Fri Dec 06, 2019 9:24 pm What's the downside (if any) or "so what" of Per-service configuration being no?

Debian's implementation automatically runs any services in /etc/rc2.d/ because runleveles 2-5 are identical. MX separates the runlevels further, perhaps this is why it won;t work. The LightDM init script has different runlevels listed for the Debian and MX package versions.Huckleberry wrote: ↑Fri Dec 06, 2019 9:33 pm How do I run a service under runit service supervision ?
mod note: Signature removed, please read the forum rules
Re: Booting MX-19 with runit
Ah, so good. (I've read on some forum yesterday but that's such a good news).anticapitalista wrote: ↑Sat Dec 07, 2019 7:18 am slim works with runit on antiX-19. You have to edit /etc/slim.conf.
In fact, I'd installed Slim on 18.3 (just to try) but couldn't make it work no matter what I did... I'll try on 19 again.
- Head_on_a_Stick
- Posts: 919
- Joined: Sun Mar 17, 2019 3:37 pm
Re: Booting MX-19 with runit
I've got LightDM working now
Edit the file at /etc/runit/2 and add some lines for the other runlevels so it looks like this:
It's not perfect because some services are started several times but LightDM runs and the exit dialogue works.

Edit the file at /etc/runit/2 and add some lines for the other runlevels so it looks like this:
Code: Select all
#!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
SVDIR=/etc/service
# This script is also invoked in runit-systemd and runit-sysv packages.
# We must start sulogin and sysv scripts only if `runit' is current init
# system.
if [ -f /run/runit.stopit ] ; then
# single mode
if grep -q -w -i 'single' /proc/cmdline ; then
chpst -P /sbin/sulogin -p /dev/tty1
fi
# Give sysv scripts 90 seconds (hardcoded in async-timeout source) to
# start. If something goes wrong, they are detached from controlling
# terminal.
#
# In this case tty1 would likely look ugly -- output from sysv scripts
# is written over terminal session, but at least we would be able to
# login.
/lib/runit/async-timeout /lib/runit/run_sysv_scripts '/etc/rc2.d'
/lib/runit/async-timeout /lib/runit/run_sysv_scripts '/etc/rc3.d'
/lib/runit/async-timeout /lib/runit/run_sysv_scripts '/etc/rc4.d'
/lib/runit/async-timeout /lib/runit/run_sysv_scripts '/etc/rc5.d'
fi
exec env - PATH=$PATH \
runsvdir -P "${SVDIR}" 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
mod note: Signature removed, please read the forum rules
Re: Booting MX-19 with runit
Would this work? https://github.com/artix-linux/runit-artixHead_on_a_Stick wrote: ↑Sat Dec 07, 2019 7:27 amDo you have a link to that? I can't find it in the live ISO or their LightDM package.
(Edit: I see nothing related to DM )
https://wiki.artixlinux.org/Main/Runit
Last edited by Huckleberry Finn on Sat Dec 07, 2019 7:40 am, edited 1 time in total.
- Head_on_a_Stick
- Posts: 919
- Joined: Sun Mar 17, 2019 3:37 pm
Re: Booting MX-19 with runit
Ah-ha, that's the ticket — thanks!Huckleberry wrote: ↑Sat Dec 07, 2019 7:36 am Would this work? https://github.com/artix-linux/runit-artix
LightDM now works after a fashion (see my last post) but migrating to a runit script would be ideal.
mod note: Signature removed, please read the forum rules