Another Gtk RGBA module
Gnome Other
Score 59%
Description:

Description
This is my spin on a RGBA module for use by theme engines that support RGBA colormaps, such as Murrine SVN.

Usage
1. Ensure your system has the proper development packages installed for Gtk+ development. Compile the source file via this command:
gcc -O2 -fPIC -shared `pkg-config --cflags --libs gtk+-2.0` librgba.c -o librgba.so
2. Copy librgba.so to /usr/lib/gtk-2.0/modules
3. Add this line to your ~/.profile file:
export GTK_MODULES=rgba
4. Restart your session by logging out and logging in to load up the module.
5. Create a file called rgba.conf in the directory ~/.config/gtk-2.0
Read below for information regarding the format of this file and how to use it.
6. Enjoy!

Configuration
Each line in rgba.conf is a pattern to match the name of the running program against. The patterns use standard glob notation (* and ? for matching). Lines prefixed with # are ignored. Lines prefixed with a ! character invert the match. By default, RGBA is disabled for the application. If a pattern evaluates to true (before inversion from a !), no further patterns in the file will be tested, and RGBA is enabled for the application depending on the result of the evaluation (post inversion, if specified).

Here is an example rgba.conf:

# this configuration is a series of invert patterns, so all applications that do not match one of these patterns will have RGBA enabled
# gksu[do] don't like RGBA
!gksu*
# disable all applets
!*applet*
# these applications use Gtk, but for widget rendering only. (gecko stuff, wxGTK apps). Not RGBA compatible
!audacity
!firefox*
!thunderbird*
# no to gnome panel
!gnome-panel
# other RGBA troublesome apps
!gthumb
!nautilus
!pidgin

Another example:

# disallow bluetooth-applet
!bluetooth-applet
# but allow all the other bluetooth apps
bluetooth-*
# allow only these apps
gedit
eog
gcalctool
gnome-sound-*
gnome-volume-control

Last changelog:

8 years ago

0.0.4.1
Reverted Cimi's suggested change as it caused many problems when logging into Gnome.
0.0.4
Updated per Cimi's suggestion. Thanks!
0.0.3
Disable "unknown" apps (Java GTK apps, Qt apps using QGtkStyle, etc...)
0.0.2
Have the module print the program name and RGBA status to the console. Useful for making filters against troublesome apps.

LuxieRayku

7 years ago

How can I change te level ok transparency?

Report

Janhouse

7 years ago

If you are using Google Chrome or Chromium, add

!exe

to the config or flash player will crash.

Report

Enzo01

7 years ago

conky won`t running when module is loaded

Any suggestions how to solve the problem?

Report

noka02

7 years ago

need a Tutorial to do rgba transparency works.

Report

95monye

8 years ago

awesooomeeeeeeeeee!!!!!!!! :) :)

Report

libihero

8 years ago

when i tried ur command, i got:
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
gcc: librgba.c: No such file or directory
gcc: no input files

what do i do? :(

Report

TiZ

8 years ago

...not to enable rgba for Thunar, xfce4-panel, et al? I'd actually like to enable it for them, and according to what I have set up in my rgba.conf (mostly the same as your first example), those programs should have it enabled. But it shows up in my .xsession-errors that rgba for them is disabled.

Report

Tedil

8 years ago

Just wanted to note you that I use your RGBA module which works quite flawlessly, the "rgba enabled / disabled" is really useful, too.
I also linked your module here: http://www.gnome-look.org/content/show.php?content=101468

Thanks for enabling (almost) global rgba ;)

Report

jarryson

8 years ago

i installed gnome-globalmenu, and now this

gnome-globalmenu need globalmnu-gnome module. this need rgba moudule.

i tried "gcc -O2 -fPIC -shared `pkg-config --cflags --libs libgnomenu` librgba.c -o librgba.so" but not work.

Report

jarryson

8 years ago

confile = g_strdup_printf("%s/.config/gtk-2.0/%s", g_get_home_dir(), config);

should not "g_get_home_dir(), config" be g_get_user_config_dir()?

according to XDG standards..

Report

cmost

8 years ago

Exactly which development files are needed? I've installed practically every -dev package I can find relating to GTK+ but I'm getting all sorts of errors.

Report

berkanan

8 years ago

There was a typo in my example command line for the compiler commands. I typed "pkg-conifg", it should be "pkg-config". My apologies!

Report

cmost

8 years ago

Haha. I should have caught that. That's what I get for being lazy and cutting and pasting. Anyway, I managed to compile this but I have to say, I saw no benefit to using it whatsoever. Many of my favorite programs needed to be added to the exceptions list and some refused to load after the rgba module was implemented. I simply removed it and went back to my previous configuration. Obviously rgba needs a lot of work. Whose working on this? Gnome?

Report

cimi86

8 years ago

You did this:
if(colormap && gdk_screen_is_composited(screen))

but you should not check if the screen is composited, because you may have a rgba colormap on a screen without a composited window manager currently running. If you start an application and then you run compiz, the application requires restart with your code.

Report

berkanan

8 years ago

Ah yes. Did not think about that. My logic was it would be wasteful to set an RGBA colormap on a non-composited desktop. Thanks Cimi!

Report

berkanan

8 years ago

Cimi, after further investigation I found that not checking for a composited screen was very harmful. It caused many programs not to run when logging into a new Gnome session, namely gnome-settings-daemon. I put back the composited screen check, logged out and logged in and all was fine. I was able to reproduce it too, so it was not just a coincidence. Out of curiosity, I turned off compiz. I verified compiz was indeed off. I then launched gcalctool from a terminal. My module notified me that RGBA was enabled (gdk_is_screen_compoisted() has to return true). I then turned compiz back on, and the gcalctool displayed with a proper alpha channel. I am a little puzzled. Perhaps gdk_screen_is_composited() doesn't do what we think it does?

Report

cimi86

8 years ago

That means those apps don't work with RGBA and they should be fixed/blacklisted.

Checking for the composited screen is not the right approach.

Report

cimi86

8 years ago

You did this:
if(colormap && gdk_screen_is_composited(screen))

but you should not check if the screen is composited, because you may have a rgba colormap on a screen without a composited window manager currently running. If you start an application and then you run compiz, the application requires restart with your code.

Report

berkanan

8 years ago

Thank you! I'm glad you enjoy it. Unfortunately there is not much I can do for apps that do not work so good with RGBA colormaps. We will have to wait until these apps (such as nautilus) become more RGBA "friendly". For now I can only provide a way to not allow these apps to have an RGBA colormap.

Report

zniavre

8 years ago

hello
im trying your patch . it works quite well

in fact not better than first patch but not worst
what is good is the point i do not need to relog to make rgba.conf activated.

nautilus seem bugged again
and application with notification icon on systray also (pidgin first).

so im still ready to try your patch if you are working on it.

thank you very much. keep working

Report

8 years ago

0.0.4.1
Reverted Cimi's suggested change as it caused many problems when logging into Gnome.
0.0.4
Updated per Cimi's suggestion. Thanks!
0.0.3
Disable "unknown" apps (Java GTK apps, Qt apps using QGtkStyle, etc...)
0.0.2
Have the module print the program name and RGBA status to the console. Useful for making filters against troublesome apps.

product-maker 7 13

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
0.0.4.1
updated Mar 17 2009
added Mar 13 2009
downloads today
0
page views today 0