13

I'm new to Ubuntu - sorry for novice questions. What I have - is Ubuntu server, to which I have access only via ftp and putty. What I would like to do - is to run firefox (or any other browser) from that Ubuntu machine.

I've managed to install firefox , but when I'm trying to run something like this:

x-www-browser http://google.com

It is saying:

Error: no display specified

I don't understand - there is no display at all at Ubuntu sever - it is just computer case on rack, the only display I have - is mine.

Don't know, how to redirect this display output to my machine (if this is possible at all).

Nathan Osman
  • 32,155
user3344830
  • 131
  • 1
  • 1
  • 3
  • I assume that "access via PuTTY" refers to SSH access. – Nathan Osman Feb 24 '14 at 03:44
  • 2
    Welcome to Ask Ubuntu! @user3344830: If this answer was helpful to you, then please consider marking it as the accepted answer so others may more easily find it in the future. This is also a polite way to thank the person answering your question for helping you out. – Danatela Feb 24 '14 at 03:59
  • 1
    This question says 'to which I have access to via putty (ssh?) and ftp", you are not stating something critical, what is the OS/software/hardware setup of the CLIENT (your local computer) that you are using to access this server?? Because you left that out, these questions are all shot-in-the-dark. I can answer this easily but not knowing what that main variable is, I do not want to list 10 different possible solutions, I just dont have that kind of time :) – osirisgothra Aug 18 '14 at 02:08

1 Answers1

19

This is more than possible using X11 tunneling. The exact instructions for doing this differ depending on the platform you are using to connect to the server.

Windows XP/7/8

You will need to download and install the following tools:

Once you have Xming installed, launch the program. You now have an X11 session running locally on your computer. When you launch PuTTY to connect to the server, expand the "SSH" column on the left and click on "X11":

enter image description here

Now make sure the "Enable X11 forwarding" checkbox is checked:

enter image description here

Connect to the server as you normally would. Now when you run an X11 application (such as Firefox) it will use your local X11 server:

enter image description here

Ubuntu 12.04+

X11 forwarding in Ubuntu is incredibly simple. You don't even need to use PuTTY. Just open a terminal and use the SSH command:

ssh -X myserver.example.com
Nathan Osman
  • 32,155
  • 1
    Thanks, but it didn't work for me. After doing all the suggestions, I'm getting another error message now: is still giving error: cannot open display:localhost:0.0 – user3344830 Feb 24 '14 at 04:16
  • @user3344830 Are you sure Xming is running? There should be an icon in the system tray. Sometimes closing PuTTY and opening it and trying again helps. – Nathan Osman Feb 24 '14 at 04:27
  • The SSH server should also have X11 forwarding enabled. – ankit7540 Dec 20 '16 at 07:53