Mansome
Posts: 68
Joined: Sat May 16, 2015 2:32 pm

Setup Auto Start VNC server

Fri Dec 23, 2016 4:22 am

Hi all,

I wanted to know if it is possible to setup a VNC server that auto starts but is not linked to a specific profile that auto logs in. I wanted to change my pi server to be completely headless at this point. I do not want my pi auto logging itself in though. Is that possible with the VNC server? If so is there a guide to set this up for the latest version of the pi?

User avatar
sconemad
Posts: 231
Joined: Thu Apr 28, 2016 1:47 pm
Location: Cambridge, UK
Contact: Website

Re: Setup Auto Start VNC server

Fri Dec 23, 2016 5:11 pm

Hi, yes the RealVNC service mode server can do this. This should be installed by default in Raspbian Pixel, and can be enabled via the Raspberry Pi configuration app. Then configure your Pi to boot to desktop but not auto login.

Mansome
Posts: 68
Joined: Sat May 16, 2015 2:32 pm

Re: Setup Auto Start VNC server

Fri Dec 23, 2016 6:35 pm

sconemad wrote:Hi, yes the RealVNC service mode server can do this. This should be installed by default in Raspbian Pixel, and can be enabled via the Raspberry Pi configuration app. Then configure your Pi to boot to desktop but not auto login.
When I do the raspi-config there is no option for VNC. I was thinking that something might have changed.

ElEscalador
Posts: 684
Joined: Tue Dec 15, 2015 4:55 pm
Location: Detroit, MI USA
Contact: Website

Elescalador

Fri Dec 23, 2016 6:53 pm

It might be under advanced options. Make sure you have one of the latest two releases of jessie.
My Autonomous Robot Project and a few of my other projects below.

https://lloydbrombach.wordpress.com/

Mansome
Posts: 68
Joined: Sat May 16, 2015 2:32 pm

Re: Elescalador

Tue Dec 27, 2016 2:20 pm

ElEscalador wrote:It might be under advanced options. Make sure you have one of the latest two releases of jessie.
Its not under that either. The base image was not the latest Jessie but was upgraded to that. I dont know if that makes a difference.

User avatar
legendisback
Posts: 11
Joined: Thu Sep 01, 2016 12:58 pm

Re: Setup Auto Start VNC server

Tue Dec 27, 2016 2:31 pm

Mansome wrote:Hi all,

I wanted to know if it is possible to setup a VNC server that auto starts but is not linked to a specific profile that auto logs in. I wanted to change my pi server to be completely headless at this point. I do not want my pi auto logging itself in though. Is that possible with the VNC server? If so is there a guide to set this up for the latest version of the pi?

yes

install tightvncserver

Code: Select all

sudo apt-get install tightvncserver
then

Code: Select all

tightvncserver
(it will ask for a password use six dig password 666666 for example)

then use autocutsel (copy,paste between computer and pi )

Code: Select all

sudo apt-get isntal autocutsel
then

Code: Select all

sudo nano /home/pi/.vnc/xstartup
add

Code: Select all

autocutsel -fork
after xsetroot –solid grey
then

Code: Select all

sudo nano /etc/rc.local
add

Code: Select all

su - pi -c   '/usr/bin/tightvncserver  :1'
to the end before exit

then

Code: Select all

sudo nano ~/.bashrc
Paste following code at the end.

Code: Select all

if [ -z "$XAUTHORITY" ]; then
    if [ -e $HOME/.Xauthority ]; then
        export XAUTHORITY=$HOME/.Xauthority;
     fi;
fi

then a sudo reboot
you are all set

good luck

and i always use sudo because i dont want to get no permission error
I am the terror that flaps in the night...
I am the surprise you find in your cereal box!
I am DARKWING DUCK!!!

User avatar
sconemad
Posts: 231
Joined: Thu Apr 28, 2016 1:47 pm
Location: Cambridge, UK
Contact: Website

Re: Elescalador

Tue Dec 27, 2016 4:53 pm

Mansome wrote:
ElEscalador wrote:It might be under advanced options. Make sure you have one of the latest two releases of jessie.
Its not under that either. The base image was not the latest Jessie but was upgraded to that. I dont know if that makes a difference.
It's moved to the interfacing sub-menu in the latest version.

If you have upgraded, then you may need to manually install the realvnc-vnc-server package.

Mansome
Posts: 68
Joined: Sat May 16, 2015 2:32 pm

Re: Setup Auto Start VNC server

Wed Dec 28, 2016 2:03 pm

legendisback wrote:
Mansome wrote:Hi all,

I wanted to know if it is possible to setup a VNC server that auto starts but is not linked to a specific profile that auto logs in. I wanted to change my pi server to be completely headless at this point. I do not want my pi auto logging itself in though. Is that possible with the VNC server? If so is there a guide to set this up for the latest version of the pi?

yes

install tightvncserver

Code: Select all

sudo apt-get install tightvncserver
then

Code: Select all

tightvncserver
(it will ask for a password use six dig password 666666 for example)

then use autocutsel (copy,paste between computer and pi )

Code: Select all

sudo apt-get isntal autocutsel
then

Code: Select all

sudo nano /home/pi/.vnc/xstartup
add

Code: Select all

autocutsel -fork
after xsetroot –solid grey
then

Code: Select all

sudo nano /etc/rc.local
add

Code: Select all

su - pi -c   '/usr/bin/tightvncserver  :1'
to the end before exit

then

Code: Select all

sudo nano ~/.bashrc
Paste following code at the end.

Code: Select all

if [ -z "$XAUTHORITY" ]; then
    if [ -e $HOME/.Xauthority ]; then
        export XAUTHORITY=$HOME/.Xauthority;
     fi;
fi

then a sudo reboot
you are all set

good luck

and i always use sudo because i dont want to get no permission error
I notice you use the user pi in this guide, in my install I almost never log in as pi. I created another account that I primarily use. Do I need to change it to that user or keep it as pi?

Return to “Beginners”