Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 11-29-2008, 09:28 AM   #1
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia 4
Posts: 715

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
Registered: Jul 2008
Posts: 159

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


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 05:49 PM.

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