LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can not forward X11 output (https://www.linuxquestions.org/questions/linux-software-2/can-not-forward-x11-output-666152/)

Hewson 08-28-2008 05:45 PM

can not forward X11 output
 
I'm not sure what I'm doing wrong.

I have a linux box that I want to forward the DISPLAY on. I think there is something I need to configure on my local machine that should display the windows.

Code:

[scattaneo@172.16.2.103 ~]$ ssh -X regress5
scattaneo@regress5's password:
Last login: Thu Aug 28 12:17:51 2008 from 172.16.2.103
[scattaneo@regress5 ~]$
[scattaneo@regress5 ~]$ export DISPLAY=172.16.2.103:0.0
[scattaneo@regress5 ~]$ sudo wireshark

(wireshark:23836): Gtk-WARNING **: cannot open display:
[scattaneo@regress5 ~]$ echo $DISPLAY
172.16.2.103:0.0

What am I missing?

Thanks in advance.

-Steve

matthewg42 08-28-2008 06:04 PM

When you forward X with ssh, the DISPLAY should be set automatically. Maybe the remote config (e.g. .profile) is over-writing the auto-set value?

Also, bear in mind that the remote host may not allow X forwarding. Check the config on the remote host.

Hewson 08-29-2008 11:33 AM

Code:

[scattaneo@172.16.2.103 ~]$ ssh -X regress5
scattaneo@regress5's password:
Last login: Thu Aug 28 15:28:15 2008 from 172.16.2.103
[scattaneo@regress5 ~]$ echo $DISPLAY
localhost:10.0
[scattaneo@regress5 ~]$ sudo wireshark
X11 connection rejected because of wrong authentication.
The application 'wireshark' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.
[scattaneo@regress5 ~]$ exit
logout
Connection to regress5 closed.
[scattaneo@172.16.2.103 ~]$ ssh regress5
scattaneo@regress5's password:
Last login: Fri Aug 29 09:28:49 2008 from 172.16.2.103
[scattaneo@regress5 ~]$ echo $DISPLAY

[scattaneo@regress5 ~]$

I also have a WinXP laptop running xming (Xserver for windows). I am able to forward from the remote machine to my laptop, yet I am unable to forward from the remote machine to my local linux machine.

This leads me to believe there is something I need to do on my local linux box.

matthewg42 08-29-2008 11:51 AM

After logging in to the remote machine with ssh, please do this command and paste the output:

Code:

ls -l $HOME/.Xauthority

Hewson 08-29-2008 07:24 PM

Code:

[scattaneo@regress5 regression]$ ls -l /home/scattaneo/.Xauthority
-rw------- 1 scattaneo users 275 Aug 29 09:28 /home/scattaneo/.Xauthority


matthewg42 08-30-2008 02:43 AM

Googling about I found some example where this file was owned by root, and as such was not modifiable by the logged in user. However in your case it looks OK.

tethysgods 08-30-2008 03:59 AM

The command you need (If I read this question correctly) is

xhost +

So, in the place where you are exporting from, use that

in the place you are exporting to you might need

setenv DISPLAY 0:0

or something similar to that.

You can always

env | grep DISPLAY in the place you export from to find out.

Hewson 09-02-2008 10:39 AM

We have a winner!

xhost was what I needed.

Thanks!


All times are GMT -5. The time now is 07:51 AM.