Skip to main content
Topic: How to run Lemurs DM on runit?? (Read 861 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

How to run Lemurs DM on runit??

Hi, I was looking for some light weight TUI Display Managers where I can switch between i3 and dwm quickly.
I found this https://github.com/coastalwhite/lemurs.
Was wondering how I would run this on runit since there is just a systemd script. I tried Ly but its broken for me and breaks rofi.

Thanks!

Re: How to run Lemurs DM on runit??

Reply #1
Not sure about runit script for Lemurs but a project called Ly may have what you are looking for:
Ly - a TUI display manager
(copied from the site)
systemd?
Unlike what you may have heard, Ly does not require systemd, and was even specifically designed not to depend on logind. You should be able to make it work easily with a better init, changing the source code won't be necessary
For runit the instructions are:
Code: [Select]
$ make
# make install installrunit
# ln -s /etc/sv/ly /var/service/
Disable your existing display manager service if need be e.g.:
Code: [Select]
# rm /var/service/lxdm
If you are running on tty2 (check your /etc/ly/config.ini) you can disable e.g. agetty running there:
Code: [Select]
# rm /var/service/agetty-tty2
Everything appears to geared for something you describe as wanting through a slightly different application.
The package exists in AUR though you will have to edit to change the make install line to the above example.

Re: How to run Lemurs DM on runit??

Reply #2
Not sure about runit script for Lemurs but a project called Ly may have what you are looking for:
Ly - a TUI display manager
(copied from the site)
systemd?
Unlike what you may have heard, Ly does not require systemd, and was even specifically designed not to depend on logind. You should be able to make it work easily with a better init, changing the source code won't be necessary
For runit the instructions are:
Code: [Select]
$ make
# make install installrunit
# ln -s /etc/sv/ly /var/service/
Disable your existing display manager service if need be e.g.:
Code: [Select]
# rm /var/service/lxdm
If you are running on tty2 (check your /etc/ly/config.ini) you can disable e.g. agetty running there:
Code: [Select]
# rm /var/service/agetty-tty2
Everything appears to geared for something you describe as wanting through a slightly different application.
The package exists in AUR though you will have to edit to change the make install line to the above example.
Hi thanks for the reply. For some reason when I tried Ly, it would act really strange like the background would be merged with the tty and sometimes I would loose the cursor and the thing would freeze up. Also some nerd fonts in rofi would be broken too.

I have not tried the AUR method, how would I yay to install the runit version?

 

Re: How to run Lemurs DM on runit??

Reply #3
Yes one can use yay to install the application fine though one will have to manually edit the package build file to change to install to a runit service during the edit phase of the process.
You need to change the
Quote
make DESTDIR="$pkgdir" install
to
Quote
make DESTDIR="$pkgdir" install installrunit
.
Here is a modified PKGBUILD for you to use if you like to use instead with the updated line.
Code: [Select]
# Maintainer: éclairevoyant
# Contributor: nullgemm <[email protected]>

pkgname=ly
pkgver=0.5.3
pkgrel=2
pkgdesc="TUI display manager"
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/fairyglade/$pkgname"
license=('custom:WTFPL')
makedepends=('git')
depends=('pam' 'xorg-xauth')
conflicts=('python-ly') # TODO prevent this
backup=(etc/$pkgname/{config.ini,wsetup.sh,xsetup.sh})
source=("git+$url.git#tag=v$pkgver"
        "git+https://github.com/nullgemm/argoat.git"
        "git+https://github.com/nullgemm/configator.git"
        "git+https://github.com/nullgemm/dragonfail.git"
        "git+https://github.com/nullgemm/termbox_next.git")
b2sums=('SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP')

prepare() {
cd $pkgname
git submodule init
for _i in argoat configator dragonfail termbox_next; do
git config submodule.sub/$_i.url "$srcdir/$_i"
done
git -c protocol.file.allow=always submodule update
}

build() {
make -C $pkgname
}

package() {
cd $pkgname
make DESTDIR="$pkgdir" install installrunit
install -Dm644 license.md "$pkgdir/usr/share/licenses/$pkgname/WTFPL"
}
Since the application is designed to create the runit service file, it should work though I do not know since I have never used it. I just though it looked promising.
If issues arise you should post the errors on the ly's github website and see if it can be corrected to function like it should. Thus you help the project and other users.

If ly still does not function even after the PKGBUILD build/installation then I would use the runit service file it created as base to use when creating the required runit service files for lemur and plymouth since it is very similar type service. The systemd service file shows lemur waits for plymouth to be running before starting. Thus lemur needs "omniverse/plymouth-nosystemd" since plymouth in community is systemd based and plymouth runit service does not  seem to exist in Artix. So it also will need to be created and started before the lemur runit service. Though the whole thing shouldn't be too difficult since runit's syntax is quite straightforward. Some trail and error will figure stuff out in the end if you are serious in getting it going.

Re: How to run Lemurs DM on runit??

Reply #4
Yes one can use yay to install the application fine though one will have to manually edit the package build file to change to install to a runit service during the edit phase of the process.
You need to change the  to .
Here is a modified PKGBUILD for you to use if you like to use instead with the updated line.
Code: [Select]
# Maintainer: éclairevoyant
# Contributor: nullgemm <[email protected]>

pkgname=ly
pkgver=0.5.3
pkgrel=2
pkgdesc="TUI display manager"
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/fairyglade/$pkgname"
license=('custom:WTFPL')
makedepends=('git')
depends=('pam' 'xorg-xauth')
conflicts=('python-ly') # TODO prevent this
backup=(etc/$pkgname/{config.ini,wsetup.sh,xsetup.sh})
source=("git+$url.git#tag=v$pkgver"
        "git+https://github.com/nullgemm/argoat.git"
        "git+https://github.com/nullgemm/configator.git"
        "git+https://github.com/nullgemm/dragonfail.git"
        "git+https://github.com/nullgemm/termbox_next.git")
b2sums=('SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP')

prepare() {
cd $pkgname
git submodule init
for _i in argoat configator dragonfail termbox_next; do
git config submodule.sub/$_i.url "$srcdir/$_i"
done
git -c protocol.file.allow=always submodule update
}

build() {
make -C $pkgname
}

package() {
cd $pkgname
make DESTDIR="$pkgdir" install installrunit
install -Dm644 license.md "$pkgdir/usr/share/licenses/$pkgname/WTFPL"
}
Since the application is designed to create the runit service file, it should work though I do not know since I have never used it. I just though it looked promising.
If issues arise you should post the errors on the ly's github website and see if it can be corrected to function like it should. Thus you help the project and other users.

If ly still does not function even after the PKGBUILD build/installation then I would use the runit service file it created as base to use when creating the required runit service files for lemur and plymouth since it is very similar type service. The systemd service file shows lemur waits for plymouth to be running before starting. Thus lemur needs "omniverse/plymouth-nosystemd" since plymouth in community is systemd based and plymouth runit service does not  seem to exist in Artix. So it also will need to be created and started before the lemur runit service. Though the whole thing shouldn't be too difficult since runit's syntax is quite straightforward. Some trail and error will figure stuff out in the end if you are serious in getting it going.

Hey thanks for the reply!
When I do makepkg -s PKGBUILD on your file, I get,
Code: [Select]
make: *** No rule to make target 'installrunit'.  Stop.
==> ERROR: A failure occurred in package().
    Aborting..

Re: How to run Lemurs DM on runit??

Reply #5
Okay it appears that one must use the latest git version for the other non-systemd stuff. Thus it means changing the package build to the latest git version from the tagged release version. Now remember using git versions has risks in that the program may not function correctly or crash. But if you need the latest features then one has no choice but to try.
Update PKGBUILD:
Code: [Select]
# Maintainer: éclairevoyant
# Contributor: nullgemm <[email protected]>

pkgname=ly
pkgver=2022.12.08.137.24f017e
pkgrel=1
pkgdesc="TUI display manager"
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/fairyglade/$pkgname"
license=('custom:WTFPL')
makedepends=('git')
depends=('pam' 'xorg-xauth')
conflicts=('python-ly') # TODO prevent this
backup=(etc/$pkgname/{config.ini,wsetup.sh,xsetup.sh})
source=("git+$url.git"
        "git+https://github.com/nullgemm/argoat.git"
        "git+https://github.com/nullgemm/configator.git"
        "git+https://github.com/nullgemm/dragonfail.git"
        "git+https://github.com/nullgemm/termbox_next.git")
sha256sums=(
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            )


pkgver() {
  cd ${pkgname}
  # I like this format because it provides the date of the last update.
printf "%s.%s.%s" "$(git log -1 --format="%cd" --date=short | sed 's/-/./g')" \
                    "$(git rev-list --count HEAD)" \
                    "$(git rev-parse --short HEAD)"
}

prepare() {
cd $pkgname
git submodule init
for _i in argoat configator dragonfail termbox_next; do
git config submodule.sub/$_i.url "$srcdir/$_i"
done
git -c protocol.file.allow=always submodule update
}

build() {
make -C $pkgname
}

package() {
cd $pkgname
make DESTDIR="$pkgdir" install installrunit
install -Dm644 license.md "$pkgdir/usr/share/licenses/$pkgname/WTFPL"
}
Once it completes:
Code: [Select]
ls pkg/ly/etc/sv/ly
conf  finish  run
Code: [Select]
vim pkg/ly/etc/sv/ly/run
#!/bin/sh

tty=${PWD##*-}

[ -r conf ] && . ./conf

if [ -x /sbin/getty -o -x /bin/getty ]; then
# busybox
GETTY=getty
elif [ -x /sbin/agetty -o -x /bin/agetty ]; then
# util-linux
GETTY=agetty
fi

exec setsid ${GETTY} ${GETTY_ARGS} -nl /usr/bin/ly tty2 "${BAUD_RATE}" "${TERM_NAME}"
So it does create the runit stuff though I am not going to install and test.
Hopefully it will work for what you want. If it does not then post the issues on their website. You never know it may get fixed in short order. One never knows since it is all volunteer stuff just like here.

Re: How to run Lemurs DM on runit??

Reply #6
Okay it appears that one must use the latest git version for the other non-systemd stuff. Thus it means changing the package build to the latest git version from the tagged release version. Now remember using git versions has risks in that the program may not function correctly or crash. But if you need the latest features then one has no choice but to try.
Update PKGBUILD:
Code: [Select]
# Maintainer: éclairevoyant
# Contributor: nullgemm <[email protected]>

pkgname=ly
pkgver=2022.12.08.137.24f017e
pkgrel=1
pkgdesc="TUI display manager"
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/fairyglade/$pkgname"
license=('custom:WTFPL')
makedepends=('git')
depends=('pam' 'xorg-xauth')
conflicts=('python-ly') # TODO prevent this
backup=(etc/$pkgname/{config.ini,wsetup.sh,xsetup.sh})
source=("git+$url.git"
        "git+https://github.com/nullgemm/argoat.git"
        "git+https://github.com/nullgemm/configator.git"
        "git+https://github.com/nullgemm/dragonfail.git"
        "git+https://github.com/nullgemm/termbox_next.git")
sha256sums=(
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            )


pkgver() {
  cd ${pkgname}
  # I like this format because it provides the date of the last update.
printf "%s.%s.%s" "$(git log -1 --format="%cd" --date=short | sed 's/-/./g')" \
                    "$(git rev-list --count HEAD)" \
                    "$(git rev-parse --short HEAD)"
}

prepare() {
cd $pkgname
git submodule init
for _i in argoat configator dragonfail termbox_next; do
git config submodule.sub/$_i.url "$srcdir/$_i"
done
git -c protocol.file.allow=always submodule update
}

build() {
make -C $pkgname
}

package() {
cd $pkgname
make DESTDIR="$pkgdir" install installrunit
install -Dm644 license.md "$pkgdir/usr/share/licenses/$pkgname/WTFPL"
}
Once it completes:
Code: [Select]
ls pkg/ly/etc/sv/ly
conf  finish  run
Code: [Select]
vim pkg/ly/etc/sv/ly/run
#!/bin/sh

tty=${PWD##*-}

[ -r conf ] && . ./conf

if [ -x /sbin/getty -o -x /bin/getty ]; then
# busybox
GETTY=getty
elif [ -x /sbin/agetty -o -x /bin/agetty ]; then
# util-linux
GETTY=agetty
fi

exec setsid ${GETTY} ${GETTY_ARGS} -nl /usr/bin/ly tty2 "${BAUD_RATE}" "${TERM_NAME}"
So it does create the runit stuff though I am not going to install and test.
Hopefully it will work for what you want. If it does not then post the issues on their website. You never know it may get fixed in short order. One never knows since it is all volunteer stuff just like here.

I got it working, thanks for the PKGBUILD script!
I had completely missed this step
rm /var/service/agetty-tty2

I also had to also follow this post to get unicode and nerd font characters to work in i3 again, by adding my UTF type to /etc/environment.

https://github.com/fairyglade/ly/issues/116

I will report any further issues and seek any future assistance on the ly github page.

Thank you.

Re: How to run Lemurs DM on runit??

Reply #7
I am glad that the ly git runit version worked for you. It is sometimes hard to find a solution with how systemd changed the general Linux landscape. But thankfully more software developers are now gearing their applications to be used no matter what the PID 1 application is like this "ly" project and that is great to see.
Take care and have fun.