How do I set the DISPLAY variable on Linux?

Posted by Jiltin     25 March, 2009    14,274 views   

xclockIt is possible to use your computer at home or in the labs to login to the Client server machines and use cool graphical tools like xclock. The system that makes this possible is the X Windows System (X), it is the basis for all GUI application on the Client server machines. One of the design ideas behind X is the idea of remote displays, in much the same way a standard telnet login works. From another computer you connect to your sever over a network login and do all kinds of neat command line things remotely. X is the method that allows you to login to the server and use neat graphical things remotely.

Using Linux, and especially configuring Linux, normally require some insight, and we strongly suggest (to inexperienced linux users) to get some help from a system administrator.

In short, you must open up a shell (csh, bash, etc), so that it is possible to issue commands on Linux. Then you must enter the commands to set the environment variable, as explained in the setup-instructions.

In the following paragraphs I will give several examples of how to use X using UNIX based X servers such as Xfree86. For other OSes refer to the user manual of your X server to find how to do similar things. First lets load an X server under Linux and see some of the details inside (further details of how to get this far are at Xfree86):

$ startx

This starts the server and by default starts a single xterm. An xterm is just a simple X client to display text in, usually a login shell. Assuming you are running bash you can look at your environment variables (EV) by typing “set”. Environment variables store useful information for programs defaults or system state. If you look at your EV you will see a variable called “DISPLAY” this variable stores the address for X clients to connect to. These addresses are in the form:

hostname:displaynumber.screennumber

A typical example would be:

snake.cs.uidaho.edu:0.0
or
192.168.0.12:0.0

I said earlier that it is possible to have more than one X server running at a time. In this case the displayname would be something like

snake.cs.uidaho.edu:1.0
or
192.168.0.12:1.0

or

snake.cs.uidaho.edu:0.1
or
192.168.0.12:0.1

depending on how its done.

When the X clients start the look at the DISPLAY EV to see where to connect to by default. One way to do remote displaying would be to set this EV to a remote X server.

$ export DISPLAY=mymachine.mynet.uidaho.edu:0.0
or
$ export DISPLAY=192.168.0.12:0.0

Or you can set this in .bashrc file like this to have it automatically keep it with your client computer during your ssh login.

CLIENTIP=`echo $SSH_CONNECTION ‘ cut -d’ ‘ -f1`
export DISPLAY=${CLIENTIP}:0.0

Other forms of DISPLAY exist, but this will do for our purposes.

Telling the Client

The client program (for instance, your graphics application) knows which display to connect to by inspecting the DISPLAY environment variable. This setting can be overridden, though, by giving the client the command line argument -display hostname:0 when it’s started. Some examples may clarify things.

Our computer is known to the outside as light, and we’re in domain uni.verse. If we’re running a normal X server, the display is known as
light.uni.verse:0. We want to run the drawing program xfig on a remote computer, called dark.matt.er, and display its output here on light.

If you have csh running on the remote computer:

dark% setenv DISPLAY light.uni.verse:0
dark% xfig &

Or alternatively:

dark% xfig -display light.uni.verse:0 &

If you have sh running on the remote computer:

dark$ DISPLAY=light.uni.verse:0
dark$ export DISPLAY
dark$ xfig &

Or alternatively:

dark$ DISPLAY=light.uni.verse:0 xfig &

Or, of course, also:

dark$ xfig -display light.uni.verse:0 &

It seems that some versions of telnet automatically transport the DISPLAY variable to the remote host. If you have one of those, you’re lucky, and it’s automatic. If not, most versions of telnet _do_transport the TERM environment variable; with some judicious hacking it is possible to piggyback the DISPLAY variable on to the TERM variable.”

Then you can run your cool X application and its display will be on mymachine.mynet.uidaho.edu.

$ xclock

Another way to do remote display is by a command line option that all X applications have: “-display [displayname]“. To run your cool X application:

$ xclock -display mymachine.mynet.uidaho.edu:0.0

This does the exact same as before.

The previous demonstrations rely on whether your X server is allowing connections from remote hosts. The following command allows connections from all hosts (run on machine that the X server is running on (mymachine.mynet.uidaho.edu)):

