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!
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!