cairo-dock, quick update
Karl sent me an improved version, which further streamlines the placement-code. I added an animated background and shaped-input also. But it turned out that shaped-input is to costly to be updated with every redraw using the same rendering code. Doing an approximation with bounding-boxes is better suited. Furthermore Karl reported, that he experiences some major memory-leaking when using glitz under Xgl/compiz and a corruption of the text-labels. I’m able reproduce this too. Nasty! But not using glitz and everything is ok again. In contrast: using plain Xorg and xcompmgr those glitz-related issues do not arise. Hm. However the preformance leaves much to be desired if the CPU is under a heavy load (e.g. compiling), no matter if using glitz or not. Eye-candy clips for the day:

huge (click to play back, ogg/theora, ~2 MBytes)

the same, a bit smaller (click to play back, ogg/theora, ~1.2 MBytes)
I feel like a rewrite. The code grows messy and one starts to see that it all began as “quick&dirty”. I’ll try to revamp everything in a clean fashion until guadec.
June 17th, 2006 at 7:17 pm
You and the communauty do a really good work. Thank you.
June 17th, 2006 at 10:38 pm
2006-06-07, Macslow said
>> ATTENTION… it is highly unlikely that I will make a full dock-like application for gnome (or plain gtk+) out of this. This time I will stay strong and resist any forces that attempt to lure me into doing this. It happend with cairo-clock. But not this time *g*. Of course it does by no means prohibit anybody else to pick it up and do so.
Way to go! Please don’t resist these dark forces that makes you create cool things. They will get you anyway.
June 17th, 2006 at 10:39 pm
s/makes/make/
June 18th, 2006 at 5:58 am
Please allow for proper spacing around icons, so things are so jammed. I would say have a preference, that would allow you to do: Icon Padding: 1 - 20px; ?
Also, please allow for a fully transparent background.
Ok, ok, I know you aren’t going to release this, but…. or someone else is going to do it, but if they take over the project, they too should consider these items.
There is nothing worse than a bunch of icons on a dock with crappy padding.
Gnome panel currently suffers from this oversight.
June 18th, 2006 at 6:26 am
@Trae McCombs: The background can be disabled (made fully transparent) already via a command-line option. The icon-spacing is also easily ajustable (only not exposed as an optoin yet).
June 19th, 2006 at 3:02 am
Sweet! That is good news to hear. Could you please keep me updated somehow (feel free to add my email address to a list or something) on the status of this project? If you are too busy, I totally understand. Thanks for the work you are doing.
June 19th, 2006 at 5:02 am
Hey macslow, I’m totally impresed by the excelent work you are doing. Keep up the good work. You are an example to follow. I would love to contribute, but its been a while since I don’t program. Could you give me some references on where to start? Some literature or something? Also I would like to know where is the latest code for the cairo-dock. Cause I can just find the one without the background.
Cheers and congrats again!!
June 19th, 2006 at 9:40 am
@Trae: eMail on it’s way.
@Fernando: Thanks a lot! Just watch http://www.gnome-dock.org form time to time. It will pick up what cairo-dock left… sort of.
June 20th, 2006 at 10:37 am
Hello, i have successfully installed cairo-dock on my laptop (with some hacks: windows placement, …) .
There is a big problem for now: This dock need to be above others windows, it’s pretty cool. But as you use a gtk window, it make user unable to use applications because when you click you click in the dock and not in the application. I tried to change windows size but then cairo doesn’t render in the good part of window.
I’m really not a devel, so i can’t help more.
Thanx for your work.
June 20th, 2006 at 8:11 pm
cario dock doesnt compile on ubuntu dapper. it gives me error
…
cairo-dock.c:108: error: syntax error before ‘g_DimensionData’
…
cairo-dock.c:109: error: syntax error before ‘g_iCurrentWidth’
…
cairo-dock.c:110: error: syntax error before ‘g_iCurrentHeight’
…
cairo-dock.c:111: error: syntax error before ‘g_bClicked’
cairo-dock.c:111: error: ‘FALSE’ undeclared here (not in a function)
…
cairo-dock.c:112: error: syntax error before ‘g_iClickedIcon’
…
cairo-dock.c:116: error: syntax error before ‘g_uiRedraws’
…
cairo-dock.c:117: error: syntax error before ‘g_uiEvents’
…
cairo-dock.c:118: error: syntax error before ‘g_uiTimeoutHandlerId’
…
make: *** [cairo-dock] Error 1
June 21st, 2006 at 1:47 am
@haani: You are obviously missing several if not all header-files for gtk+, cairo, glitz and so on. Please make sure you’ve installed them. Finding out about not-installed header-files will be easier once the dock got some autotools-love applied.
June 21st, 2006 at 5:40 am
how can i get those headers installed i am using ubuntu dapper gnome?? i am kind of a newbie to linux so can u please explain it to me?
June 24th, 2006 at 11:03 pm
apt-get install whatever is needed. librsvg is needed.
June 26th, 2006 at 3:01 pm
the source misses a file?
svn co http://www.gnome-dock.org/svn/
dane@DaNebox ~/tmp/gd $ cd svn
dane@DaNebox ~/tmp/gd/svn $ make
cc `pkg-config –cflags cairo gtk+-2.0 librsvg-2.0 glitz-glx` -DHAVE_GLITZ `pkg-config –libs cairo gtk+-2.0 librsvg-2.0 glitz-glx` -lm cairo-dock.c -o cairo-dock
cairo-dock.c:53:25: error: cairo-glitz.h: No such file or directory
cairo-dock.c: In function ‘dock_cairo_create’:
cairo-dock.c:175: error: too few arguments to function ‘glitz_surface_attach’
cairo-dock.c:179: error: too few arguments to function ‘glitz_surface_attach’
cairo-dock.c:181: warning: assignment makes pointer from integer without a cast
cairo-dock.c: In function ‘main’:
cairo-dock.c:995: warning: assignment makes pointer from integer without a cast
cairo-dock.c:1112: error: ‘glitz_color_format_t’ has no member named ‘fourcc’
cairo-dock.c:1112: error: ‘GLITZ_FOURCC_RGB’ undeclared (first use in this function)
cairo-dock.c:1112: error: (Each undeclared identifier is reported only once
cairo-dock.c:1112: error: for each function it appears in.)
cairo-dock.c:1119: error: ‘GLITZ_FORMAT_FOURCC_MASK’ undeclared (first use in this function)
make: *** [cairo-dock] Error 1
June 26th, 2006 at 5:54 pm
i have corrected this error cairo-dock.c:53:25: error: cairo-glitz.h: No such file or directory
but now
make
cc `pkg-config –cflags cairo gtk+-2.0 librsvg-2.0 glitz-glx` -DHAVE_GLITZ `pkg-config –libs cairo gtk+-2.0 librsvg-2.0 glitz-glx` -lm cairo-dock.c -o cairo-dock
cairo-dock.c: In function ‘dock_cairo_create’:
cairo-dock.c:175: error: too few arguments to function ‘glitz_surface_attach’
cairo-dock.c:179: error: too few arguments to function ‘glitz_surface_attach’
cairo-dock.c: In function ‘main’:
cairo-dock.c:995: warning: assignment makes pointer from integer without a cast
cairo-dock.c:1112: error: ‘glitz_color_format_t’ has no member named ‘fourcc’
cairo-dock.c:1112: error: ‘GLITZ_FOURCC_RGB’ undeclared (first use in this function)
cairo-dock.c:1112: error: (Each undeclared identifier is reported only once
cairo-dock.c:1112: error: for each function it appears in.)
cairo-dock.c:1119: error: ‘GLITZ_FORMAT_FOURCC_MASK’ undeclared (first use in this function)
make: *** [cairo-dock] Error 1
June 27th, 2006 at 10:39 am
i fixed all
one sugestion you could make like the mac os x, when you put a file over the dock that app will open that file…
June 27th, 2006 at 4:24 pm
@dane: I’m glad to see that you were able to figure out, that you where missing some of the glitz-related header files. But regarding the suggestion for this enhancement, remember that I’m not really going to do anything like a full application out of cairo-dock. This will actually happen at http://www.gnome-dock.org. We should put put some mailing-list there. I’m still at guadec (which is a totally blazing event to be attending) and actually cannot get anything done… like in hacking
It’s just that busy, interesting and thrilling… not to mention the amount of famous and ingenious OpenSource-figureheads one runs into on a hourly basis.
July 3rd, 2006 at 1:50 am
tks a lot i understand it
my only problem now is the background the fake transparency dont seems to work…. (i already posted at THE PAGE, but seems that no one looks at it)
http://img138.imageshack.us/img138/3121/cairo315bb.png
July 3rd, 2006 at 6:28 pm
@dane: There is no such thing as "fake transparency" in the cairo-dock. Either you have a compositing-manager running (you’ll have correct transparency) or not (you’ll see the black rectangle in the background).
July 14th, 2006 at 3:39 am
is it possible to actually get the sourcecode? it does not seem to be on the gnome-dock page or anywhere else i can think to look
July 27th, 2006 at 3:20 am
The websie gnome-dock.org is down. What’s up?
July 27th, 2006 at 3:57 am
@tom: I’ve no idea. I don’t run it. Karl Lattimer does. You have to ask him.
August 21st, 2006 at 9:44 pm
I get this error when launching cairo-dock:
./cairo-dock
Floating point exception
August 21st, 2006 at 10:15 pm
@ G: Try to start it with the –no-glitz option.
August 30th, 2006 at 4:04 pm
i just started cairo-dock but is only about 1 cm width and i can not see any icons. Do you have an idea where the problem could be?
September 2nd, 2006 at 1:49 am
Hi MacSlow, I was getting the floating point exception too, so I tried ./cairo-dock –no-glitz like you said, but I still get the floating point exception.
September 2nd, 2006 at 7:37 pm
Same here with ./cairo-dok and ./cairo-dock –no-glitz error.
September 3rd, 2006 at 3:15 am
@ Luigi, rodgersan: Did you also try it without the background-option (–no-background). So use –no-glitz –no-background. It maybe an issue with the gradient-drawing. BTW, did you use a compiled-binary? Right now I cannot test things as I’m still without a machine (dying gfx-card, hosed crt) and only online via a 770. But if all goes well I’ll be back in business in a week or so (getting some nice support from folks from the community).
September 5th, 2006 at 4:26 pm
Max you need to have the icons the dock is using in the same directory as the binary file produced when you compiled the code.
September 10th, 2006 at 1:44 am
With a make clean and make it compiles, but running with ./cairo-dock –no-glitz shows the following error:
undefined symbol: cairo_push_group
I compiled myself libcairo 1.2.4 but still getting that *&/%ç error!
Any ideas?
September 10th, 2006 at 7:30 am
@ MacSlow, I tried running cairo-dock with –no-glitz -no-background, and I still get the floating point exception.
September 10th, 2006 at 8:26 pm
@ Luigi, please read my previous post and try a make clean before make.
September 12th, 2006 at 1:41 am
I’m also getting the cairo_push_group error and it’s so frustrating! I compiled Cairo 1.2.4 and then was able to compile Cairo-dock..everything seemed to go fine. However when I run ./cairo-dock –no-glitz (tried with no-background as well) I get the error message:
./cairo-dock: symbol lookup error: ./cairo-dock: undefined symbol: cairo_push_group
What’s interesting is when I hit enter in the console, the focus in Compiz goes towards the bottom of my screen where it should appear but then it gives the error..it’s almost like it’s trying to draw itself but it can’t? I dunno.
September 12th, 2006 at 4:07 am
@ rodgersan, Mobilehavoc: From your stated experiences I would guess, that you’re both trying to run the self-compiled cairo-dock against a different (older) version of libcairo.so compared to compile-time (you may have passed the path to the new libcairo.so in the makefile of cairo-dock). Here’s an example… say you have an old cairo 1.0.2 installed /usr/lib and a more recent 1.2.4 installed in /usr/local/lib but at runtime don’t "tell" the dynamic linker to also look in /usr/local/lib _first_, then the symbol-lookup will fail as you both have experienced. What you can do is either fix your LD_LIBRARY_PATH environment-variable to include the additional search-path (in my example: /usr/local/lib, may be different in your cases) or just modify it temporarily calling cairo-dock like e.g.:
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./cairo-dock –no-glitz
I hope that helps. This kind of "remote support" (for pre-alpha code) isn’t something I digg, honestly!
September 12th, 2006 at 4:40 pm
Okay thanks, it worked but I’ve got an error: Xlib: extension "XFree86-DRI" missing on display ":1.0".
And it looks a bit ugly: http://img236.imageshack.us/img236/5166/capturery6.png
Any clue?
September 14th, 2006 at 6:54 am
@ rodgersan: Hm… that error means your X11-server is missing the "Direct Rendering Interface", so you have no hw-accelerated 3D. But that’s normal for a composited environment afaik. I think it’s unrelated to the artefacts you see at the icon-borders. What compositing-solution do you run? Xgl, xorg with aiglx or xorg with xcompmgr?
September 14th, 2006 at 11:48 am
Yep, after some google I found it was not related but I have a lot of issues with 3d acceleration (slower screensaver, enemy-territory, and some compiz effects). I will google again.
About the artefacts, they are showing only when the dock is animated.
I’m running xgl with a fglrx driver…
However thanks for your time and patience.
September 26th, 2006 at 10:03 pm
I have an error when I make the cairo source
make
cc `pkg-config –cflags cairo gtk+-2.0 librsvg-2.0 glitz-glx` -DHAVE_GLITZ `pkg-config –libs cairo gtk+-2.0 librsvg-2.0 glitz-glx` -lm cairo-dock.c -o cairo-dock
cairo-dock.c: In function ‘dock_cairo_create’:
cairo-dock.c:184: attention : assignment makes pointer from integer without a cast
/tmp/ccRRhIzd.o: dans la fonction « dock_cairo_create »:
cairo-dock.c:(.text+0xa0): référence indéfinie vers « cairo_glitz_surface_create »
/tmp/ccRRhIzd.o: dans la fonction « fill_text_buffer »:
cairo-dock.c:(.text+0×23e9): référence indéfinie vers « cairo_push_group »
cairo-dock.c:(.text+0×2475): référence indéfinie vers « cairo_pop_group_to_source »
collect2: ld a retourné 1 code d’état d’exécution
make: *** [cairo-dock] Erreur 1
October 3rd, 2006 at 5:06 pm
nice.but change a settings not realy comfortable/
April 4th, 2007 at 4:13 pm
Does anyone knows how cairo-dock can be installed in a openSuSE 10.2 (prequisites, already installed packages?) I would be grateful for a howto
May 8th, 2007 at 6:54 am
I have YDL 5.0 installed in PS3…i use gnome…..I really want to install your Cairo clock….I downloaded the file….Could you help me install it?…im really new to linux…..Thank you in advance
May 9th, 2007 at 10:21 am
@ rey: As there are no pre-packaged versions of cairo-clock available for YDL (as far as I know) you will have to compile it yourself I’m afraid. Since I don’t have any experience on nor access to a YDL system (or a PS3 for that matter) I’m unable to help you here. In addition to that you will need to be running a compositing-manager on your system (e.g. xcompmgr or compiz… the latter is unlikely to work as it needs proper OpenGL-acceleration via the GPU/3D-chip, which is impossible on the PS3 due to Sony’s stance regarding direct hardware-access to the RSX for Linux… they just don’t allow it and shield it behind this HyperVisor-thing, which abstracts all direct-hardware access except for the cell-CPU). cairo-clock will still work without a compositing-manager running, but it just will not look as nice. You’ll see a black rectangle behind the clock itself. You will have to search yourself for help from others (preferably from some YDL-specific forums or mailing-lists) in order to get cairo-clock running on your PS3.
November 8th, 2008 at 9:45 am
i am fascinated by the cairo-dock that i have . . . my only problem is that i cannot make the black rectangle transparent . . . is there anything i can do . . . please make your explanation as easy as possible . . . i am newbie to ubuntu 7.10 . . .
November 10th, 2008 at 9:33 pm
@ nathan: First you should consider updating to Ubuntu 8.10 via "sudo update-manager" (or via http://www.ubuntu.com/getubuntu/download or http://shipit.ubuntu.com). Secondly, run a compositing window-manager like compiz or metacity (to enable metacity’s compositor enter "gconftool-2 /apps/metacity/general/compositing_manager –type bool -s true" in a gnome-terminal, disable it passing "false" instead of "true"). Doing that will make the black rectangle become transparent. Third thing to note is, that my cairo-dock was never meant to be a real application for end-users. It was just a test-bed for investigating SVG-rendering performance with cairo using different backends. My efforts sort of kicked off a bunch of new dock-like programs like gnome-dock, kiba-dock, awn and "reborn" cairo-dock in the course of time. Of those efforts the only projects to be taken seriously are awn (avant-window-navigator) and perhaps the reborn cairo-dock… with awn being my personal favourite.