1 |
On Thursday, 27 June 2019 02:18:05 BST Mike Gilbert wrote: |
2 |
> On Wed, Jun 26, 2019, 7:30 PM Neil Bothwick <neil@××××××××××.uk> wrote: |
3 |
> > On Wed, 26 Jun 2019 18:00:22 -0500, »Q« wrote: |
4 |
> > > > In an OpenRC system there is no loginctl. Consequently, unless we |
5 |
> > > > define a separate config in /etc/ to use shutdown (with sudo?) it |
6 |
> > > > won't work. This systemd-ism may be worth a bug report. |
7 |
> > > |
8 |
> > > In /usr/share/sddm/sddm.conf.d/00default.conf I have |
9 |
> > > |
10 |
> > > HaltCommand=/sbin/shutdown -h -P now |
11 |
> > > |
12 |
> > > RebootCommand=/sbin/shutdown -r now |
13 |
> > > |
14 |
> > > I just checked it with sddm-0.18.0, then upgraded to 0.18.1-r1, and it |
15 |
> > > stayed the same, I guess because I have USE="-systemd". |
16 |
> > |
17 |
> > And on a systemd setup, I have |
18 |
> > |
19 |
> > HaltCommand=/usr/bin/systemctl poweroff |
20 |
> > |
21 |
> > so where did Mick's loginctl option come from? |
22 |
> |
23 |
> elogind |
24 |
|
25 |
Yes! It seems elogind affects the commands in file /usr/share/sddm/ |
26 |
sddm.conf.d/00default.conf to use a different HaltCommand and RebootCommand: |
27 |
|
28 |
$ egrep -i 'Halt|Reboot' /usr/share/sddm/sddm.conf.d/00default.conf |
29 |
# Halt command |
30 |
HaltCommand=/usr/bin/loginctl poweroff |
31 |
# Reboot command |
32 |
RebootCommand=/usr/bin/loginctl reboot |
33 |
|
34 |
Here's a kicker: I do not have '/usr/bin/loginctl' in this (openrc + elogind, |
35 |
but -consolekit, -systemd) system: |
36 |
|
37 |
$ which loginctl |
38 |
/bin/loginctl |
39 |
|
40 |
$ ls -la /usr/bin/loginctl |
41 |
ls: cannot access '/usr/bin/loginctl': No such file or directory |
42 |
|
43 |
$ /usr/bin/loginctl poweroff |
44 |
-bash: /usr/bin/loginctl: No such file or directory |
45 |
|
46 |
NOTE: Running '/bin/loginctl poweroff' from a console works. |
47 |
|
48 |
|
49 |
So perhaps this explains why I also do not have Shutdown/Reboot buttons |
50 |
showing up on the default theme at the top RH corner? Errm ... not so! |
51 |
Please walk through this test case with me: |
52 |
|
53 |
1. I log out, or reboot. The sddm DM screen shows no Shutdown/Reboot buttons. |
54 |
Consequently, I have no means of shutting down or rebooting from the DM |
55 |
screen. |
56 |
|
57 |
2. I log out, drop into a console, stop the xdm rc service and restart it. |
58 |
The sddm screen launches and it now presents Shutdown/Reboot buttons as it |
59 |
should! |
60 |
|
61 |
Question: if /usr/bin/loginctl is not present, what commands do the buttons |
62 |
operate/which config file they read, to shutdown/reboot? |
63 |
|
64 |
NOTE: If I login/out, or reboot, the buttons are gone again. :-/ |
65 |
|
66 |
3. I use KDE's systemsettings 'Startup and Shutdown/Login Screen (SDDM)' to |
67 |
change the default theme. This creates a new /etc/sddm.conf file, with the |
68 |
new Theme entry I selected, but the Halt/Reboot commands are empty. I logout |
69 |
or reboot and the buttons are absent again, or when shown in the new theme |
70 |
they are either greyed out and do not work (Breeze) or not greyed out and |
71 |
still not work. |
72 |
|
73 |
I have not tried setting up a config file in /etc/ and modifying it |
74 |
comprehensively, i.e. specifying my own theme, Halt/Reboot commands, etc., but |
75 |
I do not have a coherent theory why the above behaviour is observed. |
76 |
|
77 |
The next thing to try: |
78 |
|
79 |
I don't have elogind starting up as a boot level rc service, because it is |
80 |
launched when needed by dbus or pam. Perhaps if elogind is running as a |
81 |
background service sddm will (re)launch differently? |
82 |
|
83 |
-- |
84 |
|
85 |
Regards, |
86 |
|
87 |
Mick |