LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can't display xwindow on remote machine using Debian 3.1 (https://www.linuxquestions.org/questions/linux-software-2/cant-display-xwindow-on-remote-machine-using-debian-3-1-a-465364/)

linian 07-18-2006 10:05 PM

can't display xwindow on remote machine using Debian 3.1
 
I am runnig Debian (Sarge) 3.1 on a LAN.
I want to open xwindow on a remote machine.

Two machines: Machine A and Machine B

I am logged in A.
1. I gave command: xhost + B
2. ssh to machine B.

3. Now while in machine B wrote command:
export DISPLAY=A:0.0
4. xterm

I see error message: xterm Xt error: Can't open display

I also made following change in /etc/ssh/sshd_config:
X11Forwarding yes
(Above change was made made for both the machines A and B). I also rebooted A & B after this change, but to no avail. (I also tried the same thing while on machine B.)

Your help is greatly appreciated.

b0uncer 07-19-2006 03:22 AM

Did you try to open the ssh connection using
Code:

ssh -X
(enable X11) or
Code:

ssh -Y
(enable trusted X11 - remember to make B "trusted")

instead of plain "ssh"?

linian 07-19-2006 09:32 AM

After your advice I tried it as:

xhost + remotehost
ssh -X machineB -l username
....export DISPLAY....

also as:

xhost + remotehost
ssh -Y machineB -l username
....export DISPLAY....

But both ways, I get the following error
xterm Xt error: Can't open display: machineA:0.0

linian 07-20-2006 09:40 AM

Hello b0uncer,
I GOT THAT. NOW IT is working fine. Thanks for your help.
Today I tried ssh -X without messing with xhost or export DISPLAY..etc.
That is : I did NOT write : xhost +hostname
I did not write: export DISPLAY....
I just wrote:
ssh -X hostname
and once I got into that host, then I wrote xterm.
It is working great.
Previously I was mixing ssh -X and then given command ..DISPLAY.. and then xterm. That is not a proper way.
Proper way is just as I described above. I wrote a detailed reply so that it can help anyone who reads this thread.

Thank you b0uncer. I appreciate taking your time and giving the response.
Best regards.


All times are GMT -5. The time now is 09:57 PM.