Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-10 Thread Willie Wong
On Wed, Mar 10, 2010 at 09:21:06AM +0800, Xi Shen wrote:
 i kanda thought about that for the usb stuff. but i have not resolve
 it. may be i also need the pmout package to allow me to mount the usb
 disk?
 
 the big problem now is the battery information. i really have no idea
 where to look for it. it is really dangerous to us a laptop without
 knowing when the battery will die.

I am rather curious what application you are using to get battery
information that requires it being root. 

/proc/acpi/battery/BAT0/state is 0444 on my netbook/laptop since
forever. I just use a bash function to parse it and display it on my
${PS1}. 

W
-- 
Willie W. Wong ww...@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
 et vice versa   ~~~  I. Newton



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-10 Thread Xi Shen
On Wed, Mar 10, 2010 at 5:05 PM, Willie Wong ww...@math.princeton.edu wrote:
 I am rather curious what application you are using to get battery
 information that requires it being root.

 /proc/acpi/battery/BAT0/state is 0444 on my netbook/laptop since
 forever. I just use a bash function to parse it and display it on my
 ${PS1}.


my laptop is thinkpad t61, and i do not have /proc/acpi/battery/BATO/state... :(

now i have a damn wired good news. all the problems i talked about are
gone. :) i can access my usb disk, i can see the battery info.

yesterday, after i have joined those groups, i did not restart my
system. i just exit X, and log off, then log on, and i did not able to
access those resources. but today, after a cold start up, all the
problems are fixed without touching any configuration.

i think this is just a group and permission issue.


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-10 Thread Neil Bothwick
On Wed, 10 Mar 2010 19:28:26 +0800, Xi Shen wrote:

 yesterday, after i have joined those groups, i did not restart my
 system. i just exit X, and log off, then log on, and i did not able to
 access those resources. but today, after a cold start up, all the
 problems are fixed without touching any configuration.
 
 i think this is just a group and permission issue.

Logging out of and back into X should be enough for any group changes to
take effect. I wonder if it could have been a module loading problem.


-- 
Neil Bothwick

A great many people mistake opinions for thoughts. -- Herbert V. Prochnow


signature.asc
Description: PGP signature


Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-10 Thread Xi Shen
On Wed, Mar 10, 2010 at 7:40 PM, Neil Bothwick n...@digimed.co.uk wrote:
 On Wed, 10 Mar 2010 19:28:26 +0800, Xi Shen wrote:

 i think this is just a group and permission issue.

 Logging out of and back into X should be enough for any group changes to
 take effect. I wonder if it could have been a module loading problem.



you said the group changes should take effect after i logged off. if
it is a module loading problem, i should be able to load those modules
and should be able use the resources yesterday.

i am now the member of the following group: disk wheel audio cdrom
video usb users plugdev, and i have restart my laptop again, and i
still have access to usb and battery info.


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-10 Thread Paul Hartman
On Wed, Mar 10, 2010 at 5:28 AM, Xi Shen davidshe...@googlemail.com wrote:
 now i have a damn wired good news. all the problems i talked about are
 gone. :) i can access my usb disk, i can see the battery info.

Congratulations :)

This reminds me to attempt to solve why my laptop has no battery info.
I think I need to create a custom DSDT...



[gentoo-user] normal user do not have access to usb, and many other things

2010-03-09 Thread Xi Shen
hi,

i usually use my linux system with root account. i think it is not
good, so i created a normal user account for myself. but i found that
i cannot access many system resources, like usb disk, battery
informatiion, etc.

i am already in these groups: disk,wheel,audio,video,usb,haldaemon,plugdev.

now, i cannot get notification when i plug a new usb device. my
battery gadget says battery information is not available.

all there stuffs works fine if i log in with root account.


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-09 Thread Mick
On 9 March 2010 11:14, Xi Shen davidshe...@googlemail.com wrote:
 hi,

 i usually use my linux system with root account. i think it is not
 good, so i created a normal user account for myself. but i found that
 i cannot access many system resources, like usb disk, battery
 informatiion, etc.

 i am already in these groups: disk,wheel,audio,video,usb,haldaemon,plugdev.

 now, i cannot get notification when i plug a new usb device. my
 battery gadget says battery information is not available.

 all there stuffs works fine if i log in with root account.

You only have yourself to blame I'm afraid ...

