Karmic - Webcam does not work as a ltsp-localapps

Bug #487473 reported by Asmo Koskinen
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Invalid
Undecided
Scott Balneaves

Bug Description

I have two mini laptops, Asus Eee 900 and HP Mini 2133. Both have UVC-based webcam.

I have installed guvcview in chroot.

If I run 'ltsp-localapps guvcview' program says it can't find webcam device.

But if I access to the chroot, then webcam works in both mini laptops.

HP Mini 2133

ssh -X root@192.168.0.200

root@ltsp200:~# guvcview
guvcview 1.1.1
video device: /dev/video0
/dev/video0 - device 1
Init. CNF7070 (location: usb-0000:00:10.4-8)

Asus Eee 900

ssh -X root@192.168.0.202

root@ltsp202:~# guvcview
guvcview 1.1.1
video device: /dev/video0
/dev/video0 - device 1
Init. CNF7129 (location: usb-0000:00:1d.7-8)

Best Regards Asmo Koskinen.

Revision history for this message
Oliver Grawert (ogra) wrote :

this is due to missing dbus support between the clients system dbus and the session dbus on the server. most device access in karmic is granted through udev-acl by default which in turn needs proper dbus communication. in karmic the old way to access devices through system group membership should still work though, try to add your user to the video group and see if that helps.

Revision history for this message
Asmo Koskinen (asmok) wrote :

My users are in group video.

asmok@edubuntu:~$ cat /etc/group | grep video
video:x:44:ltsp001,ltsp002,ltsp003
asmok@edubuntu:~$

'ltsp-localapps guvcview' does not work. But if I do this in chroot, after that 'ltsp-localapps guvcview' works.

root@ltsp202:~# ls -al /dev/video*
crw-rw---- 1 root video 81, 0 2009-11-24 17:25 /dev/video0
root@ltsp202:~# chmod 777 /dev/video0
root@ltsp202:~# ls -al /dev/video*
crwxrwxrwx 1 root video 81, 0 2009-11-24 17:25 /dev/video0
root@ltsp202:~#

There was same kind of bug before, wrong mode.

https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/347957
https://help.ubuntu.com/community/UbuntuLTSP/LocalAppsResolvConf

Best Regards Asmo Koskinen.

Revision history for this message
Oliver Grawert (ogra) wrote :

with these permissions the device should be accessible, does the chroot have a video group and do the GIDs match ?
using 777 is definately adding a huge security hole, you should not do that.
there seems to be a discrepancy between server and client in the group numbers.

(anyway the only proper fix is to have dbus communication between server and client going on, at some point the group stuff wont work anymore since everything is moving to udev-acl)

Revision history for this message
Asmo Koskinen (asmok) wrote :

asmok@edubuntu:~$ cat /opt/ltsp/i386/etc/group | grep video
video:x:44:
asmok@edubuntu:~$

asmok@edubuntu:~$ cat /opt/ltsp/i386/etc/group | grep ltsp001
asmok@edubuntu:~$

root@ltsp202:~# cat /etc/group | grep ltsp001
sambashare:x:120:asmok,ltsp001,ltsp002,ltsp003
ltsp001:x:1001:ltsp001
root@ltsp202:~#

root@ltsp202:~# cat /etc/group | grep video
video:x:44:
root@ltsp202:~#

If add user ltsp001 to the group video in chroot I can access to the webcam - or change mode to the 644 (better than all doors open 777).

Why only group including users in chroot is 'sambashare'? Why no other groups? Where that 'sambashare' comes from in chroot?

Best Regards Asmo Koskinen.

Revision history for this message
Asmo Koskinen (asmok) wrote :

You need write access on that device, so you need 666 or 777 because you are not in video group.

root@ltsp200:~# chmod 666 /dev/video*

root@ltsp200:~# ls -al /dev/video*
crw-rw-rw- 1 root video 81, 0 2009-11-25 12:44 /dev/video0
root@ltsp200:~#

Best Regards Asmo Koskinen.

Revision history for this message
Asmo Koskinen (asmok) wrote :

Well, I have another installation in KVM machine (Edubuntu DVD) and it seems to work OK.

I removed all users in trouble one and created new 'ltsp001' user. Webcam does not work.

Here are details for working on installation.

