LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can't open display (https://www.linuxquestions.org/questions/linux-general-1/cant-open-display-813497/)

NiclasO 06-11-2010 02:39 AM

Can't open display
 
Hello

I am running reflexionX to acces a linux server but is doesn't work so well on my new computer with windows7. On the old computer with XP it works ok. Is there any magic settings that has to be made on windows 7 to allow for the linux machine to open windows on my client machine?

I can acces the linux server but when I try to start a second terminal window or graphic window I get the error:
/usr/X11R6/bin/xterm Xt error: Can't open display: 134.37.223.57:0

The IP adress is correct for my client computer.

I have installed the latest version of reflexionX but does not help. I have also installed PuTTY but the error remains the same. Offcourse I have the same settings as on my old computer with XP and telnet is switched on.

/Niclas

MensaWater 06-11-2010 12:50 PM

Xwindows by default use ports in the range 6000-6010. It may be that Win7 has those ports blocked in its firewall and you need to open them.

However an even safer way to do it is initiate an ssh session to the server from Windows using PuTTY with ssh tunneling. (Putty Configuration -->SSH -->X11 select "Enable X11 Forwarding".

When you open the PuTTY session to the remote server it will set your DISPLAY variable to a special one that tunnels back through the existing connection. (Make sure you don't override DISPLAY variable in /etc/profile, /etc/bashrc, .profile or .bashrc etc...). It also creates a .Xauthority in your home directory. Using that you can open X sessions back to your server (assuming you have your X server ReflectionX on).

If you change users after login (e.g. "su -" to become root) you can still use the same tunnel by setting DISPLAY to what it was before the su and setting XAUTHORITY variable equal to the .Xauthority file in the original user's home directory (e.g. export XAUTHORITY=/home/myuser/.Xauthority). For user's other than root you'd need to set permission on .Xauthority to allow that. (This permission change should be done sparingly and for short sessions as it opens a security hole into your Windows box - anyone that can access that .Xauthority file has a tunnel back to you.)


All times are GMT -5. The time now is 03:23 AM.