sim_tcr
Posts: 326
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

x11vnc setup for raspberry pi.

Thu Dec 06, 2012 11:19 am

Hello,

I would like to setup x11vnc on my raspberry pi. I installed x11vnc using 'apt-get install x11vnc'. And from the putty if I do a 'startx' I can connect to desktop using address <ipaddress>:0 using vnc viewer.
I want to set x11vnc such a way that, I can connect to desktop without issuing startx command. Also I want to tunnel it through ssh. Can some one here help please?

I am running on raspbian wheezy. SSH is setup with key based authentication only. I also have tightvnc server installed and configured. I am successfully tunneling vnc over ssh.

Thanks in advance,
Simon Mandy
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

User avatar
topguy
Posts: 5092
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: x11vnc setup for raspberry pi.

Thu Dec 06, 2012 11:45 am

"x11vnc" makes an existing x11 session available with VNC.

"Xvnc" on the other hand makes a brand new desktop which is only available via VNC.

But to have a desktop to connect to with VNC, someone has to start it.

If I were to do something similar for myself I would probably do something like this:
* Get "plink" command from the original Putty site.
* Use "plink" to connect to the RPi, start a Xvnc session and tunnel port 5900 back to localhost.
Plink manual: http://the.earth.li/~sgtatham/putty/0.5 ... er7.html#7
* Start vncviewer to connect to localhost:5900.

sim_tcr
Posts: 326
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: x11vnc setup for raspberry pi.

Thu Dec 06, 2012 12:03 pm

topguy wrote:"x11vnc" makes an existing x11 session available with VNC.

"Xvnc" on the other hand makes a brand new desktop which is only available via VNC.

But to have a desktop to connect to with VNC, someone has to start it.

If I were to do something similar for myself I would probably do something like this:
* Get "plink" command from the original Putty site.
* Use "plink" to connect to the RPi, start a Xvnc session and tunnel port 5900 back to localhost.
Plink manual: http://the.earth.li/~sgtatham/putty/0.5 ... er7.html#7
* Start vncviewer to connect to localhost:5900.
I am bit confused. Which software you are referring o by saying Xvnc? I want help with x11vnc software because from this forum I heard that, it is superior.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

sim_tcr
Posts: 326
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: x11vnc setup for raspberry pi.

Thu Dec 06, 2012 1:24 pm

sim_tcr wrote:
topguy wrote:"x11vnc" makes an existing x11 session available with VNC.

"Xvnc" on the other hand makes a brand new desktop which is only available via VNC.

But to have a desktop to connect to with VNC, someone has to start it.

If I were to do something similar for myself I would probably do something like this:
* Get "plink" command from the original Putty site.
* Use "plink" to connect to the RPi, start a Xvnc session and tunnel port 5900 back to localhost.
Plink manual: http://the.earth.li/~sgtatham/putty/0.5 ... er7.html#7
* Start vncviewer to connect to localhost:5900.
I am bit confused. Which software you are referring o by saying Xvnc? I want help with x11vnc software because from this forum I heard that, it is superior.
I downloaded plink and issued command plink <ip> -l pi startx (from a microsoft windows command prompt) I could see from the commmand prompt that xwindow is started.
Now I launched putty and setup tunnel such a way that Source port:5900 and Destination is localhost:5900 and saved that session and connected to pi.
Now from windows I launch vncviewer and tried connecting to localhost:0.Not working. Tried localhost:5900. Not working. Then I tried <ip>:0 and it worked.
I also tried <ip>:5900 and it worked too (just to make sure that port is 5900)
So tunneling failed. What could be the reason?
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

User avatar
topguy
Posts: 5092
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: x11vnc setup for raspberry pi.

Thu Dec 06, 2012 1:29 pm

I'm referring to this.
http://www.tightvnc.com/Xvnc.1.php

I havent verified if Xvnc (or vncserver) is standard packages in raspbian, but I see no reason why they wouldnt.

x11vnc is great if you already has an X-server started and want to use the display output on the RPi to show it.
If you on the other hand want to run it headless, and to have as much memory as possible available to the CPU, I would suggest my solution.

sim_tcr
Posts: 326
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: x11vnc setup for raspberry pi.

Thu Dec 06, 2012 1:34 pm

You know what i am set.
I could tunnel 5900 successfully and connect using localhost:0.
Issue was I have another putty session which was using 5900. I closed that and checked and all set.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

User avatar
topguy
Posts: 5092
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: x11vnc setup for raspberry pi.

Thu Dec 06, 2012 1:36 pm

if you add:
-L 5900:127.0.0.1:5900
to your plink command you should start the tunneling also.

Does your "startx" start "x11vnc" also ?

sim_tcr
Posts: 326
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: x11vnc setup for raspberry pi.

Thu Dec 06, 2012 1:43 pm

topguy wrote:if you add:
-L 5900:127.0.0.1:5900
to your plink command you should start the tunneling also.
I will try that.
topguy wrote:Does your "startx" start "x11vnc" also ?
Yes. I had done below as instructed by someone in the forum,

Code: Select all

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

Code: Select all

[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
This start x11vnc when lxde starts
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

sim_tcr
Posts: 326
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: x11vnc setup for raspberry pi.

Thu Dec 06, 2012 1:51 pm

I see only one resolution to set when i launch monitor settings. I would like to set it to 1024x768 or 800*600.
I am connected to display through video output.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

Return to “General discussion”