0

I have a question about running GUI apps on the ubuntu server, e.g. sublime. Is it possible? since there is no Desktop installed on the server.

what I mean is that can I install sublime text from package manager, run subl command and the new document opens in sublime with GUI.

2
  • argh, we're not talking about ssh here, then my answer does not apply ... – pLumo Apr 6 '20 at 14:26
  • @pLumo that's ok I use ssh for managing multiple servers. – Arrow Apr 6 '20 at 16:25
0

If you'd like to edit files on a remote server as if you were sitting in front of a remote server:

ssh -X user@remote.server

Then run SublimeText with subl command.

Notice the usage of -X flag in the ssh command.

You can also do both steps in a single go, like shown below:

ssh -X user@remote.server subl

On the remote server you must have X-server, to install a minimal X11 server use comand:

sudo apt install xorg

! A complete desktop environment, XFCE, is installed on the server where i tested.

1

It is possible using X11-forwarding if the server allows. On the client you start such a session using ssh -X.

Note, that you'll find a security note in man ssh:

X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the user's X authorization database) can access the local X11 display through the forwarded connection. An attacker may then be able to perform activities such as keystroke monitoring.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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