3

http://www.instructables.com/id/Setting-up-a-VNC-Server-on-your-Raspberry-Pi/step4/Setting-up-the-Pi-to-Automatically-Start-a-VNC-Ser/

I have seen various tutorials explaining the exact process in the link above but I can't for the life of me work out why I can't get it to work.

VNC server works great if I manually boot it up with sudo vncserver.

I have created the specified autostart folder and inside of it placed a file called vncserver.desktop.

Inside that file there is the following information:

[Desktop Entry]
Type=Application
Name=TightVNC
Exec=vncserver:1
StartupNotify=false

Can anyone help?

My Raspberry Pi has been updated to the latest version by using:

sudo apt-get update

sudo apt-get dist-upgrade

After updating, I tried to run RealVNC but it didn't work so I am not sure it was installed after doing the upgrade process? Hence, I installed tightVNC.

Chumboski
  • 91
  • 1
  • 1
  • 7

5 Answers5

2

Found an easier solution.

sudo apt-get install xrdp
sudo shutdown -r now

Problem solved. Using Microsoft Remote Desktop works perfectly on boot.

I imagine though that some people will say it is better to go with VNC but I am not sure why.

Dmitry Grigoryev
  • 27,928
  • 6
  • 53
  • 144
Chumboski
  • 91
  • 1
  • 1
  • 7
  • The primary advantage to VNC is that you get the desktop and don't need to worry about reconnecting to virtual sessions. But that is easily fixed by going into /etc/xrdp and editing the xrdp.ini file so the first session says "ask5910" instead of -1 - side effect is that for your first session you do need to manually change the 5910 to -1 upon login. Afterwards it will default to 5910 so you will reconnect. – SDsolar Oct 01 '17 at 03:08
  • 1
    Please fix the answer - it should be xrdp and not xrpd – Denis Itskovich Oct 21 '19 at 15:15
1
 apt-get update
 apt-get upgrade
 apt-get dist-upgrade

after finish

sudo raspi-config 

then go to Interfacing Options then select vnc and enable it and reboot enjoy your vnc server running on boot

SDsolar
  • 2,348
  • 8
  • 25
  • 43
basheer
  • 11
  • 1
  • This works great. Note that any other vnc servers will be removed at this step (like vnc4server) - but press on and it all works out OK. Plus, the ~/.vnc/passwd file is not reset so you still have the same login password. And with this answer it will now work with all clients - both Windows TightVNCviewer and Linux remmina. – SDsolar Oct 01 '17 at 03:10
1

Dropped ":1" from the above and it worked the next time i booted ....

user81494
  • 11
  • 1
  • 4
    Why did this help solve the problem? Your answer may give a valid solution, but without further context it's not particularly helpful. – Jacobm001 Feb 26 '18 at 02:51
0

My issue was with a headless Pi - used this solution

If you do not have a keyboard or mouse connected to your Pi, VNC Server may not start automatically.

Solving it with(install another entropy generator):

sudo apt-get install haveged

nby
  • 1
  • 1
0

Make sure to disable Wayland if you happened to have it enabled. VNC does not work with Wayland.

More information here: https://help.realvnc.com/hc/en-us/articles/4417193011857-How-do-I-disable-Wayland-to-use-VNC-Connect-.

z11i
  • 101
  • 1