sakugava
Posts: 2
Joined: Mon Apr 22, 2013 3:14 am

Re: Can not set up VNC server to start at bootup (solved)

Mon Apr 22, 2013 3:16 am

Found this on http://www.raspberrypi.org/phpBB3/viewt ... p?p=108862.
Working for me
================================================================
I found x11vnc was better for me as I wanted to access the same session as being displayed via HDMI
(console 0). Plus, it supports UVNC and TightVNC file transfer.

steps:
install and set password
- sudo apt-get install x11vnc
- x11vnc -storepasswd

create autostart entry

- cd .config
- mkdir autostart
- cd autostart
- nano x11vnc.desktop
- paste following text:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false

- save and exit (Ctrl-X, Y, <Enter>)

This start x11vnc when lxde starts.

sorvad
Posts: 46
Joined: Thu Dec 22, 2011 11:04 am

Re: Can not set up VNC server to start at bootup (solved)

Wed Jul 17, 2013 3:11 pm

I followed the suggestions on this page but when I try to start the server from command line with

x11vnc -forever -display :0

I get this error;

x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.

I would have thought that this means it cannot connect to the main desktop session. I do not have a monitor or HDMI cable attached, is that an issue ?

[EDIT]
Sorry, sorted it. I could have sworn I had the pi booting to desktop but after checking the settings I discovered it wasn't which would explain my issues.

tavshed
Posts: 1
Joined: Fri Dec 20, 2013 5:41 am

Re: Can not set up VNC server to start at bootup (solved)

Fri Dec 20, 2013 5:42 am

I used the steps and it worked like a charm. Thank you very much

mech259
Posts: 6
Joined: Tue Aug 20, 2013 1:33 am

Re: Can not set up VNC server to start at bootup (solved)

Sun Dec 29, 2013 2:08 am

My X11VNC server starts up just fine, but you have to manually check the "Allow Connections" in order go into it. Makes it hard to start headless to run my APRS Igate. Any suggestions to put into a script to allow connections on boot?

munklefish
Posts: 75
Joined: Tue Oct 02, 2012 5:35 pm
Location: Neumarkt in der Oberpfalz
Contact: Website

Re: Can not set up VNC server to start at bootup

Wed Jan 08, 2014 3:21 pm

npr wrote:
emg wrote:Don't know if you want to try another VNC, but I use x11vnc and have lxde autostart it. I found x11vnc was better for me as I wanted to access the same session as being displayed via HDMI (console 0). Plus, it supports UVNC and TightVNC file transfer.

steps:
install and set password
- sudo apt-get install x11vnc
- x11vnc -storepasswd

create autostart entry

- cd .config
- mkdir autostart
- cd autostart
- nano x11vnc.desktop
- paste following text:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false

- save and exit (Ctrl-X, Y, <Enter>)

This start x11vnc when lxde starts.
Every time I set-up a new Pi, I spend days trying to get VNC running at boot to no avail. Eventually I have so much junk on the SDCard I have to flash a new version and start again. As per usual, I eventually found a method that worked, but then need to attach the expected issue of vnc not running on the 0 desktop.

Today, I found emg's post and it worked first time. iut even runs alongside my tightvncserver setup allowing both vversions to run.

emg - You post setup vnc for me, exactly how I needed it in about 30seconds!!!!

Why is there so many posts that simply dont work, when emg makes it so simple.???

:D
http://www.codeclinic.de

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Can not set up VNC server to start at bootup (solved)

Sun Feb 09, 2014 6:30 pm

I've finally scripted setting up X11VNC
http://cymplecy.wordpress.com/2014/02/0 ... ll-x11vnc/

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

Stefan_PI
Posts: 2
Joined: Thu Feb 13, 2014 6:18 pm

Re: Can not set up VNC server to start at bootup (solved)

Wed Feb 19, 2014 7:50 pm

Hi!

I tried your solution after banging my head into a wall with XRDP and tightvnc. The former did not allow me to remotley view the same desktop as I see when I connect a screen to the PI directly. I have tried a lot of workarounds and even Vino. Did not get it working. Your solution works flawlessly and I am really grateful that I found it. Great work!

As a sidenote I would like to add that all the comments from people that have not tried a solutions is rather pointless when people like me want to know if something works. I hope this will get better in the future on this forum, but for all you guys who wonder: THIS WORKS GREAT! ;)

See ya!

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Can not set up VNC server to start at bootup (solved)

Thu Feb 20, 2014 12:37 am

Thanks :)
Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

shanester
Posts: 15
Joined: Tue Sep 10, 2013 8:03 pm

Re: Can not set up VNC server to start at bootup (solved)

Sun Mar 30, 2014 7:56 pm

Hi Simon,
I love the stuff you've been doing and I tried your X11VNC script on my latest setup. It creates the file in .config and ps shows it is running. However although I can SSH into the pi (showing the network is correct) my VNC viewer that I usually use (?realVNC?) tells me that the connection is refused. Same if I use Mocha from my iDevices. These are methods I've usually used to connect when I had setup TightVNC. Mocha uses port 5900 and RealVNC I've tried different displays :0,:1,:2 but no use. Any help would be appreciated.

