View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 15 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Feb 25, 2006 5:37 pm 
Offline
Joined: Mon Aug 01, 2005 9:54 pm
Posts: 77
I know how to restart the backend remotely via ssh, /etc/init.d/mythbackend restart, how can i restart the frontend remotely?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 25, 2006 5:56 pm 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
/etc/init.d/gdm restart
will do it, it's ugly and restarts more than just the frontend, but will accomplish the goal probably more easily than anything else.

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 26, 2006 9:05 am 
Offline
Joined: Mon Aug 01, 2005 9:54 pm
Posts: 77
thanks for that!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 27, 2006 6:03 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
Code:
export DISPLAY=192.168.1.100:0
nohup mythfrontend &


use your own IP address in the DISPLAY command

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 27, 2006 6:17 pm 
Offline
Joined: Tue Oct 25, 2005 1:22 pm
Posts: 108
Location: USA, New Hampshire
your own IP of the local machine or the myth machine? I am intersted in this as well.
Does that move the display over to the remote machine or does it just permit you to be able to start frontend via ssh?

Thanks so much!!

_________________
Once you go HDTV, you'll never come back!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 28, 2006 7:49 am 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
sorry for the quick response, I was in a hurry.

you need to ssh or telnet into the frontend box

Code:
ssh <ip address of frontend box>


once you have a terminal window on the frontend you can run any program you wish. It executes on te frontend. The trick is telling any X programs where to display the GUI. X uses a variable DISPLAY to determine this.

when you log into the console on the frontend it gets set automatically. Since you connected remotely, you need to set DISPLAY yourself.

Code:
DISPLAY=<ip of frontend>:0
export DISPLAY


now when you run mythfrontend, the gui will be displayed on the tv.

Couple ohter comments:

add an ampersand & to the end of the command to cause it to run in the background. this wiil return you to the command prompt to do more stuff or to logout.

add 'nohup' to the beginning of the command line. When you eventually logout of the terminal window, the shell will send a signal to all of the background process that the shell is exiting. the signal, HANGUP, causes the background processes to exit as well. so exiting the terminal will kill the mythfrontend process. by prepending nohup to the command line, the child process (mythfrontend) will ignore the hangup command.

If this something you plan to do offen, I would create a script to do it (use your own frontend box ip address)

Code:
MYTHFRONTEND_IP=192.168.1.50

DISPLAY=${MYTHFRONTEND_IP}:0
export DISPLAY

nohup mythfrontend &


This same script can be used by LIRC to start the frontend with a remote control button.

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 01, 2006 3:09 pm 
Offline
Joined: Tue Jul 26, 2005 2:49 pm
Posts: 26
khrusher wrote:
Code:
MYTHFRONTEND_IP=192.168.1.50

DISPLAY=${MYTHFRONTEND_IP}:0
export DISPLAY

nohup mythfrontend &


This same script can be used by LIRC to start the frontend with a remote control button.


To start the frontend using the remote control, wouldn't you just need the last line:
nohup mythfrontend &

because you're issuing the command on the myth machine and not remotely through ssh?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 01, 2006 3:52 pm 
Offline
Joined: Fri Nov 18, 2005 9:22 am
Posts: 777
Location: spencerport, ny (USA)
FWIW, I've been doing it this way:

cat /usr/local/bin/rfe.sh
#!/bin/sh
#rfe - reboot front end
#Purpose: restart the front-end when it's crashed.
#by Chris Thornton
#11/27/2005

/etc/init.d/gdm stop
echo Sleeping 4 secs...
sleep 4
/etc/init.d/gdm start
echo Done!


I've got it with the setuid bit set, and I just call it.
I don't have LIRC working yet, so I just use my RF keyboard to run from one of the other consoles. It's mainly useful in situations where the whole X envronment is messed up, and I want to "reboot X", as opposed to just starting the front end.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 01, 2006 7:09 pm 
Offline
Joined: Fri Dec 26, 2003 2:25 pm
Posts: 244
Can someone tell me how to do this as user mythtv? Seems like running the above script needs to be done by root. Maybe I'm missing something simple. Many thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 01, 2006 7:40 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
tmryan wrote:
khrusher wrote:
Code:
MYTHFRONTEND_IP=192.168.1.50

DISPLAY=${MYTHFRONTEND_IP}:0
export DISPLAY

nohup mythfrontend &


This same script can be used by LIRC to start the frontend with a remote control button.


To start the frontend using the remote control, wouldn't you just need the last line:
nohup mythfrontend &

because you're issuing the command on the myth machine and not remotely through ssh?


absolutly, but why have two scripts, the DISPLAY settings may be redundant for lirc but required for ssh...script works for both.

Dinki, my script will run for non-root users.

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 01, 2006 9:20 pm 
Offline
Joined: Fri Dec 26, 2003 2:25 pm
Posts: 244
Krusher, doesn't work for me.

export DISPLAY=192.168.0.100:0
nohup mythfrontend &

Produces:

[1] 844
(~)
mythtv@mythtv$ nohup: appending output to `nohup.out'

[I hit enter after a few seconds waiting for the frontend to start and:

[1]+ Exit 1 nohup mythfrontend


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 4:52 am 
Offline
Joined: Sun Jan 29, 2006 8:51 am
Posts: 48
Quote:
export DISPLAY=192.168.0.100:0


there seems to be something wrong with the ip you're using: a 0 (zero) can not be right..
use ifconfig to see the ip (prolly 192.168.1.100)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 8:10 am 
Offline
Joined: Tue Feb 21, 2006 10:55 am
Posts: 98
bonarez wrote:
Quote:
export DISPLAY=192.168.0.100:0


there seems to be something wrong with the ip you're using: a 0 (zero) can not be right..
use ifconfig to see the ip (prolly 192.168.1.100)


A 0 as an octet in the network portion of an IP address is valid, although not very common.

If you binaryize (lemme see you find that word in the dictionary!) this out you will see it better.

Code:
   192      168       0       100
11000000.10101000.00000000.01100100
\------------------------/ \-------/
Network address          Host Address



The host portion of this address should not be all zeros, but there is nothing preventing a full octet of the network address from being all zeros.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 11:47 am 
Offline
Joined: Mon Feb 13, 2006 10:44 am
Posts: 16
Wow, are we off-topic. The last poster said that the last 8 bits are for the host address. This is only for a Class C address. Thus:
Code:
Class A: network.host.host.host
Class B: network.network.host.host
Class C: network.network.network.host

Just wanted to clarify. Now we return you to your regular broadcast station.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 12, 2006 12:20 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
Quote:
mythtv@mythtv$ nohup: appending output to `nohup.out'


Is there any clues in nohup.out?

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 18 guests


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 post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu