What is the simplest way to have remote GUI access to Ubuntu 16.04 "server" from Ubuntu 16.04 "desktop"?

6,708

There's two directions for you I can see.

  1. You can "upgrade" your Ubuntu server to the desktop configuration, with a local version of X and whatever GUI applications you want, turn on desktop sharing, and use VNC by turning on "Desktop Sharing" (vino-server). Then from your desktop machine, you can access the entire desktop using VNC. (Remmina or Vinagre - I use Remmina because Vinagre crashes too often for my taste). This is the direction I use personally - X running locally goes faster, and I can disconnect the VNC connection, leaving applications running. I'd recommend using port forwarding within ssh to connect securely over the Internet, rather than expose port 5900.

  2. You can install enough of X and GUI applications to run applications on the server with all windows created on your desktop machine. Just "ssh -X serverrname" and start applications from a shell. You can also start up a window manager on the server in the same way as an application, and then use it to launch further applications. I haven't done this much, but I'd presume that once you "apt install" a GUI application on Ubuntu server, you should have enough installed to run that application from a shell. I've found advice that you should first install the xauth package. For example, the package x11-apps contains small X applications such as xclock, xeyes, and xcalc, so "ssh -X servername" and "sudo apt install xauth x11-apps ; xclock" should get you started.

You can find Ubuntu's own advice on this topic at https://help.ubuntu.com/community/ServerGUI

Share:
6,708

Related videos on Youtube

4xy
Author by

4xy

Updated on September 18, 2022

Comments

  • 4xy
    4xy almost 2 years

    I'm trying to figure out what is "lightweight" way to configure my Ubuntu 16.04 LTS server to have access via GUI (over SSH as option). I would like to reach it from my Ubuntu 16.04 workstation. I have really poor knowledge about how those techniques work. I read about X11 and it seems it's possible to just install Xorg server and enable X11 forwarding and it's it.

    But in other articles I read that it's just enough to install desktop common packages and it's not necessary to install all the GUI related stuff. So I'm really confused. I also see there are several methods like VNC, "plain" X11 forwarding, xRDP. They can be combined. I read different resources and as I realized the most preferable way to do this is to use xRDP? May be I'm wrong?

    This article (one of I've read) http://c-nergy.be/blog/?p=8952 describes the xRDP installation and doesn't consider SSH. Here is the ssh forwarding How to forward X over SSH to run graphics applications remotely?

    The questions are:

    1. Is the xRDP most preferable way achieve the goal?
    2. What steps should I do to have xRDP provide the remote GUI to me (What packages should I install to server and desktop)? I would like to have mate desktop. Should I install it to workstation or server or both?*
    3. How to enable xRDP over SSH tunnel?*

    * - If the xRDP is not an option the last two questions relate to that one (VNC or something else) you suggest, please.

    • Bruno9779
      Bruno9779 over 7 years
      Having a desktop environment on a server is a Windows-specific view of a servers function. It is not impossible, but you are going to have a hard time getting help setting that up and fixing any problems you might find.
    • 4xy
      4xy over 7 years
      I have ssh access with sudo user to the server and the main purpose of such an adventure is to be able to start web browser and render a page on localhost machine. And see it on remote. Due to I don't want to share the service's port on the Internet. I thought it's not a big deal for the linux system.