It should be possible with the latest version of VirtualGL (2.3.3.) 
However, 3D window manager support is still very experimental, so it's 
quite possible that what you end up with will be more buggy than running 
Unity 2D or the "Gnome fallback" session in TurboVNC.  The company who 
sponsored compiz support in VGL hasn't yet implemented the feature in 
their product (for good reason-- see below), and there are still quite a 
few known issues with running Unity 3D in VGL.

Here's basically how you do it:

-- You currently have to use the TigerVNC Server rather than the 
TurboVNC Server, because Turbo doesn't yet support the X Composite 
extension (looking for financial sponsorship to implement that 
extension, incidentally.)  Thus, you lose access to the 
TurboVNC-specific enhancements like ALR.  You can still use the TurboVNC 
Viewer, though.

-- You can only run 3D window managers that use compiz in VirtualGL, 
which currently includes Gnome and Unity.  You can't currently use VGL 
to provide remote hardware-accelerated support for KDE desktop effects-- 
or, at least, I wasn't able to make it work.

-- Currently, the only platform in the Red Hat family that this will 
work with is RHEL (or CentOS) 6, but it probably works with Fedora as 
well (I haven't tested it.)  It does not work with RHEL 5.  The 
usefulness of running the WM in VirtualGL on RHEL 6 is basically zero, 
because the RHEL 6 window managers work fine in 2D mode without VGL. 
All this does is allow you to enable desktop effects in Gnome.  If you 
want to play with that, however, you can simply edit ~/.vnc/xstartup and 
replace "exec" in lines 17 and 20 with "vglrun +wm".

-- With Ubuntu, it's a bit trickier.  The only way I've managed to do it 
is this:

    > mv /usr/bin/compiz /usr/bin/compiz.bin

    Create the following script as /usr/bin/compiz:
    #!/bin/bash
    DIR=`dirname $0`
    vglrun +wm $DIR/compiz.bin ${1+"$@"}

    > chmod a+x /usr/bin/compiz

    Of course, that means that VirtualGL is always activated along with 
the window manager, even when logging in locally.  :|  Before anyone 
starts asking about gnome-session, etc., I tried that!  I tried creating 
a custom Gnome session for VGL and was never able to make it start the 
Unity panel.  After many unpaid hours of hacking and cursing, I gave up. 
  Someone else fix it.


Issues:

-- When you vglrun the window manager, it sets LD_PRELOAD globally.  I 
STRONGLY ADVISE AGAINST THIS.  I would in fact recommend that you edit 
.bash_profile and unset LD_PRELOAD, then use vglrun only when you want 
to run 3D apps.  There are some known issues with preloading VirtualGL 
into non-3D apps under certain circumstances (for instance, 
https://sourceforge.net/tracker/?func=detail&aid=3576711&group_id=117509&atid=678327).

-- On Ubuntu, compiz will just die for random reasons.  For instance, on 
Ubuntu 12, it dies when I start the System Settings app.  On Ubuntu 13, 
it will sometimes die when I run 3D applications such as GLXspheres.  I 
did mention this is experimental, right?  I have no idea whether these 
are failures in compiz or TigerVNC or Unity or VirtualGL or all of the 
above, but I suspect that a more stable long-term approach is going to 
involve setting LD_PRELOAD only for the compiz process and not for any 
child processes of the WM.

-- Enabling desktop effects will introduce performance overhead in 
VirtualGL.  The reason is that the windows are now being rendered with 
the texture-from-pixmap extension.  This extension requires a lot of 
memory movement, since the texture is stored on the 3D X Server but the 
pixmap is stored on the 2D X Server (note: there's got to be a better 
way!)  Whether this overhead affects the overall performance of the 
system depends on a lot of factors.  On an older consumer-class machine 
I have that has slow memory transfer, the overall performance of 
GLXspheres (as measured from the client) dropped by about 1/3 whenever I 
enabled desktop effects on the server.  On my more recent 
workstation-class machine, the blitting and readback performance in VGL 
still took a hit when desktop effects were enabled, but it wasn't enough 
of a hit to cause an end-to-end performance drop.


So hopefully you understand now how messy this is currently and why it 
would be much better for Ubuntu-- and everyone else-- to continue 
supporting 2D window managers.  I suspect that they won't.  However, I 
also suspect that the introduction of RHEL 7 is going to force someone's 
hand on this.  Because Red Hat supports TigerVNC, they will either have 
to figure out a supported way to run a 3D WM in TigerVNC or they will 
have to continue providing a 2D WM for that purpose.  Ubuntu frankly 
doesn't seem to care much.  They're just steamrolling ahead, and frankly 
I find the stability of even Unity 3D to be sorely lacking even when 
used locally.  This is particularly the case for Ubuntu 13.

I also hasten to point out that you don't have to use Unity as your 
window manager.  You can use XFCE or any number of others, all 
installable through apt-get.


On 10/14/13 2:37 PM, Valentin Crone wrote:
> Hello,
> I have a Ubuntu Server (Ubuntu Desktop used as server) with proprietary
> Nvidia 3D drivers enabled.
>
> I have installed TurboVNC and VirtualGL on the server, and installed
> TurboVNC on the clients.
>
> Currently, when I open a session, the server starts Ubuntu 2D (Unity 2D
> Panel, because VirtualGL is not started for the desktop environnement),
> and I can start 3D application with the vglrun command.
>
> But, I would to start all the desktop environnement with VirtualGL to
> use Ubuntu (Unity, the normal 3D desktop environnement) because the 2D
> desktop have many bugs.
>
> I have already searched how to do that, but I have not found.
>
> Have you a solution to do that? (start Unity Desktop by TurboVNC with
> VirtualGL enabled for all desktop environnement and all applications)
>
> Thank you.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
VirtualGL-Users mailing list
VirtualGL-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtualgl-users

Reply via email to