1828474 Members
3095 Online
109978 Solutions
New Discussion

DISPLAY variable problem

 
SOLVED
Go to solution
PVR
Valued Contributor

DISPLAY variable problem

I have a normal user in my unix box. He logs into the monitor (console) attahced to the HP workstation.

When I start a graphics application, it gives me the erro that
"Xlib" connection refused by the xserver
DISPLAY not found whereas I set the DISPLAY as
hostname:0.0.

Pl help

Thanks in advance
Don't give up. Try till success...
5 REPLIES 5
Mark Grant
Honored Contributor
Solution

Re: DISPLAY variable problem

IF the connection is being refused, try putting an "xhost +" in the .dtlogin startup file (or whatever start up file CDE uses (cant remember anymore))
Never preceed any demonstration with anything more predictive than "watch this"
Steven E. Protter
Exalted Contributor

Re: DISPLAY variable problem

A less security problem suggestion:

One or the other in /etc/profile or .dtprofile

# DISPLAY=$(who -m -u | awk '{print $8}'):0.0
DISPLAY=$(who -m -u | awk '{print $8}')


One of these will work.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sanjiv Sharma_1
Honored Contributor

Re: DISPLAY variable problem

Hi PVR,

You need to type
# xhost +

this will help.
Everything is possible
T G Manikandan
Honored Contributor

Re: DISPLAY variable problem

As root, run from one windows

#xhost +

From the other window,

#export DISPLAY=:0.0
G. Vrijhoeven
Honored Contributor

Re: DISPLAY variable problem

Hi,

Looks like a resolving problem. Putting the FQDN in the hostname:0.0 string. xhosts + disables all access restrictions so it is better to do a xhosts + hostname.


HTH,

Gideon