Order it now! Amazon prioritizes orders on a first come, first served basis.


View Full Version : libprs500 on SuSE linux 10.3 doesn't recognize non-root user


flubu
03-19-2008, 05:33 PM
Hi all, hope somebody can help.

I'm running SuSE linux 10.3 (x86_64). I've been trying to install libprs500 with varying degrees of success. I now have it to the point where I can detect the sony reader when logged in as root. However, if I log in as a regular user, I am told "Unable to find a connected ebook reader".

The last instruction on the "generic linux" installation page of libprd500 is:

gpasswd -a username plugdev

However, this command does not work in SuSE (it would be groupmod) and furthermore, SuSE does not have a plugdev group. So, I'm stuck. I can run the scripts as root and get it to work, but that's a pain. Does anybody know which group I need to add my username to for it to work without all this pain?

Cheers and thanks,
Rc

kovidgoyal
03-19-2008, 05:35 PM
is this a prs500?

flubu
03-19-2008, 06:04 PM
Yes, it is:

here's the output as root:

talisker:/home/rcote # prs500 info
/usr/local/lib64/python2.5/site-packages/libprs500-0.4.42-py2.5.egg/libprs500/devices/prs500/prstypes.py:145: DeprecationWarning: 'I' format requires 0 <= number <= 4294967295
Device name: Sony Reader
Device version: PRS-500/U
Software version: 1.0.03.07170
Mime type: application/x-bbeb-book
talisker:/home/rcote #

kovidgoyal
03-19-2008, 06:22 PM
What does ls -l /dev/sony reader device give?

where sony reader device should be something like sda or sdb or sdc etc

flubu
03-20-2008, 06:09 AM
talisker:/home/rcote # ls -l /dev/sd*
brw-r----- 1 root disk 8, 0 2008-03-20 09:02 /dev/sda
brw-r----- 1 root disk 8, 1 2008-03-20 09:02 /dev/sda1
brw-r----- 1 root disk 8, 2 2008-03-20 09:02 /dev/sda2
brw-r----- 1 root disk 8, 3 2008-03-20 09:02 /dev/sda3
brw-r----- 1 root disk 8, 5 2008-03-20 09:02 /dev/sda5

kovidgoyal
03-20-2008, 05:36 PM
Looks like it's not being called sd*

You'll have to find out what device file it is being assigned to, by plugging it in and then looking at the last few lines in the output of the command dmesg

flubu
03-22-2008, 05:54 AM
This is the output of dmesg:

usb 4-2: new full speed USB device using uhci_hcd and address 2
usb 4-2: new device found, idVendor=054c, idProduct=029b
usb 4-2: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-2: Product: Sony Portable Reader System
usb 4-2: Manufacturer: Sony
usb 4-2: configuration #1 chosen from 2 choices

and I seem to have some corresponding /dev entries:

crw-rw---- 1 root root 254, 14 2008-03-22 08:46 /dev/usbdev4.2_ep00
crw-rw---- 1 root root 254, 16 2008-03-22 08:46 /dev/usbdev4.2_ep02
crw-rw---- 1 root root 254, 15 2008-03-22 08:46 /dev/usbdev4.2_ep81

but unfortunately, they're only available to root. Why do I have a feeling this will be a problem?

kovidgoyal
03-22-2008, 05:56 AM
Edit /etc/udev/rules.d/95-libprs500.rules replace plugdev with any group you're a member of, reboot and you should be fine.

flubu
03-22-2008, 06:03 AM
Interestingly, the group in the file is not plugdev, but usb:

# Sony Reader PRS-500
BUS=="usb", SYSFS{idProduct}=="029b", SYSFS{idVendor}=="054c", MODE="660", GROUP="usb"

Is there any security/usage risk changing the value of usb to users?

kovidgoyal
03-22-2008, 06:20 AM
Nope, only that you grant everyone in the group users access to your reader.