Shane

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Can not set up VNC server to start at bootup (solved)

Sun Mar 30, 2014 10:08 pm

Well I just use TightVNCViewer on XP and Win7 and I just type in the ipaddress of my RPi into the Remote Host of my RPi

I don't specify anything else just the IP address

Can you try that out (or maybe someone knows which port X11VNC runs on?)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

shanester
Posts: 15
Joined: Tue Sep 10, 2013 8:03 pm

Re: Can not set up VNC server to start at bootup (solved)

Sun Mar 30, 2014 11:53 pm

OK Thanks

Will switch back to TightVNC as I know how to get that running.

Well done with Scratch5

Shane

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: Can not set up VNC server to start at bootup (solved)

Tue Apr 01, 2014 11:31 am

Its probably more a little bug in my setup that can't deal with a non-virgin RPi than an issue with ports as both UltraVNC and TightVNC clients connect fine at my end.

I only use it on fresh Raspbian installs so maybe it doesn't work properly with NOOBs???

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

amanjosan2008
Posts: 4
Joined: Sun Sep 28, 2014 5:38 pm

Re: Can not set up VNC server to start at bootup

Mon Sep 29, 2014 8:25 am

emg wrote:Don't know if you want to try another VNC, but I use x11vnc and have lxde autostart it. I found x11vnc was better for me as I wanted to access the same session as being displayed via HDMI (console 0). Plus, it supports UVNC and TightVNC file transfer.

steps:
install and set password
- sudo apt-get install x11vnc
- x11vnc -storepasswd

create autostart entry

- cd .config
- mkdir autostart
- cd autostart
- nano x11vnc.desktop
- paste following text:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false

- save and exit (Ctrl-X, Y, <Enter>)

This start x11vnc when lxde starts.
Worked flawlessly..
Thank you.

ubanov
Posts: 1
Joined: Tue Dec 29, 2015 9:06 am

Re: Can not set up VNC server to start at bootup

Tue Dec 29, 2015 9:10 am

emg wrote:Don't know if you want to try another VNC, but I use x11vnc and have lxde autostart it. I found x11vnc was better for me as I wanted to access the same session as being displayed via HDMI (console 0). Plus, it supports UVNC and TightVNC file transfer.

steps:
install and set password
- sudo apt-get install x11vnc
- x11vnc -storepasswd

create autostart entry

- cd .config
- mkdir autostart
- cd autostart
- nano x11vnc.desktop
- paste following text:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false

- save and exit (Ctrl-X, Y, <Enter>)

This start x11vnc when lxde starts.
I have done what you say, and it worked perfectly for my... this is what I want, have only ONE X session (for console), and remote control it.

Thanks a lot

nautilus27
Posts: 71
Joined: Fri May 22, 2015 9:38 pm

Re: Can not set up VNC server to start at bootup

Fri Jan 08, 2016 2:15 am

emg wrote:Don't know if you want to try another VNC, but I use x11vnc and have lxde autostart it. I found x11vnc was better for me as I wanted to access the same session as being displayed via HDMI (console 0). Plus, it supports UVNC and TightVNC file transfer.

steps:
install and set password
- sudo apt-get install x11vnc
- x11vnc -storepasswd

create autostart entry

- cd .config
- mkdir autostart
- cd autostart
- nano x11vnc.desktop
- paste following text:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false

- save and exit (Ctrl-X, Y, <Enter>)

This start x11vnc when lxde starts.
This works but starts with a very bad resolution. How do I set resolution?

Ludovicot
Posts: 1
Joined: Tue Feb 23, 2016 2:13 pm

Re: Can not set up VNC server to start at bootup (solved)

Tue Feb 23, 2016 2:32 pm

To autostart server tightvncviewer at boot, try changing in the script, instead of root
USER=pi
HOME=/home/pi
(and do not forget to register later your script with update-rc.d {your file} defaults )

estufa8
Posts: 2
Joined: Wed Jul 20, 2016 1:59 pm

Re: Can not set up VNC server to start at bootup

Fri Jan 13, 2017 4:49 pm

emg wrote:Don't know if you want to try another VNC, but I use x11vnc and have lxde autostart it. I found x11vnc was better for me as I wanted to access the same session as being displayed via HDMI (console 0). Plus, it supports UVNC and TightVNC file transfer.

steps:
install and set password
- sudo apt-get install x11vnc
- x11vnc -storepasswd

create autostart entry

- cd .config
- mkdir autostart
- cd autostart
- nano x11vnc.desktop
- paste following text:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false

- save and exit (Ctrl-X, Y, <Enter>)

This start x11vnc when lxde starts.
wow emg! you made it so easy!
I've fight to run VNC for more than an hour! Following your tuto I've had it running in seconds!
I wanted vnc starting on boot and sharing desktop 0, I tried and tried with Jessie's vnc and Tightvnc for no results!
Now I have it!
Thank you!

Return to “Troubleshooting”