X11 and "Cannot Open Display" errors | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

X11 and "Cannot Open Display" errors

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-18-2011
bluescreen bluescreen is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 1 February 2013, 2:00 PM EST
Location: Virginia
Posts: 262
Thanks: 8
Thanked 34 Times in 31 Posts
Lightbulb X11 and "Cannot Open Display" errors

Greetings Forumers!

I'm posting a solution to an Issue I ran into this week: Getting applications to display on another through X11 and SSH. I have run into this issue many years ago and finally found my notes. Some of you may already know the answer to this issue but it took me a while to resolve it for myself.

Scenerio: both systems running Solaris 10u4 or greater, remote system=SPARC(M5000) and my workstation running x86(Ultra24).

I was merely trying to get xclock to display on my workstation from a remote system to test that x11 was working. I ran "xhost +remotehost" on my system before I started an ssh session to the remote system. I set the DISPLAY var and ran xclock. This failed repeatedly with "Cannot Open Display" errors. I tried changing the DISPLAY var with variations of "mysystem:0" and "mysystem:0.0" and "mysystem:1", etc., etc. Long story short: nothing worked.

The resolution that worked was to modify the "tcplisten" option in the "application/x11/x11-server" service on my system to "true":

Code:
mysystem# svccfg -s application/x11/x11-server
svc:/application/x11/x11-server> listprop options/*
options/default_depth        integer  24
options/server               astring  /usr/X11/bin/Xorg
options/server_args          astring
options/stability            astring  Evolving
options/value_authorization  astring  solaris.smf.manage.x11
options/tcp_listen           boolean  false
svc:/application/x11/x11-server> setprop options/tcp_listen=true
svc:/application/x11/x11-server> listprop options/*
options/default_depth        integer  24
options/server               astring  /usr/X11/bin/Xorg
options/server_args          astring
options/stability            astring  Evolving
options/value_authorization  astring  solaris.smf.manage.x11
options/tcp_listen           boolean  true
svc:/application/x11/x11-server> exit
mysystem#

After setting this I was able to get xclock to display on my system.


HTH
Sponsored Links
    #2  
Old 02-18-2011
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 18 December 2014, 12:18 PM EST
Location: Paris
Posts: 4,469
Thanks: 17
Thanked 482 Times in 434 Posts
As you wrote you are using ssh, a simpler and safer solution would be to simply tunnel X11 through ssh:


Code:
$ ssh -X servername
...
$ xclock &

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
"Gtk-WARNING cannot open display" from ssh badrabbit6 UNIX for Dummies Questions & Answers 4 10-29-2009 07:17 PM
"too big" and "not enough memory" errors in shell script jerardfjay AIX 11 03-17-2009 12:09 AM
VMDB Failure" followed by "Unable to open snapshot file" s_linux SuSE 0 02-10-2009 12:01 PM
invisble with "w" and ip doesnt display with "who" Micz UNIX for Dummies Questions & Answers 4 09-12-2003 04:36 AM



All times are GMT -4. The time now is 04:12 PM.