Find the answer to your Linux question:
Results 1 to 2 of 2
I have a freshly installed Ubuntu 7.10 and am trying to use X forwarding so that I can run X programs on a remote computer. I have done this with ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    2

    X11 forwarding doesn't work


    I have a freshly installed Ubuntu 7.10 and am trying to use X forwarding so that I can run X programs on a remote computer. I have done this with no trouble in the past when the host had other linux distributions but with Ubuntu, I get the message "cannot connect to X server" when I attempt to run an X11 program. (After the Ubuntu installation, I needed to use xynaptic to install the ssh server - the client was already installed).

    I have scoured the various forums so I believe I have the usual suspects under control. Both computers allow X forwarding in the sshd_config and ssh_config files. The firewall in Ubuntu is turned off (using Firestarter). Finally, there are no hidden commands in the startup scripts which set some value for DISPLAY.

    Also, for some reason, on the Ubuntu machine when I type "ssh localhost" there is no response and the command line hangs. ssh works in both directions from both machines; the problem only occurs when I attempt X forwarding. The other machine runs OS X. The problem occurs with the "ssh -Y" and "ssh -X" commands (I usually use the "Y" version since it is faster).

    Any help would be much appreciated. Thanks very much.

  2. #2
    Just Joined!
    Join Date
    Dec 2007
    Posts
    2
    Problem solved: it was the lack of a "loopback interface", which actually caused both problems: the inability to use X forwarding and the failure of the "ssh localhost" command. I inserted two lines describing the loopback into my /etc/network/interfaces file and everything worked (the lines are described in "man 5 interfaces").

    This should have been configured by Ubuntu during installation - it is a fairly subtle problem and I stumbled on the solution by accident.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •