Video simply hangs so it's impossible to watch any.
These are the steps to set it up:
1. Open your favorite text editor and save the script,
e.g. command : nano vncserver
and paste this script:
!/bin/sh
case $1 in
start)
if [ -f /var/run/vnc.pid ] ; then
echo "VNC server is already running"
else
initctl stop xbmc
sudo vnc_dispmanx 2>/dev/null &
echo $! | sudo dd of=/var/run/vnc.pid
initctl start xbmc
fi
;;
stop)
if [ -f /var/run/vnc.pid ] ; then
sudo kill -TERM $(cat /var/run/vnc.pid)
sudo rm /var/run/vnc.pid
else
echo "VNC server is not running"
fi
;;
*)
echo "Usage $0 start|stop"
;;
esac
2. chmod +x vncserver
3. sudo mv vncserver /usr/local/sbin
4. vncserver start
If you want to check if it's running, check if vnc_dispmanx has the default VNC port open (5900)
pi@raspbmc:~$ sudo netstat -lnptu |grep vnc
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 3687/vnc_dispmanx
tcp6 0 0 :::5900 :::* LISTEN 3687/vnc_dispmanx
vncserver stop
sudo apt-get install vncviewer
vncviewer 192.168.1.101:5900
After trying for days to get x11vnc to work and failed, I tried this solution and was finally able to remotely connect to my rasbperry pi's desktop (running kodi). Thank you for posting this. It was very very helpful!
ReplyDelete