LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 12-20-2003, 07:12 PM   #1
rverdugo
LQ Newbie
 
Registered: Oct 2003
Distribution: Red Hat
Posts: 3

Rep: Reputation: 0
Unhappy XDarwin - $DISIPLAY - X11Forwading


Dear Linux community:

After days and days of work I am getting to the point where I want to shut
my self and I hope you can help me before I take an final decision.

I have an XServe with Panther installed and the Apple's distribution of
XDarwin.

I want to forward the graphics of a session to my Windows XP desktop which
has X/Cygwin installed and working.

The problem is that when I want to start a client in the server I from the
command line, get a message like this

angenome:~ admin$ xterm
xterm Xt error: Can't open display:

If I start X11, an xterm widow start, as expected, so I know X11 is working
in the server. What is strange is that when I just installed X11 in the
server I could start xterm without any problem. This stopped working
shortly,
though. I installed X11 twice with the same behavior.

Now, when I login from my WinXP within cygwin (and the X server working
already) I get:

Code:
$ ssh -X raverdugo@angenome.ucdavis.edu
raverdugo@angenome.ucdavis.edu's password:
Welcome to Darwin!
angenome:~ raverdugo$ xterm
xterm Xt error: Can't open display:
angenome:~ raverdugo$
I checked and I don't have any file in my home that could cause this
problem, such as .login, .bash_profile, .bashrc, etc.

If I echo $DISPLAY , I get just a blank line so I guess it is not set.

I don't know what to do. Every HOWTO that I read says that it should very
easy to forward X graphics through SSH, so I must be an idiot.

I include a verbose version of the connection, if that could be of any use.

Thanks a lot,

Ricardo.

####################
Code:
$ ssh -v -X rverdugo@angenome.ucdavis.edu /usr/X11R6/bin/xterm
OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to angenome.ucdavis.edu [169.237.111.244] port 22.
debug1: Connection established.
debug1: identity file /home/RAVerdugo/.ssh/identity type 0
debug1: identity file /home/RAVerdugo/.ssh/id_rsa type 1
debug1: identity file /home/RAVerdugo/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version
OpenSSH_3.6.1p1+CAN
-2003-0693
debug1: match: OpenSSH_3.6.1p1+CAN-2003-0693 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.7.1p2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'angenome.ucdavis.edu' is known and matches the RSA host key.
debug1: Found key in /home/RAVerdugo/.ssh/known_hosts:12
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue:
gssapi,publickey,password,keyboard-in
teractive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/RAVerdugo/.ssh/id_rsa
debug1: Authentications that can continue:
gssapi,publickey,password,keyboard-in
teractive
debug1: Offering public key: /home/RAVerdugo/.ssh/id_dsa
debug1: Authentications that can continue:
gssapi,publickey,password,keyboard-in
teractive
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue:
gssapi,publickey,password,keyboard-in
teractive
debug1: Next authentication method: password
rverdugo@angenome.ucdavis.edu's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: /usr/X11R6/bin/xterm
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
/usr/X11R6/bin/xterm Xt error: Can't open display:
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 1
 
Old 12-20-2003, 10:59 PM   #2
Inexactitude
Member
 
Registered: Oct 2003
Distribution: Slackware 12.2, Ubuntu 9.04
Posts: 477

Rep: Reputation: 30
Make sure that you have port forwarding enabled. Also, x11 forwarding should be enabled.

Add these to your sshd-config file. This may just do the trick.

Code:
X11Forwarding yes
GatewayPorts yes

Last edited by Inexactitude; 12-20-2003 at 11:04 PM.
 
Old 12-22-2003, 10:36 PM   #3
rverdugo
LQ Newbie
 
Registered: Oct 2003
Distribution: Red Hat
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Inexactitude:

Thanks for your reply. I added GatewayPorts but nothing happens.

It strange that I get different errors when using different SSH clients. E.g. If I use ssh from cygwin I get

Code:
angenome:~ admin$ xclock
Error: Can't open display:
angenome:~ admin$ xterm
xterm Xt error: Can't open display:
But if I use PuTTy I get

Code:
angenome:~ admin$ xclock
Xlib: connection to "localhost:10.0" refused by server
Xlib: No protocol specified

Error: Can't open display: localhost:10.0
angenome:~ admin$ xterm
Xlib: connection to "localhost:10.0" refused by server
Xlib: No protocol specified

xterm Xt error: Can't open display: localhost:10.0
Ti set up PuTTy I just checked the Enable X11 Forwarding box.


Wait!... Now I tried something different. I started tha X11 server with the startxwin.bat file that comes with X/cygwin and it strated a bash X window. From there I did SSH to the server and called xclock and it worked!!! I showed the clock in a lillte X window in my local computer.

So I guess that my server is ok, I have a problem in the connection from PuTTy o from the normal cygwin shell.

Wowww! If I call xterm from the open xterm I get a whit terminal, just like the one I would get if I call it when sitted in the server (it is an Apple).
I can also call xclock from here.

However, if I call R (a statitical package that can open a X11 window for graphics) I get thise error.

Code:
X connection to localhost:10.0 broken (explicit kill or server shutdown).
... and the I get quicked out of R. I had to do it as root because when I tried to start R as normal user I got

Code:
kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only
INIT_Processeses(), could not establish the default connection to the WindowServer.Abort trap
I got this from PuTTy as well.

Well I hope someone can help me. I feel like I am very close to reach my objective.
 
Old 01-17-2004, 05:09 AM   #4
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Okay, you say that $DISPLAY is null. Let me see if I got things right.

You are seated at box0... you ssh into box1... on box1 you want to run an xterm that will display on box0?

First, from your examples I can see that you are attempting to display the xterm on box1 -- which would be the wrong thing. You should probably try `xterm -display box0.net.address:0` so that it will get sent to the right computer. you can set your $DISPLAY variable to that address to avoid typing it constantly. Remember to include the ":0".

If you still get errors they will probably be: box0:0.0 refused blah blah blah. From box0... you need to run `xhost +box1` -- this will tell X to accept information from the remote computer.

I think this should help... who knows.

-Eric
 
Old 01-19-2004, 06:36 PM   #5
rverdugo
LQ Newbie
 
Registered: Oct 2003
Distribution: Red Hat
Posts: 3

Original Poster
Rep: Reputation: 0
Eric, thanks for your help.

look what I got

Code:
angenome:~ rverdugo$ xterm -display 169.237.111.232:0
dyld: xterm version mismatch for library: /usr/X11R6/lib/libfreetype.6.dylib (compatibility version of user: 6.3.0 greater than library's version: 6.2.0)
Trace/BPT trap
I understand from this that the libraaru in the server (remote machine) is old.

I am not shure if this library was installed by Apple's X11 (the one working apparently) or fy Fink, swhich I got partially installed. (and I can not make work)

Thanks,

Ricardo.
 
Old 01-24-2004, 02:32 AM   #6
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Did you try and upgrade that library? Also, did you get a core dump? If you did you can use that to see exactly where you crashed. Just type

gdb /path/to/xterm xterm.corefile

After the list of libraries loaded... you will get a prompt... type "bt" and it will print out the stack when the program dumped core... it should print out the name of the library it was in as part of that dump. But that is really out there... just try and upgrade the library.
 
  


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



LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 06:01 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration