From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1C7AA1396D0 for ; Wed, 13 Sep 2017 09:07:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EB565E0DA4; Wed, 13 Sep 2017 09:07:44 +0000 (UTC) Received: from gw2.antarean.org (gw2.antarean.org [141.105.125.208]) by pigeon.gentoo.org (Postfix) with ESMTP id 9260FE0D77 for ; Wed, 13 Sep 2017 09:07:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gw2.antarean.org (Postfix) with ESMTP id 39036121AA4 for ; Wed, 13 Sep 2017 11:06:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at antarean.org Received: from gw2.antarean.org ([127.0.0.1]) by localhost (gw2.antarean.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HoicwHeKXZqa for ; Wed, 13 Sep 2017 11:06:53 +0200 (CEST) Received: from mailstore1.antarean.org (localhost [127.0.0.1]) by gw2.antarean.org (Postfix) with ESMTP id AFA7C1214B0 for ; Wed, 13 Sep 2017 11:06:53 +0200 (CEST) Received: from eve.localnet (eve.adm.antarean.org [10.55.16.44]) by mailstore1.antarean.org (Postfix) with ESMTP id 927D332 for ; Wed, 13 Sep 2017 11:07:42 +0200 (CEST) From: "J. Roeleveld" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: Unlocking Plasma desktop in Gentoo without systemd Date: Wed, 13 Sep 2017 11:07:42 +0200 Message-ID: <16558269.VYKaH625ab@eve> Organization: Antarean In-Reply-To: <7ca2b0e8-a8f8-eb4e-8b60-ee7f262c4b7e@gentoo.org> References: <1796091.ePQMIEJqSB@dell_xps> <114afe11-602f-39f0-e240-2bbd0c8948c0@gmail.com> <7ca2b0e8-a8f8-eb4e-8b60-ee7f262c4b7e@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Archives-Salt: 6f4b6e4e-641f-4831-b7a6-14dd1bbd75b9 X-Archives-Hash: af3222e659b83035b2db40d54f110cf7 On Tuesday, September 12, 2017 2:13:32 PM CEST Michael Palimaka wrote: > On 09/12/2017 05:04 AM, Daniel Frey wrote: > > According to a comment in the bug, you can try to figure out which > > session it is (ck-list-sessions) and look for the X11 display property > > set. This will not work (or could be difficult) if you have several > > users using KDE at the same time and can't tell the sessions apart. > > > > Once you figure that out, remember the session name and: > > > > # su -c 'dbus-send --system --print-reply \ > > --dest="org.freedesktop.ConsoleKit" \ > > > > /org/freedesktop/ConsoleKit/ \ > > > > org.freedesktop.ConsoleKit.Session.Unlock' > > If there a nice way to wrap this up in a script I'd be interesting in > shipping this for non-logind systems. There is: joost@eve ~ $ cat /usr/local/bin/unlock-screens.sh ck-list-sessions | grep Session | sed 's/\(.*\):/dbus-send --system --print- reply --dest\=\"org.freedesktop.ConsoleKit\" \/org\/freedesktop\/ConsoleKit\/ \1 org.freedesktop.ConsoleKit.Session.Unlock/' | sh joost@eve ~ $ cat /usr/local/bin/lock-screens.sh ck-list-sessions | grep Session | sed 's/\(.*\):/dbus-send --system --print- reply --dest\=\"org.freedesktop.ConsoleKit\" \/org\/freedesktop\/ConsoleKit\/ \1 org.freedesktop.ConsoleKit.Session.Lock/' | sh I build these when I encountered this same issue nearly a year ago. I run them as "root" and they will (un)lock ALL X-sessions. > Another option is sys-auth/elogind, which provides the logind interface > and tools (like loginctl) for non-systemd systems. This is what I've > been testing with OpenRC for some time. If it works better, I have no issue with it being pulled in. > I read that ConsoleKit is also supporting the logind dbus interface now. > This would in theory make it easy to create a tool to unlock the > session, but I haven't had a chance to test it yet. Better solutions are always welcome. -- Joost