Skip to content

Port GetSession=auto from logind #151

Description

@jbeich

See systemd/systemd@3b92c086a8d5. Allows consumers (e.g., hypridle) to use GetSession "as is" instead of patching to GetSessionByPID (aka GetSessionForUnixProcess) or GetSessionForCookie.

$ basuctl --system call org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager GetSession s auto
<27>(../src/busctl/busctl.c:1920) Access denied

$ basuctl --system introspect org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager | (read h; echo "$h"; fgrep GetSession)
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
.GetSessionByPID                    method    u         o            -
.GetSessionForCookie                method    s         o            -
.GetSessionForUnixProcess           method    u         o            -
.GetSessions                        method    -         ao           -
.GetSessionsForUnixUser             method    u         ao           -
.GetSessionsForUser                 method    u         ao           -

$ basuctl --system call org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager GetSessionForCookie s $XDG_SESSION_COOKIE
o "/org/freedesktop/ConsoleKit/Session2"

$ basuctl --system call org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager GetSessionByPID u $$
o "/org/freedesktop/ConsoleKit/Session2"

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions