View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Jun 28, 2004 8:16 pm 
Offline
Joined: Tue Jun 22, 2004 9:11 pm
Posts: 17
Is there a way to have programs invoked from a PuTTy session display in the TV? I remember Unix has a $DISPLAY variable that can be set, in the format hostname:0, but I forgot how to do it... I tried using the command "env DISPLAY=[the hostname of my box]:0" , but it didn't work.

I connect to the box from an XP machine, but when I try to run a program like Xmame (even to see the options) it quits with the error "cannot open display". If there was a way to somehow redirect the display to the TV, then it should work... I also have the same problem when I open a shell console (Ctrl+Alt+F1), but I guess in that case the main display is taken by text...

_________________
Don't panic!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 28, 2004 8:22 pm 
Offline
Joined: Mon Feb 23, 2004 11:37 pm
Posts: 87
you can do what i did, and install the vncserver and just start a vnc session, that way you can do things from another computer. not what your looking for, but its another way


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 28, 2004 10:21 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
You're trying to get the display for you boxen to display on XP? This will not work, unless to install Cygwin or Exceed or something that allows the use of X on Windows.

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2004 12:39 am 
Offline
Joined: Wed Apr 28, 2004 10:42 pm
Posts: 405
Location: Bendigo, Victoria, Australia
cesman wrote:
You're trying to get the display for you boxen to display on XP?


No, I think he is trying to launch the program from a remote telnet session and get it to display on the TV / X display.

_________________
Paul Turpie
-------------
<--Is your location in your profile? Why not?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2004 5:11 am 
Offline
Joined: Tue Jun 22, 2004 9:11 pm
Posts: 17
Both are fine, I just want to be able to run programs that look for a display, when launching them from my XP machine. I suppose the easiest would be to use KnoppMyth's main display (TV). It doesn't have to be fast or anything, this is just for debugging purposes and allow me to quickly test if a set of command line parameters are working.

_________________
Don't panic!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2004 9:55 am 
Offline
Joined: Mon Feb 23, 2004 1:08 am
Posts: 91
Location: Switzerland
Ah! I've had this problem...

Answer: DON'T DO IT AS ROOT...

For some reason, I was unable to X display stuff when running as root, but switching to mythtv user did the trick...

Here is a quick output:

Code:
root@mythtv:~ # DISPLAY=:0.0;export DISPLAY
root@mythtv:~ # xterm
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Warning: This program is an suid-root program or is being run by the root user
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s

root@mythtv:~ # su - mythtv
mythtv@mythtv:~ $ DISPLAY=:0.0;export DISPLAY
mythtv@mythtv:~ $ xterm
mythtv@mythtv:~ $ (gives no error, displays fine)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2004 10:15 am 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
yes by default debian does not allow one user to dispay anything on another users X session for security purposes.

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

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 29, 2004 8:43 pm 
Offline
Joined: Sat Feb 28, 2004 10:04 am
Posts: 173
Location: Canton, MI USA
Well, the general way to do this (redirecting the X display onto a remote machine is like so:

on the machine you want it to appear on (assuming it's running X): xhost +IP , where IP is the IP addy or hostname of the machine that you want to shoot you the output

On the source machine, redirect the display to a remote machine that you ran the xhost command on like so:

export DISPLAY=IP:0.0 , where IP is the remote machine.

Display must be in caps. Double check by typing "echo $DISPLAY". Some shells (sh) need 2 commands: DISPALY=...
and then "export DISPLAY" to be typed in.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 9:52 pm 
Offline
Joined: Tue Jun 22, 2004 9:11 pm
Posts: 17
Thanks for the answers! Unfortunately it's still not working... I tried both ways, but both fail saying that they can't open the display. I tried with hostnames and IP addresses of the KnoppMyth box, and both fail. :(

I did two su - mythtv (just in case, the second time it asked for a password), set DISPLAY to either the hostname and the IP, and tried to set xhost for my WinXP machine's IP and then the KnoppMyth box. Both xterm and xhost commands failes with a "can't open display" command.

Am I missing something? I though declaring an xhost would allow opening the display remotely, but maybe I'm not doing it right. I'm not doing it under Cygwin for the moment, so it should appear on the TV.

Edit: I found in a page mention that there's a need to open an SSH connection for X. So I tried the following... it didn't work, but it may give a clue to what's needed:
Code:
$ ssh -X [hostname]
(asks for login+password, entered mythtv)
$ echo $DISPLAY
localhost:10.0
$ xterm
connect [hostname] port 6000: Connection refused
X connection to localhost:10.0 broken (explicit kill or server shutdown)

If I change the DISPLAY variable to [hostname]:0.0, then I just get the same old "Cannot open display" error...

_________________
Don't panic!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 01, 2004 3:46 pm 
Offline
Joined: Thu Apr 01, 2004 10:44 am
Posts: 677
Location: WA
This is how it works on Fedora Core 2 (need to test it on KnoppMyth):
1) On the Myth Server (frontend):
Code:
#echo $DISPLAY


On Fedora you get:
:0.0

2) On the PuTTy session:
#export DISPLAY=[response_from_Myth_server]

For me it was:
Code:
#export DISPLAY=:0.0


If this works tell me :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 01, 2004 5:33 pm 
Offline
Joined: Tue Jun 22, 2004 9:11 pm
Posts: 17
That did the trick! Thanks a lot! :mrgreen:

_________________
Don't panic!


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 24 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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu