Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an Ubuntu server running on EC2 (which I didn't install myself, just picked up an AMI). So far I'm using putty to work with it, but I am wondering how to work on it with GUI tools (I'm not familiar with Linux UI tools, but I want to learn). Silly me, I'm missing the convenience of Windows Explorer.

I currently have only Windows at home. How do I set up GUI tools to work with a remote server? Should I even do this, or should I stick to the command line? Do the answers change if I have a local linux machine to play with?

share|improve this question
    
If X11 forwarding is fast enough (there are cases where it's not) it should be fine. The CLI is always more powerful so it's useful to not ignore it but this doesn't mean that GUIs are never useful :) –  faif Mar 22 '11 at 8:26
    
But what kind of tasks do you want to fulfil on the server? Which tools do you want to use? It's important information for an answer. Say, you mentioned something called "Windows Explorer"; but there's probably no "Windows Explorer" on Ubuntu, so the solution suggesting running some X programs remotely won't fit. –  imz -- Ivan Zakharyaschev Mar 22 '11 at 9:11
    
There is no Explorer equivalent for Ubuntu? Seriously? –  ripper234 Mar 22 '11 at 9:22
1  
@imz - currently I'm interested in the general problem. I'm not experieniced with linux GUI apps at all, so I have no idea what I want right now... the first use that comes to mind is navigating folders in an Explorer like fashion, and perhaps editing. –  ripper234 Mar 22 '11 at 10:23
1  
@ripper234: For navigating directories, check out mc. –  Faheem Mitha Mar 22 '11 at 16:14

7 Answers 7

up vote 13 down vote accepted

You can use X11 forwarding over SSH; make sure the option

X11Forwarding yes

is enabled in /etc/ssh/sshd_config, and either enable X11 forwarding by hand with ssh -X remoteserver or add a line saying

ForwardX11 yes

to the relevant host entry in ~/.ssh/config

Of course, that requires a working X display at the local end, so if you're using Windows you're going to have to install something like XMing, then set up X11 forwarding in PuTTY as this page or this article demonstrates.

ETA: Reading again and seeing your clarifications in the comments, this might suit your needs even better, as it will let you 'mount' SFTP folders as if they're regular network drives.

share|improve this answer

I have found freenx and nxclient to be a very high-performance remote desktop solution, far better than vnc or X11. I would give that a try.

share|improve this answer

Shadur covered how to enable X. Note that the /etc/ssh/sshd_config is at the server end, and the ~/.ssh/config is at the client end, so we are in general talking about two different machines. X forwarding will display your remote application on the local X display. So the two configs have to tell the remote and the local to allow this operation to happen, respectively.

As to whether you should use X, it depends. You need to consider (at least) the following factors.

  • What kind of bandwidth do you have? What is its speed? Is it metered? Is there a cap? If you have a very fast connection to the net and no restrictions, that X is more usable, otherwise it can be very slow. Bear in mind that in general X is a network hog; it is not bandwidth optimized (or whatever the right phrase is).

  • What tools are you planning to use over X? Are there non-gui replacements/equivalents? If you give examples of the kinds of tools you are thinking of using, people could suggest alternatives if available. Also be aware that some well known tools come in both gui and commandline/console form. Eg. emacs, aptitude, reportbug.

In general my recommendation is to use command line (apt, wget, rsync) or curses applications (like aptitude or mc) if they are available and do what you need. Such apps aren't necessarily worse than X apps; some of these are fine applications. Eg. The software of John Davis, eg jed and slrn, both console apps, show his distinctive aesthetic, and are works of art. BTW, running a X server on a Windows client to connect to a Linux server is an option, though not a particularly good one.

If you have a local linux server, then the bandwidth issues go away, and X is a much more viable option.

share|improve this answer
    
I concur that unless you're working over a fairly fast (low latency being slightly more important than bandwidth) link it's generally a better idea to use command-line tools if they're available. –  Shadur Mar 22 '11 at 8:52
1  
@Shadur - my latency isn't great event on the command line, perhaps I should not even attempt a UI tool because it will probably be too slow. –  ripper234 Mar 22 '11 at 10:25

If you used Emacs, you could run a locally installed Emacs on your Windows, and do file editing, file&directory management (dired), version control, compilation, and also some other random work in the shell (M-xshell or M-xeshell), and probably some more things via TRAMP in your local Emacs. (Some easily findable demo videos that perhaps can make a person not so scared of the unknown Emacs, and TRAMP, etc.: 1, 2.)

That's an illustration that remote X programs might not be the right solution for you. In contrast to the remote X clients way, the TRAMP way involves no heavyweight "graphical" traffic over the remote connection, it uses the ssh connection only to send directory listings, files, and command output back and forth.

Say, if you want to work with "Windows Explorer", then there still won't be a "Windows Explorer" on the Ubuntu server, so you can't run it remotely.

But if "Windows Explorer" had something like TRAMP as a feature (for remote accesses via SSH), you could continue to happily use your local "Windows Explorer", if that's all what you need.

share|improve this answer
    
He's asking about GUI tools, not a GUI editor for config files. [xkcd.com/378/] aside, Emacs isn't the answer for everything, and in this case you come across as wielding a hammer just looking for a way to describe the problem as a nail. –  Shadur Mar 22 '11 at 9:22
    
@Shadur: (Me laughing.) He hasn't yet specified what kind of tools he needs. GUI Editor is also a GUI tool, isn't it? Or do you have a special understanding of what a "tool" is? –  imz -- Ivan Zakharyaschev Mar 22 '11 at 9:26
    
@Shadur BTW, the point of my answer is to suggest a potential approach to a solution that would match his demands as precisely as possible, without us knowing exactly what tasks he wants to solve. My logic is: 1) he likes "Windows Explorer" 2) we don't know which features of "Windows Explorer" he likes because he hasn't specified this. ==> So, if "Windows Explorer" had something like TRAMP, that would be a kind of ideal solution and answer: the features he likes are there, and it would work with his remote server. –  imz -- Ivan Zakharyaschev Mar 22 '11 at 10:04
    
Is my answer irrelevant for this question?.. :) No, I don't think so, because ripper234 is looking for ideas -- (s)he writes "Should I even do this, or should I stick to command line?" And that's a new idea: look for TRAMP-like solutions, too. That's similar to my personal experience: when I wondered about a convenient way to work on a remote server, a friend of mine said IIRC that he is happy to use TRAMP in Emacs; and I started considering this as an option, too. –  imz -- Ivan Zakharyaschev Mar 22 '11 at 10:17
1  
And I occasionally use the equivalent in gedit via the ssh/sftp backends for gnome-vfs. Again, "a way to use a GUI editor to change config files on a remote system" is a different question from "using GUI administration frontends remotely" –  Shadur Mar 22 '11 at 11:45

I use nautilus --no-desktop on Ubuntu server 11.04 for MS Windows Explorer type functionality.

share|improve this answer

Unlike RDP, X loses the session if the server or ssh tunnel disconnects. You can use XVNC, which presents an X server to the client programs and connects to a VNC client. This keeps the X session alive and allows you to connect abd disconnect the VNC session.

I've had it working successfully over a 128k/128k Jetstart DSL connection (Yes, Telecom NZ really used to offer a 128k/128k DSL service!). It was fairly reponsive, only slowing down when it had to download a large bitmap to the VNC client.

You can see how to tunnel VNC over ssh in this article.

share|improve this answer

You should consider sticking to the command line, because a) most servers dont even have a GUI installed, and b) all GUIs are kind of slow to use over networks.

That said, I would suggest having a look at VNC. There are native clients for Windows and servers for Linux, so you would not have to set up X11 on your Windows box.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.