From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Nocera Subject: Re: Communicating tablet mode status to userspace Date: Fri, 05 Oct 2012 17:50:48 +0200 Message-ID: <1349452248.11150.6.camel@novo.hadess.net> References: <20121002233640.GB8542@core.coreip.homeip.net> <20121003150542.GA8460@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from relay3-d.mail.gandi.net ([217.70.183.195]:55569 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751225Ab2JEPuw (ORCPT ); Fri, 5 Oct 2012 11:50:52 -0400 In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org 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