|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Linux Problems
Hello everyone, I hopw someone could help me with this. I am running sage 6.5 on Ubuntu 8.1 with Java 6. all latest patches for everything. The problem I am having is that the sage server will not run unless I am logged into the root account. (and not just an account with root rights. it has to be root.) I am not sure why this is and have tried many things such as changing the permissions on all of the files and adding my user account to the root group. nothing seems to work. The weird thing is that I get varied results. Sometimes System Monitor will say its running be when I goto connect, I get the "connecting to your local sage server" windows and then it disappears. I have to stop the process and start it again.
Another problem I am having is that my Wiz.bin keeps getting corrupt. acutally almost every reboot kills my Wiz.bin This has happened for a couple of releases now, so it is not specific to this latest beta. I believe it is somehting wrong with my setup. I should also mention that this comp is only used to for sage. that is the only thing on it. and I have reformatted to see if that helps but it didnt. |
#2
|
|||
|
|||
Regarding the Wiz.bin corruption.
Sounds to me like you have multiple nics. Make sure you have a udev rule set up to load your nics in the same name on every boot. Regarding the user. Make sure your user is the owner of all files in /opt/sagetv/server and I would also modify the startsage and stopsage scripts to write the PID files in /opt/sagetv/server and that your user is in the video group. B
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#3
|
|||
|
|||
I just reformated again and all i did was install the deb package for the server. I installed all the dependencies and when I reboot it wont auto run. I tried like 5 times. Then I tried to login as root and it came up. this is from a fresh install. this wouldnt be too much of a problem but i cant run my server in root all the time. and i cant autologin to root either. Am I missing something here?
|
#4
|
|||
|
|||
I don't use the deb package, sorry. I am not sure what scripts they run in there.
B
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#5
|
||||
|
||||
I use the deb packages, and I haven't had any issues yet.
As your normal user, try Code:
# sudo /etc/init.d/sagetv restart Then you look at using the update-rc.d command (man update-rc.d) to set the scripts to autostart. (rean the man page) As for running sagetv as a non root user, you can do it, but you'll want to spend a lot of time understanding how permissions work, and ensure that your grant the sagetv user access to hardware device nodes, and directories.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#6
|
||||
|
||||
Quote:
Quote:
Code:
set -e PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="SageTV Server" NAME=sagetv SCRIPTNAME=/etc/init.d/$NAME Quote:
Code:
sudo update-rc.d sagetv defaults Quote:
Thanks for your input so far it has been a real help. i think im close to getting this, but im not good at linux. Last edited by Kevintimm; 12-31-2008 at 12:03 PM. |
#7
|
|||
|
|||
Not specific to SageTV, but I wouldn't expect many things inside /etc/init.d to run as a non-root user. Not just people in the root or wheel group, but actually root. Sure, you can get it to work, but you really need to know what you're doing. On distros that encourage "one user per service" like www-user for Apache and Debian-Exim for exim, the init.d script is run as root and either the script drops privileges to another user or the application itself does it.
|
#8
|
|||
|
|||
Quote:
I don't understand this. It is my impression that after installation SageTV has a service script in /etc/init.d and that it's setup to have start/stop at the various runlevels. If that is the case, the server should start up automatically when you reboot, even before your Linux box has presents you with a login prompt and almost certainly before you graphical desktop starts up. Are you trying to run the SageTV UI automatically once you do a graphical login to the desktop? |
#9
|
|||
|
|||
that is how i understood it also. but that doesnt happen. my comp wont run the server automaticly. that is where i am confused also. it should work but for some reason which I cant see, it doesn't. I also could car less about the GUI. its just that the server service wont run properly. it says its running but I cant connect to it until I do a
Code:
sudo /etc/init.d/sagetv restart Last edited by Kevintimm; 12-31-2008 at 12:09 PM. |
#10
|
|||
|
|||
The initial startup from init.d is as root and if that is not working it's a different problem that user permissions. Weird. Where does it say it is running? with the ps command?
|
#11
|
|||
|
|||
Had the same issue running Ubuntu 8.04. I renamed the sagetv script in the rc2.d directory(I thought this was the default run-level of Ubuntu) to S94sagetv from S20... On my system there are six or seven S20... scripts so I thought it might be gumming things up with Sage.
|
#12
|
|||
|
|||
Quote:
|
#13
|
||||
|
||||
Quote:
Try rebooting, then login as a regular user and enter the following command Code:
ps aux | grep sagetv Code:
java -Dsage.paths.tools=/opt/sagetv/server -Djava.awt.headless=true -DUSERKEY If it's running but a client won't connect, then that's a different issue than the service not starting. Have you tried using the placeshifter on the same linux box to connect to the server on the same box?
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#14
|
|||
|
|||
thanks for the suggestions everyone. I was unable to get this to work due to my lack on linux experiance. I have since purchased a windows license as an easy way out. once i get a little better at linux i think i'll give it another go since I still have that license also.
thanks for the help everyone it was apperciated. |
#15
|
|||
|
|||
You may want to look at this thread
http://forums.sagetv.com/forums/showthread.php?t=33133 when I run sage through sudo, I got always corrupted Win.biz. The problem was in different path between when running as root and sudo.
__________________
TV: Samsung UN46D8000 Server: Intel Core i3 540, 4G RAM, Matrox G450, 70GB EXT3 encrypted software RAID1 system drive, 1TB XFS tv recording drive, 2TB EXT3 encrypted data drive mirror across 2 machines, 2TB EXT3 encrypted media drive mirror across 2 machines, CentOS 6 64 bit, Experimenting with DNLA servers 1Gb wired network Disconnected after G day[HD 100 Media Extender, Placeshifter 7.x, SageTV 7.x, HDHomeRun] |
#16
|
|||
|
|||
Running sage as non-root...
Hey all,
Apparently, a couple of programs (in this case VLC) have begun to prohibit running as non-root. I outlined the problem here in my recent post in the neilm's webserver thread. I do not see any documentation related to running as non-root. I am sure that I could get it all to run as non-root, but I am lazy (not to mention I am trying to stay reasonably close to factory to minimize impact on the rare email to support). What do you all think? Should Sage move standard to non-root (like oracle or other apps)? Thanks! jp |
#17
|
||||
|
||||
I haven't tried it, but I would think that making sage run as non-root would be trivial. The issue would be ownership permissions on devices and directories. As long as the ownership is set correctly, there is no reason that Sage can't run as regular user. I think that sage has chosen to run as root to avoid all the stupid "sage can't see my tuner card" questions because the v4l device node changed ownership.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#18
|
|||
|
|||
I run SageTV as non-root. Not difficult at all to set up.
Code:
chown -R sagetv /opt/sagetv/server chown -R sagetv /var/media/* # You may want to be more specific, but not me B
__________________
Running SageTV on unRAID via Docker Tuning handled by HDHR3-6CC-3X2 using OpenDCT |
#19
|
|||
|
|||
Running sage as non-root...
Thanks b & stuckless! You guys are awesome!
I have changed file ownership as outlines and can see how to change the pid file location to be less non-root friendly, but I do not understand how to launch the system at boot and run in proper context How do you launch via init.d and switch user context? Thanks! jp |
#20
|
|||
|
|||
A couple of ways to launch via init.d.
1) edit rc.local. Most distros run rc.local as the last thing they do before init.d is done. Any lines in that file get run. OR 2) Create your own script and put it in /etc/init.d/ Then get your script turned on and off at the various runlevels. How you do this is distro specific, sometimes it's chkconfig, sometimes it's something else. At the lowest level, you can just create symlinks in the various rc[0-9].d directories. Copy an example from something in /etc/rc3.d/ like /etc/rc3.d/cron. It Now about switching to another user. There are many ways to do this, but init.d runs as root and doing 'su -c /opt/sagetv/server/startsage sageusername' in a script like rc.local will run that command as 'sageusername'
__________________
Current Server: Sage v7.1.9.1 beta w/ Diamond UI on Ubuntu 11.10 x86_64 | Storage: Linux md's raid10,f2 | Client: HD300 extender | Tuner: HDHomeRun for QAM |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moved back to Windows from Linux | mahcsm | SageTV Linux | 8 | 12-02-2008 05:45 PM |
Some problems w/ GUI after new SageMC install | jp1982 | SageMC Custom Interface | 2 | 11-29-2008 11:18 AM |
I want to migrate to linux but... | dnlmln | SageTV Linux | 3 | 09-27-2008 08:45 AM |
ATI to Offer HD Playback with Linux | bjterry62 | Hardware Support | 0 | 09-02-2008 01:56 PM |
Linux or WHS? | tmiranda | SageTV Linux | 8 | 08-12-2008 05:43 PM |