When you login to xorg using a root account some configuration files
become owned by root.  A normal user can no longer access them.  Most
desktops should be clever enough to allow users to create their own
configuration files in their home directory - but I am not sure how
you have yours set up.

Either way, to login in X as root user is a *very* bad idea from a
security perspective.  Personally, I recommend to reinstall Gentoo
from scratch, instead of messing up with access permissions on config
files.  It would also teach you to follow the Gentoo handbook to the
letter (which asks you to set up a plain user account during the
installation).  ;-)
-- 
Regards,
Mick



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-09 Thread Xi Shen
On Tue, Mar 9, 2010 at 8:48 PM, Mick michaelkintz...@gmail.com wrote:
 Yes, that's how it *should* work, but it evidently isn't.  Maybe
 someone else more experienced in KDE can explain what happened and why
 the particular functions are now not available to plain users, or if
 you have another machine which has been running properly you could
 compare and contrast access rights between the two systems.

 Meanwhile, just as a test, you may want to logout of X, move the
 /root/.kde4 folder and /home/user/.kde4 somewhere else, then restart
 X as a plain user and see if these functions are working properly now.
  If not then I suspect the problem is not with these user specific
 configuration files but with the system KDE or X files.

 HTH.
 --
 Regards,
 Mick




i tried your idea, no doubt, it does not work. hope someone with more
system admin knowledge could help me :)


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-09 Thread Xi Shen
On Tue, Mar 9, 2010 at 7:24 PM, Mick michaelkintz...@gmail.com wrote:

 You only have yourself to blame I'm afraid ...

 When you login to xorg using a root account some configuration files
 become owned by root.  A normal user can no longer access them.  Most
 desktops should be clever enough to allow users to create their own
 configuration files in their home directory - but I am not sure how
 you have yours set up.


if kde created configuration file when i log in as root, it should
only create the configuration files for my root, and should not affect
other users. so i guess those issues are not specific to kde, and my
account do not have access to those resources any way...


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-09 Thread Mick
On 9 March 2010 12:31, Xi Shen davidshe...@googlemail.com wrote:
 On Tue, Mar 9, 2010 at 7:24 PM, Mick michaelkintz...@gmail.com wrote:

 When you login to xorg using a root account some configuration files
 become owned by root.  A normal user can no longer access them.  Most
 desktops should be clever enough to allow users to create their own
 configuration files in their home directory - but I am not sure how
 you have yours set up.


 if kde created configuration file when i log in as root, it should
 only create the configuration files for my root, and should not affect
 other users.

Yes, that's how it *should* work, but it evidently isn't.  Maybe
someone else more experienced in KDE can explain what happened and why
the particular functions are now not available to plain users, or if
you have another machine which has been running properly you could
compare and contrast access rights between the two systems.

Meanwhile, just as a test, you may want to logout of X, move the
/root/.kde4 folder and /home/user/.kde4 somewhere else, then restart
X as a plain user and see if these functions are working properly now.
 If not then I suspect the problem is not with these user specific
configuration files but with the system KDE or X files.

HTH.
-- 
Regards,
Mick



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-09 Thread Paul Hartman
On Tue, Mar 9, 2010 at 5:14 AM, Xi Shen davidshe...@googlemail.com wrote:
 hi,

 i usually use my linux system with root account. i think it is not
 good, so i created a normal user account for myself. but i found that
 i cannot access many system resources, like usb disk, battery
 informatiion, etc.

 i am already in these groups: disk,wheel,audio,video,usb,haldaemon,plugdev.

 now, i cannot get notification when i plug a new usb device. my
 battery gadget says battery information is not available.

 all there stuffs works fine if i log in with root account.

Depending on your specific USB device you may need to edit UDEV rules
to set proper permissions on the device node. For example I had to do
that for normal users to read my digital camera.



Re: [gentoo-user] normal user do not have access to usb, and many other things

2010-03-09 Thread Xi Shen
On Wed, Mar 10, 2010 at 12:41 AM, Paul Hartman
paul.hartman+gen...@gmail.com wrote:
 Depending on your specific USB device you may need to edit UDEV rules
 to set proper permissions on the device node. For example I had to do
 that for normal users to read my digital camera.



i kanda thought about that for the usb stuff. but i have not resolve
it. may be i also need the pmout package to allow me to mount the usb
disk?

the big problem now is the battery information. i really have no idea
where to look for it. it is really dangerous to us a laptop without
knowing when the battery will die.


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/