DnArturo
Posts: 4
Joined: Wed May 20, 2015 12:04 pm

Auto type "vncserver :1" on reboot

Wed Jun 15, 2016 1:35 pm

Hello Raspberry Pi community!

Have some limited success on my pi so far but my next project is to automatically enable the VNC on the pi. Currently when I boot it up I have to go to putty, log in, type vncserver :1, then go to the VNC program and re-log in from there. Both Google and Youtube came up short in giving me a straight answer.

How does one make the pi perform the "vncserver :1" command on boot up so I don't have to log on through putty?

Thanks much!
Art

Romonga
Posts: 123
Joined: Mon May 09, 2016 7:09 pm
Location: Montgomery Il

Re: Auto type "vncserver :1" on reboot

Wed Jun 15, 2016 3:13 pm

You can run, but you will only die tired.

User avatar
pi-anazazi
Posts: 515
Joined: Fri Feb 13, 2015 9:22 pm
Location: EU

Re: Auto type "vncserver :1" on reboot

Thu Jun 16, 2016 1:27 pm

Hint: Good chance that

"sudo ipconfig"

in the first step of the Instructable should read

"sudo raspiconfig"

....I guess ;-)
Kind regards

anazazi


User avatar
penguintutor
Posts: 376
Joined: Tue May 08, 2012 9:11 am
Location: UK
Contact: Website

Re: Auto type "vncserver :1" on reboot

Thu Jun 16, 2016 3:47 pm

As an alternative I've written a guide to starting tightvnc at startup, it uses a systemd startup file, which is the same way that other services are started on the Raspberry Pi.

http://www.penguintutor.com/linux/tightvnc

DnArturo
Posts: 4
Joined: Wed May 20, 2015 12:04 pm

Re: Auto type "vncserver :1" on reboot

Tue Jun 28, 2016 5:31 pm

SonOfAMotherlessGoat wrote:http://simplesi.net/auto-install-x11vnc/
This appears to install VNC but does not execute the command automatically.

DnArturo
Posts: 4
Joined: Wed May 20, 2015 12:04 pm

Re: Auto type "vncserver :1" on reboot

Tue Jun 28, 2016 6:42 pm

This works and is the best answer for 6/28/2016.

Recap:
1. sudo Raspi-config > option 3 (boot options) > B4 (Desktop login with auto sign-on)
2. cd /home/pi/.config
3. sudo mkdir autostart
4. cd autostart
5. sudo nano tightvnc.desktop

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

6. Ctrl+x to save > "y" > sudo reboot

Then forget putty and go straight to VNC Server :)

Art

Return to “Beginners”