LinHES Forums http://forum.linhes.org/ |
|
redirecting display to TV when in a PuTTy session? http://forum.linhes.org/viewtopic.php?f=5&t=1854 |
Page 1 of 1 |
Author: | newsdee [ Mon Jun 28, 2004 8:16 pm ] |
Post subject: | redirecting display to TV when in a PuTTy session? |
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... |
Author: | turkish [ Mon Jun 28, 2004 8:22 pm ] |
Post subject: | |
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 |
Author: | cesman [ Mon Jun 28, 2004 10:21 pm ] |
Post subject: | |
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. |
Author: | turpie [ Tue Jun 29, 2004 12:39 am ] |
Post subject: | |
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. |
Author: | newsdee [ Tue Jun 29, 2004 5:11 am ] |
Post subject: | |
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. |
Author: | saruman [ Tue Jun 29, 2004 9:55 am ] |
Post subject: | |
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) |
Author: | Xsecrets [ Tue Jun 29, 2004 10:15 am ] |
Post subject: | |
yes by default debian does not allow one user to dispay anything on another users X session for security purposes. |
Author: | SnapperDragon [ Tue Jun 29, 2004 8:43 pm ] |
Post subject: | |
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. |
Author: | newsdee [ Wed Jun 30, 2004 9:52 pm ] |
Post subject: | |
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... |
Author: | gr8nash [ Thu Jul 01, 2004 3:46 pm ] |
Post subject: | |
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 ![]() |
Author: | newsdee [ Thu Jul 01, 2004 5:33 pm ] |
Post subject: | |
That did the trick! Thanks a lot! ![]() |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |