Newer versions of Ubuntu use the Unity interface – a shell for GNOME. Unity doesn’t play nicely with NX, which is a remote desktop solution for Linux. By default, it doesn’t work at all – and when you do get NX to work with Unity, you get some serious glitches when switching windows. I couldn’t get window previews to work properly, which is really bad within Unity, since it groups windows by application – switching between the editor and plots in Matlab is totally blind. That’s too bad, because NX is otherwise very nice – much faster than, say, VNC.
There’s a few solutions for this, but the best I’ve found so far is also one of the simplest, and it will not break you local Unity installation. XFCE, an alternative window manager, looks like of a mix between the old GNOME interface and KDE. It doesn’t use fancy transitions, etc. which don’t work well over the wire, and so it plays well with NX. You can install the xubuntu shell – the XFCE window manager within Ubuntu, using:
sudo apt-get install xubuntu-desktop
Then, in the NX client, choose CDE rather than e.g. GNOME or KDE to open an XFCE session. If it gives you a “cannot run cdwm” error when you try to open the NX session, use the following commands to symlink cdwm to xfce:
cd /usr/bin ln -sf xfce4-session cdwm
Done. While you’re at it, you can also change NX settings so that Matlab will have less glitches.