Siddesh BG's Build Release Config mgmt Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg
Showing posts with label xterm. Show all posts
Showing posts with label xterm. Show all posts

Sunday, 21 November 2010

How to invoke xterm from putty?

Posted on 23:45 by Unknown
When we connect to a Linux/Solaris or any Unix servers using putty from Windows machine and try to access any X applications like xterm, xeyes, etc it may throw errors like

Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
Error: Can't open display: localhost:10.0
or
X connection to localhost:10.0 broken (explicit kill or server shutdown)

Then you need to install Xming on your Windows machine. Xming is the X Window Server for Microsoft XP/2008/Windows7.

Start Xming in your windows machine and now login to your Unix machine through putty
For Ex:
#ssh root@spodumene.ap.rsa.net
[root@spodumene build]# xeyes

Here xeyes is a simple X application, which displays a pair of eyes. If it displays this, then you can start any  X applications.

But still you may get issues if you login as root and then do "su - user" and try to access X application.

[root@spodumene build]# su - build
[build@spodumene ~]$ xeyes
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
Error: Can't open display: localhost:10.0

You need to temporarily transfer the authorization to the other account. First, get the key from your account
To fix this, do following. Login as root and call "xauth list" command.
[root@spodumene build]# xauth list
spodumene.ap.rsa.net/unix:12  MIT-MAGIC-COOKIE-1  e0190c6d94addb5201f3d8cbeef32b72
spodumene.ap.rsa.net/unix:13  MIT-MAGIC-COOKIE-1  b1e7ee620ddef216e32cff36945a31a0
spodumene.ap.rsa.net/unix:11  MIT-MAGIC-COOKIE-1  5db41fd092612581a408a762e252494b
spodumene.ap.rsa.net/unix:10  MIT-MAGIC-COOKIE-1  bb6f1099c09e630fd5caed5dc7b8d143


Now do "su" to your account
[root@spodumene build]# su - build

 And add auth tokens listed in the previous command using "xauth add" command.
[build@spodumene ~]$ xauth add spodumene.ap.rsa.net/unix:10  MIT-MAGIC-COOKIE-1  bb6f1099c09e630fd5caed5dc7b8d143


You can repeat this for remaining tokens. After that run "xauth list", which will display all the added tokens.
[build@spodumene ~]$ xauth list
spodumene.ap.rsa.net/unix:10  MIT-MAGIC-COOKIE-1  bb6f1099c09e630fd5caed5dc7b8d143
spodumene.ap.rsa.net/unix:12  MIT-MAGIC-COOKIE-1  e0190c6d94addb5201f3d8cbeef32b72
spodumene.ap.rsa.net/unix:13  MIT-MAGIC-COOKIE-1  b1e7ee620ddef216e32cff36945a31a0
spodumene.ap.rsa.net/unix:11  MIT-MAGIC-COOKIE-1  5db41fd092612581a408a762e252494b

Now run your X application
[build@spodumene ~]$ xterm

It will open an xterm.
Read More
Posted in xterm | No comments
Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Solution to Project Euler Problem 10 - Find the sum of all the primes below two million
    http://projecteuler.net/problem=10 Problem The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two mi...
  • Installing and configuring Fortify on Linux and Windows machines
    Installing Fortify on Linux (RHEL 5 32 bit) Download Fortify archive Fortify-360-2.6.5-Analyzers_and_Apps-Linux-x86.tar.gz and extract it to...
  • FeatureBranch v/s FeatureToggle v/s BranchByAbstraction patterns
    This blog is excerpts from Martin Fowler blog and Continuous Delivery book (Jez Humble, David Farley). It explains about the concepts of 1) ...
  • How to know architecture of a AIX machine?
    We can easily know the architecture type in Linux or Solaris systems with the help of "uname" command. But uname command in AIX do...
  • AIX: make: 1254-055 Dependency line needs colon or double
    We get this compilation issue "make: 1254-055 Dependency line needs colon or double" while compiling C/C++ code in AIX machines. I...
  • 0509-036 Cannot load program p4 because of the following errors
    Here is the full description of error ............ bash-3.00# p4 info exec(): 0509-036 Cannot load program p4 because of the following error...
  • How to know a Unix/Linux system is a 32/64 bit architecture?
    To know whether given Unix/Linux machine is of type 32/64 bit architecure, use the command getconf LONG_BIT It outputs correspondingly 32 or...
  • Posting a JIRA bug using Perl Mechanize
    Perl provides modules which can be used as command line browser to automate tasks dependent on web pages. Among them LWP and mechanize are i...
  • fortifyclient uploadFPR An internal error has occurred
    When you try to upload a .fpr file to Fortify 360 server and you get the below mentioned error. Then, this blog provides one of the route ca...
  • 0509-036 Cannot load program ssh because of the following errors: Dependent module /usr/local/ssl/lib/libcrypto.a(libcrypto.so) could not be loaded.
    I installed openssh without any problem, but when I invoked either ssh/sshd, it started giving error .. > ssh exec(): 0509-036 Cannot loa...

Categories

  • AIX
  • AIX ssh
  • ANT
  • apache
  • appliance
  • awk
  • branching
  • build-failures
  • cgi-perl
  • code-signing
  • commands
  • continuous Integration
  • cvs
  • cygwin
  • DNS
  • Drupal
  • EPM
  • euler
  • Fortify
  • hadoop
  • hpux
  • html
  • InstallShield
  • iptables
  • iso
  • jenkins-hudson
  • Jira
  • kiwi
  • linux
  • Makefile
  • maven
  • Miscellaneous
  • mysql
  • nexus
  • NFS
  • package
  • Perforce
  • Perl
  • php
  • rbuilder
  • rpath
  • rpm
  • rsync
  • Solaris
  • ssh
  • SuseStudio
  • tinderbox
  • unix
  • Visual studio 2008
  • vmware
  • war
  • webserver
  • wget
  • windows
  • xterm

Blog Archive

  • ▼  2013 (12)
    • ▼  December (1)
      • How to restart windows from command line ?
    • ►  July (2)
    • ►  April (2)
    • ►  March (2)
    • ►  February (3)
    • ►  January (2)
  • ►  2012 (43)
    • ►  December (2)
    • ►  November (1)
    • ►  October (4)
    • ►  September (7)
    • ►  August (5)
    • ►  July (4)
    • ►  June (2)
    • ►  May (3)
    • ►  April (4)
    • ►  March (3)
    • ►  February (1)
    • ►  January (7)
  • ►  2011 (23)
    • ►  December (4)
    • ►  November (9)
    • ►  October (4)
    • ►  September (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
  • ►  2010 (15)
    • ►  December (2)
    • ►  November (1)
    • ►  September (3)
    • ►  April (1)
    • ►  February (6)
    • ►  January (2)
  • ►  2009 (28)
    • ►  November (5)
    • ►  October (3)
    • ►  September (2)
    • ►  August (1)
    • ►  July (1)
    • ►  June (5)
    • ►  May (3)
    • ►  April (1)
    • ►  February (2)
    • ►  January (5)
  • ►  2008 (20)
    • ►  December (6)
    • ►  November (3)
    • ►  October (1)
    • ►  September (1)
    • ►  July (8)
    • ►  June (1)
Powered by Blogger.

About Me

Unknown
View my complete profile