Running xclock - Setting the Display in Linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bonson mampilli
    New Member
    • Dec 2011
    • 3

    Running xclock - Setting the Display in Linux

    Hello,

    I am trying to get xclock to display on my Windows XP machine so that I can then move to installation of another application. However, I have been stuck since a very long time now.

    I have also set the server IP address in the X0 hosts file on my Windows machine. So the file now reads:
    localhost
    <Server IP>

    I have installed Xming on my Windows machine. So the steps I do are as follows:

    1. Start xMing.
    2. Start xLaunch.
    2a. Select Multiple Windows. Click Next.
    2b. Start No Client. Click Next.
    2c. Clipboard is checked. Click Next.
    2d. Click Finish
    3. can see the Xmin Server icon in my taskbar.
    4. Now I start putty
    4a. Give the host name as "myhostname.com "
    4b. The port by default is 22
    4c. SSH radio button is selected
    4d. Close Window on Clean exit is selected
    4e. Click Open
    5. Command prompt
    6. login as : I enter "root"
    7. Enter password
    8. I see the last login details and then I see
    root@server [~]#
    9. Which shell am I using:
    root@server [~]# echo $SHELL
    /bin/bash
    10. Then I run the following commands
    root@server [~]# DISPLAY=<my ip>:0.0
    root@server [~]# export DISPLAY
    root@server [~]# echo $DISPLAY
    <my ip>:0.0
    root@server [~]# xclock
    Error: Can't open display: <my ip>:0.0
    11. I ran the xhost command:
    root@server [~]# xhost +
    xhost: unable to open display: <my ip>:0.0

    Totally stuck now. Dont know what to do.

    If there is some other freeware software that I should use other than Xming, then please let me know that also.

    Regards,
    Bonson Mampilli
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Under Connection->SSH->X11 branch select "Enable X11 forwarding"

    Comment

    • bonson mampilli
      New Member
      • Dec 2011
      • 3

      #3
      Hello,

      Thank you very much for the response. Now the error "xhost: unable to open display: <my ip>:0.0" is not coming. :o)

      However, I xclock is not poping up. :o(

      Just wanted to confirm the following configuration:
      Under Connection->SSH->X11 branch the following are the settings:
      Enable XX1 forwarding (Checked)
      X Display Location (Blank)

      Remote X11 authentication protocol
      - MIT-Magic-Cookie-1 (Selected)
      - XDM-Authorization-1 (Unselected)
      x Authority file for local display (Blank)

      Is this correct? Do I need to do anything else?

      Thanks again for responding

      Regards
      Bonson

      Comment

      • bonson mampilli
        New Member
        • Dec 2011
        • 3

        #4
        Just to add.. after waiting for 15 minutes or so.. now xclock has returned the error "Error: Can't open display: <my ip>:0.0"

        Comment

        • jabbah
          New Member
          • Nov 2007
          • 63

          #5
          are you sure you have to set the DISPLAY variable on the server? my experience with windows is a bit dusty but sitting at my linux desktop i only do
          Code:
          joe@desktop:~$ ssh -Y user@server
          [user@server ~] $ echo $DISPLAY 
          localhost:22.0
          [user@server ~] $ xclock
          and it works fine. every time i do this i get a different DISPLAY number so i guess ssh (or putty in your case) is taking care of this.

          can you forward the xclock from one unix box to another?
          does the x server work locally? have you tried as non-root? maybe there are some extra restrictions regarding x11/port forwarding for root?

          Comment

          • sdadesky
            New Member
            • Jan 2014
            • 1

            #6
            I had this same problem. Went crazy looking for solution.

            What is the icon for a sheepish grin? In my case, I simply had to activate MING before launching Putty. I had been under the impression that Putty would automatically activate MING. This is not the case.

            Hope this helps some other poor schmucks.

            Comment

            Working...