Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

udev dev/dvb/adapter video

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
mengoshmink



Joined: Sun Oct 20, 2013 4:17 pm
Posts: 9

PostPosted: Sat Dec 07, 2013 8:03 pm    Post subject: udev dev/dvb/adapter video Reply with quote

Hi,

I must admit this is a "problem" I haven't researched much so the answer could be really simple.

$ dmesg | grep dvb
Quote:
DVB: registering new adapter (SAA716x dvb adapter)
DVB: registering new adapter (SAA716x dvb adapter)
dvb-usb: found a 'Hauppauge Nova-T 500 Dual DVB-T' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
dvb-usb: schedule remote query interval to 50 msecs.
dvb-usb: Hauppauge Nova-T 500 Dual DVB-T successfully initialized and connected.
usbcore: registered new interface driver dvb_usb_dib0700


I run a MythTV server and normally all is well. After a passing comment in #mythtv-users it has become clear that I am running my MythTV backend with a security window. I'm aware you shouldn't run things as root unless absolutely necessary but I just accepted that when I installed MythTV via ATrpms that everything was as it should / needed to be.

ps auxw | grep mythbackend tells me my backend is being run as root. When I looked in /etc/init.d/mythbackend I found this:
Quote:
# Does not work on Red Hat, do to to missing audio/video groups.
# daemon --user mythtv $binary $OPTIONS


So I was told to do the following, I have paraphrased what wagnerrp said:
Quote:
add the groups and adjust your udev rules to create the device nodes with the proper permissions
http://www.reactivated.net/writing_udev_rules.html#ownership
all you need to do is configure the rule that creates those device nodes to specify a group and mode
if they're currently set to root, then there should be no issue setting them to some group


So I went to that link and did some reading, plus here:
http://www.comp.lancs.ac.uk/~fittond/myth_tv_dvb-t.html
and here:
http://www.mythtv.org/wiki/Device_Filenames_and_udev
but my attempts so fr have failed.

The three things I have tried are:
nano /etc/udev/rules.d/10-dvb.rules
Attempt #1
Code:
KERNEL=="dvb/adapter[0-9]*", NAME="adapter/%n", SYMLINK+="%k", GROUP="video"

Attempt #2
Code:
dvb/adapter[0-3]*/*:root:video:0660

Attempt #3
Code:
KERNEL=="dvb/adapter[0-9]*", GROUP="video"


Can anyone point me in the right direction?
_________________
Sharing knowledge is the best way to learn.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Sun Dec 08, 2013 10:59 am    Post subject: Reply with quote

First of all, it is best to not rename devices, leave the name alone at put your custom name as the symlink. Secondly, the individual entries under the adaptorN directory need to be set, not adaptorN itself. Instead of matchng on KERNEL, match on SUBSYSTEM. I have this in my default udev rules

Code:
SUBSYSTEM=="dvb", GROUP="video"


The entries already have 660 permissions, if that's not the case for you, add MODE=660 to the above rule. And, of course, make sure the mythtv user is in the video group.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
mengoshmink



Joined: Sun Oct 20, 2013 4:17 pm
Posts: 9

PostPosted: Sun Dec 08, 2013 6:43 pm    Post subject: Reply with quote

Thank you to my rescue (laziness) again nelz.

1st off, I didn't realize one of the rules would of renamed the device, good job it didn't work.

2nd, I forgot adapterN was a folder. The permissions were already 660 so all I had to do was add the correct udev rule to assign the video group and life is peachy.

If it helps anyone else this is what I did in full:

Code:
# service mythbackend stop


I have a folder that contains all my storage groups (dbbackups, livetv, coverart etc) so I did a chgrp on that folder:
Code:
chgrp mythtv -R dvr/


Add mythtv to the video group:
Code:
# usermod -a -G video mythtv


Create and edit udev rule for my dvb cards:
Code:
# nano /etc/udev/rules.d/10-dvb.rules

Containing:
Quote:
SUBSYSTEM=="dvb", GROUP="video"


Edit the mythbackend init script to start the service as the mythtv user:
Code:
# nano /etc/init.d/mythbackend

Quote:
daemon --user mythtv $binary $OPTIONS


Start the service and tested by trying to watch a livetv program:
Code:
# service mythbackend start


Thank you to wagnerrp, edman007 and nelz Very Happy
_________________
Sharing knowledge is the best way to learn.
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast