From owner-freebsd-mobile@FreeBSD.ORG Fri Jun 26 19:44:20 2009 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D4A31065677; Fri, 26 Jun 2009 19:44:20 +0000 (UTC) (envelope-from marcus@freebsd.org) Received: from av-tac-rtp.cisco.com (hen.cisco.com [64.102.19.198]) by mx1.freebsd.org (Postfix) with ESMTP id D67F08FC2B; Fri, 26 Jun 2009 19:44:19 +0000 (UTC) (envelope-from marcus@freebsd.org) X-TACSUNS: Virus Scanned Received: from rooster.cisco.com (localhost.cisco.com [127.0.0.1]) by av-tac-rtp.cisco.com (8.13.8+Sun/8.13.8) with ESMTP id n5QJMJ14006863; Fri, 26 Jun 2009 15:22:19 -0400 (EDT) Received: from [192.168.1.243] (jclarke-vpn.cisco.com [172.18.254.237]) by rooster.cisco.com (8.13.8+Sun/8.13.8) with ESMTP id n5QJMHF8026292; Fri, 26 Jun 2009 15:22:18 -0400 (EDT) Message-ID: <4A451FE9.60002@freebsd.org> Date: Fri, 26 Jun 2009 15:22:17 -0400 From: Joe Marcus Clarke Organization: FreeBSD, Inc. User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: vova@fbsd.ru References: <1245773234.11855.22.camel@localhost> In-Reply-To: <1245773234.11855.22.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: gnome , mobile Subject: Re: dbus and system events - howto X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2009 19:44:20 -0000 Vladimir Grebenschikov wrote: > Hi > > I am wandering is there "right" way to pass "system" events, like > brightness buttons, volume buttons reported with devd to gnome desktop > to: > 1. do appropriate changes (change volume, brightness, etc) > 2. show nice informational popup (with volume bar and so on) > ? > > Before I had simple script, called from devd, it configures system with > xbacklight, mixer and sysctl's, and shows something with onscreend > daemon. > > After Xorg update oscreend starts to freeze by some reason. So now I am > thinking about more "sane" way to link system events to gnome desktop. > > Also xbacklight now does not works with radeonhd again. > > So far I've dig for following dbus calls to manage brihgtness: > /usr/local/bin/dbus-send --system --type=method_call --print-reply=1 \ > --dest=org.freedesktop.PowerManagement \ > --session /org/freedesktop/PowerManagement/Backlight \ > org.freedesktop.PowerManagement.Backlight.GetBrightness > > /usr/local/bin/dbus-send --system --type=method_call --print-reply=1 \ > --dest=org.freedesktop.PowerManagement \ > --session /org/freedesktop/PowerManagement/Backlight \ > org.freedesktop.PowerManagement.Backlight.SetBrightness uint32:$1 > > But, looks like they are not shows popup. > And I've not found simple solution about volume yet. I haven't done much with power management in a long time as I don't have a laptop with good working PM. However, the volume support is easy. Just go to your Keyboard Shortcuts capplet, and add a new hotkey for the volume up and volume down actions. I actually used the Dell buttons on my laptop for this, and it works very well in GNOME. Joe > > Hints will be appreciated. > > PS: > Side question, can dbus work without DISPLAY and XAUTHORITY initialized ? > (system bus ?, but above calls requires them) > > PPS: > 8-CURRENT, Gnome, IBM T60. > -- Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome