DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 9th January 2010
Graaf_van_Vlaanderen Graaf_van_Vlaanderen is offline
Port Guard
 
Join Date: Apr 2009
Posts: 10
Thanked 0 Times in 0 Posts
Default X forwarding fails

I installed OpenBSD on a Sun Balde 1500. X is working on the machine itself (for example with gnuplot and GNU Octave). However it doesn't work through ssh. With my FreeBSD machines I don't get this issue.

Code:
$ gnuplot

        G N U P L O T
        Version 4.2 patchlevel 6
        last modified Sep 2009
        System: OpenBSD 4.6

        Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009
        Thomas Williams, Colin Kelley and many others

        Type `help` to access the on-line reference manual.
        The gnuplot FAQ is available from http://www.gnuplot.info/faq/

        Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>


Terminal type set to 'x11'
gnuplot> plot sin(x)

gnuplot: unable to open display ''
gnuplot: X11 aborted.
Code:
# uname -a
OpenBSD Tiphareth.home 4.6 GENERIC#43 sparc64
Reply With Quote
  #2   (View Single Post)  
Old 9th January 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,608
Thanked 214 Times in 189 Posts
Default

You need "X11Forwarding yes" in the applicable sshd_config, and either "ForwardX11 yes" in the applicable ssh_config, or use "ssh -Y".
Reply With Quote
  #3   (View Single Post)  
Old 9th January 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,608
Thanked 214 Times in 189 Posts
Default

To clarify my comment, "ForwardX11 yes" is equivalent to ssh -X, and "ForwardX11Trusted yes" is equivalent to ssh -Y.

See the man pages for ssh_config(5) and ssh(1).
Reply With Quote
  #4   (View Single Post)  
Old 9th January 2010
Graaf_van_Vlaanderen Graaf_van_Vlaanderen is offline
Port Guard
 
Join Date: Apr 2009
Posts: 10
Thanked 0 Times in 0 Posts
Default

I tried what you mentioned but like expected it didn't work.

I compared with my FreeBSD (where X forwarding works for all my machines) and saw no difference between the "ssh_conf" and "sshd_conf" files from FreeBSD and OpenBSD. I even think it's enabled by default.

Code:
#   ForwardX11 no
This is default value, so this would imply you need to enable this one to disable X forwarding.
Could it be that I missed installing some components? In FreeBSD I simply build Xorg from the ports and it works.
Reply With Quote
  #5   (View Single Post)  
Old 9th January 2010
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 699
Thanked 90 Times in 81 Posts
Default

Commented values show the defaults, which means X11 forwarding is disabled by default.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #6   (View Single Post)  
Old 9th January 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,608
Thanked 214 Times in 189 Posts
Default

In OpenBSD, all OpenSSH configurations are left to their defaults. That is reasonable, as OpenSSH is developed on OpenBSD.

X11 Forwarding is disabled by default for both the client and server.
  • In the case of the server, sshd, it must be enabled via sshd_config.
  • In the case of the client, ssh, it can be enabled via ssh_config, or via command line.
Using "-Y" has always worked for me, from an OpenBSD client, to any OpenSSH server with X11Forwarding enabled. I end up with a $DISPLAY variable, and the packets are tunnelled properly.

If 'ssh -Y <myserver>' does not work for you, then examine the sshd_config in use on <myserver>. If you can confirm X11 forwarding has been explicitly enabled, with "X11Forwarding yes" then you must debug the configuration. Try 'ssh -v -v -v -Y <myserver>' and examine the debugging output.

Last edited by jggimi; 9th January 2010 at 06:10 PM.
Reply With Quote
  #7   (View Single Post)  
Old 9th January 2010
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 552
Thanked 14 Times in 13 Posts
Default

Code:
Terminal type set to 'x11'
gnuplot> plot sin(x)

gnuplot: unable to open display ''
gnuplot: X11 aborted.
This is exactly the behaviour I get when running gnuplot with TERM=xterm and DISPLAY unset. So a question is: is your DISPLAY variable set (and exported) at the point of running gnuplot?
Reply With Quote
  #8   (View Single Post)  
Old 10th January 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,608
Thanked 214 Times in 189 Posts
Default

-If- OpenSSH's X11 forwarding is enabled by both client and server, and used, the $DISPLAY environment variable will be set automatically in the shell provided to the client.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD, vpnc and packets forwarding problems Tritone OpenBSD General 3 2nd July 2009 09:59 PM
Bootonly CD Fails rtwingfield FreeBSD Installation and Upgrading 1 29th December 2008 01:25 AM
x11 forwarding over ssh not working kasse OpenBSD General 14 23rd December 2008 02:21 PM
port forwarding ikevmowe OpenBSD Security 13 21st November 2008 06:03 PM
VNC port forwarding help revzalot OpenBSD Security 3 10th September 2008 06:59 AM


All times are GMT. The time now is 05:27 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick