How to setup VNC on Linux?

Is it possible to have VNC running on Ubuntu to share just 1 application running on the desktop instead of the whole desktop?


Yes. x11vnc (available in Ubuntu's repositories somewhere) has a command line option (-id) which allows you to only share one window. Note that the window will appear without decorations, and resizing the windows may cause issues. You can use the xwininfo to find the window id. Basic steps:

  1. Run xwininfo from a console. It will change your cursor. Click on the window you want to share. xwininfo will print out the window id.
  2. Run x11vnc -id "id from xwininfo" replacing "id from xwininfo" with the appropriate id.