LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-29-2008, 09:28 AM   #1
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mandriva, Mandriva, Mandriva. (Three different releases depending on the computer)
Posts: 710

Rep: Reputation: 35
Giving user access to files in /sys/class/ subdirectory and /dev/video0


I have written a Qt program for Linux that controls a Hauppaugge winpvr2 USB box and records what is streaming in from the box to a user defined file. But, the user has to be root to do this for two reasons:

1. You have to be able to write to files in /sys/class/pvrusb2 subdirectories. Problem is, they are group readable, so you can see what values the box is set to, but they are not group writeable, so you can't change the values (for channel, volume etc). (I can't even give group write access because these directories are created on the fly when the box is plugged in and then disappears when it is unplugged.)

2. The hauppaugge device comes up as /dev/video0 and unless you're root, it will not allow you to stream either to a file or to mplayer. (What I don't understand about this is that when a webcam's plugged in and appears as /dev/video0 you can stream that as user...)

I don't think the idea of having to be root to run a program, so does anyone have any idea about how to solve these issues please? Many thanks.
 
Old 12-01-2008, 03:11 AM   #2
burschik
Member
 
Registered: Jul 2008
Posts: 159

Rep: Reputation: 31
As far as device files are concerned, have a look at the udev documentation.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
webcam not found under /dev/video or /dev/video0/.. superevilspacemonkey Linux - Hardware 1 11-14-2008 03:56 PM
cannot access /dev/video0 from chrooted environment kpachopoulos Linux - General 1 08-22-2008 02:57 AM
giving user access to 'shutdown -r now' or -h commands Lleb_KCir Linux - General 2 03-16-2005 11:50 AM
Two Video Devices - /dev/video0 & /dev/video1 liguorir Linux - Software 1 07-21-2003 08:20 PM
giving a user access to my /mnt/windows riddlebox80 Linux - General 1 03-12-2003 05:48 PM


All times are GMT -5. The time now is 02:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration