Remote Tech Support with x11vnc and wrapper script

So, the idea is that I wanted something “like” the Ultranvnc Single Click download, only for linux. The main idea being is that if someone is looking for a bit of desktop tech support on linux, we don’t need to be giving instructions for 5 different package managers, or source compilation, or anything more than MAYBE something to cut and paste. In fact, something like this…. wget && sh remote-support could be easily pasted into a console window (which hopefully we can give instructions on finding), or a run command in kde for instance. Then the remote-support script should do the rest. *(By the way, the script doesn’t have to be chmod’ed to executable when we use sh to invoke it…)

So, basically this is what I’ve got for the script right now – addresses changed…..



#where are we going to get our vnc server from

#this is where the support tech is waiting
# "listening" for the connection


#we don't want the program to try forever to connect and
#stay open if the "listener" is not there

#not everyone has wget so we need to detect wget
#or curl - the first command above
#could be changed to curl -O http://mywebsite..... if necessary

if [ -x /usr/bin/wget ] ; then
if [ -x /usr/bin/curl ] ; then
DOWNLOADER="/usr/bin/curl -O"


#this is the download bit - take our download command and
#the address of the vnc binary

chmod +x x11vnc
#make it executable

./x11vnc -connect $REMOTEVIEWER -timeout $TIMEOUT \
-accept popup -norc -q -solid
#time to connect

#the above connects to the machine at $REMOTEVIEWER
#(port 5500 is the vnc listen by default)

#also we want to do a prompt on connect for the
#user to authorize the connection
#-norc - do not use any pre-existing rc file for x11vnc
# -q quiet - don't give a bunch of information
#if they're running in the console
#-solid - change the background to a solid background.

#we must be done now

rm ./x11vnc
#clean up - remove the x11vnc executable

rm ./remote-support
#clean up - remove the remote-support script

Obviously, if you were deploying this on an internal lan you could use an internal ip like as the $REMOTEVIEWER or on the web you could either use a static ip or domain name ( or some such) Whatever domain points to your LAN from the outside world.

(I’ve setup two versions of this – one for the internal lan which I’ve tested out on a number of livecd’s internally and one for the internet side.)

One thing I really like about the above script is the way it cleans up after it’s done. At this point I’ve done quite a bit of testing and only found one linux distro (an old Mepis livecd) that I couldn’t run the binary on, but the nice thing is if I run into a problem with the binary I can deal with that seperately. In order to make the binary I’m using, I did a bit of tweaking to the compile time options and rebuilt one myself (to disable some of the newer X extensions that were causing problems on older systems.) More on that in another post.

By the way, the above script is freely re-distributable/usable for whatever purpose you like. Feel free to take it and use it. I doubt I’m the first to mashup x11vnc like this, but I sure couldn’t find any others online. (Believe me I searched while I was trying to run ultravnc sc in wine….)

Related Posts

Blog Traffic Exchange Related Posts
  • New wine and new bottles this month for linux users to run windows applications Well, one of the big items in the last span in linux news has been related to WINE... (Wine Is Not an Emulator). WINE of course in the context of linux is a layer of compatibility to allow Windows applications to run under linux without a virtual machine such as......
  • Windows 98 and ME in final days of support (6 by my count) July 11th will mark the end of Microsoft's support for Windows 98 and ME. Which means that there will be no further security updates for those systems after that date. In SOME ways, those systems may find comfort in the security through obscurity approach as much malware MAY not run......
  • Scheduling tasks in linux cron Windows has scheduled tasks which most people are only halfway aware of. Linux has very powerful scheduling capabilities coming from it's unix heritage. cron is the daemon that deals with scheduled tasks under most linux distributions. There are a couple ways that you can schedule cron tasks. The first is......
Blog Traffic Exchange Related Websites
  • iPhone, Firefox, Safari, IE8 Pwned! The three day Pwn2Own contest at the CanSecWest security show is on. And at the end of the day, 3 major browsers, Firefox, Safari and IE8 were successfully exploited. Also a non-jailbroken iPhone was also hacked and its SMS database was stolen. Vincenzo Iozzo and Ralf Philipp Weinmann redirected an......
  • How to Install Window Boxes Window boxes add charm to any home and they are so easy to install that anyone can do it. You're going to need to get a few things together before you get started. Your tools will include: window box brackets a level that is longer than the window box you......
  • Ten Steps To Become a Linux/Unix Geek Until recently, Linux/Unix was considered OS of the geeks. However, with GUI and more desktop Linux distributions, things have simplified on both Linux and Unix. Still you can geek out with Unix/Linux using its terminal. Just follow the steps below to master the terminal. 1. Never used Linux! Get Ubuntu......    Send article as PDF   

Similar Posts

See what happened this day in history from either BBC Wikipedia
Amazon Logo

Comments are closed.

Switch to our mobile site