Forums » Tutorial and setups »
New User - problems starting
Added by Joe Haimerl about 11 years ago
I previously had been using Windows Media Center on Windows 7 with my SiliconDust HDHomeRunPrime boxes. I am becoming increasing aggravated with windows and windows media center, so I decided to experiment with Linux.
I installed Ubuntu 12.04.3 onto one of my machines and also installed XBMC from the ubuntu software center. From what I can tell, I need to have a pvr running, so I followed your directions (https://tvheadend.org/projects/tvheadend/wiki/AptRepository) to install the 'stable' version.
I am now trying to start the software, but cannot figure-out how to do it from the initial setup page (https://tvheadend.org/projects/tvheadend/wiki/Install_and_initial_setup). I see descriptions of command line options, but not what the actual command is... Can someone provide guidance and possibly clarify the webpage?
Thanks!
Replies (11)
RE: New User - problems starting - Added by Prof Yaffle about 11 years ago
If you've installed from the repository onto Ubuntu, tvheadend should automatically start. Try running this at the command line:
ps -eaf | grep tvh
If tvheadend is running, you'll get something like this:
ian@Server:~$ ps -eaf | grep tvheadend hts 1462 1 5 Sep27 ? 20:26:27 tvheadend -f -u hts -g video ian 12489 12383 0 09:30 pts/4 00:00:00 grep --color=auto tvheadend
The first of these - process 1462 in my case - is the tvheadend process: it's running as user hts, group video, and running as a daemon (a background process like a Windows service). The second is the grep command we just issued, so you can safely ignore that.
If tvheadend isn't running, try:
sudo service tvheadend restart
If that doesn't work, try rebooting.
And if that still doesn't work... we'll need to get into log files to see what's happening (or not).
Remember in XBMC you need to enable the right PVR add on before the XBMC client can talk to the tvheadend server.
RE: New User - problems starting - Added by Joe Haimerl about 11 years ago
Thanks for your reply. Unfortunately I do not think that tvheadend is running. I also believe it is an unrecognized service. Again, I installed according to the instructions above on a fresh installation of ubuntu and got no errors.
joe@patrickstar:~$ ps -eaf | grep tvh
joe 2548 2489 0 08:58 pts/1 00:00:00 grep --color=auto tvh
joe@patrickstar:~$ sudo service tvheadend restart
[sudo] password for joe:
tvheadend: unrecognized service
joe@patrickstar:~$
I have been searching the file system to try to find where it put stuff, but I'm not that savvy in Linux yet.
Thanks!
Joe
RE: New User - problems starting - Added by Prof Yaffle about 11 years ago
Okay, let's check that it's actually installed...
This will list all of your installed packages and then use grep to shortlist it down to just those containing the string "tvh":
ian@Server:~$ dpkg --get-selections | grep tvh tvheadend install xbmc-pvr-tvheadend-hts install
Okay, I've confirmed that tvheadend is installed, so let's take a look at the specific version:
ian@Server:~$ apt-cache policy tvheadend tvheadend: Installed: 3.5.96~gaa0e5b1~precise Candidate: 3.5.96~gaa0e5b1~precise Version table: *** 3.5.96~gaa0e5b1~precise 0 100 /var/lib/dpkg/status
(you'll get different output, including version number, because this is a version I built and installed myself).
Run those commands and see what it reports, please. It looks like something's not been installed correctly.
You can also cut to the chase and try:
ian@Server:~$ which tvheadend /usr/bin/tvheadend
Or:
ian@Server:~$ ll /usr/bin/tvheadend -rwxr-xr-x 1 root root 693072 Apr 10 2013 /usr/bin/tvheadend*
... but they both assume that things have been installed into the default locations, which may be the problem.
Or you could just search the hard way - this searches for any file called tvheadend
ian@Server:~$ find / -name tvheadend 2>&1 | grep -v 'Permission denied' /usr/bin/tvheadend /usr/share/doc/tvheadend /usr/share/tvheadend /etc/default/tvheadend /etc/init.d/tvheadend /home/hts/.hts/tvheadend /home/ian/tvheadend /home/ian/tvheadend/build.linux/tvheadend /home/ian/tvheadend/debian/tvheadend-dbg/usr/lib/debug/usr/bin/tvheadend /home/ian/tvheadend/debian/tvheadend /home/ian/tvheadend/debian/tvheadend/usr/bin/tvheadend /home/ian/tvheadend/debian/tvheadend/usr/share/doc/tvheadend /home/ian/tvheadend/debian/tvheadend/usr/share/tvheadend /home/ian/tvheadend/debian/tvheadend/etc/default/tvheadend /home/ian/tvheadend/debian/tvheadend/etc/init.d/tvheadend ian@Server:~$
Again, your output will be different as some of this is in my home directory since that's where I compiled before installation.
Take your pick! :-)
RE: New User - problems starting - Added by Joe Haimerl about 11 years ago
OK... so apparently it is NOT installed...
joe@patrickstar:~$ dpkg --get-selections | grep tvh
joe@patrickstar:~$
joe@patrickstar:~$ which tvheadend
joe@patrickstar:~$
joe@patrickstar:~$ find / -name tvheadend 2>&1 | grep -v 'Permission denied'
joe@patrickstar:~$
Again, I followed the installation instructions on https://tvheadend.org/projects/tvheadend/wiki/AptRepository for ubuntu... I saw no indication of errors...
Repeating installation here:
removing previous launchpad ppa
joe@patrickstar:~$ sudo apt-add-repository -r http://ppa.launchpad.net/adamsutton/tvheadend
[sudo] password for joe:
Error: 'deb http://ppa.launchpad.net/adamsutton/tvheadend precise main' doesn't exist in a sourcelist file
Error: 'deb-src http://ppa.launchpad.net/adamsutton/tvheadend precise main' doesn't exist in a sourcelist file
joe@patrickstar:~$
import GPG signing key:
joe@patrickstar:~$ curl http://apt.tvheadend.org/repo.gpg.key | sudo apt-key add :--:-- --:--:-- --:--:-- 16148
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1744 100 1744 0 0 3183 0 -
OK
joe@patrickstar:~$
adding repository:
joe@patrickstar:~$ sudo apt-add-repository http://apt.tvheadend.org/stable
joe@patrickstar:~$
joe@patrickstar:~$ sudo apt-get update
Hit http://dl.google.com stable Release.gpg
Hit http://dl.google.com stable Release
Hit http://us.archive.ubuntu.com precise Release.gpg
Get:1 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://us.archive.ubuntu.com precise-backports Release.gpg
Hit http://security.ubuntu.com precise-security Release.gpg
Hit http://apt.tvheadend.org precise Release.gpg
Get:2 http://extras.ubuntu.com precise Release.gpg [71 B]
Hit http://dl.google.com stable/main i386 Packages
Hit http://us.archive.ubuntu.com precise Release
Get:3 http://us.archive.ubuntu.com precise-updates Release [49.6 kB]
Hit http://security.ubuntu.com precise-security Release
Ign http://dl.google.com stable/main TranslationIndex
Hit http://extras.ubuntu.com precise Release
Hit http://apt.tvheadend.org precise Release
Hit http://security.ubuntu.com precise-security/main Sources
Hit http://extras.ubuntu.com precise/main Sources
Hit http://apt.tvheadend.org precise/main Sources
Hit http://security.ubuntu.com precise-security/restricted Sources
Hit http://security.ubuntu.com precise-security/universe Sources
Hit http://security.ubuntu.com precise-security/multiverse Sources
Hit http://security.ubuntu.com precise-security/main i386 Packages
Hit http://security.ubuntu.com precise-security/restricted i386 Packages
Hit http://security.ubuntu.com precise-security/universe i386 Packages
Hit http://security.ubuntu.com precise-security/multiverse i386 Packages
Hit http://security.ubuntu.com precise-security/main TranslationIndex
Hit http://security.ubuntu.com precise-security/multiverse TranslationIndex
Hit http://security.ubuntu.com precise-security/restricted TranslationIndex
Hit http://extras.ubuntu.com precise/main i386 Packages
Ign http://extras.ubuntu.com precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports Release
Hit http://apt.tvheadend.org precise/main i386 Packages
Ign http://apt.tvheadend.org precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/main Sources
Hit http://us.archive.ubuntu.com precise/restricted Sources
Hit http://us.archive.ubuntu.com precise/universe Sources
Hit http://us.archive.ubuntu.com precise/multiverse Sources
Hit http://us.archive.ubuntu.com precise/main i386 Packages
Hit http://us.archive.ubuntu.com precise/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise/universe i386 Packages
Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex
Get:4 http://us.archive.ubuntu.com precise-updates/main Sources [420 kB]
Ign http://dl.google.com stable/main Translation-en_US
Ign http://dl.google.com stable/main Translation-en
Hit http://security.ubuntu.com precise-security/universe TranslationIndex
Hit http://security.ubuntu.com precise-security/main Translation-en
Hit http://security.ubuntu.com precise-security/multiverse Translation-en
Hit http://security.ubuntu.com precise-security/restricted Translation-en
Hit http://security.ubuntu.com precise-security/universe Translation-en
Ign http://extras.ubuntu.com precise/main Translation-en_US
Ign http://extras.ubuntu.com precise/main Translation-en
Ign http://apt.tvheadend.org precise/main Translation-en_US
Ign http://apt.tvheadend.org precise/main Translation-en
Get:5 http://us.archive.ubuntu.com precise-updates/restricted Sources [7,006 B]
Get:6 http://us.archive.ubuntu.com precise-updates/universe Sources [97.8 kB]
Get:7 http://us.archive.ubuntu.com precise-updates/multiverse Sources [8,343 B]
Get:8 http://us.archive.ubuntu.com precise-updates/main i386 Packages [715 kB]
Get:9 http://us.archive.ubuntu.com precise-updates/restricted i386 Packages [11.4 kB]
Get:10 http://us.archive.ubuntu.com precise-updates/universe i386 Packages [223 kB]
Get:11 http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages [14.0 kB]
Hit http://us.archive.ubuntu.com precise-updates/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/main Sources
Hit http://us.archive.ubuntu.com precise-backports/restricted Sources
Hit http://us.archive.ubuntu.com precise-backports/universe Sources
Hit http://us.archive.ubuntu.com precise-backports/multiverse Sources
Hit http://us.archive.ubuntu.com precise-backports/main i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise-backports/main TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise-backports/universe TranslationIndex
Hit http://us.archive.ubuntu.com precise/main Translation-en
Hit http://us.archive.ubuntu.com precise/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise/restricted Translation-en
Hit http://us.archive.ubuntu.com precise/universe Translation-en
Hit http://us.archive.ubuntu.com precise-updates/main Translation-en
Hit http://us.archive.ubuntu.com precise-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-updates/universe Translation-en
Hit http://us.archive.ubuntu.com precise-backports/main Translation-en
Hit http://us.archive.ubuntu.com precise-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com precise-backports/universe Translation-en
Fetched 1,547 kB in 10s (143 kB/s)
Reading package lists... Done
joe@patrickstar:~$
checking installation again, as you suggested...
joe@patrickstar:~$
joe@patrickstar:~$ dpkg --get-selections | grep tvh
joe@patrickstar:~$
joe@patrickstar:~$ which tvheadend
joe@patrickstar:~$
joe@patrickstar:~$ ll /usr/bin/tvheadend
ls: cannot access /usr/bin/tvheadend: No such file or directory
joe@patrickstar:~$ find / -name tvheadend 2>&1 | grep -v 'Permission denied'
joe@patrickstar:~$
Not sure what I'm doing wrong... I opened a terminal window to do this install... do I need to cd to a specific directory before I start???? Is there a package that I can install from the Software Center to do this instead???
RE: New User - problems starting - Added by Prof Yaffle about 11 years ago
You're only adding the repository (and removing and old one that isn't actually there - hence the errors at the start).
Try:
sudo apt-get install tvheadend
As an aside, you may not have the XBMC PVR addons installed, otherwise they'd have shown up in the apt-cache command as they did in mine. So you may also need to do:
sudo apt-get install xbmc-pvr-tvheadend-hts
... but I need to check that, so don't go down that rabbit hole unless we have to!
RE: New User - problems starting - Added by Joe Haimerl about 11 years ago
OK now its doing something!
Are you able to update the instructions page to add that last critical step???
Thanks for the guidance!
Hopefully this will get me on my way again...
Do you know if this is compatible with Mint? I prefer that over Ubuntu...
RE: New User - problems starting - Added by Prof Yaffle about 11 years ago
Excellent - let's see if that gets you on your way.
I'll look at whether I can clean up the instructions, since you're right, it's not immediately obvious.
As for Mint ... yes, it should be perfectly happy since Mint is just another 'buntu underneath.
RE: New User - problems starting - Added by Joe Haimerl about 11 years ago
Great! Downloading MINT now... It seems to have a nicer version of XBMC built-in... Will try this again in a few hours.
My ultimate goal:
1. Convert all 4 laptops to Mint - seems so much more stable than windows and less effort for me to maintain!
2. Convert 1 of 2 desktops that are running windows media center into
home media server with Mint and XBMC/Tvheadend (and put near router in home network closet). Retire other desktop... and buy 4 androids or cuboxes for XMBC front end at each TV in the house.
3. Convert my high-end gaming PC to dual-boot Windows & Mint... No support for my games on Linux
RE: New User - problems starting - Added by Joe Haimerl about 11 years ago
So now on Mint I get errors adding repository:
joe@patrickstar / $ sudo apt-add-repository http://apt.tvheadend.org/stable
Cannot add PPA: 'No JSON object could be decoded'.
joe@patrickstar / $
Any idea how to get past this one?
RE: New User - problems starting - Added by Prof Yaffle about 11 years ago
Ugh.
https://tvheadend.org/boards/5/topics/8885
http://forums.linuxmint.com/viewtopic.php?f=90&t=136317
I'd guess that you can follow the Debian instructions and manually add the repository to the /etc/apt/sources.list.
deb http://apt.tvheadend.org/stable <version> main
I'm not a Mint guru, but I'm presuming that you just need to find the equivalent Ubuntu release name to your version of Mint and put it where it says <version> in the above. So "Olivia" means you use "Raring" (for example).
Don't forget to import the key as per the instructions.
RE: New User - problems starting - Added by Crazy Fin about 11 years ago
@Prof Yaffle
I just wanted to thank you for your very well support in this case! Very good and thorough explanations with good examples on how to do the install. I really enjoyed reading this thread.
I had exactly the same problems in the beginning 2 months ago when I started to struggle with Ubuntu trying to install TVHeadend. :-)
I did almost the same mistakes as Joe above did. May I suggest that you change a little bit on the "Download" page https://tvheadend.org/projects/tvheadend/wiki/AptRepository
It was not completely clear that after the steps
"curl http://apt.tvheadend.org/repo.gpg.key | sudo apt-key add -
sudo apt-add-repository http://apt.tvheadend.org/stable
sudo apt-get update"
one should do the "sudo apt-get install tvheadend" command since that row was under the paragaph "Debian Apt Repository" on that page.
(As well as I needed to install CURL too... :-) )
I did probably 3-4 clean Ubuntu re-installations and TVHeadend re-installations until I am where I am today 2 months later.. :-)
I was able to get TVHeadend running but it was a messy setup based on other pages on this site as well as other threads I´ve found using Google... :-)
When I realized that I was doing the error as Joe above and did the three simple steps
sudo curl http://apt.tvheadend.org/repo.gpg.key | sudo apt-key add -
sudo apt-add-repository http://apt.tvheadend.org/stable
sudo apt-get update
sudo apt-get install tvheadend
it actually installed properly and I was greeted with a graphic page with info about the superuser being setup. I was also really glad to see that after a reboot TVHeadend now started automatically in the background since it was now properly installed as a service! So coooool! :-)
I also had huge problems with the driver by Oliver Endriss for the Digital Devices Cine S2 card but that has also been solved now. :-)
(Info on the solution can be found at for example https://tvheadend.org/boards/5/topics/9563?r=9645#message-9645)
Now just have to figure out why I am not able to get proper permissions for TVHeadends user "hts" on my external drive where I want to save my timeshift buffer and recordings. I think that I have added hts as a user to the video group and changed the owner of the folders on my external group to hts user.
However, no need to reply in this thread on that issue. I´ll put that question in a separate thread and hoping to get nice support from you "Prof Yaffle" with that issue too. :-)
/CrazyFin