$ xhost +

To allow connections from single hosts at a time:

$ xhost +myremote.myothernet.uidaho.edu

ssh is a neat remote login tool that in addition to having secure encrypted transmissions auto forwards your X DISPLAY EV if your are running it under an X Server. ssh allows a easy, no hassle, way to do all of the stuff we have discussed so far. The ssh documentation has more detailed information on how to get this working.

Following Google Searches Lead To This Post: setting DISPLAY on linux
linux DISPLAY variable
bash display variable
display variable linux
setenv displat
centos set your display variable
linux get DISPLAY variable
linux DISPLAY variable who
how to lunch remote xclock
linux unable to display application from remote system + redhat
HOW TO EXPORT XTERM DISPLAY IN LINUX
set display variable linux
no display name and no $DISPLAY environment variable
setting environment variables DISPLAY:0
setenv DISPLAY linux
set display environment variable automatically
“set display linux”
how to find the dispaly variable name in linux
sam export term display hp-ux
xhost unable to open display 0.0 in RHEL
how to close & rerun application in linux
bash script set display variable
get display variable bash
diplay remote linux
expample of display variable on unix
set display linux
bash set environment display ip
xhost linux unable to open display redhat
setenv DISPLAY 0:0
address of variable in linux
redhat set DISPLAY variable
DISPLAY environment variable not set! unix
set DISPLAY in solaris bash
setting display in linux
How do I set the DISPLAY variable on Linux
check DISPLAY is set in script
display variable not set linux
set display bash
DISPLAY is not set solaris
check setenv DISPLAY
how to set display variable in bash shell with linux
export linux display to windows
This is a graphical application and requires DISPLAY to be set.
unable to open x display. please check your display environment if is set
Check if the DISPLAY variable is set; unable to open display+xclock
Unable to access the X Display, is $DISPLAY set properly?
telnet display variable
unable to open DISPLAY in Xterm RHEL
setenv DISPLAY :0 +linux
xclock display in linux
The DISPLAY variable is not set properly. Ensure that the DISPLAY variable is set properly
set DISPLAY variable in linux
export DISPLAY=0:0
linux how check display :0
bash setenv DISPLAY
setenv DISPLAY bash
Linux auto determining appropriate display
sam DISPLAY variable is not set
set DISPLAY solaris bash
howto export display in linux
export display auto forwards
oracle “check if display variable” solaris
oracle “check if display variable”
set display linux telnet
“check if the display variable is set”
linux start program in display 0
centos The DISPLAY variable is not set properly.
display variable linux bash
how to get display variable on remote server
setting $DISPLAY in linux
Ensure that the $DISPLAY enviroment variable is set correctly
Set DISPLAY environment variable, then re-run
linux set display variable bash
how to set variables permenantly centos
setenv DISPLAY 0.1
unix set display variable
how to setup DISPLAY variable in linux
display a variable in linux script
set display environment variable then re-run.
set term for xclock
setting the display variable for xterm
setting display variable in linux csh
how do u set display when remote logging into a linux machine
how to set display veriable in unix
linux set display variable
setting DISPLAY in bash
linux hosts file display variable
linux set display
linux ensure that the display variable is set propertly
set display variable for oracle in linux
environment variable linux set php
ceos xterm
how to set DISPLAY properly in linux
how to correctly check display variable value
how to set up display variables in bash shell
display system variables linux
Set and export DISPLAY, then re-run.
DISPLAY variable in linux clients connect to server
please set the DISPLAY variable and re run the script
how to check display variable linux
pengaturan display di linux
have you set your DISPLAY variable
ssh term environment variable not set
setting up telnet term variable
linux windows “set display”
linux set display 0:0
this is a graphical application and requires DISPLAY to be set
determine current DISPLAY variable value + redhat
unable to open x sever linux
how to display a variable in linux shell
Unable to open display. Please set DISPLAY environment variable
how to set display in linux for remote environment
how to set display in linux
linux test x display
“export display” linux
no xclock displayed after setenv
how to we override display while doing telnet + linux
How to Check if the DISPLAY variable is set on unix
setting DISPLAY variable c c++ library
set linux display
please check your display environment in linux
export display variable
bash setenv display
Unable to access graphics display device. Check the ‘DISPLAY’ environment variable value.
auto setenv display to remote hosts
linux export display bash
how export x display under linux
linux set environment variable “x windows”
centOS set environment variable “x windows”
how to set centOS environment variable using GUI
how to set x display setting on linux
how to check whether display setting set properley in unix
ORACLE set display variable
set environment variable to DISPLAY centos
display not set. set display environment variable then re-run.
DISPLAY variable in centos
how to change display variable on linux
set linux display variable
bashrc display remote connection
find variable linux
$ DISPLAY not set. Set DISPLAY environment variable, then re-run.
starting application on DISPLAY variable linux
set display bash shell
xterm display variable
x server change DISPLAY variable runtime
Your DISPLAY variable has not been set
linux Setenv Display
“Unable to access the X Display, is $DISPLAY set properly?”+solaris
setting DISPALY on linux
linux bash set display
set DISPLAY environment variable, then re-run.
xclock on a remote computer named serverX
This is a graphical application and requires DISPLAY to be set. export
display variable telnet
DISPLAY not set. Set DISPLAY environment variable, then re-run
display variable default value in linux
linux how to set display output
Display variable for hp-ux
set display variable unix
scp “TERM environment variable not set”
when is the DISPLAY variable set RHEL
xhost+ in RHEL 5 for R12
“bash howto get display variable in bash”
bash “get display variable”
how to set SSH_CONNECTION
“bash get display variable”
xhost unable to set display variable from the command line
linuyx set display
linux set display name email sent
variable DISPLAY defaut
linux display variable X
csh display variable
how to set the display variable in centos
setting the display variable
setting dispaly + linux
check display variable solaris
unix +”DISPLAY” variable example
set display in linux
how to set the display linux windows
where does the DISPLAY value get set +linux
display not set. set display environment variable then re-run
centos set TERM variable
The DISPLAY variable is not set properly
unix remote top TERM environment variable not set.
display xclock in hp-ux
setting display variable in redhat
wie geht display set linux
configure xhost xclock redhat 5
display get set variables php
setting display variable in linux
linux setenv DISPLAY bash
xhost unable to open display rhel5
centos set DISPLAY
hot to set ssh_connection variable
check the DISPLAY variable is set
environment variable value on “remote server” command prompt
RHEL5 setting display variable
set remote display variable
using telnet in scripts set display
how to check display variable setting in lunix
centos DISPLAY variable
how to see another display linux
linux set display output 0 0
auto set display variable in logon script
c++ TERM variable not set
linux DISPLAY:0.0 environment variable
check if the display variable is set.
linux xterm display set
linux display variable “xhost +”
oracle display variable x server
telnet display xclock
set linux envronment variables via php
set display variable xterm+ linux
how to export display variable in rhel5
howto use the DISPLAY variable
DISPLAY=displayname 0:0
Unable to access the X Display, is $DISPLAY set properly
Your TERM variable is not set. Please set it to an appropriate value.
how to configure display variable in rhel5
linux set display for application
bash set DISPLAY
DISPLAY variable on linux
“Unable to access the X Display, is $DISPLAY set properly”
+solaris remote display oracle forms
display login name in linux
display variable in rhel
automatically setup display variable in shell
Unable to access the X Display, is $DISPLAY set properly?
linux the display environment variable must be set
check if the display variable is set
remote x “display not set”
dispaly variables
set the display on linu8x
Please set the DISPLAY environment variable.
scp TERM environment variable not set redhat
this is a graphical application and required display to be set in redhat
DISPLAY variable for export display linux
ssh no display name and no $DISPLAY environment variable
RHEL Display variable
bash set display linux
linux set $DISPLAY
linux display name
display veriable
SET DISPLAY VARIABLE ENVIRONMENT LINUX COMMAND LINE
how to set display variable in linux 5
what is $DISPLAY variable unix script
set display + linux
linux red hat 5 xterm display is not set
export display linux
setenv DISPLAY
bash set display unix
Check that the DISPLAY environment variable is set correctly
set the DISPLAY=:0 for all users linux
centos linux shell set trusted display
Set DISPLAY environment variable in rhl5
TERM environment variable not set
RedHat “Please set DISPLAY”
how see the system variables in linux
displat set in unix
setting display in linux to open gui applications
solaris 10 setenv display variable
oracle install xhost xclock redhat
linux set start variable
centos xhost unable to open display
Please set your DISPLAY variable
linux change display name
“This is a graphical application and requires DISPLAY to be set.”
RHEL5 “This is a graphical application and requires DISPLAY to be set.”
ssh “TERM environment variable not set”
linux script to change display
“redhat 5″ unable to open display “:0.0″.
test remote display linux xclock
display setting for user on linux server
how do i setup a diplay variable in centos
how do i setup a display variable in centos
linux display veriable
current linux display variable
set display variable unix xterm
setting value xclock in linux
set $display linux
setting display variable at login
how to do setenv DISPLAY in windows
Check if the DISPLAY variable is set. solaris
linux rhel5 remote X display xhost
display variable linux oracle
“Set DISPLAY environment variable”
set display in bash linux
Check that the DISPLAY environment variable is correctly set
display variable linux export
unable to display remote X applications through telnet in Red Hat 5 Enterprise
store the display variable unix
how to find whether display variable was set in HP-UX
xterm display variable for linux
Xterm display setting on Oracle Linux
xterm display is not set in Oracle linux
determine display setting linux
set solaris display environment
linux telnet display
linux check for display
changing your display variable 10.0
display set linux
This is a graphical application and requires DISPLAY to be set red hat
The DISPLAY variable is not set properly. Ensure that the DISPLAY variable
“xhost: unable to open display :0.0″
“export DISPLAY” xserver :0.0 :0.1
The DISPLAY environment variable is not set LINUX xterm
set display variable on linux
linux to solaris DISPLAY variable not set
RHEL 5 set user variable with remote ssh
centos set display environment variable
rhel Unable to access the X Display, is $DISPLAY set properly?
unix script set remote display
DISPLAY not set. Set DISPLAY environment variable, then re-run.
RHEL setenv DISPLAY
setting up display variable in redhat linux
“how to setup DISPLAY”
current “DISPLAY name” linux
set bash DISPLAY xhost+
red hat do not export DISPLAY variable
How to export display from linux
is $DISPLAY set properly
linux start application on other display
xhost: unable to open display centos
how to set DISPLAY variable in linux for windows
DISPLAY not set.Set DISPLAY environment variable, then re-run.
Unable to access the X Display
getting xclock + centos
top term environment variable not set
centOS DISPLAY xhost
linux + set + display + bash
bash scripting set display variable
how do i setup environment variables in centos export DISPLAY localhost
‘DISPLAY’ environment variable not set.
unable to open x display is your display environment variable set
linux get display name
set environment variable solaris bash “export display”
no display name and no $DISPLAY environment variable insight
unable to run xclock on redhat 5
this is graphical application and requires DISPLAY to be set
How to set graphical variable in linux
display variable specify display to run on
linux set automatic DISPLAY
Linux no display name
DISPLAY not set on redhad
set DISPALY in linux
setear DISPLAY linux
RHEL how to set the display in telnet session
redhat set $display variable
setear DISPLAY linux 5
setenv display 192.168
change display linux
linux script remotely start application display variable
Please set your DISPLAY environment variable!
set display environment variable then re-run
how to configure your $DISPLAY variable
set Display on linux
+linux +$display not set
how do i set DISPLAY variable in RHEL\
DISPLAY was overridden by “-display :0:0″
how to set term variable in centos

Post to Twitter  Post to Delicious  Post to Digg    Post to StumbleUpon

Categories : 11i DBA Scripts, 11i Installation, Scripts Unix Tags : ,

Comments
March 27, 2009

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

Joannah

http://linuxmemory.net

Posted by Joannah
Leave a comment

(required)

(required)