I could not run xterm... .  Got the error message as folows.  I am using a HP unix server.../usr/bin/X11/xterm
Can some one help me please.

Thank you.

$ xterm
Error: Can't open display:
Error: Couldn't find per display informationrror message
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

are you 'telnet'ing or connecting to the server from a remote machine ?
If so, you'll need to run 'xhost +' after connecting to the server.
Then, do 'setenv DISPLAY LOCAL_HOST:0' (where LOCAL_HOST is the name or IP address of the machine you're working from.)

Hope that helps,
Arnon David.
ycgohAuthor Commented:
I am trying to connecting to the server from another machine within the network using xwin.

However, when I telnet to the unix server and execute xhost +

I got the error message xhost:unable to open display.  Is there any other thing that I need to set???
Each X client (xterm is one of them) uses an environment variable called DISPLAY to determine at startup which server to connect with.

So you must check, and eventually set, that variable to get the X client to work.

The format for DISPLAY is 'hostname:n.m' where:

hostname is the tcp/ip name of the host where X server process is running on. If omitted defaults to local host.

n is the instance number of the X server (usually 0)

m is the screen number (usually 0). If omitted it defaults to 0.

Example: (bash)
export DISPLAY=mars:0.0

Usually you can start an X client with '-display' option forcing it to connect with a given X server.

Example: xterm -display mars:0.0

At client side that's all.

At server side:
* the X server must be up and running
* your client must be authorized to open windows.

clients are commonly granted using 'xhost' command (please refer to 'xhost' man page for details).

Example: xhost +
allows ANY client to connect to X server

Final consideration: xhost is a client so the DISPLAY variable must be set before executing it. Only the owner of the X server process can authorize clients to connect. If you are using CDE you can put 'xhost +' statemente at the end of your '.dtprofile'.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

ycgohAuthor Commented:
Based on what you explain, I think the problem is at the server side.  I hope you will please bear with me 8P

As I could not run xhost + I concluded that the DISPLAY variable have not been set. I tried to look for the file .dtprofile using the command find / -name .dtprofile but it's not there.  Can you PLEASE tell me how to check and to set the display environment.  I have gone through the book UNIX ESSENTIAL, can get any help.

Looking forward to hear from you.  Thanks.
open a shell at server side
type the command 'echo $DISPLAY'
look at the response
if the value is incorrect
  type the command 'export DISPLAY=:0'
type the command 'xhost +'
response should be:
access control disabled, clients can connect from any host

try opening an xterm
ycgohAuthor Commented:
Hi Mliberi,
I have done as you directed.  I have all the sequence of command going right till the last.  When I finally type xterm, nothing happens.  The screen just suspend there. Anything I miss out.

Did you obtain the output line:
"access control disabled, clients can connect from any host" from 'xhost +'?

Did you type 'xterm' command at the same shell prompt where you typed 'xhost +'?

Do you succeed starting any other graphical application (such as xclock) from the same shell prompt?

If the reply to the questions above is 'yes' I must give up.

If not remeber that setting a variable, such as DISPLAY=mars:0.0, doesn't affect any shell but the one that executed the variable assignement.

Waiting for news from you.
ycgohAuthor Commented:
The answer is
1 - yes,
2 - yes,
3 - no, I cannot start xclock it just
    hang there like executing xterm.
My [.profile] is as follows.

sassp2-218> cat .profile

umask 022
ulimit -c 0
banner Have Fun!
# @(#) $Revision: 72.2 $
# Default user .profile file (/usr/bin/sh initialization).
mesg y
# Set printer
# Set up the terminal:
        if [ "$TERM" = "" ]
                eval ` tset -s -Q -m ':?hp' `
                eval ` tset -s -Q `
        stty erase "^H" kill "^U" intr "^C" eof "^D"
        stty hupcl ixon ixoff
# Set up the search paths:
# Set up the shell environment:
        set -u
        trap "echo 'logout'" 0
# Set up the shell variables:
        PS1="`uname -n`-\!> "
alias runsas="sas -fsd ascii.vt100"
alias sql="sqlplus rss/rss@cmpb"
alias cx="ps -fu "
alias ls_size="ls -l|awk '{print \$5,\" \",\$1,\" \",\$3,\" \",\$9}'|sort -n"
xhost +
nothing wrong in your .profile

>>I am trying to connecting to the server from another machine within the network using xwin.

Is this still true? Can you explain how do you connect to your HP server from your PC?

I was supposing you opened the shell directly on the server with a X-server up and running.

Do you want the window to come up on the server screen or on your PC one?

if you want an X-client (like xterm) to run on your HP box and see the output (=window) on your PC you need the following to be true:
1) an X-server up and running on your PC
2) set DISPLAY variable to point your PC X-server. e.g. export DISPLAY=pc:0.0, where pc is the hostname of your pc. Before doing so try ping pc from server.

The server is the box owning the screen!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.