[gutsy] best way to start compiz in kubuntu?

Paul S paulatgm at gmail.com
Tue Oct 9 13:21:00 BST 2007


Has anyone found a good way to start compiz that works all the time 
using kubuntu?

I've tried 4 and each has problems:

1. create /usr/bin/startcompiz with the following content:

#!/bin/bash
compiz --indirect-rendering &
sleep 5
#emerald --replace || kwin --replace
kde-window-decorator --replace || kwin --replace

.. and put "export KDEWM=startcompiz" in ~/.profile

This starts it on login, but sometimes, some kde settings seem lost. 
For example, sticky keys.
I added them at the end, with the following:

# restart sticky keys
xkbset st -twokey -latchlock

But, sometimes I also lose the Alt-F1 keyboard shortcut (it fails to 
popup the main menu). I haven't figured out how to fix this.

2. create startcompiz.sh and link it to a button on my panel .. click 
the buttion to activate it.  This is the content:

#!/bin/bash
# check which window manager:
getwm=`kdialog --radiolist "Select Desired Window Manager" 1 kwin off  2 
compiz on`
if [ $getwm = 1 ] ; then
kwin --replace &
elif [ $getwm = 2 ] ; then
compiz --indirect-rendering --replace &
sleep 2s
# load window decorator
kde-window-decorator --replace --blur=all --active-opacity=0.75 &
else
# arrive here if the "cancel" was selected
true
fi

This works ok except starting it immediately after login results in the 
adept-updater icon being kicked out of the taskbar into it's own window. 
Sometimes, if I start other windows first, the updater will stay in the 
taskbar.  This has the disadvantage of not starting compiz on login 
automatically, which is the issue I'd like to solve.

3. Creating the file ~/.kde/Autostart/startcompiz.sh with the following 
content:

#!/bin/bash
compiz --indirect-rendering --replace &
sleep 2s
# load window decorator
kde-window-decorator --replace --blur=all --active-opacity=0.75 &

This has the problem of kicking the adept-updater icon off the taskbar 
into it's own window, and the kde-window-decorator sometimes crashes, 
leaving no borders.  I've tried longer and shorted "sleep" pauses, but 
no help.

4. Saving the compiz in the default session.  (I know this is the way 
it's supposed to be done in kde.)

This has the same problem as the ~/.kde/Autostart method in that 
sometimes the kde-window-decorator crashes and the emerald decoration 
appears instead.

Anyone find a 100% successful way?

regards,



More information about the kubuntu-users mailing list