Remote graphics on linux server

So you have a great ubuntu server running somewhere and you want to display graphics from the server?

Visualize the current user desktop

That is actually really easy through VNC in ubuntu:

  1. On the server use Desktop sharing (simply enter “Desktop sharing” in the Dash)
    1. click on “Allow users to see your desktop”
    2. click on “Require … password” and set a password
    3. Give the ip address (click on the screen icon at the top of your screen to see it) and the password to the person
  2. On the (ubuntu) client
    1. start “Remote desktop viewer”
    2. select VNC protocol, enter IP address
  3. User on the server need to accept the connection

All set! I used these more complete instructions.

Open an independant graphic session

The problem with the vnc approach is that you cannot have two different users on the same server at the same time.
The best option I found for now is to use xRDP, the windows protocol. The set up is very well described here. Hereafter a short summary.

Server set up

It requires to install xrdp and xfce4 on the server, It’s quick, don’t worry:
sudo apt-get install xrdp xfce4 xorgxrdp

Then for each user allowed to connect simply run users terminal:
echo xfce4-session >~/.xsession

When done for all users, restart xrdp:
sudo service xrdp restart

Then give the ip to the users, you can get it in the terminal with hostname -I.

Client connection

  •  Windows: simply open “Desktop client”, enter your ip address and user name on the ubuntu machine
  • Ubuntu: I recommand installing Remmina
    • Be sure to choose “RDP” protocol, enter IP and linux user name
    • play with the options to make sure you have the best possible experience with your network
  • RDP should work ok under mac but I didn’t test it (yet)
    • Install from the mac app store
    • start it and enter IP and linux user name
    • Works ok but for non qwerty keyboard that are not correctly recognized

With a ubuntu client this is the best experience I had (careful though, if the user is already connected graphically, some softwares may not like to be relaunched, firefox typically doesn’t like it).

Just launch graphic application through ssh (slow)

If nothing else is possible, you can always to simple X11 forwarding under ssh, but it’s slow.

Specific linux client


Specific mac client

You need to first install XQuartz
Then open, and in the terminal follow intructions for all clients.

Specific windows client

Install putty, and enable X11 Forwarding

All clients

In the terminal:
ssh -X myserver
Then you can test xdisplay with
You can even launch a file explorer:
It’s real slow for the set up but then file exploration is ok.
This solution still is really slow (try for example plotting complex graphics in R…

Comments are closed.