Skip to main content
Topic: ly dm dinit scripts (Read 2388 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: ly dm dinit scripts

Reply #15
im only getting this message on tty1, pressing enter will should normal artix login prompt. no ly interface appears on any other tty. moving default tty in /etc/ly/config to 2 or 7 (not use by console) still no ly. try ly from "world" repo and ly-git from "omniverse" still the same

Re: ly dm dinit scripts

Reply #16
One required variable is probably missing. One of the downsides of Ly is that the errors are not helpful.
So, carefullly compare your setup for Ly to what is required. Note that the agetty related instructions most probably also apply for dinit.

artix
Linux is simple; use Artix, or Submit Your System To Evil Malicious D(a)emons

Re: ly dm dinit scripts

Reply #17
ok, managed to get LY working by replacing "command = /usr/bin/$EXE_NAME" to point to a custom shell sript that run "/usr/bin/agetty -nl /usr/bin/ly-dm 38400 linux"

wierd to have a dinit script included which is incomplete. even the upstream ly repo uses the same incomplete dinit script, at least it should follow how ly was implemented in runit for example.

Re: ly dm dinit scripts

Reply #18
@negative I got same exact issue as you, tried everything and changing to "/usr/bin/agetty -nl /usr/bin/ly-dm 38400 linux", nothing helped. I'm trying to get ly to start in tty2 only, but for now I only experimented with tty7. tty7 is just blank page with blinking cursor no matter what I change.

I'm afraid of breaking stuff in `/etc/dinit.d/config/console.conf`, can I change it to `ACTIVE_CONSOLES="/dev/tty[1,3-6]"`to free tty2?

@negative Could you share all the files that needed for ly? Like git repo or something else if you got it, been stuck on this for past two days. Might just give up and try "Tuigreet" like @Artist suggested.

related: https://github.com/davmac314/dinit/discussions/440

Re: ly dm dinit scripts

Reply #19



im just using the modified launcher from ly-runit. copy this code into your executable path (e.g.  /usr/bin/). Make it executable.

Code: [Select]
#!/bin/sh

## Get the tty from the conf file
CONFTTY=$(cat /etc/ly/config.ini | sed -n 's/^tty.*=[^1-9]*// p')

## The execution vars
# If CONFTTY is empty then default to 2
TTY="tty${CONFTTY:-2}"
TERM_NAME=linux
BAUD=38400

[ -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

#setsid
exec ${GETTY} ${GETTY_ARGS} -nl /usr/bin/ly-dm "${TTY}" "${BAUD_RATE}" "${TERM_NAME}"
#exec setsid /usr/bin/ly-dm

then modify /etc/dinit/ly. change "command = $EXE_NAME" to "command = <path_to_script_from_above>".

enable service. this should be enough to make ly work.


Re: ly dm dinit scripts

Reply #21
Spoke too soon,  after reboot it crashed Hyprland that autostarts on tty1 and switches to tty2 with ly...

I'm giving up, not worth it with my setup.

Re: ly dm dinit scripts

Reply #22
Did you disable the agetty service(s) for the tty(s) you want to use? That is required.

Or indeed try Greetd with Tuigreet.

artist
Linux is simple; use Artix, or Submit Your System To Evil Malicious D(a)emons

Re: ly dm dinit scripts

Reply #23
I think tuigreet needs it's own wiki section.

Re: ly dm dinit scripts

Reply #24
Spoke too soon,  after reboot it crashed Hyprland that autostarts on tty1 and switches to tty2 with ly...

I'm giving up, not worth it with my setup.
disable tty2,

Code: [Select]
# sudo dinitctl disable tty2

i had mine on default, so it starts at tty7 which console and default agetty is not

Re: ly dm dinit scripts

Reply #25
Trying to figure out much the same.
My "/etc/ly/config.ini" is set to start in tty7;
I have additionally changed "/etc/dinit.d/ly" to include the following:

Code: [Select]
inittab-id = 7
inittab-line = tty7

I've also played around with switching the "options" variable between "starts-on-console" and the default "shares-console".
I've used the fix provided in this thread to boot into tty7 with agetty.

My result is that the I do, indeed, boot with tty7 open, however ly is open in tty1 at boot; and is fighting for control over the terminal with the default login script. I'm lost on how to specify it to actually start into tty7.
Does one need to actually compile it from source, then? Or how did you manage to get it running there, @negative and @danielwerg ?

Re: ly dm dinit scripts

Reply #26
did you disable the relevant agetty service as instructed in the ly reedme?

artist
Linux is simple; use Artix, or Submit Your System To Evil Malicious D(a)emons

 

Re: ly dm dinit scripts

Reply #28
Since this keeps coming up (here and elsewhere), I've had a bit of a look at the state of things. Let me weigh in:

  • The dinit service file distributed with ly (both upstream and in Artix) isn't correct. The upstream would possibly work if you wanted to run ly on tty1.
  • The instructions in the ly readme aren't really correct, either
  • As far as I can tell (the documentation for ly isn't great), the tty setting in /etc/ly/config.ini is to tell ly which tty it is (already) running on, not to force it to run on a particular tty
  • To run ly with dinit on a particular tty, the easiest solution is to run it via a getty program (eg agetty). That's what the script posted by negative above does. You could (probably) also just edit the service file to run the command directly (something like "/usr/bin/agetty -nl /usr/bin/ly-dm tty7 38400 linux" - replace tty7 with the tty you want to actually run on, and make sure that there's nothing else trying to run on that tty - see instructions elsewhere in thread, i.e. edit /etc/dinit.d/config/console.conf).
  • If you're happy with it running it on tty1, you could possibly run without using getty and just use the shares-console option instead. That option is already in the Artix ly-dm service description. The reason this works is that it runs the service on the same console that dinit itself is running on, and that's normally tty1. You still need to prevent the regular getty from running on tty1 in this case.

I hope that clears things up.

 
Artix forum uses a single cookie to remember youOK