[systemd-devel] How to use systemd-gnome-ask-password-agent?

Mantas Mikulėnas grawity at gmail.com
Tue Jan 19 06:04:10 PST 2016


On Fri, Jan 15, 2016 at 8:31 PM, Ilya Basin <basinilya at gmail.com> wrote:

> Hi.
> I want a graphical password prompt when an entry in /etc/crypttab is
> activated.
> I have Archlinux/Xfce
>
> Additionally installed xfce4-notifyd.
>
> This works:
>
>     $ sudo systemd-gnome-ask-password-agent
>
> I think I can add this to ~/.xprofile, but I guess that's not how it was
> intended to work.
>

Looks almost normal – that's also how other 'agents' like
polkit-gnome-agent or nm-applet work. (They belong to different daemons but
essentially do the same task.) Although, I suppose, the agent
should autostart via /etc/xdg/autostart or ~/.config/autostart (Xfce's
session settings), but that doesn't make any difference in the end.

The only difference is that you *really* shouldn't need `sudo` here. The
agent itself will use polkit to send responses to systemd. Maybe your
display manager doesn't properly set up a logind session? Does `pkexec`
work? Does `pkcheck -p $$ -a org.freedesktop.systemd1.reply-password -u`
work?

(Though I'm not entirely sure what restrictions the polkit side is supposed
to have. Is asked for admin password normal here, or should it
automatically allow replies from console sessions?)

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20160119/14d7ff00/attachment.html>


More information about the systemd-devel mailing list