2

I'm fairly unfamiliar with Linux, so I'm not sure if what I'm describing is possible, or even how to describe it in a way that Google will understand.

Right now, I am using my Windows PC to ssh into a headless Ubuntu Server VM. To edit files on it, I am using Sublime Text on Windows to edit files in a Samba-shared folder, and then running them on the VM. It's a little clumsy.

What I'm wondering now is if there's a way I could install Sublime Text in the VM, and then forward its GUI through SSH somehow, so that I could interact with it from Windows.

Yes, I could just use a VM that wasn't headless... but I'm wondering if something like this is possible, it would feel more natural and convenient and I wouldn't have to render an entire composited desktop.

2
  • You can achieve something similar by using TightVNC. It will create virtual screen and you'll be able to interact with it using any VNC client.
    – gronostaj
    Mar 21, 2014 at 12:05
  • Would X-forwarding fulfill your requirements? Mar 21, 2014 at 12:09

2 Answers 2

1

You can use X Forwarding for this, it forwards the application's GUI to a local X server running on your Windows box. For this you'll need Putty, Xming and a properly configured SSHd.

On the server, you'll need to make sure that X11Forwarding has been set to yes in /etc/ssh/sshd.conf.

After this, you need to run Xming to create the local X server, use PuTTY to SSH into the server with X11 Forwarding enabled in the settings, and after this, you can run the desired application, e.g. sublime-text &.

For a more thorough explanation, see this for the server side and this for the client side.

1
  • Thanks for this advice, works perfectly and was much simpler than I thought, I really appreciate it. Mar 21, 2014 at 12:56
1

Yes, you can accomplish this using one of several Windows-based X-Window servers. (I'm really enjoying MobaXterm currently).

The fact that the VM is "headless" is irrelevant, so long as all the required packages are installed on the VM.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .