LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 08-28-2008, 05:45 PM   #1
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Rep: Reputation: 32
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
 
Old 08-28-2008, 06:04 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
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.
 
Old 08-29-2008, 11:33 AM   #3
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Original Poster
Rep: Reputation: 32
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.

Last edited by Hewson; 08-29-2008 at 11:35 AM.
 
Old 08-29-2008, 11:51 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

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

Code:
ls -l $HOME/.Xauthority
 
Old 08-29-2008, 07:24 PM   #5
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Original Poster
Rep: Reputation: 32
Code:
[scattaneo@regress5 regression]$ ls -l /home/scattaneo/.Xauthority
-rw------- 1 scattaneo users 275 Aug 29 09:28 /home/scattaneo/.Xauthority
 
Old 08-30-2008, 02:43 AM   #6
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
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.
 
Old 08-30-2008, 03:59 AM   #7
tethysgods
Member
 
Registered: May 2004
Posts: 166

Rep: Reputation: 17
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.
 
Old 09-02-2008, 10:39 AM   #8
Hewson
Member
 
Registered: Feb 2007
Location: /home
Distribution: Kubuntu and CentOS
Posts: 214

Original Poster
Rep: Reputation: 32
We have a winner!

xhost was what I needed.

Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forward, input & output chains on iptables kurrupt Linux - Software 4 11-09-2011 04:29 AM
Mangle Output vs. Forward Palula Linux - Networking 1 04-12-2008 03:19 AM
Forward X11 multiple ssh sessions doublejoon Linux - Networking 5 04-26-2007 03:55 PM
How do I forward standard and error output into same file? ivj Linux - Software 5 07-19-2005 08:30 PM
Using echo to output a string to a file with forward slashs chrisk5527 Linux - General 15 06-21-2003 02:04 PM


All times are GMT -5. The time now is 04:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration