From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LMRKR-00025J-Rl for garchives@archives.gentoo.org; Mon, 12 Jan 2009 18:16:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 51F7BE0221; Mon, 12 Jan 2009 18:15:58 +0000 (UTC) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by pigeon.gentoo.org (Postfix) with ESMTP id E2054E0221 for ; Mon, 12 Jan 2009 18:15:57 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id e21so2382811fga.14 for ; Mon, 12 Jan 2009 10:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:x-homepage:x-operating-system :user-agent; bh=4lSCi2uol/8sq4nAcIXj6reN6cZQpTaRWL0d7awxFHk=; b=PTVpfO4Z/p/XeyBNho1Xjm+86lRY2ZXpjP8lN1Z581AHztbR1X15xRxuij+KY8i6c+ 8gzzTc+IOhzi9PwT8KK1bRE/Oo32ModKg0lbSeOJUrydHXVIEJfwWeLg6427lZCECC3e qBgZ04Aa9Fr5hIYB8dg158WYxyviLvtfqS6FY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :x-homepage:x-operating-system:user-agent; b=t5O3jPlA+V7Q1Z3UMKDNTKgpjD4mlSqEnJ1O/7hEeM7Q0p6GvUhxQXpct9rcdHDC1p MfW+woJD5YE/LuecPCFTpUEvHQNN+o6NvJsyzPq6fpW4soYdV1XwHFBATBEbQpb/5I0q gDmnGOw1yStBI1/U/vdxCwEz89yeX+9jqJnhQ= Received: by 10.86.62.3 with SMTP id k3mr11081532fga.47.1231784157156; Mon, 12 Jan 2009 10:15:57 -0800 (PST) Received: from localhost ([151.80.153.21]) by mx.google.com with ESMTPS id 4sm43543046fgg.24.2009.01.12.10.15.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Jan 2009 10:15:55 -0800 (PST) Date: Mon, 12 Jan 2009 19:13:32 +0100 From: Momesso Andrea To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Permissions of files in /sys/ Message-ID: <20090112181332.GB15628@revolver> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <20090107142956.GB5477@revolver> <58965d8a0901071247x2663df01o5e3c963f83d244df@mail.gmail.com> <94f5c8410901090828g1f55b87du9b35c70a88bca00d@mail.gmail.com> 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-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y7xTucakfITjPcLV" Content-Disposition: inline In-Reply-To: <94f5c8410901090828g1f55b87du9b35c70a88bca00d@mail.gmail.com> X-Homepage: http://topperh.blogspot.com X-Operating-System: Gentoo Linux User-Agent: Mutt/1.5.16 (2007-06-09) X-Archives-Salt: b5ccffd5-1d21-4dd3-99de-f740950c1b95 X-Archives-Hash: 78dfc65dd469443bb7bdb27f28156fc9 --Y7xTucakfITjPcLV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 09, 2009 at 05:28:40PM +0100, Andrea Momesso wrote: > On Wed, Jan 7, 2009 at 9:47 PM, Paul Hartman > wrote: > > On Wed, Jan 7, 2009 at 8:29 AM, Momesso Andrea wrote: > >> I'd like to make the file /sys/class/backlight/asus-laptop/brightness > >> writeable for users, so that I don't need to be root anymore to change > >> the brightness. > >> > >> Of course I can chown or chmod ot in local.start but I'm asking if the= re > >> is a cleaner way. > > > > I guess you need to use udevinfo to get the important information > > about /sys/class/backlight/asus-laptop/brightness and then write up a > > rule, slap it into a file in /etc/udev/rules.d/ and enjoy your new > > permissions. :) I don't have that device on my system so I can't > > really suggest anything more specific. > > > > Here's a udev rules HOWTO that might help: > > > > http://www.reactivated.net/writing_udev_rules.html > > > > (specifically "Controlling permissions and ownership") > > > > Good luck :) > > Paul > > > > >=20 > It looks like I cannot simply write a rule to change that permission... > After experiencing some failures I guess that udev rules can change > permissions on /dev/ files, but not on /sys/ files... >=20 > This is my case: >=20 > # udevadm info -a -p /sys/class/backlight/asus-laptop/ >=20 > looking at device '/class/backlight/asus-laptop': > KERNEL=3D=3D"asus-laptop" > SUBSYSTEM=3D=3D"backlight" > DRIVER=3D=3D"" > ATTR{bl_power}=3D=3D"0" > ATTR{brightness}=3D=3D"5" > ATTR{actual_brightness}=3D=3D"5" > ATTR{max_brightness}=3D=3D"15" >=20 > And this is the rule I added in /etc/udev/rules.d/10-local.rules >=20 > KERNEL=3D=3D"asus-laptop", SUBSYSTEM=3D=3D"backlight", GROUP=3D"video", M= ODE=3D"0660" >=20 > After a reboot I still get this: >=20 > # ls -la /sys/class/backlight/asus-laptop > total 0 > drwxr-xr-x 3 root root 0 2009-01-09 15:18 . > drwxr-xr-x 3 root root 0 2009-01-09 15:18 .. > -r--r--r-- 1 root root 4096 2009-01-09 15:18 actual_brightness > -rw-r--r-- 1 root root 4096 2009-01-09 15:19 bl_power > -rw-r--r-- 1 root root 4096 2009-01-09 17:02 brightness > -r--r--r-- 1 root root 4096 2009-01-09 15:18 max_brightness > drwxr-xr-x 2 root root 0 2009-01-09 15:19 power > lrwxrwxrwx 1 root root 0 2009-01-09 15:18 subsystem -> ../../backlight > -rw-r--r-- 1 root root 4096 2009-01-09 15:18 uevent >=20 > Googling a bit I found some solutions [1] [2], but all of them are > changing the permissions at every > boot. It works, but it looks to me a bit unclean... > [1] http://wiki.laptop.org/go/Xfce_keybindings#Adjust_screen_brightness_b= uttons > [2] http://www.thinkwiki.org/wiki/Automatically_reduce_brightness >=20 Hmmm... Having not recived any answers might mean that my suspects are right and there is no way to create an udev rule for my scope. I think I will have to change those permissions manually at boot time Thanks anyway for help --=20 Momesso (TopperH) Andrea http://topperh.blogspot.com Jabber: topper_harley@jabber.org ICQ: 224179391 --Y7xTucakfITjPcLV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAklriEwACgkQTusdC+HYtiJPkQCghy7d1Mjcd+7tS+z90w+aJq+J EuUAoKC2txzUzrGDycIMjpcaX0ozaw4z =C2Yk -----END PGP SIGNATURE----- --Y7xTucakfITjPcLV--