tightvnc [raspberrypi,windows,android,ubuntu]

wpid-2013-08-15_12-20-47-1-picsay.jpg

maybe try xrdp, it is faster:
https://fredfire1.wordpress.com/2015/06/26/xrdp-raspberrypidebian/

based on:
http://jankarres.de/2012/08/raspberry-pi-vnc-server-installieren
http://www.cs.uni-potsdam.de/ti/lehre/05-ALuP-I/anleitung_vncssh.html
http://shujinkou.blogspot.de/2009/04/how-to-vnc-from-android-phone-to-linux.html

on the pi
————-

install server software:
sudo apt-get install tightvncserver -y
sudo apt-get install preload -y

configure preload:
sudo sed -i 's/sortstrategy = 3/sortstrategy = 0/g' /etc/preload.conf

start tightvncserver:
tightvncserver
choose a password(and remember it):
1Passwd$
vncserver -kill :1

if you like to change the password:
vncpasswd

create a vnc start script:
touch vnc.sh
chmod +x vnc.sh
nano vnc.sh

#!/bin/sh
vncserver :1 -geometry 1280x720 -depth 24

create a vnc start on boot script:
sudo nano /etc/init.d/vncboot

### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: networking
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts VNC
# Description:
### END INIT INFO
 
export USER='pi'
 
eval cd ~$USER
 
# Check state
case "$1" in
  start)
    su $USER -c '/usr/bin/vncserver :1 -geometry 1280x720 -depth 24'
    echo "Starting vncserver for $USER"
  ;;
  stop)
    pkill Xtightvnc
    echo "vncserver stopped"
  ;;
  *)
    echo "Usage: /etc/init.d/vncserver {start|stop}"
    exit 1
  ;;
esac
 
exit 0

give the scripts correct rights and update the defaults:
sudo chmod 755 /etc/init.d/vncboot
sudo update-rc.d vncboot defaults

enable boot to desktop:
sudo raspi-config
->enable boot to desktop->desktop log in as user pi at the graphical desktop
reboot

tunneling through ssh on ubuntu:
————-

open terminal with ctrl+alt+t:
install xtightvncviewer from terminal:
sudo apt-get install xtightvncviewer -y
start ssh tunnel from terminal:
ssh -f -l pi -L 5901:localhost:5901 yoursubdomain.no-ip.com -p 22 sleep 20
start xtightvncviewer from terminal:
xtightvncviewer localhost:1
1Passwd$

tunneling through ssh on debian:
————-

betrachter für entfernte bildschirme:
ssh-tunnel
in top menu:
ansicht -> activate shortcuts
so you can get back from fullscreen with the F11-key
or move to to top middle with your mouse while holding ctrl

client on windows 7(local network):
————-

download tightvnc from http://www.tightvnc.com/download.php
install neither server nor to firewall
search for “tightvnc viewer” after install and start it.
connect to the pi on 192.168.1.xx:5901
with the password you choosed when you started vnc first
get back from vnc fullscreen-mode: ctrl+alt+shift+f
put vnc into background: win+d

tunneling through ssh on windows 7:
————-

putty-sessions
putty-ssh-tunnels
Session:
Hostname or ip address: yoursubdomain.no-ip.com
Port: 22

building ssh tunnel with putty:
SSH/Tunnels
Source port: 5901
Destination: localhost:5901

Press on “Add”!
login with putty:
username
password

if not already done start vnc server:
vncserver :1 -geometry 1280x720 -depth 24
[to kill vnc: vncserver -kill :1]
leave putty terminal open

connecting with tightvnc:
Remote host: localhost:1
1Passwd$

client on android(local network):
————-

install androidvnc from:
https://f-droid.org/repository/browse/?fdid=android.androidVNC
connect to the pi on 192.168.1.xx:5901
with the password you choosed when you started vnc first

tunneling through ssh on android client:
————-

connect to your computer with the androidapp ConnectBot
workarround if it does not show the “port weiterleitungen” button by default: click in ConnectBot menu on “Kopieren” first
Now open the ConnectBot menu again and click Port-Weiterleitungen:
spitzname: vnc
typ: Lokal
quellport: 5901
Ziel: 192.168.1.x:5901

now open android app androidVNC
nickname:
Password:1Passwd$
Address: localhost
Port: 5901

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s