admin-edubuntu@edubuntu:~$ cat /etc/group | grep ltsp001
adm:x:4:admin-edubuntu,ltsp001
dialout:x:20:admin-edubuntu,ltsp001
fax:x:21:ltsp001
cdrom:x:24:admin-edubuntu,ltsp001
tape:x:26:ltsp001
audio:x:29:pulse,ltsp001
dip:x:30:ltsp001
video:x:44:ltsp001
plugdev:x:46:admin-edubuntu,ltsp001
fuse:x:106:ltsp001
lpadmin:x:107:admin-edubuntu,ltsp001
netdev:x:113:ltsp001
sambashare:x:122:admin-edubuntu,ltsp001
ltsp001:x:1001:ltsp001
admin-edubuntu@edubuntu:~$

root@ltsp206:~# ls -al /dev/video*
crw-rw---- 1 root video 81, 0 2009-11-25 20:23 /dev/video0
root@ltsp206:~#

root@ltsp206:~# cat /etc/group | grep ltsp001
adm:x:4:ltsp001
dialout:x:20:ltsp001
fax:x:21:ltsp001
cdrom:x:24:ltsp001
tape:x:26:ltsp001
audio:x:29:pulse,ltsp001
dip:x:30:ltsp001
video:x:44:ltsp001
plugdev:x:46:ltsp001
fuse:x:104:ltsp001
lpadmin:x:107:ltsp001
netdev:x:113:ltsp001
sambashare:x:122:admin-edubuntu,ltsp001
ltsp001:x:1001:ltsp001
root@ltsp206:~#

root@ltsp206:~# ps ax | grep cheese
 3757 tty7 S 0:00 su - ltsp001 -c LANG=fi_FI.UTF-8 LANGUAGE=fi_FI.UTF-8 DISPLAY=:7 XAUTHORITY=/var/run/ldm-xauth-gFawSkZHO/Xauthority cheese
 3761 tty7 Sl 1:32 cheese
 3883 pts/1 S+ 0:00 grep cheese
root@ltsp206:~#

-----

I try to find out what is so badly wrong in that another one installation.

Best Regards Asmo Koskinen.

Revision history for this message
Asmo Koskinen (asmok) wrote :

Well, I did it in short way - ltsp-build-client --arch i386

Now webcam works in both servers. My bad, I'm sorry for that.

asmok@edubuntu:~$ cat /etc/group | grep ltsp001
adm:x:4:asmok,ltsp001
dialout:x:20:asmok,ltsp001
fax:x:21:ltsp001
cdrom:x:24:asmok,ltsp001
tape:x:26:ltsp001
audio:x:29:pulse,ltsp001
dip:x:30:ltsp001
video:x:44:ltsp001
plugdev:x:46:asmok,ltsp001
fuse:x:103:ltsp001
lpadmin:x:104:asmok,ltsp001
netdev:x:112:ltsp001
sambashare:x:120:asmok,ltsp001
vboxusers:x:124:ltsp001
ltsp001:x:1001:ltsp001
asmok@edubuntu:~$

root@ltsp200:~# cat /etc/group | grep ltsp001
adm:x:4:ltsp001
dialout:x:20:ltsp001
fax:x:21:ltsp001
cdrom:x:24:ltsp001
tape:x:26:ltsp001
audio:x:29:pulse,ltsp001
dip:x:30:ltsp001
video:x:44:ltsp001
plugdev:x:46:ltsp001
fuse:x:104:ltsp001
lpadmin:x:107:ltsp001
netdev:x:112:ltsp001
sambashare:x:120:asmok,ltsp001
vboxusers:x:124:ltsp001
ltsp001:x:1001:ltsp001
root@ltsp200:~#

root@ltsp200:~# ls -al /dev/video*
crw-rw---- 1 root video 81, 0 2009-11-25 21:12 /dev/video0
root@ltsp200:~#

root@ltsp200:~# ps ax | grep cheese
 3791 tty7 S 0:00 su - ltsp001 -c LANG=fi_FI.UTF-8 LANGUAGE=fi_FI.UTF-8 DISPLAY=:7 XAUTHORITY=/var/run/ldm-xauth-uDpAbh9mb/Xauthority cheese
 3794 tty7 Sl 0:12 cheese
 3867 pts/1 S+ 0:00 grep cheese
root@ltsp200:~#

Best Regards Asmo Koskinen.

Changed in ltsp (Ubuntu):
assignee: nobody → Scott Balneaves (sbalneav)
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.