Page 1 of 1

Setup Auto Start VNC server

Posted: Fri Dec 23, 2016 4:22 am
by Mansome
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?

Re: Setup Auto Start VNC server

Posted: Fri Dec 23, 2016 5:11 pm
by sconemad
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.

Re: Setup Auto Start VNC server

Posted: Fri Dec 23, 2016 6:35 pm
by Mansome
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

Posted: Fri Dec 23, 2016 6:53 pm
by ElEscalador
It might be under advanced options. Make sure you have one of the latest two releases of jessie.

Re: Elescalador

Posted: Tue Dec 27, 2016 2:20 pm
by Mansome
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.

Re: Setup Auto Start VNC server

Posted: Tue Dec 27, 2016 2:31 pm
by legendisback
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

Re: Elescalador

Posted: Tue Dec 27, 2016 4:53 pm
by sconemad
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.

Re: Setup Auto Start VNC server

Posted: Wed Dec 28, 2016 2:03 pm
by Mansome
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?