Skip to content

Using display and xwindows – useful reference for the new oracle dba

As a new oracle dba you want to run some gui tool on a unix operating system but you want the gui window to open on your screen. to enable this you have to make some configuration changes which this article tries to explain. so if you want to use the netca tool or dbca tool on a unix operating system , you must do the below setup before the gui screens display on your local machine.If you have any problems always ask your unix administrator for help.

X11 and OpenWindows Packages

X11 and OpenWindows both allow programs running on remote hosts to create windows on the local display. To set this up, you need to perform the following steps:

  1. Enable the remote host to create windows on the local display. If you are using OpenWindows, this step is not necessary. If you are using xauth under X11, this step is not necessary. If you are not using xauth under X11 (or if you’re not sure), you need to use the xhost command to allow the remote host (the one running SunOS) to create windows on the local display. To do this, type:
2.                       % xhost +sunos-host

Once you are done using the package, you may want to remove access for this host again; to do this type:

             % xhost -sunos-host
  1. Log in to the remote host (the one running SunOS).
  2. Set your DISPLAY environment variable so that it indicates your local host (the one running Solaris), display number zero. This can be done with the command
  4.      in the C shell (csh), and with the commands
  6.              DISPLAY=solaris-host:0
  7.              export DISPLAY
  9.      in the Bourne shell (sh) and Korn shell (ksh).
5.                       setenv DISPLAY solaris-host:0

13.  Execute the package as you normally would.

For example, to use MATLAB to plot a vector, you might perform the following steps. (Note that you don’t really need to do this for MATLAB, since it is available for Solaris.)

        solaris-host% xhost +sunos-host               allow display access
        solaris_host% rlogin sunos-host
        ....message of the day, etc...
        sunos-host% setenv DISPLAY solaris-host:0     set display variable
        sunos-host% matlab


Make sure that your local xserver is listening for incomming connections (on the machine you initiate the connection from), then make sure you authorize the xclient to connect to it.

man xhost will give you the needed info for this.

If you are able to run xclock then the above step is not needed.

Then on the remote end export your display variable:

export DISPLAY=

where is the ip address of the machine you initiate the connection from.




Registered User


Join Date: Sep 2008

Posts: 40

Thanks: 0

Thanked 0 Times in 0 Posts


The better way – set DISPLAY automaticly :
add next strings in /etc/profile and relogin

DISPLAY="`who -m | cut -f2 -d'(‘ | cut -f1 -d’)’`:0.0"
export DISPLAY



Let’s say you are on machine Y, connect to A, and then to B (from A).

As far as I understand the situation, you can not connect from Y to B straighly from Y, so there is no connection:
   Y –> B   for telnet
so, i beleive there is no such connection for X11
(that is, when you are on B, and set your DISPLAY to Y:0.0
this does not work). So, there is no connection:
   B –> Y   for X11

The best way to solve this is to connect to A and then to B using SSH with X11 forwarding (AFAIK, its the default).
So, you will have:
   Y –> A –> B  for SSH and X11
   Y <– A <– B  for SSH and X11

I beleive, this may be enough good for you.

(Or, you can do a program xforward (or similar) running on machine A.)

i don’t think you can do it through putty.

You should use either xmanager or exceed or reflextion etc… for access x tools…


As mentioned in other experts comments, you need to install X server for Windows in
your PC before you can use it for running remote X application from *nix box.
You can install Xwin32, reflextion X, Cygwin (free) on your PC.

After you install X server, you can enable X tunneling for your secure shell, and run
your X applications from the remote server, DISPLAY will automatically set for you.

X11 Tunneling

The Secure Shell 2 client can securely tunnel (forward) X11 graphic connections from the remote host computer to an X- Windows server running on the local computer.

Note: You must also be running an X emulator such as Exceed or Reflection X in passive mode on the Windows computer for X11 tunneling to work.

To tunnel (forward) X11 traffic, perform the following tasks:

  1. Install an X server (X emulation) program on Windows (eXceed, Reflection X, or the like).
  2. Start SSH Secure Shell for Workstations.
  3. Select the Edit -> Settings… -> Tunneling option and make sure that the Tunnel X11 connections checkbox is selected.
  4. Save your settings for SSH Secure Shell for Workstations.
  5. Quit the client, start it again and log into the remote host.
  6. Start the X server (X emulation) program.
  7. Run xterm or xclock from Secure Shell, and it should work
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Post a Comment

You must be logged in to post a comment.