Re: git: d9c63d9e7e80 - main - sysutils/consolekit2: Pull in commit adding GetSession method

From: Gleb Popov <arrowd_at_freebsd.org>
Date: Fri, 21 Mar 2025 14:41:04 UTC
On Fri, Mar 21, 2025 at 5:30 PM Jan Beich <jbeich@freebsd.org> wrote:
>
> Gleb Popov <arrowd@FreeBSD.org> writes:
>
> > -GH_TAGNAME=  70b5f7d6f710377f288b4723a32923290dc16501
> > +GH_TAGNAME=  fbf7045c8d83b0c3f08535577aa2365bf9b250bf
>
> Does GetSession support auto instead of SessionN as argument? See
> https://github.com/ConsoleKit2/ConsoleKit2/issues/151
>
> $ dbus-send --system --dest=org.freedesktop.ConsoleKit \
>   --type=method_call --print-reply --reply-timeout=2000 \
>   /org/freedesktop/ConsoleKit/Manager \
>   org.freedesktop.ConsoleKit.Manager.GetSession string:Session1
> method return time=[...] sender=:1.75 -> destination=:1.149 serial=195 reply_serial=2
>    object path "/org/freedesktop/ConsoleKit/Session1"
>
> $ dbus-send --system --dest=org.freedesktop.ConsoleKit \
>   --type=method_call --print-reply --reply-timeout=2000 \
>   /org/freedesktop/ConsoleKit/Manager \
>   org.freedesktop.ConsoleKit.Manager.GetSession string:auto
> Error org.freedesktop.ConsoleKit.Manager.Error.General: Unable to find session for ID

Unfortunately, nope. Maybe you can patch the client code to call
GetCurrentSession instead as a poor man's hack.