Operating System - HP-UX
1820473 Members
3156 Online
109624 Solutions
New Discussion юеВ

Re: unable to set DISPLAY

 
kartick
Occasional Advisor

unable to set DISPLAY

im connecting to a HP UX server using telnet session.
when i use the xmodmap command...it gibes an error saying that " unable to open display ':0.0'".

I have set the display variable to :0.0

The files in the /etc/X11 are X0screens,X0pointerkeys,X0devices.

Is there any way i can set the Dispay var.

I even tried setting it to :0
but a similar error was thrown.

Can i use xon to set the display var??

Can any of u pls specify how shud i do that.

Thanx
Kartick

11 REPLIES 11
Sanjay Kumar Suri
Honored Contributor

Re: unable to set DISPLAY

Are you setting as below:

export DISPLAY=xxx.xxx.xxx.xxx:0.0


sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ravi_8
Honored Contributor

Re: unable to set DISPLAY

Hi

It should be
#export DISPLAY=:0.0

never give up
Eric Antunes
Honored Contributor

Re: unable to set DISPLAY

Hi Kartick,

Set it to your pc IP in the .profile:

#export DISPLAY=:0.0

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Nguyen Anh Tien
Honored Contributor

Re: unable to set DISPLAY

1)Your command was incorrect. It must be
export DISPLAY=XXX.XXX.XXX.XXX:0.0
XXX.XXX.XXX.XXX is your IP on which you run xmodmap.
2) you should add this command to you profile (.profile) rather than tying it at prompt.
tienna
HP is simple
Sanjay Kumar Suri
Honored Contributor

Re: unable to set DISPLAY

Another method is set the following code in the profile.

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

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Hoang Chi Cong_1
Honored Contributor

Re: unable to set DISPLAY

Hi kartick

Do as those answer!
Just more clearly:
The IP address is the local machine that you loged on.
For example: You PC ip address's 192.168.0.20
then just type:
(in Xwindows)
export DISPLAY=192.168.0.20:0.0

It works!

Best and regard,
HoangChiCong
Looking for a special chance.......
kartick
Occasional Advisor

Re: unable to set DISPLAY

i have tested the same thing using Linux.
In that case what i had done was i had loggeed on Linux using a telnet session from a Windows machine.

Then i had set the display variable to :0.0

After that i was able to execute all the x related commands.

But when i do the same thing on hp ux it shows
MZ_1
Advisor

Re: unable to set DISPLAY

you may have to turn on xhost by executing the "xhost +" command.

the procedure for this is to do a "who" and find your pts. then run a "who -R" which will display your ip address relitive to your login.
Chris Vail
Honored Contributor

Re: unable to set DISPLAY

Let me ask a more fundamental question: what host are you trying to send a display to? Is this another Unix/Linux host, or something from Microsoft or Apple? Unix/Linux systems usually have X windows utilities by default. Microsoft and Apple systems do not. For these (not so sure about OSX) you'd have to obtain some kind of X server software. A freeware version is cygwin, and popular commercial versions are Refection and Exceed.

If you're sure that the system that you're trying to send a display to has X server software, you may need to check its security settings. If this is a M$ system, checking and setting this can be tricky and will vary from system to system. If the system is a Unix/linux host, then the command "xhost +" sets the security settings appropriately.

Next, ensure that the host name of the system to which you're trying to send the X session to has an entry in the /etc/hosts table. Example:
192.168.1.128 myhost myhost.foo.com

Finally, (assuming you're using the korn or posix shell), type:
"export DISPLAY=myhost:0.0"

Lastly, start the x client program. On a HPUX system, the command:
/usr/dt/bin/dtpad -standAlone &
will open the graphical text editor on the X server specified in the DISPLAY variable.

The error you mention can indicate that there is no network connectivity to the host you specify, OR that the X server software isn't running.

Chris
Tor-Arne Nostdal
Trusted Contributor

Re: unable to set DISPLAY

Hi Kartick.
When you get this message:
unable to open display ':0.0'
It is trying to send the X-window to the host your logged into. This server might not have an X-console, thus can't display the window.

When you specify myhost:0.0 it will try to send the X-window from the server to myhost.

On myhost you must have X running.

As mentioned in previous replies you should also ensure that the client/server is individually known to each other.
It might be a good idea that they're defined in the hosts file.

If you login from a workstation with X, your problem could also be related to restrictions in X.
For some X implementations, the server must also be granted access to display the X-window on myhost. On myhost try to run the command: xhost +
This will allow everyone to send X-windows to myhost.

If you login from a Windows PC - you need X-emulator software. This might also have restrictions for who can connect.

P.S.
If none of the hints you've been given help you, try to specify your problem better and give info about where you want to display...
The :0.0 indicate that you want to display on the server itself - console, while you obviously come from another client via telnet. Specify what kind of client this is.

/Tor-Arne
I'm trying to become President of the state I'm in...
kartick
Occasional Advisor

Re: unable to set DISPLAY

im currently using windows 2000.telnet client is putty.What i need to do is change the keymap to cyrillic.Hence im using xmodmap.So i connect to the server HP UX.Then run the command xmodmap .It shows me an error unable to open display ' '.If i manually set the display variable as :0.0 nad then run xmodmap it says unable to open display':0.0'I try the same thing by on linux.Connnect via telnet using putty client running on windows 2000.run xmodmap It shows me an error unable to open display ' '.So i set the DISPLAY variable as :0.0Run xmodmap.|t works fine.So im doing the same thing on HP and Linix.But not getting the same result.Let me clarify again that im using windows not linux.I guess the problem is that the xserver is not starting.Pls help me out!!!!!