Kodi-buntu build troubles...
Added by Mark Hamblin over 9 years ago
OK I built a ubuntu 14.04 system,.. loaded tvh and got the xmltv stuff all running without much pain,...
Did another install with kodi-buntu build,.. installed tuner driver and xmltv stuff,.. and then tried to configure tvh....
This is where my problems started,.. had major problems trying to login to tvh using remote PC,.... found that tvh was now running as my user,.. and not hts,.. as it was before with clean ubuntu install.
Tried running from command line with -C option,.. and through some fumbling and inconsistent behavior I eventually got to the setup screen,.. tried running a hts user,.. and this failed as tvh did not have access to the tuner adapters,.. ( this worked fine with clean ubuntu install ) am I doing something wrong,..
Should tvh run as my-user or hts? and hence do I have to set access to the adapter cards which are root.root own/grp.
When first installed,.. is access granted to network access,.. rather than just local, as in localhost:9981
At one stage I just deleted the .hts structure under my user,.. and started with the -C,... eventually I got in,.. and was able to grant access,.. even though I had tried the sudo package configure to set a login and passwd.
Does someone have a definitive on which user I should be running tvh as,.. and should I be able to login via a remote PC at first install.
Tx and regards
Replies (6)
RE: Kodi-buntu build troubles... - Added by Prof Yaffle over 9 years ago
On any 'buntu base, it should be hts:video. This user and group membership should be defined when the package is installed - if not, I think dpkg-reconfigure should force the issue by effectively starting again (not quite as brutal as removing, purging and re-installing, which would also work).
How'd you install it? Are you compiling yourself and, if so, are you building a .deb or just the executable? The Autobuild.sh script is the safest option if you are building for any Debian-alike OS.
EDIT
It's a lifetime since I installed it afresh, but I believe that initial package config should also create the superuser account, which you can then use to log in from any PC that can access the web interface.
RE: Kodi-buntu build troubles... - Added by Mark Hamblin over 9 years ago
Hi there prof,.. tx for reply,..this was a clean install of kodi ubuntu,.. and I used the tvh wiki install instructions... no fiddling no compiling just simple install. ( I used the sudo apt-add-repository http://apt.tvheadend.org/stable line)
Curiously,.. when I installed via ubuntu,.. I was prompted for the account and passwd,.. but under the kodi-buntu install I was not,... although I did go back later an do it, but that did no immediatle fix things... but tvh still insists on running user/video.
when installing kodi-buntu,.. hts is a default account,.. my user is happy to read the adaptors,.. but hts user does not,.. it is refused,.. so errors in RED when run from the command line with -C.... access denied stuff.
regards
Mark
RE: Kodi-buntu build troubles... - Added by Prof Yaffle over 9 years ago
I can only suggest checking how tvheadend is started (sudo service tvheadend start/stop/restart), or checking the defaults file (/etc/default/tvheadend) to make sure it's daemonising properly on startup.
$ sudo service tvheadend status [sudo] password for <user>: tvheadend start/running, process 1841
$ cat /etc/default/tvheadend # # Default configuration for tvheadend # # TVH_ENABLED # set to 0 to disable upstart job TVH_ENABLED=1 # TVH_USER # if set to "" will run as root TVH_USER="hts" # TVH_GROUP # if set to "" will run as root TVH_GROUP="video" # TVH_CONF_DIR # if set to "" will use ~TVH_USER/.hts/tvheadend TVH_CONF_DIR="" # TVH_ADAPTERS # if set to "" will use all available adapters # for select adapters use comma seperated list of adapter # numbers, i.e. to use /dev/dvb/adapter0 and /dev/dvb/adapter1 only # set as "0,1" TVH_ADAPTERS="" # TVH_IPV6 # if set to 1 will enable IPv6 support TVH_IPV6=0 # TVH_HTTP_PORT # if set to "" will use binary default TVH_HTTP_PORT="" # TVH_HTTP_ROOT # if set to "" will use binary default # else will change the webui root context, useful for proxied # servers TVH_HTTP_ROOT="" # TVH_HTSP_PORT # if set to "" will use binary default TVH_HTSP_PORT="" # TVH_DEBUG # if set to 1 will output debug to syslog TVH_DEBUG=0 # TVH_ARGS # add any other arguments TVH_ARGS=""
There should be no reason to be playing with -C unless the setup failed AFAIK.
$ ps -eaf | grep tvh hts 1841 1 0 Apr16 ? 00:55:11 tvheadend -f -u hts -g video
Check that hts is part of the video group and/or the permissions on your tuner files, e.g.
$ ll /dev/dvb/adapter0 total 0 drwxr-xr-x 2 root root 120 Apr 16 10:38 ./ drwxr-xr-x 7 root root 140 Apr 16 10:38 ../ crw-rw----+ 1 root video 212, 0 Apr 16 10:38 demux0 crw-rw----+ 1 root video 212, 1 Apr 16 10:38 dvr0 crw-rw----+ 1 root video 212, 3 Apr 16 10:38 frontend0 crw-rw----+ 1 root video 212, 2 Apr 16 10:38 net0
RE: Kodi-buntu build troubles... - Added by Mark Hamblin over 9 years ago
Tx ,.. need to check some of that stuff,.. but I did look at the upstart file myself,.. and I'm pretty sure $USER stuff was blank.
although ps stuff was something like
myUSER 1841 1 0 Apr16 ? 00:55:11 tvheadend -f -u myUSER -g video
So without checking it maybe that the upstart file has not been created correctly for some reason.
what does package configure set these things to,.. or does it just go with what is already there?
Just wondering,.. but will confirm other stuff later...
RE: Kodi-buntu build troubles... - Added by Mark Hamblin over 9 years ago
Just checked what is going on,.. and as you suspected the /etc/default/tvheadend file was the issue,... as my_user was defined as the user rather than hts,. not sure why this occurred,.. would assume the install script would check for hts user,.. and associated privs and got with it..
Anyway changed my_USER to hts and did a service restart,.. and all is now well it seems.. although I had to re-tune all adapters again,.. I assume there must be a way of copying this config data,. as a backup,.. and for restore purposes...
Now system reports the following:-
hts 3126 1 3 17:20 ? 00:00:29 tvheadend -f -u hts -g video
total 0
drwxr-xr-x 2 root root 120 Apr 25 16:38 adapter0
drwxr-xr-x 2 root root 120 Apr 25 16:38 adapter1
drwxr-xr-x 2 root root 120 Apr 25 16:38 adapter2
drwxr-xr-x 2 root root 120 Apr 25 16:38 adapter3
drwxr-xr-x 2 root root 120 Apr 25 16:38 adapter4
drwxr-xr-x 2 root root 120 Apr 25 16:38 adapter5
Many thanks for the pointers to the defaults file...
Rgrds
RE: Kodi-buntu build troubles... - Added by Prof Yaffle over 9 years ago
You'd have had to set up again as your config location will have moved when the user changed - you probably have /home/$ME/.hts/tvheadend and /home/hts/.hts/tvheadend now, with your old config in the former and the new one in the latter.
Yes, you could have moved it over and changed some file ownerships (i.e. anything owned by $ME needs to be owned by hts now) - same for backups - just keep an eye on permissions and all would be fine. I've moved configs around, back and between with very little problem, although setting up from scratch isn't too traumatic if necessary.
Glad it's up and running, though. When all this playing around is finished, you'll miss it ... :-)