Sponsored Content
Operating Systems Solaris X11 and "Cannot Open Display" errors Post 302497930 by bluescreen on Friday 18th of February 2011 12:02:51 PM
Old 02-18-2011
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
 

8 More Discussions You Might Find Interesting

1. SuSE

VMDB Failure" followed by "Unable to open snapshot file"

keep getting an error when I try to revert to a snapshot: "VMDB Failure" followed by "Unable to open snapshot file" Im using vmware server 1.0.4, host OS is windows xp and guest OS is SLES. Is there anything I can do to recover the snapshot or am I in trouble!?!?! (0 Replies)
Discussion started by: s_linux
0 Replies

2. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

3. IP Networking

Unknown open port: "6881/tcp open bittorrent-tracker" found with nmap

Hi. I ran nmap on my server, and I get the following: Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-19 16:33 EDT Interesting ports on -------- (-----): Not shown: 997 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 6881/tcp open bittorrent-tracker The... (0 Replies)
Discussion started by: Rledley
0 Replies

4. UNIX for Dummies Questions & Answers

"Gtk-WARNING cannot open display" from ssh

I am trying to do something on another computer through ssh and I keep getting this:"(gedit:6169): Gtk-WARNING **: cannot open display:"I have googled the interweb and this forum and found many posts but nothing seems to work. I have freshly installed Ubuntu 8.10 with updates on the machine and I... (4 Replies)
Discussion started by: badrabbit6
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Advanced & Expert Users

[Solved] putty+x11:How do I pass X11 display rights to "su"?

I can log into a unix system with Putty. I've set the "X11 forwarding" checkbox, and I've verified that I can display an X11 window back on my laptop. What I need to be able to do is "su" to another uid after logging in and then run something which display a window back on my laptop, with the... (2 Replies)
Discussion started by: dkarr
2 Replies

7. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies

8. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
XmGetPixmap(library call)												 XmGetPixmap(library call)

NAME
XmGetPixmap -- A pixmap caching function that generates a pixmap, stores it in a pixmap cache, and returns the pixmap SYNOPSIS
#include <Xm/Xm.h> Pixmap XmGetPixmap( Screen *screen, char *image_name, Pixel foreground, Pixel background); DESCRIPTION
XmGetPixmap uses the parameter data to perform a lookup in the pixmap cache to see if a pixmap has already been generated that matches the data. If one is found, a reference count is incremented and the pixmap is returned. Applications should use XmDestroyPixmap when the pixmap is no longer needed. screen Specifies the display screen on which the pixmap is to be drawn. The depth of the pixmap is the default depth for this screen. image_name Specifies the name of the image to be used to generate the pixmap foreground Combines the image with the foreground color to create the pixmap if the image referenced is a bit-per-pixel image background Combines the image with the background color to create the pixmap if the image referenced is a bit-per-pixel image If a pixmap is not found, image_name is used to perform a lookup in the image cache. If an image is found, it is used to generate the pixmap, which is then cached and returned. If an image is not found, the image_name is used as a filename, and a search is made for an X10 or X11 bitmap file. If it is found, the file is read, converted into an image, and cached in the image cache. The image is then used to generate a pixmap, which is cached and returned. If image_name has a leading slash (/), it specifies a full pathname, and XmGetPixmap opens the file as specified. Otherwise, image_name specifies a filename. In this case, XmGetPixmap looks for the file along a search path specified by the XBMLANGPATH environment variable or by a default search path, which varies depending on whether or not the XAPPLRESDIR environment variable is set. The default search path contains a lot of directories. Therefore, XmGetPixmap will need a relatively long time to search through all these directories for pixmaps and bitmaps. Applications that use a lot of pixmaps and bitmaps will probably run more quickly if XBMLANGPATH is set to a short list of directories. In addition to X bitmap files (XBM), Motif also supports XPM (X Pixmap) file formats. The XBMLANGPATH specifies the path for both XBM and XPM files. Refer to the XmGetPixmapByDepth reference page for further details. The XBMLANGPATH environment variable specifies a search path for X bitmap files. It can contain the substitution field %B, where the image_name argument to XmGetPixmap is substituted for %B. It can also contain the substitution fields accepted by XtResolvePathname. The substitution field %T is always mapped to bitmaps, and %S is always mapped to NULL. If XBMLANGPATH is not set but the environment variable XAPPLRESDIR is set, the following pathnames are searched: o %B o $XAPPLRESDIR/%L/bitmaps/%N/%B o $XAPPLRESDIR/%l_%t/bitmaps/%N/%B o $XAPPLRESDIR/%l/bitmaps/%N/%B o $XAPPLRESDIR/bitmaps/%N/%B o $XAPPLRESDIR/%L/bitmaps/%B o $XAPPLRESDIR/%l_%t/bitmaps/%B o $XAPPLRESDIR/%l/bitmaps/%B o $XAPPLRESDIR/bitmaps/%B o $HOME/bitmaps/%B o $HOME/%B o /usr/lib/X11/%L/bitmaps/%N/%B o /usr/lib/X11/%l_%t/bitmaps/%N/%B o /usr/lib/X11/%l/bitmaps/%N/%B o /usr/lib/X11/bitmaps/%N/%B o /usr/lib/X11/%L/bitmaps/%B o /usr/lib/X11/%l_%t/bitmaps/%B o /usr/lib/X11/%l/bitmaps/%B o /usr/lib/X11/bitmaps/%B o /usr/include/X11/bitmaps/%B If neither XBMLANGPATH nor XAPPLRESDIR is set, the following pathnames are searched: o %B o $HOME/%L/bitmaps/%N/%B o $HOME/%l_%t/bitmaps/%N/%B o $HOME/%l/bitmaps/%N/%B o $HOME/bitmaps/%N/%B o $HOME/%L/bitmaps/%B o $HOME/%l_%t/bitmaps/%B o $HOME/%l/bitmaps/%B o $HOME/bitmaps/%B o $HOME/%B o /usr/lib/X11/%L/bitmaps/%N/%B o /usr/lib/X11/%l_%t/bitmaps/%N/%B o /usr/lib/X11/%l/bitmaps/%N/%B o /usr/lib/X11/bitmaps/%N/%B o /usr/lib/X11/%L/bitmaps/%B o /usr/lib/X11/%l_%t/bitmaps/%B o /usr/lib/X11/%l/bitmaps/%B o /usr/lib/X11/bitmaps/%B o /usr/include/X11/bitmaps/%B These paths are defaults that vendors may change. For example, a vendor may use different directories for /usr/lib/X11 and /usr/include/X11. The following substitutions are used in these paths: %B The image name, from the image_name argument %N The class name of the application %L The display's language string. This string is influenced by XtSetLanguageProc. The default string is determined by calling set- locale(LC_ALL, NULL). %l_%t The language and territory component of the display's language string %l The language component of the display's language string The contents of the file must conform to the rules for X11 bitmap files. In other words, Motif can read any X11 conformant bitmap file. RETURN
Returns a pixmap when successful; returns XmUNSPECIFIED_PIXMAP if the image corresponding to image_name cannot be found. RELATED
XmDestroyPixmap(3), XmGetPixmapByDepth(3), XmInstallImage(3), and XmUninstallImage(3). XmGetPixmap(library call)
All times are GMT -4. The time now is 02:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy