[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Interface of `shutdown', 'halt', ... programs



On Thu, 2016-10-06 at 13:51 +0300, Dmitry Bogatov wrote:
> > 
> > > 
> > > #838480
> > > [...]
> > > Any suggestions?
> > Is it possible to use a pointyclicky desktoppy widgety thing to reboot
> > a system with runit ?  I guess from your mails you use the command
> > line.
> > [...]
> > I think if I were you I would try installing a system with runit and
> > GNOME, make enough of an emulation that the GNOME shutdown and reboot
> > functions work, and call that "done".
> Thank you for your advice, Ian. You guessed correctly -- 'sudo init 0' is
> good enough for me and I have little knowledge about "pointy-clicky"
> things.  While I can install GNOME on virtual machine (sigh) there are
> also other desktop enviroments (KDE, XFCE, ...).
> 
> Is there some common way to get "pointy-clicky widget"? I assume
> (correct me, if I am wrong) all desktop enviroments share some
> mechanism how to invoke root-only command (shutdown) as regular user,
> so there may be way to invoke just shutdown menu, without need other
> parts of desktop enviroments.
> 
> More suggestions are welcome.

You might take a look at elogind developed in the Guix sphere:
https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00439.html
https://lists.gnu.org/archive/html/guix-devel/2016-03/msg00247.html

They are addressing the problems with gnome and systemd-logind.
https://github.com/wingo/elogind
https://wingolog.org/pub/elogind/

>From the README:
Elogind does monitor power button and the lid switch, like systemd,
but instead of doing RPC to systemd to suspend, poweroff, or restart
the machine, elogind just does this directly. For suspend, hybernate,
and hybrid-sleep, elogind uses the same code as systemd-sleep.
Instead of using a separate sleep.conf file to configure the sleep
behavior, this is included in the [Sleep] section of
/etc/elogind/login.conf.  See the example login.conf for more.  For
shutdown, reboot, and kexec, elogind shells out to "halt", "reboot",
and "kexec" binaries.

The loginctl command has the poweroff, reboot, sleep, hibernate, and
hybrid-sleep commands from systemd, as well as the --ignore-inhibitors
flag.


Reply to: