On Thursday, 27 June 2019 02:18:05 BST Mike Gilbert wrote:
> On Wed, Jun 26, 2019, 7:30 PM Neil Bothwick <n...@digimed.co.uk> wrote:
> > On Wed, 26 Jun 2019 18:00:22 -0500, »Q« wrote:
> > > > In an OpenRC system there is no loginctl.  Consequently, unless we
> > > > define a separate config in /etc/ to use shutdown (with sudo?) it
> > > > won't work.  This systemd-ism may be worth a bug report.
> > > 
> > > In /usr/share/sddm/sddm.conf.d/00default.conf I have
> > > 
> > >   HaltCommand=/sbin/shutdown -h -P now
> > >   
> > >   RebootCommand=/sbin/shutdown -r now
> > > 
> > > I just checked it with sddm-0.18.0, then upgraded to 0.18.1-r1, and it
> > > stayed the same, I guess because I have USE="-systemd".
> > 
> > And on a systemd setup, I have
> > 
> >         HaltCommand=/usr/bin/systemctl poweroff
> > 
> > so where did Mick's loginctl option come from?
> 
> elogind

Yes!  It seems elogind affects the commands in file /usr/share/sddm/
sddm.conf.d/00default.conf to use a different HaltCommand and RebootCommand:

$ egrep -i 'Halt|Reboot' /usr/share/sddm/sddm.conf.d/00default.conf 
# Halt command
HaltCommand=/usr/bin/loginctl poweroff
# Reboot command
RebootCommand=/usr/bin/loginctl reboot

Here's a kicker:  I do not have '/usr/bin/loginctl' in this (openrc + elogind, 
but -consolekit, -systemd) system:

$ which loginctl
/bin/loginctl

$ ls -la /usr/bin/loginctl
ls: cannot access '/usr/bin/loginctl': No such file or directory

$ /usr/bin/loginctl poweroff
-bash: /usr/bin/loginctl: No such file or directory

NOTE: Running '/bin/loginctl poweroff' from a console works.


So perhaps this explains why I also do not have Shutdown/Reboot buttons 
showing up on the default theme at the top RH corner?  Errm ... not so!  
Please walk through this test case with me:

1. I log out, or reboot.  The sddm DM screen shows no Shutdown/Reboot buttons.  
Consequently, I have no means of shutting down or rebooting from the DM 
screen.

2. I log out, drop into a console, stop the xdm rc service and restart it.  
The sddm screen launches and it now presents Shutdown/Reboot buttons as it 
should!

Question: if /usr/bin/loginctl is not present, what commands do the buttons 
operate/which config file they read, to shutdown/reboot?

NOTE: If I login/out, or reboot, the buttons are gone again.  :-/

3. I use KDE's systemsettings 'Startup and Shutdown/Login Screen (SDDM)' to 
change the default theme.  This creates a new /etc/sddm.conf file, with the 
new Theme entry I selected,  but the Halt/Reboot commands are empty.  I logout 
or reboot and the buttons are absent again, or when shown in the new theme 
they are either greyed out and do not work (Breeze) or not greyed out and 
still not work.

I have not tried setting up a config file in /etc/ and modifying it 
comprehensively, i.e. specifying my own theme, Halt/Reboot commands, etc., but 
I do not have a coherent theory why the above behaviour is observed.

The next thing to try:

I don't have elogind starting up as a boot level rc service, because it is 
launched when needed by dbus or pam.  Perhaps if elogind is running as a 
background service sddm will (re)launch differently?

-- 

Regards,

Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to