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?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You can use X11 forwarding over SSH; make sure the option
X11Forwarding yes
is enabled in /etc/ssh/sshd_config on the remote server, 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 demonstrated in these references:
- Using PuTTY and Xming to Connect to CSE
- X11 Forwarding using Xming and PuTTY
- Use Linux over Windows with Xming, here or here
ETA: Reading again and seeing your clarifications in the comments,
FTP might suit your needs even better,
as it will let you ‘mount’ SFTP folders as if they’re regular network drives.
See here, here, here (for Windows XP/7/Vista),
or here (for Windows 8).
Method 2
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.
Method 3
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.
Method 4
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.
Method 5
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.
Method 6
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.
Method 7
I use nautilus --no-desktop on Ubuntu server 11.04 for MS Windows Explorer type functionality.
Method 8
I did find the gvfs-tree command, or in some flavors of Linux just tree, to be helpful in seeing a CLI representation of the directory tree.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0