From: microcai <microcai@fedoraproject.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How to poweroff the system from user?
Date: Thu, 26 Mar 2015 08:46:47 +0800 [thread overview]
Message-ID: <5370395.GfKeZNj2bZ@gentoo> (raw)
In-Reply-To: <CADPrc82e7grS2dPysM35W3zTJ7qxhhzANF_gWNf5icgjWymWuA@mail.gmail.com>
on Saturday 21 March 2015 13:58:45,Canek Peláez Valdés wrote:
> On Sat, Mar 21, 2015 at 1:47 PM, Rich Freeman <rich0@gentoo.org> wrote:
> > On Sat, Mar 21, 2015 at 3:39 PM, German <gentgerman@gmail.com> wrote:
> > > No, I am trying to shutdown from a console
> >
> > Well, the old answer would be that you need to use sudo to run it, as
> > shutting down is a privileged operation.
> >
> > I suspect that the new answer is that with appropriate
> > policykit/consolekit/etc settings you can probably allow somebody
> > sitting at a physical console to shut down the system, or any
> > logged-in user if you prefer. However, I haven't actually set that up
> > myself.
>
> logind does that for you automagically™. The first seat has the rights to
> poweroff or reboot the machine, and it can differentiate between local and
> remote logins. You can check if your user session has the permissions to
> poweroff/reboot via dbus:
>
> $ gdbus call --system --dest org.freedesktop.login1 --object-path
> /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanPowerOff
> ('yes',)
>
> $ gdbus call --system --dest org.freedesktop.login1 --object-path
> /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanReboot
> ('yes',)
>
> But you need systemd to use logind1. There has been some attempts to
> reimplement logind outside systemd, but I'm not sure how advanced they are.
>
> This kind of problems were one of the reasons for creating logind.
>
and dump people keep talking nonsencely that sysvinit is enough while it
cannot even handle reboot for normal user. sad.
> Regards.
> --
> Canek Peláez Valdés
> Profesor de asignatura, Facultad de Ciencias
> Universidad Nacional Autónoma de México
next prev parent reply other threads:[~2015-03-26 0:44 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-21 19:26 [gentoo-user] How to poweroff the system from user? German
2015-03-21 19:34 ` Alexander Kapshuk
2015-03-21 19:35 ` Alexander Kapshuk
2015-03-21 22:38 ` Fernando Rodriguez
2015-03-21 22:52 ` Emanuele Rusconi
2015-03-21 23:03 ` Fernando Rodriguez
2015-03-21 19:39 ` German
2015-03-21 19:47 ` Rich Freeman
2015-03-21 19:58 ` Canek Peláez Valdés
2015-03-26 0:46 ` microcai [this message]
2015-03-29 11:55 ` Volker Armin Hemmann
2015-03-29 12:33 ` Jorge Almeida
2015-03-29 12:44 ` Rich Freeman
2015-03-21 20:01 ` German
2015-03-21 20:17 ` Jc García
2015-03-21 20:09 ` Fernando Rodriguez
2015-03-21 20:32 ` Philip Webb
2015-03-21 20:50 ` Rich Freeman
2015-03-21 20:58 ` German
2015-03-21 22:20 ` Jc García
2015-03-22 10:30 ` Peter Humphrey
2015-03-22 11:04 ` [gentoo-user] " Nikos Chantziaras
2015-03-22 11:27 ` Peter Humphrey
2015-03-22 15:58 ` Philip Webb
2015-03-22 19:13 ` Nikos Chantziaras
2015-03-22 20:12 ` Philip Webb
2015-03-22 23:18 ` Nikos Chantziaras
2015-03-22 21:13 ` Matti Nykyri
2015-03-29 10:23 ` lee
2015-03-31 5:57 ` Fernando Rodriguez
2015-03-31 6:38 ` Fernando Rodriguez
2015-03-31 9:36 ` Tom H
2015-03-31 9:42 ` Emanuele Rusconi
2015-03-31 17:13 ` Tom H
2015-04-04 12:41 ` lee
2015-04-04 15:16 ` Rich Freeman
2015-04-07 20:10 ` lee
2015-04-07 20:24 ` lee
2015-04-04 22:36 ` Fernando Rodriguez
2015-04-07 19:21 ` lee
2015-04-07 20:43 ` Fernando Rodriguez
2015-04-07 21:27 ` Neil Bothwick
2015-04-08 21:47 ` lee
2015-04-14 21:07 ` Emanuele Rusconi
2015-04-14 22:06 ` lee
2015-04-14 23:02 ` Neil Bothwick
2015-05-09 15:13 ` lee
2015-04-04 22:37 ` Neil Bothwick
2015-04-05 7:27 ` Dale
2015-04-05 11:24 ` Rich Freeman
2015-04-05 15:13 ` Dale
2015-03-22 20:36 ` [gentoo-user] " Jc García
2015-03-23 9:46 ` Peter Humphrey
2015-03-23 10:12 ` 回复:Re: " Nicol TAO
2015-03-23 11:28 ` Rich Freeman
2015-03-23 12:13 ` [gentoo-user] " Nikos Chantziaras
2015-03-23 12:16 ` Matti Nykyri
2015-03-23 13:32 ` Nikos Chantziaras
2015-03-23 12:16 ` [gentoo-user] " Emanuele Rusconi
2015-03-29 10:43 ` lee
2015-03-29 23:20 ` Walter Dnes
2015-03-29 19:30 ` Rich Freeman
2015-03-30 0:32 ` Walter Dnes
2015-03-30 0:52 ` Rich Freeman
2015-03-30 8:09 ` Mick
2015-03-30 9:41 ` Rich Freeman
2015-03-30 8:00 ` Mick
2015-04-04 12:47 ` lee
2015-03-21 22:51 ` Fernando Rodriguez
2015-03-22 6:32 ` German
2015-03-22 6:49 ` Matti Nykyri
2015-03-22 7:06 ` German
2015-03-22 7:11 ` Alexander Kapshuk
2015-03-22 7:22 ` Matti Nykyri
2015-03-22 7:19 ` Fernando Rodriguez
2015-03-22 7:30 ` German
2015-03-22 7:34 ` Matti Nykyri
2015-03-22 7:35 ` Fernando Rodriguez
2015-03-22 7:55 ` German
2015-03-22 7:47 ` Fernando Rodriguez
2015-03-22 7:57 ` German
2015-03-23 1:39 ` Walter Dnes
2015-03-22 7:31 ` Fernando Rodriguez
2015-03-22 7:35 ` Matti Nykyri
2015-03-22 7:55 ` Fernando Rodriguez
2015-03-22 7:56 ` German
2015-03-26 0:53 ` microcai
2015-03-26 15:36 ` Tom H
2015-03-22 7:41 ` [gentoo-user] " Nikos Chantziaras
2015-03-26 1:46 ` [gentoo-user] " wabenbau
2015-03-26 16:13 ` [gentoo-user] " Hans
2015-03-26 16:28 ` Francisco Ares
2015-03-26 19:02 ` Emanuele Rusconi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5370395.GfKeZNj2bZ@gentoo \
--to=microcai@fedoraproject.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox