24 April 2012

Screensharing in Linux with GoToMeeting

Screensharing appears to be a weak part of Linux desktop. Among solutions that do work I have successful experience with TeamViewer and Mikogo. Both of them are not perfect, but they run more or less natively on Linux.
These two were no the case for the event I needed to share my screen for :). Ideally I needed GoToMeeting and made it to share my screen! This instructions should work with most (if not any) of available screensharing solution for Windows.


In parenthesis I referred to software I was using.
  1. Windows running on either virtual machine (even non-virtual would work if you have spare one) (Windows XP on VirtualBox)
  2. VNC server running on your Linux desktop (x11vnc)
  3. VNC client on your Windows PC (TightVNC)

Basic idea:

You should have guessed what I'm going to do next :) I explain if not. You share the screen of you Windows PC with screensharing tool of your choice. But what the screen will display is fullscreen VNC client connected to your Linux desktop. I suppose there might be some video issues with the way how VNC client draws the picture and the way screensharing tool captures the screen, that's why I mentioned what software I was using.


For sharing my desktop on Linux I ran x11vnc like that:
$ x11vnc -display :0 -auth ~/.Xauthority -forever -nap -noxdamage

Then I had to start another XServer instance to avoid effect of 'endless refraction' (e.g. VNC client shows your desktop running virtual machine with Windows with VNC client showing you desktop...) using:
$ startx -- :1

On the second XServer I ran VirtualBox, started my virtual Windows PC, ran TightVNC and connected to my host Linux box. (At this stage you VNC may not work smoothly, looks like XServer detects that it's not active at the moment and does not update the screen when you try to move windows from within VNC client.) Now start you screen sharing session and once it's started enter fullscreen mode in your VNC client. Now you could minimize you virtual PC window and switch to first XServer (Ctrl+Alt+F7 in my case, your may differ).
That's it and you may lead your presentation :)


  • On dual-screen setup you could share only one screen with
    $ x11vnc -display :0 -auth ~/.Xauthority -forever -nap -noxdamage -clip 1680x1050+0+0
    and thus you may try to avoid switching between different XServer by running VirtualBox instance on second screen.
  • Gnome users may use vino instead of x11vnc, though I haven't tried this.


Anonymous said...

Hello fella

I've been facing this exact same issue as of now: I was able to get all my development environment set up in Linux, but my company uses gotomeeting.

I tried using VNC in the virtual machine, but I used tightvnc in both Linux and the Virtualbox windows instance, but I was getting constant freezes in the VNC x display.

Just curious: do you still use this setup? Have you changed anything? Have it worked in the long run for you?

Thank you very much for your post

Anonymous said...

Sorry, another question: any reason as for why you used different x sessions instead of just different virtual desktops (i.e. leave virtual box running in virtual desktop 1 and share your screen with your virtual desktop 2 "selected")

Kirill Malyshev said...


yes, i'm still using this setup. i'm not doing a screen sharing very often, and it work fine. but if i do then i'm usually using WebEx and join.me, both run equally ok.
i haven't really changed much. i have 2 monitors and a VirtualBox PC running in background (with VBoxHeadless), so i just open an RDP session, start screen sharing, VNC client and leave it on my right monitor. at the same time x11vnc is sharing my left monitor which i am presenting
different virtual desktop instead of x session... hm, sounds promising :) i can't remember if i've had any problems with that. most probably i just did hit upon that :)

Felipe Weber said...

Nice, good to know it worked fine in the long run

Also great idea running it with VBoxHeadless and connecting through RDP, certainly a resource saver

Thanks for your answer, I'll be trying this :-)

Kirill Malyshev said...

well, i don't think that VBoxHeadless saves any significant amount of resources. i just that virtual PC running all the time for other tasks. so all it saves is some space in task bar :)