6

I installed Ubuntu 18.04 desktop with minimal installation on my mac mini. It however doesn't come with remote desktop.

I already have ssh access. So how can I, through terminal, enable and configure VNC remote access from both the local IP address (192.168.1.x) and its FQDN?

I want to use the default display manager and desktop interface for Bionic Beaver.

Notes:

  • I don't have any monitor attached
  • I want to use the default window manager (xorg)
  • I want to use the default desktop environment
  • I did minimal installation when installing Ubuntu Desktop

4 Answers 4

3

To your working ssh setup, add a vnc server like x11vnc to your server and a viewer like xtightvncviewer to your remote machine. For outside the local network, ensure you have a passthrough for your ssh (port 5900 will be tunneled, so nothing special needed for it). X should be running on the server, but no existing login is needed (you will connect to the login screen). No other special services needed on the server.

From the remote, use ssh to start the x11vnc server, and tunnel port 5900 back to the remote (assumed to be on ...131 on the local network). In a terminal type:

ssh -t -L 5900:localhost:5900 192.168.1.131 "sudo x11vnc -localhost -create -auth guess  -display :0"

The output should indicate a successful connection. Leave this terminal and in another, start the vnc viewer on the (tunneled local port 5900):

xtightvncviewer -encodings RRE -bgr233 localhost::5900

The encodings and option improve performance for me, but are optional. A new window should open with the server login screen displayed. Login to the desktop you set up.

If you want to leave the server program running over multiple invocations of the viewer, you may use the -forever option, but with the above, the server will close the x11vnc program when the viewer exits.

1
  • Similar questions are asked quite often, like: - Remmina cannot perform VNC remote desktop session before user logs in - How to start a GUI program on a Linux PC via SSH, with NO local logged-in user at the Server ? How to restart Vino (or my Desktop Environment)? Desktop Sharing enabled, vino-server not listening The above answer IMO is the best solution!
    – minyves
    Apr 19, 2020 at 8:53
2
sudo apt install vino

Then go to Settings >> Share

2
  • 1
    And what if I don't have a display to get to settings?
    – cclloyd
    Jun 16, 2018 at 3:56
  • Try to restart your machine after the installation of vino!
    – graceman9
    Dec 12, 2018 at 11:49
2

Vino's already installed on some versions of Ubuntu, but just incase (e.g. minimal install):

sudo apt install vino

If connecting from an unencrypted VNC client (e.g. MacOS), you can disable encryption:

gsettings set org.gnome.Vino require-encryption false

To set the password to 1234 and allow VNC style authentication

gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino vnc-password $(echo -n '1234'|base64)

To disable the manual confirmation prompt that prevents a connection until you allow it:

gsettings set org.gnome.Vino prompt-enabled false

To start vino on the display server that's on the physical machine:

export DISPLAY=:0.0
/usr/lib/vino/vino-server

Disclaimer: Some of the above will lower the security of the machine. It's intended to gain remote access temporarily. Please use proper security protocols as needed.

Thanks to various posts by @proximous:

1

Sorry for late reply, please do update if you are already able to get it resolved and if yes, how.

Question before we go ahead, how were you able to get SSH access on minimal installation ?

However with that being said the issue with 3.9.2 version is that it no longer comes with standalone preference dialog box, refer to bug 700070. In short, you now do need access to GNOME Control Center to start vino for GNOME

If that is not available there are multiple ways you can still get remote access, you can go with X11 and access via XRDP, here is great reply on forum for your ref

Else, The easiest solution is to install the package vino38, which provides the latest version with the preferences dialog, accessible via the vino-preferences command. URL for vino38 is here

Refer to another great answer on how to configure VNC from command line it is for old version of ubuntu, but i am sure the commands should still work.

That is the extent of my knowledge on vino for GNOME. i hope it helps. Good luck

You must log in to answer this question.

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