View Single Post
cddiede's Avatar
Posts: 1,034 | Thanked: 784 times | Joined on Dec 2007 @ Annapolis, MD
#6
I use the following upstart script to start a new VNC server everytime a new network connection is started. It dosen't deliniate between Wi-Fi and GPRS/3G, but it may be useful:

I've placed the following script (called vncs) in:

/etc/network/if-up.d

What this does is first off, starts a vnc server on the N900 whenever a network connection is established.

Secondly, it will kill any vnc server that is already running so you don't end up with a boatload of vnc server processes running if you connect to several networks throughout the day.

script follows:

APPCHK=$(ps aux | grep -c x11vnc)

if [ $APPCHK = '0' ];

then

/usr/bin/nohup /usr/bin/x11vnc -forever &

else

/usr/bin/pkill x11vnc;/usr/bin/nohup /usr/bin/x11vnc -forever &

fi
 

The Following User Says Thank You to cddiede For This Useful Post: