Right, here goes.
You want to make a script to launch compiz with the arguments you want, and then place this script in ~/.kde/Autostart to make it run upon login. (or whatever your autostart folder is set to under System Settings, About Me, Paths)
Example. The argument in green is an Nvidia tweak, so other users reading this can omit it if they have other cards. The argument in blue is the KDE tweak so you won't get 16x16 desktops in Compiz when you want 4x1 for your cube.
Code:
#!/bin/bash
# kill adept_notifier since it bugs out anyway
killall adept_notifier
compiz --replace --loose-binding --ignore-desktop-hints ccp $@ &
# sleep for three seconds, then restart adept_notifier
sleep 3
adept_notifier &
Save this as /usr/local/bin/compiz.start. You need superuser permissions to write to that folder. To open up that file with Kate as root, enter 'kdesu "kate /usr/local/bin/compiz.start"' in a run box (Alt+F2), or in a terminal. Then make it executable.
Code:
$ sudo chmod +x /usr/local/bin/compiz.start
Lastly, make a symbolic link to that script in your autostart folder mentioned earlier.
Code:
$ ln -s /usr/local/bin/compiz.start ~/.kde/Autostart/compiz.start
All done. It will be started upon login, or if you at any time run compiz.start, via run box or terminal. This wrapper script will leave terminal control to you, but do note: if you run it in a terminal (like Konsole) and you close it with the X button, compiz will close, too. So make a habit of closing terminals by entering exit instead.
Instead of saving this script in /usr/local/bin/ and with superuser rights, you can just save it in your own autostart folder. However, then it'd only be accessible from your user, and you wouldn't be able to run it on demand without supplying the location (it's not in the PATH variable). So the above example would save it in a place where everyone could access it, and then make a symbolic link to it in your autostart folder.
As for losing terminal control in general, this is normal for applications and commands that aren't designed to run in the background. You can add an ampersand (&) after any command to make it a child process of the terminal you entered it in. However, as mentioned earlier, child processes are closed too if you close the terminal the wrong way (X button).
Bookmarks