2012-10-05 16:37:52 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
function runCompiz() {
|
2012-12-25 18:08:23 +00:00
|
|
|
if ( [ -e /usr/lib/compizconfig/backends/libini.so ] || [ -e /usr/lib64/compizconfig/backends/libini.so ] )
|
2012-10-05 16:37:52 +00:00
|
|
|
then
|
2012-12-25 18:08:23 +00:00
|
|
|
exec compiz --replace --sm-disable --ignore-desktop-hints ccp &&
|
|
|
|
emerald --replace $@
|
2012-10-05 16:37:52 +00:00
|
|
|
else
|
2012-12-25 18:08:23 +00:00
|
|
|
exec compiz --replace --sm-disable --ignore-desktop-hints glib ini matecompat $@
|
2012-10-05 16:37:52 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
ISSW=`glxinfo | grep "Software Rasterizer" -c`
|
|
|
|
|
|
|
|
# Try with direct rendering
|
|
|
|
HAVETFP=`glxinfo | grep texture_from_pixmap -c`
|
|
|
|
|
|
|
|
if ( [ $ISSW == 0 ] && [ $HAVETFP -gt 2 ] ); then
|
|
|
|
runCompiz $@
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Try again with indirect rendering
|
|
|
|
export LIBGL_ALWAYS_INDIRECT=1
|
|
|
|
|
|
|
|
HAVETFP=`glxinfo | grep texture_from_pixmap -c`
|
|
|
|
|
|
|
|
if ( [ $ISSW == 0 ] && [ $HAVETFP -gt 2 ] ); then
|
|
|
|
runCompiz $@
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Fall back to marco
|
|
|
|
exec marco $@
|