Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MythTV: frontend and backend init scripts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
maqe
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2006
Posts: 75

PostPosted: Mon Jul 31, 2006 7:21 pm    Post subject: MythTV: frontend and backend init scripts Reply with quote

I´m running latest mythtv from svn / fixes-release and i can not get mythbackend to start from boot and i can not get mythfrontend to start when i enter X. Can anyone help me with some inits scripts that work?
Back to top
View user's profile Send private message
belrpr
Guru
Guru


Joined: 22 May 2006
Posts: 440

PostPosted: Mon Jul 31, 2006 7:29 pm    Post subject: Re: MythTV: frontend and backend init scripts Reply with quote

maqe wrote:
I´m running latest mythtv from svn / fixes-release and i can not get mythbackend to start from boot and i can not get mythfrontend to start when i enter X. Can anyone help me with some inits scripts that work?

For the backend:
rc-update add mythbackend default

then it will start at boot time.
Back to top
View user's profile Send private message
maqe
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2006
Posts: 75

PostPosted: Mon Jul 31, 2006 7:33 pm    Post subject: Re: MythTV: frontend and backend init scripts Reply with quote

belrpr wrote:
maqe wrote:
I´m running latest mythtv from svn / fixes-release and i can not get mythbackend to start from boot and i can not get mythfrontend to start when i enter X. Can anyone help me with some inits scripts that work?

For the backend:
rc-update add mythbackend default

then it will start at boot time.

When i compile from source i don´t get any init scripts at all...
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 446

PostPosted: Mon Jul 31, 2006 7:55 pm    Post subject: Reply with quote

check out the files /usr/portage/media-tv/mythtv/files/mythbackend-0.18.2.rc and /usr/portage/media-tv/mythtv/files/mythbackend-0.18.2.conf.

Copy them as /etc/init.d/mythbackend and /etc/conf.d/mythbacked respectively. That should do it for init files.
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Mon Jul 31, 2006 8:03 pm    Post subject: Re: MythTV: frontend and backend init scripts Reply with quote

maqe wrote:
I´m running latest mythtv from svn / fixes-release and i can not get mythbackend to start from boot and i can not get mythfrontend to start when i enter X. Can anyone help me with some inits scripts that work?


Just put the startup in /etc/conf.d/local.start, and then add it to the default runlevel.

Code:
# vim /etc/conf.d/local.start
su - username -c "/usr/local/bin/mythbackend &"
# rc-update add local default




For mythfrontend, I recommend starting X with a non-root user, and having mythfrontend startup when your WM starts. The setup for that depends on which one you're using though.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
maqe
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2006
Posts: 75

PostPosted: Mon Jul 31, 2006 8:15 pm    Post subject: Reply with quote

Nicias wrote:
check out the files /usr/portage/media-tv/mythtv/files/mythbackend-0.18.2.rc and /usr/portage/media-tv/mythtv/files/mythbackend-0.18.2.conf.

Copy them as /etc/init.d/mythbackend and /etc/conf.d/mythbacked respectively. That should do it for init files.


Thanks alot for the help with those...
after adding mythbackend with rc-update add mythbackend default i get a boot message that says mythbackend started ok and when i check it with rc-status i says started but if i run ps aux | grep mythbackend i can´t find it and when i tries to start mythfrontend i get an error that the backend is´t started. Nothing in /var/log/mythtv/mytbackend.log
Back to top
View user's profile Send private message
maqe
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2006
Posts: 75

PostPosted: Mon Jul 31, 2006 8:23 pm    Post subject: Re: MythTV: frontend and backend init scripts Reply with quote

beandog wrote:
maqe wrote:
I´m running latest mythtv from svn / fixes-release and i can not get mythbackend to start from boot and i can not get mythfrontend to start when i enter X. Can anyone help me with some inits scripts that work?


Just put the startup in /etc/conf.d/local.start, and then add it to the default runlevel.

Code:
# vim /etc/conf.d/local.start
su - username -c "/usr/local/bin/mythbackend &"
# rc-update add local default




For mythfrontend, I recommend starting X with a non-root user, and having mythfrontend startup when your WM starts. The setup for that depends on which one you're using though.


This seems to work but i get alog of ugly output when backend starts even if i use & at the end?
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Mon Jul 31, 2006 9:13 pm    Post subject: Re: MythTV: frontend and backend init scripts Reply with quote

maqe wrote:
This seems to work but i get alog of ugly output when backend starts even if i use & at the end?


Sorry about that. Try this:

Code:
su - username -c "/usr/local/bin/mythbackend 2&> /dev/null "


I think that's right. I suck at piping stderr.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
maqe
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2006
Posts: 75

PostPosted: Tue Aug 01, 2006 6:56 am    Post subject: Re: MythTV: frontend and backend init scripts Reply with quote

