LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
 
Search this Thread
Old 06-23-2007, 06:03 PM   #1
el amigo*
Member
 
Registered: Dec 2006
Location: República Dominicana
Distribution: CentOS, Scientific Linux
Posts: 122

Rep: Reputation: 15
TVTime works for main user, but not for 2nd user...


Hi all,

I am using Ubuntu Feisty, i386. I successfully watch TV with TVTime, from my tv-card. That is from my own user account.

Now I created a user account for my wife, with all the user's privileges enables (audio, video etc...), but whenever I open TVTime from her account, it's a blue screen with this message : "Permission denied, cannot open capture device /dev/video0"

Just a precision, I also multiboot Ubuntu on that box with Fedora 7 & PCLinuxOS 2007, and don't have any such problem in those other systems.

I am very curious to know how to solve that problem, and learn a new trick.

Don't hesitate to give me an idea...

Thank you all in advance for your time and for your help.
 
Old 06-24-2007, 02:19 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by el amigo*
but whenever I open TVTime from her account, it's a blue screen with this message : "Permission denied, cannot open capture device /dev/video0"
From the error message, it sounds like it is an issue with the ownership and/or permissions on /dev/video0.

Use the command ls -l /dev/video0 to examine these. You might find the solution is as easy as making your wife a member of another group (remember she has to log out and log back in for the change to take effect), or you might actually have to change the ownership/permissions on that device. I don't know if I can help with the last since I am not yet very familiar with udev
 
Old 06-24-2007, 06:09 AM   #3
el amigo*
Member
 
Registered: Dec 2006
Location: República Dominicana
Distribution: CentOS, Scientific Linux
Posts: 122

Original Poster
Rep: Reputation: 15
Here is what it gives me :
PHP Code:
martin@spc1:~$ sudo ls -/dev/video0
Password
:
crw-rw---- 1 root video 810 2007-06-24 06:15 /dev/video0
martin
@spc1:~$ 
 
Old 06-24-2007, 06:29 AM   #4
el amigo*
Member
 
Registered: Dec 2006
Location: República Dominicana
Distribution: CentOS, Scientific Linux
Posts: 122

Original Poster
Rep: Reputation: 15
Thank you, Blackhole54, as I experimented what you suggested, and it works now.

What I did was simply in terminal to "sudo nautilus", then i went to /dev/video0, right-clicked, opened "Properties", and on "Permissions", I chose "read & write", and enabled "open as a program".

It works !
 
Old 06-24-2007, 06:30 AM   #5
el amigo*
Member
 
Registered: Dec 2006
Location: República Dominicana
Distribution: CentOS, Scientific Linux
Posts: 122

Original Poster
Rep: Reputation: 15
Now that it works, here's what it gives me :
PHP Code:
martin@spc1:~$ sudo ls -/dev/video0
crwxrwxrwx 1 root video 81
0 2007-06-24 06:15 /dev/video0 
I hope this thread might help other users with the same issue.
 
Old 06-24-2007, 08:14 PM   #6
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
I'm glad you got it working.

Just for information, what you did was give everybody read, write, and execute permissions to this device. Since this is pretty much a private computer that is OK. On a more public computer, if you were concerned about security you could turn off the permissions for "other", and then only users who were members of the video group could use it. Also, since you were able to use it from your account before you changed things, I suspect you do not need the execute bit set. Finally, I wonder if your wife really was a member of the video group. When you are logged into an account, you can check the groups thatr user is in by typing groups.

There is a saying "if it ain't broke, don't fix it" -- so perhaps you just want to leave things as they are. Or to "learn so new tricks" you could play a bit more with permissions as I have suggested.
 
Old 06-26-2007, 06:54 AM   #7
el amigo*
Member
 
Registered: Dec 2006
Location: República Dominicana
Distribution: CentOS, Scientific Linux
Posts: 122

Original Poster
Rep: Reputation: 15
Good morning Blackhole54,

Strange thing... Yesterday my wife uses her account, and tells me : "tv doesn't work !"

That is a day or two after our discussion here... It seems the system has reseted to its default config, as of /dev/video0 's permissions...

So this is my morning's coffee time, and I check it :

PHP Code:
martin@spc1:~$ sudo ls -/dev/video0
Password
:
crw-rw---- 1 root video 810 2007-06-26 06:30 /dev/video0
martin
@spc1:~$ groups
martin adm dialout fax cdrom floppy tape audio dip video plugdev scanner netdev lpadmin powerdev admin fuse 
I am looking for a way to make the permissions permanent...

-Do you have an idea ?

Thanks in advance...
 
Old 06-26-2007, 07:36 AM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,039

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
I am looking for a way to make the permissions permanent...
The change is permissions for the device /dev/video0 is probably managed by some wretched HAL or hotplug or udev or similar daemon that runs at boot and creates /dev/video with those permissions. Rather than mess with all that, do the "proper" thing, and just add wife to the group video like this:

