HowTo: Setup a Remote Desktop with VNC server


39 posts   Page 2 of 2   1, 2
by mdalvecchio » Sun May 13, 2012 10:36 pm
I'm trying to setup the TightVNC solution for getting a QEMO Virtual Rpi with a resolution higher than 640x480.

I'm stuck with the Rpi/QEMU network configuration: I can go from Rpi to the Host PC but not the other way around. Of course that makes the TightVNC solution useless because I cannot connect to Rpi from the host PC running windows.

I discovered that you should change the QEMU networking mode activating a bridge on the host system. Any hints from those who got it running?

br
Posts: 2
Joined: Sun May 13, 2012 10:26 pm
by Joe Schmoe » Sun May 13, 2012 11:27 pm
mdalvecchio wrote:I'm trying to setup the TightVNC solution for getting a QEMO Virtual Rpi with a resolution higher than 640x480.

I'm stuck with the Rpi/QEMU network configuration: I can go from Rpi to the Host PC but not the other way around. Of course that makes the TightVNC solution useless because I cannot connect to Rpi from the host PC running windows.

I discovered that you should change the QEMU networking mode activating a bridge on the host system. Any hints from those who got it running?

br


Yes - it works. The steps are:

1) Download openvnc (Google It)
2) Install openvnc. Note: I think that you don't really need most of openvnc - you only need the "TAP device" - but for some reason, when I tried to get cute with the installation and install only the TAP device, it (the networking in the emulated Pi) didn't work. So, I went back and did a full (regular) install of the openvnc and it worked.
3) In Windows, run ncpa.cpl and rename the new TAP device to "TAP".
4) In Windows, make a bridge between your real Ethernet device and the "TAP" device
5) Add the appropriate flags to the QEMU command line (It is something like "-net nic -net if=TAP"
6) Run QEMU and it should work.

Yes, I know this isn't quite cookbook, but it is the basic idea. It's what I can recall from memory.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2799
Joined: Sun Jan 15, 2012 1:11 pm
by RaspberryPiBeginners » Mon May 21, 2012 2:05 pm
How to - Installing VNC server - Raspberry Pi
http://www.youtube.com/watch?v=c5QCoh8S ... e=g-user-u
Click here for my unofficial YouTube Channel > http://goo.gl/oFYBD
User avatar
Posts: 217
Joined: Fri May 11, 2012 6:54 am
Location: Soham, Cambridgeshire
by Joe Schmoe » Mon May 21, 2012 2:10 pm
Oops - I just realized an error. Below, please globally substitute "openvpn" for "openvnc".

Joe Schmoe wrote:
mdalvecchio wrote:I'm trying to setup the TightVNC solution for getting a QEMO Virtual Rpi with a resolution higher than 640x480.

I'm stuck with the Rpi/QEMU network configuration: I can go from Rpi to the Host PC but not the other way around. Of course that makes the TightVNC solution useless because I cannot connect to Rpi from the host PC running windows.

I discovered that you should change the QEMU networking mode activating a bridge on the host system. Any hints from those who got it running?

br


Yes - it works. The steps are:

1) Download openvnc (Google It)
2) Install openvnc. Note: I think that you don't really need most of openvnc - you only need the "TAP device" - but for some reason, when I tried to get cute with the installation and install only the TAP device, it (the networking in the emulated Pi) didn't work. So, I went back and did a full (regular) install of the openvnc and it worked.
3) In Windows, run ncpa.cpl and rename the new TAP device to "TAP".
4) In Windows, make a bridge between your real Ethernet device and the "TAP" device
5) Add the appropriate flags to the QEMU command line (It is something like "-net nic -net if=TAP"
6) Run QEMU and it should work.

Yes, I know this isn't quite cookbook, but it is the basic idea. It's what I can recall from memory.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2799
Joined: Sun Jan 15, 2012 1:11 pm
by rasbeer » Sun May 27, 2012 7:14 am
Is it possible to use openvnc (or similar) over an ethernet cable? (With a Pi B, obviously.) This might be useful for people who don't have suitable monitors.
Posts: 242
Joined: Wed Mar 07, 2012 8:35 am
by Joel, Just Joel » Mon May 28, 2012 4:45 am
Yes, it's been detailed here: http://myraspberrypiexperience.blogspot.co.uk/p/setting-up-vnc.html?showComment=1338147686947
and here: http://www.designspark.com/content/using-vnc-raspberry-pi
I haven't tried it with my R-Pi just yet, but it could be a very convenient solution for those of us with perfectly good laptops or desktops who don't want to clutter the workbench with extra monitor and keyboard, etc.
Posts: 2
Joined: Mon May 28, 2012 4:36 am
by rasbeer » Mon May 28, 2012 6:11 am
Thanks - those look very helpful. If I'm not mistaken neither explicity mentions just connecting the Pi to the ethernet port of your PC with cable tho - are they definitely aimed at this? If not, what would one need to do differently?
Posts: 242
Joined: Wed Mar 07, 2012 8:35 am
by Tass » Mon May 28, 2012 10:08 am
Yes - in the first link above I simply connect my Pi to my laptop using an ethernet cable, SSH in, then VNC in.
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by Joel, Just Joel » Mon May 28, 2012 3:53 pm
Yes, that is some awesome info in your article, thanks!

