Remote PC controlling, x11vnc, win2vnc and 100% cpu usage

Filed under: TechNotes, Linux — lars @ 03:08:04 am

At work I have my laptop running Ubuntu Fesity which I sit on my desk, next to my Windows PC.  I wanted to be able to use them both with the one keyboard and mouse so that I could seamlessly switch between the two machines - sorta like they were one dual-monitor workstation.  I was able to get this working using two tools based around VNC , the age old cross-platform remote-desktop software:

  • x11vnc: This is a VNC server for linux that will expose your actual console session via VNC.  Apparently most VNC servers for linux will start you a seperate X session (ie - you'll get a different desktop to the one you can see on the physical machine's screen).  It can be installed via Synaptic Package Manager.
  • win2vnc: This is a windows port of x2vnc.  Basically, a VNC client that allows you to remotely control a VNC-server machine but doesn't actually show you that screen.  It's made for situations where the two machines sit next to eachother, and you can nominate an edge of your desktop so that when the mouse hits it, control will be transferred to the remote machine.  The mouse appears to move seamlessly from one screen to the other.

This works great - running x11vnc on my linux laptop and win2vnc on my Windows desktop.  But there were a couple of challenges to be overcome yet.

  • Mouse smoothness: I found the mouse to be quite jittery when being controlled from my Windows desktop.  The fix for this was to run x11vnc with the command-line option -nofb.  This tells the x11vnc not to worry about all the graphical frame-buffer data that gets generated as the screen changes (which under 'normal' VNC use would need to be sent over the wire to the client), thus avoiding the mouse lag and jitters normally associated with using VNC.
  • 100% CPU issue: There appears to be a bug with win2vnc where it will start using 100% of the CPU whenever x11vnc sends it a 'beep' character-code.  Thankfully this bug is documented here: http://sourceforge.net/tracker/index.php?func=detail&aid=1190916&group_id=1074$ and there is another command-line attribute that inhibits x11vnc from sending these problem characters: -nobell.

So I can run x11vnc without any problems from my linux laptop using the following command-line:

x11vnc -usepw -nofb -nobell

(Note, the first time you run it with -usepw it will prompt you to create a password file so that your VNC session isn't unprotected).

Comments

  • Iwan N.
    Thanks for the info on the mouse smoothness. I had the same issue in my x11vnc-win2vnc setup and this really helped me out!

    Comment by Iwan N. [Visitor] — 04/18/08 @ 04:29

  • Daniel
    This is from 2008 but I just started using this today in 2015!! Thanks so much for the tutorial! :D

    Comment by Daniel [Visitor] — 07/08/15 @ 08:48

Leave a comment

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>


Options:
(Line breaks become <br />)
(Set cookies for name, email & url)




powered by  b2evolution