sudo useradd -g video wifesusername Edit Nope, I got this wrong, the command should be:
sudo usermod -aG video wifesusername see below./Edit

Then the TV should work. Even after a reboot!

Edit blackhole54 suggested this at the start of this thread - just do it!

Last edited by tredegar; 06-30-2007 at 06:34 AM.
 
Old 06-26-2007, 11:03 PM   #9
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by el amigo*
Code:
martin@spc1:~$ groups
martin adm dialout fax cdrom floppy tape audio dip video plugdev scanner netdev lpadmin powerdev admin fuse
Am I correct that you are user martin? If so, run the groups command from your wife's account and verify that she is a member of the video group. Remember, if you add your wife to this group as tredegar explained, then you (she) must log out of the account and back in before the changed takes effect.

Quote:
I am looking for a way to make the permissions permanent...
I believe that those permissions are controlled by udev. There are configuration files that control this (perhaps under /etc/udev?), but as I have indicated earlier, I have not yet climbed that learning curve. You should be able to find info on the Internet about how to do it. You can probably find something by searching Linux Questions.
 
Old 06-27-2007, 06:21 PM   #10
el amigo*
Member
 
Registered: Dec 2006
Location: República Dominicana
Distribution: CentOS, Scientific Linux
Posts: 122

Original Poster
Rep: Reputation: 15
that's what it gives me :
[HTML]martin@spc1:~$ sudo useradd -g video francis
Password:
useradd: user francis exists[/HTML]
 
Old 06-27-2007, 06:36 PM   #11
el amigo*
Member
 
Registered: Dec 2006
Location: República Dominicana
Distribution: CentOS, Scientific Linux
Posts: 122

Original Poster
Rep: Reputation: 15
Of course, your guys were right :

PHP Code:
francis@spc1:~$ groups
francis adm dialout fax cdrom floppy tape audio dip plugdev scanner powerdev fuse 
Now I just have to find the right way to add her in the video group...

Thank you both for your input !
 
Old 06-27-2007, 09:53 PM   #12
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by el amigo*
Now I just have to find the right way to add her in the video group...
According to usermod's man page:

sudo usermod -aG video francis

Make sure to include the "a" or else you will delete all of the existing groups she is in. I gave you the man page reference because I have never done it this way -- I have always directly edited the /etc/group file. If you decide to directly edit the file, make sure you first make a backup copy of the existing file so you can go back if you make a mistake. (It is always a good idea to make a backup copy of any configuration file before you edit it. Particularly while you are still learning what you are doing.)

I should have read tredegar's post a little more carefully. The command he gave you adds a new user account rather than modifying an existing user's account.
 
Old 06-29-2007, 02:30 PM   #13
el amigo*
Member
 
Registered: Dec 2006
Location: República Dominicana
Distribution: CentOS, Scientific Linux
Posts: 122

Original Poster
Rep: Reputation: 15
sudo usermod -aG video francis

That seems to work great ! Thank you very much !

PHP Code:
francis@spc1:~$ groups
francis adm dialout fax cdrom floppy tape audio dip video plugdev scanner powerdev fuse 
 
Old 06-30-2007, 04:26 AM   #14
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,039

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
I should have read tredegar's post a little more carefully. The command he gave you adds a new user account rather than modifying an existing user's account.
Oops. Sorry. Pleased the problem is fixed at last! I've edited my post above to point out my error.
 
Old 06-30-2007, 04:59 AM   #15
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by tredegar
I've edited my post above to point out my error.
tredegar,

we've all had days like this! You changed from -g to -G (which I eventually spotted, but for brevity I didn't mention earlier), but you still show the command to add a user account rather than the command to modify an exisiting account. (I am not trying to be picky here. I am just trying to look out for the future lost souls who are trying to solve their problems using this thread. Yeah, I've been that confused, lost soul too!)

EDIT: And now everything about this thread seems to have be wrapped up and squared away nicely!

Last edited by blackhole54; 06-30-2007 at 11:27 AM.
 
  


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
Keyboard locked for main user in Kubuntu Mohtek Linux - Newbie 0 07-28-2006 05:44 AM
Add user defined function in main library reach2tripplek Linux - Newbie 2 05-11-2006 09:15 AM
help me - removed main user account in kubuntu manishsingh4u Ubuntu 4 04-04-2006 12:41 AM
Multi-user and 3D sharing, 3D only works for the first logged in user foxy123 Suse/Novell 0 02-20-2005 04:31 AM
tvtime on 2nd Monitor iammike Linux - Software 6 08-16-2004 01:48 PM


All times are GMT -5. The time now is 04:23 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration