Unable to run xclock

Hello.
I am trying to run xclock on newly built solaris box[Solaris 10 11/06 s10x_u3wos_10 X86] - These are the steps I followed:

# DISPLAY=localhost:0.0
# export DISPLAY
# xclock
xclock: not found
# cd /usr/openwin/bin
# ./xclock
Error: Can't open display: localhost:0.0
#

Please suggest, what am i doing wrong?

Thank you!

It looks like you are running it as root, are you running the x-server as root or yourself? (permissions could be interfering)

A simple test:

/usr/openwin/bin/xdpyinfo -display <display>

Try localhost:0 as the display, or just look and see what the x-server is listening on.

Hello - Earlier I was connecting to server using telnet , now I use putty with ssh and below is the output:

$ echo $DISPLAY
localhost:10.0
$ xclock
ksh: xclock: not found
$ cd /usr/openwin/bin
$ ./xclock
X connection to localhost:10.0 broken (explicit kill or server shutdown).
$ su
Password:
# pwd
/usr/openwin/bin
# ./xclock
X connection to localhost:10.0 broken (explicit kill or server shutdown).
#

From my ID or root ID , the error is same.

Please advice.

Also the o/p of xdpyinfo:

# ./xdpyinfo -display localhost:10.0
X connection to localhost:10.0 broken (explicit kill or server shutdown).
#

Start without the X port forward via ssh and get it working locally first.
If the X server isn't responding properly, trying to route it via ssh isn't likely to help :wink:

As the user that is running the x-server, see what the output to the xdpyinfo command is. That will tell you if you have an issue with the x-server itself or an auth problem.

Edit: hang on, are you running this locally or trying to run it over the network? Where is the X-server (the display) running?

Hello.
I am trying to run it from remote machine , which is in the network:

$ cd /usr/openwin/bin
$ ./xclock
X connection to localhost:10.0 broken (explicit kill or server shutdown).
$ ./xdpyinfo
X connection to localhost:10.0 broken (explicit kill or server shutdown).
$ echo $DISPLAY
localhost:10.0
$

Please suggest.

To be able to show X Window applications on Your local machine You must have an X-server running on it. Do You?
Are You running this through putty on a Windows machine?

Hello
Yes, I am running this through putty on windows machine and not sure IF x-server is running or how to run x-server?

Thank you!

I am guessing that You don't have an X-server running. Look through Your menus and/or "Add/Remove Programs" if it's listed somewhere.

You could try to install Xming or Cygwin/X for Windows. There are others.
And then, if You have X forwarding enabled in putty (which it looks as if You have, the localhost:10.0 is the DISPLAY used by ssh X forwarding) and the X-server started, then it should work.

/Lakris

Thanks a lot - Its working now by having xming installed :slight_smile: Thanks a lot.

Could you please let me know what is the benefit now, IF i am having xclock or x-server running?

Nice going!

The benefit of having an X-server running is that You can run X Window programs on any *nix host (through putty for example) and display/control them on Your local machine. Xclock is actually a very bad example since You probably have a better clock locally! :wink:

But it can be practical in some situations, for example when there is no corresponding application in Your Windows environment, a research institute can have a resource hungry statistical application on a main frame or cluster that would be pointless to run on a workstation.

/Lakris

What do you mean by x-windows programs ?

Lakris is refering to applications that have a graphical interface that displays on an X-server. Most unix workstations run an x-server and display it on the locally connected screen but you can run them remotely too (as you have now done on your PC). With an xserver running, x-applications (an application that understands the X11 protocol) can display things on your screen, get keyboard and mouse inputs and (with the right extensions and plugins) play audio.

You can either run a full X desktop session - this is a proper login to a server running xdm, you get a configurable desktop running an environment defined on the server itself. Alternativly, you can display windows for each x-app, much like standard windows programs.

xclock is a very simple example as it's just a clock that runs in a window but there is a large range of x-applications out there including some very nifty games, powerful image editors (there's a version of The Gimp 2 for X), word processors etc.

A useful example would be to look at a linux PC. All the graphics work it does is via a modified version of the old X11 (aka "X"). The modifications allow it to play sounds and do a bit more with the video card but the basic concept still holds.

Spot on. And to clarify, the application is actually "running" on the remote machine, using its CPU, disc, memory, etc, but showing its output on and accepting input from Your local machine, the X server that You installed and have running. It's a bit like remote desktop, if You're familiar with the concept, but for a single application.
/L

Hello - From remote I typed reboot as root , it did not come up. Yesterday night , one person also did hard reboot... no one is available at the moment near server. But I am still not able to connect from remote. Looks like server is still down. I also have iLO of same server.

Please suggest - IF I could do something now?

I would suspect it's not been able to start up your network stack (either because it can't start the OS or becuase or a problem during OS bootup).
Not knowing what iLO is (sorry), all I can suggest is to get access to the serial port or some other form of directly connected terminal. That might mean you'll need to arrange for physical access to the server and get onto a screen and keyboard (I don't remember the old NCRs having a serial interface set up to accept logins by default - but I could be wrong, it's been a while :wink: )

Depending on your iLO version, you may have a virtual console or a virtual serial port, that if properly configured beforehand, can get you on to the box.

If you connect to the iLO via a web browser, check the power - the chassis power should be "on". If not, click the button to power it up! If it's on, and you have the ability to use the virtual console, you are essentially standing in front of the machine. Tell us what you see.

Good luck :slight_smile:

I am not sure about iLO but is the server powered on? Can You get on to the console? Maybe the sshd (the ssh server) hasn't been started?

Hello - I could arrange for someone's help to get it reboot and he says ...
Run hyperterminal and access com1 using 9600-8-N-1 and it should give you the console login prompt...

What does it mean?

It means connects a serial terminal (or computer running a terminal emulator) to a serial port on the server.

And use settings 9600 baud, 8 bits per character, negative parity, one stop bit.