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:
- On the server use Desktop sharing (simply enter “Desktop sharing” in the Dash)
- click on “Allow users to see your desktop”
- click on “Require … password” and set a password
- Give the ip address (click on the screen icon at the top of your screen to see it) and the password to the person
- On the (ubuntu) client
- start “Remote desktop viewer”
- select VNC protocol, enter IP address
- 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
- 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 XQuartz.app, and in the terminal follow intructions for all clients.
Specific windows client
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…