SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-14-2010, 03:38 PM
michaeldjcox michaeldjcox is offline
Sage Fanatic
 
Join Date: Nov 2006
Location: Ipswich, Suffolk, United Kingdom
Posts: 829
Does SageTV create a zero length recording file before recording starts?

I'm testing my Web feed encoder network encoder on linux.

WFE runs as under my account.

It spawns VLC sessions than also run under my account.

But SageTV runs as root.

And when a tune a zero length file is created owned by root and VLC cannot overwrite it.

Can this feature be selectively turned off?

(yes I tried running WFE and VLC as root but VLC refuses to run as root and does nothing)

Michael
__________________
Web Feed Encoder developer
SageTV Catchup developer
Reply With Quote
  #2  
Old 10-14-2010, 07:06 PM
thelinuxman thelinuxman is offline
Sage User
 
Join Date: Oct 2010
Location: USA
Posts: 11
VLC as root

I just wrote a small script to launch VLC from root but run as my user account. (Not really recommended because of security and storing your user account password in plain text, but ...)

#!/bin/bash
cd /usr/bin
echo password | su yourlogin -c ./vlc

replace password and yourlogin with your user account information, save that as a shell script and point WFE at your script to start VLC

Seems as though it might work if WFE is run as root. I see there are patches to allow VLC to run as root also. No more time to play right now though. Good luck!
Reply With Quote
  #3  
Old 10-15-2010, 05:21 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Michael,

I think you will find some users run sage as root and others do not, so to ensure compatibility you must be able to deal with both situations.

In my CommercialDetector plugin I use "sudo" to make sure the spawned process runs as the proper user.

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #4  
Old 10-15-2010, 05:27 AM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by michaeldjcox View Post
But SageTV runs as root.

And when a tune a zero length file is created owned by root and VLC cannot
Rather than trying to run VLC as root, why not change the file's ownership to the user running WFE? Eg, 'sudo chown $RECORDING_FILE $WFE_USER'

FWIW, I don't run SageTV as root. I don't trust binary blobs running as root.. I created a "sagetv" user for it.

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #5  
Old 10-15-2010, 09:15 AM
michaeldjcox michaeldjcox is offline
Sage Fanatic
 
Join Date: Nov 2006
Location: Ipswich, Suffolk, United Kingdom
Posts: 829
Quote:
Originally Posted by drewg View Post
Rather than trying to run VLC as root, why not change the file's ownership to the user running WFE? Eg, 'sudo chown $RECORDING_FILE $WFE_USER'

FWIW, I don't run SageTV as root. I don't trust binary blobs running as root.. I created a "sagetv" user for it.

Drew
Yeah guess I will wait for SageTV to create the file and then try and change ownership.

I believe that VLC will not run as root. There are long trails in the VLC forum with VLC developers arguing with users and basically saying their not going to allow VLC to run as root and all other daemons that run as root are wrong and should change.

Michael
__________________
Web Feed Encoder developer
SageTV Catchup developer
Reply With Quote
  #6  
Old 10-15-2010, 02:21 PM
drewg drewg is offline
Sage Icon
 
Join Date: Aug 2007
Location: Richmond, VA
Posts: 1,042
Quote:
Originally Posted by michaeldjcox View Post
I believe that VLC will not run as root. There are long trails in the VLC forum with VLC developers arguing with users and basically saying their not going to allow VLC to run as root and all other daemons that run as root are wrong and should change.
They are 100% right. A daemon should never run as root..

Drew
__________________
Server HW: AMD Ryzen Threadripper 2990WX 32-Core
Server SW: FreeBSD-current, ZFS, linux-oracle-jdk1.8.0, sagetv-server_9.2.2_amd64
Tuner HW: HDHR
Client: Nvidia Shield (HD300, HD100 in storage)
Reply With Quote
  #7  
Old 10-18-2010, 06:03 AM
michaeldjcox michaeldjcox is offline
Sage Fanatic
 
Join Date: Nov 2006
Location: Ipswich, Suffolk, United Kingdom
Posts: 829
In answer to my own original question.

I disabled my encoder so vlc never runs

SageTV is creating an mpg file for the recording - owned by root with:

-rw-r--r--

permissions.

So VLC running as vlc-wrapper cannot access it.

vlcs vlc-wrapper process runs as root but works as another user so it tries to access a root file as "michael" and fails.

So I could try chmod the fille to open up access before I launch VLC

Unless anyone knows of any SageTV hidden settings.

Michael
__________________
Web Feed Encoder developer
SageTV Catchup developer
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to show length of recording? TorontoSage SageMC Custom Interface 4 03-24-2009 02:07 PM
Once recording starts, can not change tuner even if you delete recording larryf SageTV Software 0 11-16-2008 07:59 PM
Padding a Recording After the Recording Starts Slugger SageTV Software 5 03-21-2007 03:17 AM
SageTV KickOff Program When Recording Starts joe123 SageTV Customizations 0 02-01-2007 11:54 AM
SageTV Start SA Automatically when a recording starts? joe123 SageTV Customizations 8 01-17-2007 05:00 PM


All times are GMT -6. The time now is 05:11 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.