SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   SageTV Downloads & Instructions (http://forums.sagetv.com/forums/forumdisplay.php?f=54)
-   -   Linux - Script to automatically install SageTV and Network Tuners (http://forums.sagetv.com/forums/showthread.php?t=63026)

nyplayer 06-01-2016 02:53 PM

It is working now it was a permissions and I had setup Opendct with the VM Host IP. Changed to the VM IP and it is working.... but I really need to record to a network share. So it does work with ubuntu-16.04-desktop-amd64 :thumb::thumb::thumb:

Fuzzy 06-01-2016 06:06 PM

So, I finally got around to trying out a test linux server. I set up a VirtualBox machine on my Windows desktop, installed ubundu 14.04 LTS server, and ran the script. I've got the sage server running just fine - but I don't know how to add UNC paths as library folders. Does SageTV on Linux support UNC paths for import/recording folders? That's really the only way I can see this being usable for me, as most my storage will remain on my windows server.

EnterNoEscape 06-01-2016 06:12 PM

Quote:

Originally Posted by Fuzzy (Post 589197)
So, I finally got around to trying out a test linux server. I set up a VirtualBox machine on my Windows desktop, installed ubundu 14.04 LTS server, and ran the script. I've got the sage server running just fine - but I don't know how to add UNC paths as library folders. Does SageTV on Linux support UNC paths for import/recording folders? That's really the only way I can see this being usable for me, as most my storage will remain on my windows server.

I thought it was smb://servername/share, but that doesn't work for me on the latest SageTV Linux build. I am on Fedora, so that might be the problem. I had a hard time following the log since every time I tried to use smb://, I got a flood of data.

nyplayer 06-01-2016 06:23 PM

Quote:

Originally Posted by Fuzzy (Post 589197)
So, I finally got around to trying out a test linux server. I set up a VirtualBox machine on my Windows desktop, installed ubundu 14.04 LTS server, and ran the script. I've got the sage server running just fine - but I don't know how to add UNC paths as library folders. Does SageTV on Linux support UNC paths for import/recording folders? That's really the only way I can see this being usable for me, as most my storage will remain on my windows server.

That is a showstopper for me too. Also I have a powerful Nas and would rather record to it.

KarylFStein 06-01-2016 06:45 PM

I just mounted my share. See man mount.cifs. You can add the mount to /etc/fstab to have it mount on boot.

nyplayer 06-01-2016 06:50 PM

Quote:

Originally Posted by KarylFStein (Post 589201)
I just mounted my share. See man mount.cifs. You can add the mount to /etc/fstab to have it mount on boot.

Can you post the syntax? and can you browse to it in Linux SageTV?

KarylFStein 06-01-2016 07:56 PM

Quote:

Originally Posted by nyplayer (Post 589203)
Can you post the syntax? and can you browse to it in Linux SageTV?

Yes, it's just like a local partition.

For a one-time mount try something like this:

Code:

sudo mount -t cifs //MYNAS/MYSHARE /TARGET/DIR -o username=SHARE_USER,password=SHARE_PASS
In your case /TARGET/DIR is probably /media/tv. Make sure the directory exists and is empty, (it doesn't have to be empty, but after the mount any files in there will be "hidden" behind the mount).

My share is \\STEINSERVER\Recorded TV and I have a user "SageTV" with read/write access to the share so my mount looked like this:

Code:

sudo mount -t cifs "//STEINSERVER/Recorded TV" "/media/steinserver/Recorded TV" -o username=Sagetv,password=MY_PASS
Then to mount automatically on boot I edited /etc/fstab and added the following line:

Code:

//STEINSERVER/Recorded\040TV /media/steinserver/Recorded\040TV  cifs    credentials=/root/.smbcredentials_sagetv,iocharset=utf8,sec=ntlm      0      0
(Note that things are a lot smoother if you don't have spaces in your paths :). In the fstab file you have to use \040 instead of a space and on the command line you have to enclose the directory paths in double quotes--neither needed if you don't use spaces.)

The file /root/.smbcredentials_sagetv contains the following:

username=SageTV
password=MY_PASS

Instead of credentials=xxx in the fstab file you can put username=xxx,password=yyy, but then anyone with an account on the box can read the password. I like to lock things down a little more on my systems though, (and cringe whenever I see the suggestion to do a chmod 777 on anything...)

EnterNoEscape 06-01-2016 08:03 PM

Quote:

Originally Posted by KarylFStein (Post 589215)
(and cringe whenever I see the suggestion to do a chmod 777 on anything...)

I'll agree with you on that, but if I just want to clear up if it's permissions or something else, it's a fast way to verify what you need to work out.

I suppose 766 would be a little less risky from a security standpoint.

Fuzzy 06-01-2016 08:35 PM

Quote:

Originally Posted by KarylFStein (Post 589201)
I just mounted my share. See man mount.cifs. You can add the mount to /etc/fstab to have it mount on boot.

I use Windows Clients, so UNC paths are required for comskip playback. I'm sure I can work around some mapping to make it work - but I think Sage SHOULD be able to browse the network, so this likely needs to be fixed if something is broken.

ranger 06-01-2016 08:41 PM

I had problems with mount.cifs so I installed autofs. autofs will disconnect the after a specified period to save system resources and do an automatic remount, however it can also be configured to not disconnect. In addition to cifs shares it can connect to NFS shares as well. I configured my NFS target share to accept connections from the SageTV server IP address.

# Install autofs and connect to Network shares
sudo apt-get install nfs-common
sudo apt-get install cifs-utils
sudo apt-get install autofs

sudo mkdir -p /var/media/nfstarget
sudo mkdir -p /var/media/shared

# add to /etc/auto.master
/var/media/shared /etc/auto.cifs-shares --timeout=0 --ghost
/var/media/nfstarget /etc/auto.nfs-shares --timeout=0 --ghost

# Added lines like this to /etc/auto.cifs-shares
shareName -fstype=cifs,rw,username=user,password=password ://192.168.1.1/Public/SharedVideos

# Added to /etc/auto.nfs-shares
TVSeries -fstype=nfs,rw,soft,tcp,nolock 192.168.1.2:/media/TVSeries

nyplayer 06-01-2016 10:17 PM

Quote:

Originally Posted by Fuzzy (Post 589218)
I use Windows Clients, so UNC paths are required for comskip playback. I'm sure I can work around some mapping to make it work - but I think Sage SHOULD be able to browse the network, so this likely needs to be fixed if something is broken.

Agree I give up mounting shares from my Nas did not work nor mounting my Video folders on my server. I need to be able to browse the network within sagetv too.... Will stick with windows for now.

nyplayer 06-02-2016 12:05 AM

Quote:

Originally Posted by KarylFStein (Post 589215)
Yes, it's just like a local partition.

For a one-time mount try something like this:

Code:

sudo mount -t cifs //MYNAS/MYSHARE /TARGET/DIR -o username=SHARE_USER,password=SHARE_PASS
In your case /TARGET/DIR is probably /media/tv. Make sure the directory exists and is empty, (it doesn't have to be empty, but after the mount any files in there will be "hidden" behind the mount).

My share is \\STEINSERVER\Recorded TV and I have a user "SageTV" with read/write access to the share so my mount looked like this:

Code:

sudo mount -t cifs "//STEINSERVER/Recorded TV" "/media/steinserver/Recorded TV" -o username=Sagetv,password=MY_PASS
Then to mount automatically on boot I edited /etc/fstab and added the following line:

Code:

//STEINSERVER/Recorded\040TV /media/steinserver/Recorded\040TV  cifs    credentials=/root/.smbcredentials_sagetv,iocharset=utf8,sec=ntlm      0      0
(Note that things are a lot smoother if you don't have spaces in your paths :). In the fstab file you have to use \040 instead of a space and on the command line you have to enclose the directory paths in double quotes--neither needed if you don't use spaces.)

The file /root/.smbcredentials_sagetv contains the following:

username=SageTV
password=MY_PASS

Instead of credentials=xxx in the fstab file you can put username=xxx,password=yyy, but then anyone with an account on the box can read the password. I like to lock things down a little more on my systems though, (and cringe whenever I see the suggestion to do a chmod 777 on anything...)


Finally I got it to work had to use the IP of the NAS and not the name.

Thanks.

Fuzzy 06-02-2016 02:08 AM

Quote:

Originally Posted by nyplayer (Post 589223)
Agree I give up mounting shares from my Nas did not work nor mounting my Video folders on my server. I need to be able to browse the network within sagetv too.... Will stick with windows for now.

Well, don't misread me - I would have no real issues server side setting up mount points and such, and can likely work around getting it to also work on the client as well by making a tree below the sage home directory to mimic the linux path and mounting the same shares in that location. I don't actually need a Linux server, as I've only got 2 extenders, and occasionally connect with a single placeshifter, so heap issues don't really affect me. However, as a pseudo developer/community guy here, I feel I need to push the project towards ease of use, in which case network browsing really needs to be a thing out of the box - especially when it is possible on the windows server, and the UI indicates it is possible. If we need to add extra logic to the sage server to handle the mounting (including prompting for credentials if required), and invisibly translate between UNC paths and the lniux based path, that's what we need to push toward.

EDIT: That said, this is really only an issue with Comskip Playback - and that plugin really SHOULD be reworked to access the file via SageTV API's that can access the server filesystem, instead of direct java fileIO, which accesses if via the client's filesystem. It's been many years since I've looked into doing any plugin work, so maybe that's where I should focus my attention for now.

nyplayer 06-02-2016 04:58 AM

Well one thing I am glad that I at least tried the install the script ... it is fantastic takes all the guess work out of installing. But the limitation of not being able o browse or use unc paths is a deal breaker for me. I too do not have many Mini clients most of my clients are windows clients.


Congrats to he author of the script great job.

EnterNoEscape 06-02-2016 06:17 AM

As I understand it, smb://server/share should work. When I tried to add anything to my media directories in that manner, the STV just offers to create a folder based on the name. It doesn't appear to know I'm not specifying a local path. This thread suggests that SageTV can do these things on it's own, but I don't see how. I see the code that's supposed to mount the share in the source, but I'm not sure how that ties into the STV. Going all the way up the levels and selecting Network results in it failing to find anything.

I personally just mount everything in fstab, but I can see this being a problem for other users that really just want it to work.

nyplayer 06-02-2016 07:32 AM

Quote:

Originally Posted by EnterNoEscape (Post 589231)
As I understand it, smb://server/share should work. When I tried to add anything to my media directories in that manner, the STV just offers to create a folder based on the name. It doesn't appear to know I'm not specifying a local path. This thread suggests that SageTV can do these things on it's own, but I don't see how. I see the code that's supposed to mount the share in the source, but I'm not sure how that ties into the STV. Going all the way up the levels and selecting Network results in it failing to find anything.

I personally just mount everything in fstab, but I can see this being a problem for other users that really just want it to work.

The problem is getting Comskip to work in full SageTV Clients when using fstab.

stuckless 06-02-2016 07:52 AM

Quote:

Originally Posted by EnterNoEscape (Post 589231)
As I understand it, smb://server/share should work. When I tried to add anything to my media directories in that manner, the STV just offers to create a folder based on the name. It doesn't appear to know I'm not specifying a local path. This thread suggests that SageTV can do these things on it's own, but I don't see how. I see the code that's supposed to mount the share in the source, but I'm not sure how that ties into the STV. Going all the way up the levels and selecting Network results in it failing to find anything.

I personally just mount everything in fstab, but I can see this being a problem for other users that really just want it to work.

Quote:

Originally Posted by nyplayer (Post 589234)
The problem is getting Comskip to work in full SageTV Clients when using fstab.

The whole comskip issues with clients could be totally mitigated if the comskip stv code used the http://sagetv.com/api/sage/api/Utili...g(java.io.File) API.

Fuzzy 06-02-2016 08:24 AM

Quote:

Originally Posted by stuckless (Post 589235)
The whole comskip issues with clients could be totally mitigated if the comskip stv code used the http://sagetv.com/api/sage/api/Utili...g(java.io.File) API.

That work is in progress as we speak, so hopefully it will be a non-issue soon. Still, I would much rather paths be browseable from within the Sage UI without having to map mount points manually. That's the type of thing that really makes people shy away from Linux.

Taddeusz 06-02-2016 08:39 AM

I have problems directly browsing my network at home but I assumed it was because I have a Windows domain and the machines I am attaching to are domain members. Maybe there should be a way to prompt for or otherwise enter domain credentials. I know, I'm a big nerd for having my own Windows domain at home. :blush:

BobPhoenix 06-05-2016 02:31 PM

I can browse the network with the docker stuckless put out. The only thing I had to do to browse to my computers is eliminate my WHS v1 server from becoming the master browser on the network. My unRAID server is my master browser but my WHSv1 server would ignore the fact that a master browser already existed when it booted and list itself as the master browser also which eliminated browsing from the docker since there were two master browsers on the network.

Basically I turned off on my WHSv1 server the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser\Parameters key MaintainServerList. It was set to Yes I set it to NO and then I was able to browse the network from the docker.

I also found that SageTV installed on Mint 17.3 to be able to browse the network when the Ubuntu and Debian installs I tried could not - don't know why. Probably just luck of the draw or some setting I changed that I don't remember now.


All times are GMT -6. The time now is 04:32 PM.

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