Skip to content

Running pkexec without a graphical agent fails even with falling back onto pkttyagent - polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie #18012

Description

@CMCDragonkai

Issue description

Running pkexec pwd gives you:

polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized

This incident has been reported.

I don't have a graphical polkit agent running, so pkexec should fallback onto pkttyagent. However it doesn't seem to work in this case.

Note that to make it work, I have to run pkttyagent in a different terminal binding to the PID of the first terminal that is running pkexec pwd, and that terminal will show the same workflow but will have succeeded at authentication. But this shouldn't be necessary as the pkttyagent should just work on the original terminal when called by pkexec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: freedesktopInteroperability and shared base technology for X, Wayland and others9.needs: upstream fixThis PR needs upstream to change something

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions