LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-08-2014, 03:49 PM   #1
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
X forwarding on Solaris x86 server


Hi all,

I'm working for the first time with a virtual x86 machine running Solaris 10. I need the Oracle 11.2 client libraries, and to do so need to have Xwindows forwarding working. I can ssh into the Solaris machine via PuTTY from a local Windows machine. Most howto's seem to assume that my Solaris box was set up with X preinstalled and running, which is not the case here, so that's likely where the missing piece(s) are.

I feel like I may be close -- but so far, no banana.

These are the Oracle client installation instructions I'm working from:
Official: http://docs.oracle.com/cd/E11882_01/...c.htm#BGBEAGAJ
Unofficial: http://webmodelling.com/webbits/data...solaris10.aspx

For X, I've installed:
Code:
SUNWarc SUNWbtool SUNWhea SUNWlibms SUNWmfrun SUNWxorg-client-programs SUNWxorg-clientlibs 
#  SUNWxwfnt already installed in an earlier step
The following are enabled in sshd_config:

Code:
AllowTcpForwarding yes
GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
On my Windows machine:
PuTTY: Have X11 forwarding enabled in settings
Exceed Windows x server: Have added the Solaris virtual machine's IP to C:\Program Data\Hummingbird\Exceed\xhost.txt and restarted Exceed. The Exceed title bar states that it's listening on <windows IP>:0. (Note: I have access to Exceed. Period.)

On Solaris:
Code:
-bash-3.2# export DISPLAY=localhost:0
-bash-3.2# /usr/openwin/bin/xcalc
Error: Can't open display: localhost:0

-bash-3.2# export DISPLAY=:0.0
-bash-3.2# /usr/openwin/bin/xcalc
Error: Can't open display: :0.0

-bash-3.2# export DISPLAY=<windows IP>:0
-bash-3.2# /usr/openwin/bin/xcalc


^C
The last try feels like the most plausible try as at least xcalc doesn't exit immediately. However, it just hangs there, with no application visible on Windows laptop. xhost + was recommended in sevearl places but also behaves the same (appears to hang or be expecting console input); likewise xwininfo.

Any ideas what I missed?

Many thanks!
 
Old 05-08-2014, 04:41 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You shouldn't set the DISPLAY variable with a properly configured X forwarding sshd. It should already be set to localhost:10.

Do you directly log in as root with ssh ?
 
Old 05-08-2014, 09:39 PM   #3
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
Thanks for the reply!

No, I'm logging in as a regular unprivileged user and using pfexec su - to get to root (and once that works, to oracle)
 
Old 05-09-2014, 02:38 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You are losing the DISPLAY variable when switching users. Check if it is set before su-ing to root.
The simplest way would be to directly log in as oracle.
 
Old 05-09-2014, 11:12 AM   #5
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
I'm trying it all as root, right now. There's no losing of $DISPLAY.

Code:
-bash-3.2# echo $DISPLAY
localhost:50
-bash-3.2# /usr/openwin/bin/xcalc
Error: Can't open display: localhost:50
-bash-3.2# export DISPLAY=:10
-bash-3.2# /usr/openwin/bin/xcalc
Error: Can't open display: :10
-bash-3.2# export DISPLAY=:1.0
-bash-3.2# /usr/openwin/bin/xcalc
Error: Can't open display: :1.0
-bash-3.2# export DISPLAY=:0
-bash-3.2# /usr/openwin/bin/xcalc
Error: Can't open display: :0
-bash-3.2# export DISPLAY=172.19.106.69:1.0
-bash-3.2# /usr/openwin/bin/xcalc


^C
-bash-3.2#
 
Old 05-09-2014, 11:23 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Why is DISPLAY set to:
Code:
localhost:50
while the configuration states it should start at 10:
Code:
X11DisplayOffset 10
?
Are there other ssh sessions pending ?
Why are you connecting as root and not oracle ?
 
Old 05-09-2014, 11:39 AM   #7
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
Quote:
Why is DISPLAY set to:
localhost:50
I'm trying everything at this point - as shown above, no hostname/display combination that I can come up with is working.

Quote:
Why are you connecting as root and not oracle ?
I figured if it doesn't work as root, does it have a snowball's chance of working as an unprivileged user?

To doublecheck, the same thing happens when I log over to oracle:
Code:
-bash-3.2# exit
logout
-bash-3.2$ pfexec su - oracle
Password:
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
-bash-3.2$ export DISPLAY=:10
-bash-3.2$ /usr/openwin/bin/xcalc
Error: Can't open display: :10
-bash-3.2$
-bash-3.2$ export DISPLAY=172.19.106.69:10
-bash-3.2$ /usr/openwin/bin/xcalc



^C
-bash-3.2$
Thanks!
 
Old 05-09-2014, 02:08 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I'm afraid you are confusing su-ing and login.

You have zero chance for ssh X forwarding to work by setting the DISPLAY variable yourself. I wrongly thought localhost:50 had been automatically set but that doesn't seem to be the case.

Please log in remotely from your ssh client under whatever account authorized to access throuch ssh to the Solaris server and make sure X11 forwarding is enabled in the client settings. When logged in, check if the DISPLAY variable is set. Don't run "su".
 
Old 05-09-2014, 03:20 PM   #9
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
Hi, thanks for replying.

This time logging in directly as oracle. Confirmed that X11 Forwarding is checked in PuTTY settings for the session:

Code:
Using keyboard-interactive authentication.
Password:
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
-bash-3.2$ echo $DISPLAY
localhost:50
-bash-3.2$ /usr/openwin/bin/xcalc
Error: Can't open display: localhost:50
-bash-3.2$ who am i
oracle     syscon       May  9 15:15    (172.19.106.69)
-bash-3.2$
 
Old 05-10-2014, 12:34 PM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I still don't understand why you get 50 when 10 is expected. Again, are there other ssh sessions pending on the server?

Anything of interest in putty event log ?
 
Old 05-10-2014, 08:23 PM   #11
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
Hm. I will check the event log - didn't realize it had one as a standalone binary. I will check on that.

No other sessions on the server; it's a private VM and I'm the only one who knows the IP.
 
Old 05-12-2014, 10:17 AM   #12
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
ETA: Solved.

I am pretty sure that these must be specific to our firewall, but in the end I had to go into my SSH client settings and disable X11 Forwarding, and then under Tunnels, add a forwarded Remote port with

Source Port: 6050
Destination: localhost:6000

On the VM $DISPLAY is still set to localhost:50, and there were no changes to Exceed (I took the VM's IP out of Exceed's xhost.txt file, actually, and it still works).

Thanks again for all of your help!

Last edited by rose_bud4201; 05-12-2014 at 03:04 PM. Reason: resolved
 
Old 05-12-2014, 02:00 PM   #13
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
There are no X server logs to expect on the Solaris side, the X server is supposed to run on the Windows one. On the other hand, there should be some putty logs, perhaps do you need to enable them.

Are you able to forward X through ssh when connected to a different machine (Solaris or Linux) or is it your first attempt ?
 
  


Reply

Tags
oracle11g, solaris, x11 forwarding, xhost



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install Web App Server for Solaris 10 X86 L1nuxn00b703 Solaris / OpenSolaris 1 03-11-2012 04:54 AM
Trouble in Directory Server 6.x @ Solaris 10 X86 WiLLy85 Solaris / OpenSolaris 3 05-14-2008 04:17 AM
LXer: Compiz on Solaris x86 - Eye Candy for Solaris’s Desktop LXer Syndicated Linux News 1 05-30-2007 02:31 PM
great solaris website for newbies http://solaris-x86.org/ feetyouwell Solaris / OpenSolaris 2 12-06-2006 12:14 AM
x86 Solaris 10 as a VPN Server SocialEngineer Solaris / OpenSolaris 1 04-20-2005 02:59 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:15 AM.

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