beandog wrote:
maqe wrote:
This seems to work but i get alog of ugly output when backend starts even if i use & at the end?


Sorry about that. Try this:

Code:
su - username -c "/usr/local/bin/mythbackend 2&> /dev/null "


I think that's right. I suck at piping stderr.


That dosent work either... In local.start there is an exampel how to hide output but with 1>&2 but it dosent work?
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Tue Aug 01, 2006 7:55 pm    Post subject: Reply with quote

Actually I think its "mythbackend &> /dev/null"

The one you listed would just dump everything to stderr.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
maqe
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2006
Posts: 75

PostPosted: Wed Aug 02, 2006 2:19 pm    Post subject: Reply with quote

beandog wrote:
Actually I think its "mythbackend &> /dev/null"

The one you listed would just dump everything to stderr.

hehe that did´t do it either, it seems like its hard to run something in local.start without getting alot of extra output ...
Back to top
View user's profile Send private message
NiklasH
Apprentice
Apprentice


Joined: 30 Aug 2002
Posts: 211
Location: On top of something

PostPosted: Thu Aug 03, 2006 10:43 pm    Post subject: Reply with quote

A better way of doing it, IMHO:

Put mythfrontend in your .xinitrc, then change the line
in the "Terminals" section in /etc/inittab that starts with c6 to this:

Code:
c6:2345:respawn:/usr/bin/openvt -fwc 2 -- /bin/su - mythtv -c /usr/bin/startx > /dev/null


(This is assuming that mythfrontend runs as user mythtv, otherwise you change the 'su - mythtv' to the user you want)

This has the advantage of restarting X if mythfrontend crashes (which it seems to do now and then)

Works great for me.
_________________
Banana Republic
Back to top
View user's profile Send private message
JuMPeRfLy
n00b
n00b


Joined: 23 Mar 2004
Posts: 30
Location: Bangor, Wales

PostPosted: Fri Aug 04, 2006 1:12 pm    Post subject: Reply with quote

You need to give mythbackend a log file
"mythbackend --logfile /var/log/mythtv/mythbackend.log &"
or "mythbackend -d --logfile /var/log/mythtv/mythbackend.log" to start in daemon mode

should stop it printing to stderr

I had problems with the init script too, the backend wouldn't actually start. Removing "--chuid mythtv" from the start section fixed the problem.

Code:

   start-stop-daemon --start --quiet \
      --exec /usr/bin/mythbackend \
      --make-pidfile --pidfile /var/run/mythbackend.pid \
      -- -d --verbose ${MYTH_VERBOSE} \
      --logfile /var/log/mythtv/mythbackend.log
Back to top
View user's profile Send private message
anxt
Apprentice
Apprentice


Joined: 25 Feb 2003
Posts: 254
Location: Frozen Tundra, Canada

PostPosted: Tue Aug 22, 2006 7:38 am    Post subject: Reply with quote

This also fixed the problem for me as well. Thanks.
Back to top
View user's profile Send private message
MonkeyTheCode
n00b
n00b


Joined: 20 Apr 2007
Posts: 1

PostPosted: Fri Apr 20, 2007 12:36 am    Post subject: bug report filed Reply with quote

for those that care, 175291 has been filed for this issue. FWIW, I've seen this with a 0.18.1 and a 0.20 based installation, on separate systems.
Back to top
View user's profile Send private message
Cardoe
Retired Dev
Retired Dev


Joined: 28 Jun 2002
Posts: 32

PostPosted: Fri Apr 20, 2007 2:30 pm    Post subject: Reply with quote

beandog: The real suggestion is if you're clueless. Don't go compiling things on your own and don't go tweaking and configuring things on your own. Instead use the way that's been setup long long ago and tested by many people.

emerge mythtv. enable USE=autostart. Follow the instructions.
_________________
Cardoe

Retired Gentoo Developer
Gentopia, MythTV, D-Bus
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Apr 20, 2007 2:57 pm    Post subject: Reply with quote

Cardoe wrote:
beandog: The real suggestion is if you're clueless. Don't go compiling things on your own and don't go tweaking and configuring things on your own. Instead use the way that's been setup long long ago and tested by many people.


Hmm, true enough. Anyone whose read my blog knows the horrors of running straight from the SVN repo.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
DocterD
Tux's lil' helper
Tux's lil' helper


Joined: 15 May 2004
Posts: 129

PostPosted: Tue May 08, 2007 5:33 pm    Post subject: Re: bug report filed Reply with quote

MonkeyTheCode wrote:
for those that care, 175291 has been filed for this issue. FWIW, I've seen this with a 0.18.1 and a 0.20 based installation, on separate systems.


just fixed it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum