• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6028
  • Last Modified:

How to setup xterm with cygwin/xming and putty

I have asked this question before but again struggling with this xterm.


I need to setup xterm with solaris.I have really vague knowledge about this. I have tried to setup but didnt succeed.
What have done so far are:
1. Installed cgywin,with all packages,on my windows XP.SO now i can run the X server by clicking X win SERVER icon and it pop ups a windows.
2. Then i try to connect to my remote machine
ssh -fX username@machinename xterm
and it throughs error

Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
ksh: xterm:  not found
 3. Then i tried,
 ssh -Y -f -l username machinename xterm
and got
Warning: No xauth data; using fake authentication data for X11 forwarding.
ksh: xterm:  not found

Could you guys help to find a tutorial,how to setup xterm with putty?
What i know is i need a X server on windowsXP pc which already i have as i installed cygwin.
Secondly xterm should be running on the remote machine.-- I dont know how to check this.Though i can see below thing on my remote machine.
 cd /var/svc/manifest/application/x11
$ ls -l
total 12
-r--r--r--   1 root     sys         2524 Dec 16  2004 x11-server.xml
-r--r--r--   1 root     sys         2379 Dec 16  2004 xfs.xml

and then i need ssh client.And i use putty


Hi jgiordano/ganjos:,

Need your kind  help again. I am trying to setup xterm again but running into issues:
jgiordano:  i tried your instructions before and it worked .But now again iam trying and running into issue
what i did
1)on windows laptop,clicked start ->All programms->cygwin x-> Xwin Server
pops up new white window.
2)then enable x11 forwarding in putty and connectd to solaris box as normal user.
3) then ran and got below error.
bash-3.00$ /usr/openwin/bin/xterm
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
/usr/openwin/bin/xterm Xt error: Can't open display: localhost:10.0
4) after this i switched to functional account by su command and ran same command and got erroe
$ /usr/openwin/bin/xterm
/usr/openwin/bin/xterm Xt error: Can't open display:

I tried your instructions also:
Started the Xwin server on my windows laptop
its pops up new window. In that window when i type startx ,getting below error
$ startx
xauth:  creating new authority file /home/N361203/.serverauth.7800
xinit:  Resource temporarily unavailable (errno 11):  Another X server instance is running on DISPLAY :0

Could you guys please help me again..
thank you
  • 3
  • 3
1 Solution
In putty, when you enable X11, do you make sure to define the localhost:x.y that matches the x.y on the xserver?
Why do you use putty if you have the cygwin bash
Make sure prior to running ssh to run echo $display to make sure it is set to something.
You should run ssh -Y username@remotehost
echo $Display in the shell should localhost:w.z
The difference between -X and -Y is included below.

xterm not found means two things either it is not installed on your system, or the -f flag prevents the loading of the settings which include the search $PATH. Use /usr/bin/xterm instead.

While this is a single issue, you've included several parameters you took and asked an implicit question on this one, "Why does this work?" I tried to cover all your question in the reply.

-X      Enables X11 forwarding.  This can also be specified on a per-host basis in a configuration file.
             X11 forwarding should be enabled with caution.  Users with the
             ability to bypass file permissions on the remote host (for the
             userĂ¢s X authorization database) can access the local X11 display
             through the forwarded connection.  An attacker may then be able
             to perform activities such as keystroke monitoring.

             For this reason, X11 forwarding is subjected to X11 SECURITY
             extension restrictions by default.  Please refer to the ssh -Y

-Y      Enables trusted X11 forwarding.  Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.

Open in new window

jayatallenAuthor Commented:
Thank you for your reply  Arnold,

I didnt ask my question clearly. I have asked this question before and suggested solutions worked.
Now again i am trying to following the same steps mentioned at this link:

When i follow the first solution , i got below error:
ash-3.00$ /usr/openwin/bin/xterm
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
/usr/openwin/bin/xterm Xt error: Can't open display: localhost:10.0

when trying to follow the 2nd one , got below error:
$ startx
xauth:  creating new authority file /home/N361203/.serverauth.7800
xinit:  Resource temporarily unavailable (errno 11):  Another X server instance is running on DISPLAY :0

I was thinking how can i reslove this error?

thank you
The problem you have is that the X11 tunnel might not be present.
When you use the -X option, you have to run xhost on your PC side to allow the data from the remote to your X-windows environment.  the -Y exempts it.
In putty, you need to make sure prior to the connection, that the X11 is correct with the current Xserver running on your system.
At time it is 0.0 at times it can be something else.  The -X nor the -Y validate that your Xserver is active and accessible prior to setting up a X11 tunnel through the ssh connection.  This is likely the issue.  Check the putty x11 forwarding section and the marking on the xserver.

When you cygwing-X, use the bash shell that comes up, ssh -Y user@remotehost then send as many windows as you need and the type that you need, sending the entire environment which startx does, is resource intensive on the server as well as on the bandwidth and is unnecessary.
you need an exterm, run xterm -sb -t "title" -e "command" &
This will send the Xterm through the tunnel while at the same time sending xterm into the background in the remote shell window.  You can then run another command in the same way xclock & etc.
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

jayatallenAuthor Commented:
hi Arnold,

does is matter if i dont have HOME directory on the server side?
Because i tried xming,seems simple then cygwin and it worked for on one server ( I have home directory on this server ) but didnt work on another server ( dont have home directory)

I followed these instructions at below link:
What do you mean you do not have a home directory?  A user needs to have a home directory where items can be stored. This might explain why the .X11 and other entries that need to be setup can not be.
I've not seen a setup where users do not have a home directory as part of the setup.  A home directory might be listed in /etc/passwd but was not created.
Make sure the user you use has the home directory created and see whether the answer to the issue is that the absence of a home directory prevents the X11 tunneling/functionality.
jayatallenAuthor Commented:
I mean whenever i login and type cd , sever prompts :

ksh:/home/n34123: not found

n34123 is my user ID.
and if type
bash:cd :/home/n34123: No such file or directory

Yea, i will put in a request to SA to create home directory.I will follow all the given steps and update you guys if it works.


Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now