10

currently vnc (with nvidia gfx cards) dont work with compiz..

will you be fixing this before 11.04 is released so that people can use vnc with the default desktop?

Jorge Castro
  • 71,754
  • I VNC into my compiz- and nvidia- using desktop all the time. What problem are you having? – Oli Oct 29 '10 at 10:54
  • 1
    Compiz is already enabled on the default desktop and has been since Ubuntu 7.10 (!) – 8128 Oct 29 '10 at 11:08
  • i suspect this is the bug affecting me: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/353126, however, ive never seen compiz work with vino on any of my machines and still dont (even on maverick) –  Oct 29 '10 at 12:31
  • 1
    You have to specifiy -noxdamage in your x11vnc server if you're intending to run Compiz. If you're using the built-in, Vino server (system/preferences/Remote Desktop), I have no idea - never used it. Vino lacks too many features I use (server-side scaling the main one). – Scaine Nov 28 '10 at 13:12
  • As requested, Jorge. – Scaine Dec 19 '10 at 21:48

5 Answers5

7

The current VNC server in System/Preferences/Remote Desktop is called vino-server. It doesn't currently support operation when Compiz (Desktop Effects) is enabled.

To work around this, you have to use a replacement vnc server. I use x11vnc.

sudo apt-get install x11vnc

Crucially, you have to specifiy -noxdamage when you start the x11vnc server if you're intending to run Compiz.

First, initialise x11vnc with a password :

x11vnc -usepw

and follow the prompts. Then here's an example of how I run my vnc server:

x11vnc -usepw -forever -noxdamage -scale 4/5 -avahi -nolookup -q

  • avahi will mean that the server will advertise itself using avahi (multicast dns)
  • scale 4/5 will mean that a 1900x1200 screen will fit on a 1280x1024 screen.
  • nolookup means that the server won't try to lookup the client. No long pauses.
  • q will suppress some of the output to console. Or use -logfile instead.
  • noxdamage will get your compiz effects working.
  • forever just means that the server will keep running after a client disconnects.

If you do a "man x11vnc", you'll see that there's a raft of additional options. But the ones specified above should get you running.

If you need to run this on startup, I personally run this in /etc/rc.local, but I'm sure there are better ways. EDIT : And there are easier ways, detailed on this very site : How to run scripts on start up?. So, I suppose the easiest is the crontab -e option, but you could also save the command as a script somewhere, then just specify it in system/preferences/startup apps.

Scaine
  • 11,139
  • Do I also need to prevent vino-server from starting up? – Dave Aug 22 '12 at 02:23
  • I never bothered to change the vino-server, HDave. Also, as far as I can make out, 12.04 doesn't ship with vino-server any more anyway. As long as the PC you're trying to connect to is listening properly on 5900, you should be fine. Check by running netstat -nlp and looking for a line that says 0.0.0.0:5900 with the word "LISTEN" on the same line. – Scaine Aug 22 '12 at 09:31
  • Running 12.04 here, and netstat -nlp reports vino-server listening on port 5900. AFAIK I've done nothing to make that happen...then again with all the playing around I've done.... For sure vino-server does not appear in /etc/init or any upstart configuration I've seen. – Dave Aug 22 '12 at 15:33
  • Yeah, that's odd. I have a fairly clean laptop next to me running 32-bit Ubuntu 12.04 and it's certainly not listening on 5900. You may have to kill vino-server before trying x11vnc, otherwise x11vnc may not be able to bind to the correct port. – Scaine Aug 24 '12 at 11:38
2

Correcting @Scaine's great answer, it is possible to use vino-server with compiz effects enabled.

Here is how to disable xdamage in vino, and thus make VNC work with compiz:

gsettings set org.gnome.Vino disable-xdamage true

Done!

Now you can use Ubuntu's default "Desktop Sharing" using even with Unity 3D. No need to install x11vnc

But, as others have pointed out, disabling xdamage causes huge network traffic. Not a big issue in a local network, but performance may suffer if remote controlling over the internet.

MestreLion
  • 20,086
  • Sometimes, I wonder if remote sharing is actually an after-thought in ubuntu-land. It really should just work right out of the box. – Antony Nov 28 '14 at 21:33
  • @Antony: neither Vino nor Compiz are exclusive to Ubuntu, so it's really not their fault. And the bug is related to proprietary video drivers, which is completely out of hands for Ubuntu (or any other distro) – MestreLion Nov 29 '14 at 10:07
2

the nodamage option works, but unless you're on a very fast network it's a bad idea - it forces everything to update all the time even if it doesn't change, which uses a huge amount of bandwidth.

luke
  • 21
  • 1
1

If you enable desktop visual effects ( set to Extra ) with proprietary nvidia driver, vnc to the machine WORKS but the screen is frozen after you initially log in and you can't see anything ( except a frozen picture ). It works correctly with the opensource drivers ( well at least for ATI ).

shiny
  • 216
0

I am using a mac book pro to control my ubuntu desktop. I stopped the frozen screen by going into the AMD Catalyst Control center and then under display options I went to the "Tear Free" tab and then Enabled Tear free Desktop to reduce tearing.

Started working right after that.

Brian
  • 1