]>
Commit | Line | Data |
---|---|---|
95ce3bb1 PZ |
1 | #!/bin/bash |
2 | ||
3 | function runCompiz() { | |
4 | gtk-window-decorator & | |
5 | if ( [ -e /usr/lib/compizconfig/backends/libgconf.so ] || [ -e /usr/lib64/compizconfig/backends/libgconf.so ] ) | |
6 | then | |
7 | exec compiz --ignore-desktop-hints ccp $@ | |
8 | else | |
9 | exec compiz --ignore-desktop-hints glib gconf gnomecompat $@ | |
10 | fi | |
11 | } | |
12 | ||
13 | ISSW=`glxinfo | grep "Software Rasterizer" -c` | |
14 | ||
15 | # Try with direct rendering | |
16 | HAVETFP=`glxinfo | grep texture_from_pixmap -c` | |
17 | ||
18 | if ( [ $ISSW == 0 ] && [ $HAVETFP -gt 2 ] ); then | |
19 | runCompiz $@ | |
20 | fi | |
21 | ||
22 | # Try again with indirect rendering | |
23 | export LIBGL_ALWAYS_INDIRECT=1 | |
24 | ||
25 | HAVETFP=`glxinfo | grep texture_from_pixmap -c` | |
26 | ||
27 | if ( [ $ISSW == 0 ] && [ $HAVETFP -gt 2 ] ); then | |
28 | runCompiz $@ | |
29 | fi | |
30 | ||
31 | # Fall back to metacity | |
32 | exec metacity $@ |