@rasbeer: And if it helps, it may be good to know that no ethernet crossover cable is required. The Pi auto-detects and configures the port correctly whether crossover is used or not. See from the Quick Start Guide (http://www.farnell.com/datasheets/1524403.pdf):
Internet Connectivity
This may be an Ethernet/LAN cable (standard RJ45 connector) or a USB WiFi adaptor. The
RPi ethernet port is auto-sensing which means that it may be connected to a router or directly
to another computer (without the need for a crossover cable).


Also, this info about setting up static IP addresses and connecting two Linux boxes together may be useful:
http://www.linux-archive.org/debian-user/145958-connecting-two-computers-using-ethernet-cable.html
Of course, if one of the machines is a Windows PC, then you'll need to set up a static address in the network adapter properties. That's well documented on the web if you are not familiar with the procedure.
I can hardly wait to test this out myself when I get my turn at using the family TV!
Posts: 2
Joined: Mon May 28, 2012 4:36 am
by rasbeer » Mon May 28, 2012 4:31 pm
Thanks guys; all that info's very helpful, and I think the Joel's linux archive link explains the bit I didn't understand for Linux (how to figure out/set the Pi's IP address)
Posts: 242
Joined: Wed Mar 07, 2012 8:35 am
by alexjj » Fri Jun 01, 2012 7:14 pm
I'm trying to get my rpi to run vnc at start up but I keep getting the error when I try to update the boot sequence thing:

Code: Select all
insserv: warning: current start runlevel(s) (3 4 5) of script `vncserver' overwrites defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 6) of script `vncserver' overwrites defaults (0 1 6)


Here's my script /etc/init.d/vncserver
Code: Select all
### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC Server at boot time
# Description:       Start VNC Server at boot time.
### END INIT INFO
PATH="$PATH:/usr/X11R6/bin/"

# The Username:Group that will run VNC
export USER="pi"
#${RUNAS}

# The display that VNC will use
DISPLAY="1"

# Color depth (between 8 and 32)
DEPTH="16"

# The Desktop geometry to use.
#GEOMETRY="<WIDTH>x<HEIGHT>"
GEOMETRY="1280x800"

# The name that the VNC Desktop will have.
NAME="RaspberryPi"

OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"

. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
;;

stop)
log_action_begin_msg "Stoping vncserver for user '${USER}' on localhost:${DISPLAY}"
su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
;;

restart)
$0 stop
$0 start
;;
esac

exit 0


It doesn't run at boot up.
Posts: 15
Joined: Sun Feb 05, 2012 11:42 am
by ekimq » Mon Jun 04, 2012 12:13 pm
Mac,

Take a look here: http://elinux.org/RPi_VNC_Server

You'll see that there are commands where the above example says "do more stuff"
Posts: 1
Joined: Fri Mar 16, 2012 12:43 pm
by setsanto » Wed Jan 02, 2013 8:37 pm
I followed the steps in this setup, but only get a completely gray screen. The log output is below, any tips?

Code: Select all
.  xbian@xbian:~/.vnc# cat xbian:1.log
02/01/13 13:37:15 Xvnc version TightVNC-1.3.9
02/01/13 13:37:15 Copyright (C) 2000-2007 TightVNC Group
02/01/13 13:37:15 Copyright (C) 1999 AT&T Laboratories Cambridge
02/01/13 13:37:15 All Rights Reserved.
02/01/13 13:37:15 See http://www.tightvnc.com/ for information on TightVNC
02/01/13 13:37:15 Desktop name 'X' (xbian:1)
02/01/13 13:37:15 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
02/01/13 13:37:15 Listening for VNC connections on TCP port 5901
02/01/13 13:37:15 Listening for HTTP connections on TCP port 5801
02/01/13 13:37:15   URL http://xbian:5801
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
cc1: fatal error: /home/xbian/.Xresources: No such file or directory
compilation terminated.

02/01/13 13:37:56 Got connection from client 192.168.0.49
02/01/13 13:37:56 Using protocol version 3.8
02/01/13 13:37:56 Enabling TightVNC protocol extensions
02/01/13 13:37:59 Full-control authentication passed by 192.168.0.49
02/01/13 13:37:59 Using tight encoding for client 192.168.0.49
02/01/13 13:37:59 rfbProcessClientNormalMessage: ignoring unknown encoding 16
02/01/13 13:37:59 Using image quality level 6 for client 192.168.0.49
02/01/13 13:37:59 rfbProcessClientNormalMessage: ignoring unknown encoding -223
02/01/13 13:37:59 Enabling LastRect protocol extension for client 192.168.0.49
02/01/13 13:37:59 Enabling cursor position updates for client 192.168.0.49
02/01/13 13:37:59 Enabling full-color cursor updates for client 192.168.0.49
02/01/13 13:38:13 KbdAddEvent: unknown KeySym 0xff61 - allocating KeyCode 89
Posts: 2
Joined: Tue Dec 25, 2012 11:20 pm
by JKLBelenzo » Mon Oct 27, 2014 8:07 am
I am having trouble with my remote desktop configuration, my desktop does not show its icons? :cry: Does anyone encounter this? and how can it be solved? Thanks
User avatar
Posts: 1
Joined: Mon Oct 27, 2014 7:26 am