Upgrading an existing Elive installation to non-systemd (OpenRC) version

Hi, I have now also this issue in my cleanly installation 3.8.50 from zero with OpenRC..

Replying my own comments but this one is for @Thanatermesis .

'elive-pm shutdown|poweroff' points to 'sbin/poweroff' which is, on a systemd machine, linked to 'systemctl' but -..... on my openRC machine it points to '/usr/sbin/halt', which does not completely turn off the machine but merely halts the system. It leaves the power on and will eventually drain the battery. :face_with_hand_over_mouth:

It would be better to use '/usr/sbin/poweroff' .... that does power-off the machine (laptop in my case) and doesn't require entering a sudo password either. :innocent:

I did notice that 'sudo reboot' works from a terminal but NOT from the e16 menu option nor from E27 menu..
On top 'reboot' links to 'halt' but actually does reboot the ,machine. I have no idea why that works.:eyepopping:

Addendum
Scouring the web I discovered that 'lightdm' uses 'consolekit' whereas 'lxdm' uses 'elogind' for authentification. :thinking:
And ..... 'entrance' doesn't show up at all on the openrc system, so that's not an option. :worried:

Addendum2 (sorry, learning as I go along :slight_smile: )

For 'lightdm' to, at least have the shutdown|reboot options available there's a small edit to be made in '/etc/pam.d/lightdm-greeter' where there is a line:
session optional pam_systemd.so
that has to be changed to:
session optional pam_elogind.so

This will NOT repair the shutdown|reboot buttons in the desktop-menu but will at least give a GUI method in lightdm when logged out using those buttons. :thinking:

Aah, good one, ADDED.

But, on the other hand, what is very important is to make the gksu alternative to work on openrc installs, can you make a look to /bin/gksu ? it is basically a script wrapper since gksu doesn't exist since bookworm, so we can make the wrapper to use an alternative when being in openrc... I already did that but seems like it didn't worked ? you may add "set -x" into it to see which command try's to use

ok that's another thing... so elive-pm should point to "poweroff" for the non-systemd cases instead of halt, right ? what is the correct / full command for that that works for you ?

We should better try all that in trixie (not yet), and/or we can patch it. About entrance is not yet clear if we would use it or just make a "greeter" for lightdm using and EDJE/EFL interface (because lightdm core is much more featured, allows multiple users running at ht esame time for example, among other things especially compatible)

Adding the line (instead of replacing) will also work ?

Maybe running a massive sed -i to the directory files when moved to openrc:

/e/pam.d ❯❯❯ ack pam_systemd
common-session
23-session	required	pam_unix.so
24:session	optional	pam_systemd.so
25-session	optional	pam_ecryptfs.so unwrap

lightdm-greeter
17-session   required pam_unix.so
18:session   optional pam_systemd.so

So... we have multiple bugs / things to improve here, on this order, for openrc installs:
gksu should work (it is used by many applications, not only shutdown)
elive-pm should work on openrc installs
lightdm should shutdown & reboot
e16 & e26+ should work too

Will do, given time and opportunity.

Simply "sudo poweroff"

Not 'only' for non-systemd IMO but simply do not use "halt"
I'm actually even not fully in the clear why "halt" is used. Maybe for desktop machines and remote booting ??

The difference is the power-unit being turned off or not. I suspect it's an acpi call. :thinking:

Entrance isn'teven stable yet IMO. So 'lightdm' is the better option and on top the one most used by the 'openrc' devs.
Albeit, I found 'lxdm' quite nice too ...... clean and simple, doing it's job well. :applause:

in fact elive-pm does that, not halt :thinking: , maybe would be better to add a "set -x" in elive-pm to see what is doing / where it stops when shutdown, or sudo poweroff simply dont work in openrc, i don't know

About lightdm, yeah and if you read the conf files in /etc/lightdm you will see that (even with its basic interface) has many good features wanted to a login manager

Yes, I noted that but ....... on my openrc machine 'poweroff' points to 'halt' directly

oh! that's another thing... then poweroff is not the tool itself but a wrapper to another tool. In my laptop it is:

~ ❯❯❯ file /sbin/poweroff
/sbin/poweroff: symbolic link to /bin/systemctl

now im a bit confused... so this "real" halt does shutdown the computer but not "halt" itself? lol

Exactly.
'Halt" stops all CPU processes while 'poweroff' turns off the power unit. Using 'acpi' I suspect.
And .... from what I can tell, 'poweroff' is merely 'shutdown' without all the wall messages.

Maybe ewe should use a built-in to check for 'laptop-tools' and then never use 'halt'. :thinking:

But actually I think we don't use halt ? :thinking: maybe im lost in the convo but elive-pm uses shutdown and not halt so...

Yeah, it does use shutdown but the system i.e Debian uses these links to halt, poweroff, etc, etc,....all in an effort to appease users and their M$ Windows habits.
Ultimately all nix systems need shutdown. LOL

Ok so hum... what's remaining to make it working / fix ? :thinking: i did a few modifications a few days ago... not sure which other things needs to be modified

One of the major issues is also to make gksu correctly working on openrc systems (both for password / passwordless calls, this means like running gksu + any app and gksu with something that is defined on /etc/sudo* to have auto sudo

Well. 'plymouth-theme-retrowave*' should also be removed when going over to 'openrc'.
It keeps on messing with the repos and doesn't work anyway.

I did an 'apug' on the openrc machine I still have (a Thinkpad Helix2) but the shutdown issue remains.
When opting for reboot/shutdown from the E16 menu:

  1. It logs out, shows 'gksu' in a very short flash (too short to react)and goes to Lightdm which still has the reboot|shutdown options greyed out.
    If I'm very fast (and ready) I can enter the credentials and the machine shuts down.....but NOT on the reboot option.
  2. "etc/pam.d/lightdm-greeter" still does not point-to/use 'pam_elogind.so'.

Yes , adding the line "session optional pam_elogind.so" to the end of the file suffices. but hampers 'elive-pm reboot' :slight_smile:

'gksu' and/or 'pkexec' work fine when called from the terminal, so I think the 'elive-pm reboot' fails.
Running 'elive-pm reboot' from the terminal and entering the password in 'gksu', freezes the machine totally.
Not even ssh access. :shocked:
NOTE:
Commenting out the "session optional pam_systemd.so" line does make 'elive-pm reboot' work as it should.

'elive-pm shutdown' does work nicely and shuts down the machine.

On a side note:
'gksu' and 'pkexec' in a terminal have different results.

gksu , after entering password gives:

Whereas 'pkexec' drops me straight into a root-session, quasi 'su'

I don't know what ('gksu' or 'pkexec') the DE menu options uses but I think it's not the right one. At least not in combination with a GUI
Setting a long time-out for gksu/pkexec would help, though. :thinking:

.