From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Nocera Date: Fri, 05 Oct 2012 15:50:48 +0000 Subject: Re: Communicating tablet mode status to userspace Message-Id: <1349452248.11150.6.camel@novo.hadess.net> List-Id: References: <20121002233640.GB8542@core.coreip.homeip.net> <20121003150542.GA8460@kroah.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Daniel Drake Cc: Kay Sievers , Greg KH , Dmitry Torokhov , linux-input@vger.kernel.org, linux-hotplug@vger.kernel.org, Carlos Garnacho Hey Daniel, On Wed, 2012-10-03 at 10:04 -0600, Daniel Drake wrote: > On Wed, Oct 3, 2012 at 9:23 AM, Kay Sievers wrote: > > The usual model is not uid/gid, it's ACLs dynamically applied for > > logged-in users with active sessions: > > http://www.freedesktop.org/software/systemd/man/systemd-logind.service.html > > http://cgit.freedesktop.org/systemd/systemd/tree/src/login/70-uaccess.rules > > Thanks, those were the pointers I needed. > I'll work with this approach. I think that there's a more generic approach to this, which would also work with the tablet Thinkpads. I would export the current "tablet mode" status through sysfs (which is great if your driver keeps state), and send a uevent when the mode changes (in addition to sending out that input event). You'd probably need to tag your device in the udev database so that it can be found and acted upon by user-space (probably a gnome-settings-daemon plugin in your case). Cheers