2

I have a headless Ubuntu PC running 18.04.1 Desktop. If I plug a monitor into it, Vino starts automatically and I can VNC into the box. I did set the "Sharing" item in the control panel to share the screen.

I followed the instructions at How to use Ubuntu 18.04 on VNC without display attached? to install the dummy monitor.

If I ssh into the box and manually start Vino with

/usr/lib/vino/vino-server --display=:0

then it works fine and I can VNC. How can I make it work without needing to do this?

3

After startup, click the square array of dots in the lower left of the screen.

Type 'startup applications' (no quotes) into the search box that appears at the top of the screen. Clock on the resulting icon.

Click Add at the right of the box, Type 'start vino' in the Name box, and paste /usr/lib/vino/vino-server into the command box.

Click Add at the bottom of the box.

Close the app.

You're done.

| improve this answer | |
  • Ugh, of course. Now I feel silly. – gfunkdave Aug 6 '18 at 8:02
  • added this but I'm still stuck needing to log in locally to the machine before I can VNC in; any ideas? – cvocvo Sep 18 '19 at 17:23
  • 1
    @cvocvo AFAIK you have to log in somehow to get a desktop, and vnc is a desktop sharing thing. But I am not very knowledgable, maybe ask a new question on the site. – Organic Marble Sep 18 '19 at 17:50
0

The following also works, and makes use of the systemd unit file that is installed by the Vino package, so I assume this is "the right way":

sudo ln -s ../vino-server.service \
    /usr/lib/systemd/user/graphical-session.target.wants
| improve this answer | |
0

The clean way to start he Vino Server is to use the systemctl command like so:

systemctl --user start vino-server

As mentioned by Organic Marble above, use the "Startup Applications" interface to add the command to your startup so when you log on it will automatically start that service. When you log out, it will automatically stop it.

For the hard core people, that can be done using an editor. Editing with vim:

vim ~/.config/autostart/systemctl.desktop

Then add an entry such as:

[Desktop Entry]
Type=Application
Exec=systemctl --user start vino-server
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Vino Server
Name[fr_FR]=Vino Serveur
Name=Vino Server
Comment[en_US]=Auto-start the VNC service on login in
Comment[fr_FR]=Auto-démare le service VNC sur une connection
Comment=Auto-start the VNC service on login in
| improve this answer | |

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.