PDA

View Full Version : Compiz-Wrapper loader script [to run compiz and decos easily


Treviņo
June 14th, 2007, 05:16 PM
When I started packaging compiz for ubuntu[/url:2fae7] I found that making it working wasn't so smooth as it was for beryl, so I started hacking the ubuntu compiz.wrapper loader script that was released with ubuntu packages to make all working everywhere, then when Kristian has released his [url=http://www.opencompositing.org/viewtopic.php?t=206:2fae7]compiz-manager script[/url:2fae7], I gave a try to it but I didn't like the configuration-based structure since it make the script don't sync with user software/hardware status on each run (and also it could be harder to maintain and use with no user interaction), so I started working on it making some modifications to kristian's script, to get the best for my packages.

Changes
This list includes the main changes that there are between my script and the Kristian's one on 2006-06-14, you can do it later simply using diff ;)
[quote:2fae7]* Removed all the configuration related stuff
* Added support for ccp, ini, gconf compiz configuration plugins
* Set default compizconfig if none is found (disabled by default, a global.xml can do it!)
* Fixed the possibility_check test, compiz is launched only if it has hw/sw support
* Fixed Xgl support, now it runs fine using Xgl with ATi drivers
* Improved command line, now you can pass to the script both compiz options and plugins
* Added running Desktop Environment identification
* Added running Windows Manager identification
* Added Fallback Windows manager support (based on DE and Winmanager found)
* Improved compiz decorators support
* Removed the default "--replace" option, users can define it by command line or editing the script
* Logging ability[/quote:2fae7]
Code
You can find the latest stuff in this [url=http://gitweb.opencompositing.org/?p=users/3v1n0/compiz-wrapper;a=summary:2fae7]git page[/url:2fae7], use this command to stay sinced with my code:
[code:2fae7]git-clone git://anongit.opencompositing.org/users/3v1n0/compiz-wrapper # to get the code
(cd compiz-wrapper && git-pull) # to update the code[/code:2fae7]
Script File
Considering that the script is composed by only a file, you can simply grab the latest script code from [url=http://gitweb.opencompositing.org/?p=users/3v1n0/compiz-wrapper;a=blob_plain;f=compiz.wrapper;hb=HEAD:2fae 7]this link[/url:2fae7].

Bugs
I hope I've fixed all the bugs I found or I received, but of course I can't test the script in all configurations, so please test it and let me know how it works for you!
[u]Known Bugs
In few GNOME configurations, if you put compiz --replace on sessions, when gnome starts compiz is loaded only after some seconds (minutes) of freeze, while the gnome splash screen is shown... I can't understand why![/*:m:2fae7]

How to Use
For normal use the better way to launch compiz using this wrapper is simply running
[code:2fae7]compiz.wrapper --replace[/code:2fae7]
Then the script will do all the work for you, however there are also some advanced uses for it:
[code:2fae7]compiz-wrapper -h # outputs the compiz-wrapper options
compiz-wrapper -c emerald # run compiz (if needed) and the provided decorator
compiz.wrapper --help # outputs the compiz options
compiz.wrapper --version # outputs the compiz version
compiz.wrapper --any-other-compiz-option # launch compiz adding --any-other-compiz-option to args
compiz.wrapper any-compiz-plugin # launch compiz loading any-compiz-plugin [gconf,ini,ccp][/code:2fae7]
Some real examples now:
[code:2fae7]compiz-wrapper -l cpp # run compiz using ccp settings interface and logging
compiz-wrapper --replace gconf -c emerald # run compiz using the gconf settings and emerald
compiz-wrapper --replace -v # run compiz using the default settings in verbose mode
compiz-wrapper --fast-filter ini # run compiz using the ini settings and --fast-filter option[/code:2fae7]
I'm calling the script here compiz.wrapper, however for people using my packages they have only to type compiz, since in ubuntu the real compiz binary file is called compiz.real ;)

Bye!

ivesjd
June 26th, 2007, 07:35 AM
I'm sure you know this, but what it seems to be is a black mask over the desktop (but under the cursor).
A fix I found is to make a script, with [code:add67]compiz --replace -c emerald &[/code:add67] (I use emerald obviously) but put [code:add67]sleep 30[/code:add67] before it and it boots up perfect!

shame
June 29th, 2007, 02:48 PM
Using a nvidia geforce 7600gs with latest nvidia beta drivers, this script always starts compiz with indirect rendering.
Compiz starts up ok but when I try to kill it or logout or anything that stops compiz running it completely crashes my comp, needing a hard reset.

If I edit this bit, starting at line 323 [code:7936b]if [ $INDIRECT -eq 0 ]; then
ARGS="--indirect-rendering "$ARGS[/code:7936b]
And remove the --indirect-rendering bit then everything is fine.

Is there a parameter I can add to the script (without needing to edit it) to disable indirect rendering?

Treviņo
June 29th, 2007, 07:37 PM
Using a nvidia geforce 7600gs with latest nvidia beta drivers, this script always starts compiz with indirect rendering.
Compiz starts up ok but when I try to kill it or logout or anything that stops compiz running it completely crashes my comp, needing a hard reset.

If I edit this bit, starting at line 323 [code:1b476]if [ $INDIRECT -eq 0 ]; then
ARGS="--indirect-rendering "$ARGS[/code:1b476]
And remove the --indirect-rendering bit then everything is fine.

Is there a parameter I can add to the script (without needing to edit it) to disable indirect rendering?
Not yet but I could do that... However since I've added that parameter only few days ago (commit 4304b9300c4568835f327e1076eb99768a4cf2e8) because many nvidia users have noticed an improvement from the FPS point of view adding that option.

However, if you report this issue (and I got the same in the PC of a friend), I'll update (ehm, downgrade :P) the script in git...

Edit: done -> http://gitweb.opencompositing.org/?p=us ... f216938bcc (http://gitweb.opencompositing.org/?p=users/3v1n0/compiz-wrapper;a=commit;h=53fd535d76e4f7a2484751d02be0c8f 216938bcc)

shame
June 29th, 2007, 08:29 PM
Wow, you really are excelling yourself with this fusion stuff. I haven't had time to update yet but I'm sure it will work. And of course anyone who finds it slow can always add the parameter to the startup anyway.

<EDIT>

I've done an update and can confirm I'm no longer getting the crash. Nice one Trevino

gilir
June 29th, 2007, 11:01 PM
Good news :) I didn't know why my system freeze when I close the terminal that launch compiz :D Thanks :)

pinguin
July 2nd, 2007, 08:42 AM
I tried the new wrapper version without --indirect-rendering, but now I have black windows when I open the 3° or 4° window application
I'm using Ubuntu feisty with 100.14.09 nvidia driver on GeForce 6100 GPU
Is there another parameter I can add to minimize the problem?

Treviņo
July 2nd, 2007, 12:28 PM
I tried the new wrapper version without --indirect-rendering, but now I have black windows when I open the 3° or 4° window application
I'm using Ubuntu feisty with 100.14.09 nvidia driver on GeForce 6100 GPU
Is there another parameter I can add to minimize the problem?
I don't think... There's this problem with nvidia :/

Does the indirect-rendering parmeter freeze the system for you too?

pinguin
July 2nd, 2007, 08:12 PM
Yes, with the --indirect-rendering parameter my system freezes.
I tried some option to stop compiz:
sudo killall compiz or sudo killall compiz.real
metacity --replace
Close session
but all freeze the system
only shutdown seems to work without freeze

OT: Trevino, si puo' comunicare in italiano con te in questa board (farei meno fatica visto il mio scarso inglese), o č meglio utilizzare il tuo blog per questo? grazie.

jug
July 2nd, 2007, 11:19 PM
[quote="Treviņo":022a8]Bugs
I hope I've fixed all the bugs I found or I received, but of course I can't test the script in all configurations, so please test it and let me know how it works for you!
Known Bugs
In few GNOME configurations, if you put compiz --replace on sessions, when gnome starts compiz is loaded only after some seconds (minutes) of freeze, while the gnome splash screen is shown... I can't understand why![/*:m:022a8][/quote:022a8]
That seems to be related to ubuntus native "desktop-effects". I noticed that if desktop-effects were enabled ubuntu loads compiz even if it's not in autostart. If trevinos wrapper-script is in the autostart at the same time there seems to be a conflict. Also in german ubuntu-forums It has been reported that this issue stopped when desktop-effects were installed, activated, deactivated and then uninstalled again.
Hope that helps anyone.

~jug

Treviņo
July 2nd, 2007, 11:29 PM
OT: Trevino, si puo' comunicare in italiano con te in questa board (farei meno fatica visto il mio scarso inglese), o č meglio utilizzare il tuo blog per questo? grazie.
Sė, usa il mio blog per questo... [Yes, use my blog for talking in Italian...]