Ikke's Blog

Archives for: January 2005

Jan 31
GOB signals walkthrough

I mentioned the "GOB" utility a couple of times already, but the more I use it, the more I start to love it.

I'd like to take you on a little "Glib/GObject Signals" tour today.

First of all, what are Signals? The GObject Signal API states:

Signals

Jan 30
Python for Dummies, and update

Jono Bacon wrote an article on Python coding for beginners, using PyGtk and Glade to create GUI's.
The article was inspired by his work on an application handling iRiver devices. It is (AFAIK) using HAL too.
Guess it's time for me to (re)start doing some Python coding too... Get some more skills ;-)

I fixed some (mail handling) bugs in Beagle yesterday, got the "Open IM" functionality of Best working locally (again using a patched Gaim). Mail patch should be applied soon.

[edit]Patch has been applied: link (and other updated files)[/edit]

Trying to get some GObject's for CDIS working using GOB now. GOB really rocks, it's so easy to write code once you read the complete manpage :-)

Plea"se note Ivman got a new Wiki, thanks to Rohan.

Jan 24
Beagle installed

Got beagle-cvs installed properly, started hacking on an Irssi log backend already. It rocks :-)
And so do the guys in #dashboard@GIMPNet ;-)

I'll report on how to install it (on Gentoo, of course) later.

Jan 24
Snow

Seems to be a very "cool" (;-)) thing lately to show some pictures with snow in your area in your blog. So here are mine (link won't stay valid).



Some more in my gallery.

Not as impressive as the pictures by Garret LeSage, John "J5" Palmieri, Tim Ney, John Trowbridge, Nat Friedman, Joe Shaw, Luis Villa and many more, but well...

Going to write a Beagle-cvs ebuild now :-)

Jan 24
Beagle

Beagle is so damn impressive. Check these demo's.

Jan 23
Gnome coding, and presenting CDIS

I started looking into Gnome coding last days, by reading some of the great tutorials in the Developer section of the Gnome site. Currently I'm reading the stuff on GObjects, which is very interesting. I first read the article on IBM DeveloperWorks regarding "Wrapping GObjects in Python", which is a neat way to use C code in Python. It's also written by Ross Burton, as you might remember the author of the Contact Lookup Applet.
Regarding that applet: Ross is not willing to incorporate my Gaim patch, because it is too much bound to Gaim, and requires a patched version of Gaim. Too bad, Cdis should provide a solution for this.

Now what is Cdis? It's the new name for what I previously called DAL. Cdis stands for "Common Desktop Integration Standard", a name proposed by John "J5" Palmieri. Some information regarding it I sent to the Xdg list at freedesktop.org is available here. Beware, the thread got corrupted somewhere and is attached to the pkgconfig2 thread, so it continues here

I had some talkings on IRC with JakobS, the KDE maintainer of the MulticastDNS features coming in KDE 3.4, regarding automatic code generation. It will be fun to get this working (XML2C, XML2GObject, XML2KObject,...). It should be possible to do this without writing real code, just using XML and XSLT, which generates the necessary code for various platforms, based on a CdisInterface description file.

For the GObject creation, which is a very tedious task, I've been looking into Gob, the GObject builder. It just rocks. This is a sample Gob file:

requires 2.0.0

%{
//This should not be necessary, but well...
#include <stdio.h>
%}

class Ikke:GobTestOne from G:Object
{
        private int test=1;
        property INT test
                (nick = "test",
                 blurb = "Testje",
                 export,
                 link);

        public void
        printtest (self)
        {
                g_printf("%d\n", self->_priv->test);
        }

        public GObject *
        new (void)
        {
                return (GObject *) GET_NEW;
        }
}

As you can see, a very simple format.
If I process this file using gob, this is what I get:

$gob2 gobtest1.gob
$ ls
gobtest1.gob ikke-gobtestone-private.h ikke-gobtestone.h
ikke-gobtestone.c
$ wc -l ikke-gobtestone*
22 ikke-gobtestone-private.h
276 ikke-gobtestone.c
75 ikke-gobtestone.h
373 total

which is rather impressive. The generated code is also very usefull.

A "bigger" Gob file (just a sample) can be seen here, whilst this is a sample C file "using" the object. Impressive, huh?

Gnome 2.10.0 beta1 tarball creation tomorrow, launch on wednesday. Jay! I got the webcal in my Evolution Calendar ;-)

That's it for now, maybe I'll have some usefull stuff to say soon ;-)

Jan 20
Contact-lookup-applet with Gaim integration

Long time ago.

I've been working on a lot of things lately, hope I'll be able to report on them later, now something I did today.

I integrated Ross Burtonini's Contact Lookup Applet with Gaim.

This is the thing "in action":


The standard contact view


New button



Conversation opened

Actually this was my first Glade/GTK+ code ever, although not that much ;-) And it rocks :-) Also the Gnome devs on #gnome@GimpNet and the Gaim guys on #gaim@Freenode were a great help when needed. Thanks a lot!!!

If there's already a conversation running, that window will be focused, and if Gaim-Remote isn't running, there'll be a small error dialog box.

Gaim also needs a patch for now, but the necessary features should be standard in upcoming versions.
Make sure you got the "Remote Command" plugin enabled too.
If you're not using a patched version of Gaim (actually not Gaim, but Gaim-Remote) the "Start IM" button will also be displayed, but when pressing it, nothing will happen (no crashes or so, just nothing).

Current CLA and Gaim patches are available here.

I'll send an email to Ross, maybe this stuff can get into CVS?

I hope you like it :-)

Jan 15
Movie - Oceans12

Saw Oceans 12 yesterday evening. Never saw Oceans 11, so I can't compare, but it made me think of "The Italian Job" and "Catch me if you can".
Not a bad movie, if you're willing to turn off your brain for a while.
The trick with Julia Robberts is nice :-p But I won't say more about that B-) ;-)
By the way: funny comment on IMDB. It reveals the Robberts trick though :-(

Oceans12

Ikke • LifePermalink 1 comment
Jan 15
Done today

Not much DAL work, next to some arguments on the mailing list. I'll code some more stuff tomorrow. First need to work some things out.

Worked a bit on the frontpage. It's pure XHTML/CSS again now, SEO-optimized (simple html, headings, good meta tags,...). It even looks good in links :-)
Also did some mod_rewrite work for this blog (http://blog.eikke.com/ikke works now :-) others should follow), and error page handling (404's are redirected to / now).

I'm quite tired, need some sleep, first exam on tuesday. Bloody chemistry.

Jan 13
DAL redefined

After quite a lot of (positive) replies on both desktop-devel@gnome and xdg@freedesktop, I wrote some little summary of current state.
This stuff is quite different from the initial implementation proposition, but well :-)

Thanks to RealNitro and WindowLicker I got my frontpage pure XHTML-Strict/CSS now. Thanks guys :-p

Jan 13
New frontpage and mailings

Check it here :-) Needs some more cleaning of HTML code, but well. Thanks to RubenV for the base template.

Sent an RFC to freedesktop.org's XDG list, and one to Gnome's desktop-devel. Let's hope I'll get some responses...

Jan 12
Review and comments asked

Please review this and tell me what you think.

Is it worth the effort? Has it got any use? Is there already some project like this? Enhancements?...

Thanks, Ikke

Jan 12
Gaim plugin... working

No proof/evidence for now, some people "enjoyed" the working state already ;-) I'm set on "away" state now when the screensaver listener detects a running screensaver, and I'm online when the screensaver is stopped.

Needs a lot of cleanups...

And I'm thinking of a new project, which (next to other things) incorporates this thing. Similar to HAL, but at desktop level -> DAL. I'll write more about it later.

Ikke • LifePermalink 16 comments
Jan 11
GaimDbus

A picture says 100x more than words...

GaimDbus sample 1 (thumb)
(thumbnail is link to original picture)

This makes me feel good :-)

The picture shows how I started and stopped xscreensaver a few times (by issuing "xscreensaver-command -activate" on a console), in the bottom left corner you can see the desktop-event-notification executable running (I did not daemonize it yet), and last but not least the Gaim debug window where my Gaim plugin shows it's received some DBUS messages sent by the server.

There is on major bug: XScreensaverStarted isnt always catched by the listener, nor by "xscreensaver-demo -watch". I will have to contact the xescreensaver maintainer I guess.

Next to this: the actual "set me away" isnt done yet. This shouldn't be too hard now, calling some functions when a DBUS message is received.

I included all necessary autotools stuff too, so it's as easy as sh autogen.sh && ./configure && make && make install.

I hope I'll be able to code the other parts tomorrow. Sleep now.

Big thanks to everyone hacking on DBUS, the guys at #gaim@freenode, and Google ;-)

Jan 11
Session Bus working, Gentoo GDM patch and Xscreensaver jay'ness

signal interface=com.eikke.DesktopEventNotification; member=XScreensaverEvent; sender=:1.58
string:ScreensaverStarted
signal interface=com.eikke.DesktopEventNotification; member=XScreensaverEvent; sender=:1.58
string:ScreensaverStopped

Next to this, I got my session bus working thanks to the nice guys on the DBUS mailing list, Ross' IBM article and some custom hacking.

Now my session bus is started when I log in, patch for GDM's Xsession file submitted into the Gentoo Bugzilla

Next task: simple DBUS listener to test the Xscreensaver notification stuff, and write the Gaim plugin.

[edit]
DBUS test listener is done:

./dbus-watch-test
Event received: ScreensaverStarted
Event received: ScreensaverStopped

TODO:
- Gaim plugin (get DBUS inside Gaim's Glib mainloop)
- Daemonize the event submitter

Jan 10
DBUS troubles, stupid HAL patch, and gaim-xscreensaver start

Still haven't got the DBUS session bus working :-(

Made a patch for HAL-CVS so it broadcasts kobject-uevents to DBUS. It's of no use. Will give it some usefullness (SP?) tomorrow :-)
Current patch is here.

Started working on the xscreensaver <-> DBUS link. Some testing code is here, not indented. It's buggy, so don't look at it too closely.
sGapor gave a good hint about another possible use of this daemon: pause your media player when your screensaver is started.
Creating the Gaim plugin to idle you when the screensaver is started shouldn't be too difficult now I looked at the sources of gaim-remote.

Anyone's got the name of a music group that plays Turkish traditional music?

[edit] Just got an email from Havoc with some pointers on how to try to get the system bus working. Tomorrow...

Ikke • LifePermalink 2 comments
Jan 9
New subdomain UI, me on dbus@lists.fgo, and XScreensaver security considerations

I got a (IMHO) nice UI on code.eikke.com, using AutoIndex. It still needs some hacking: I want to get some mod_rewrite working, so I can use links like http://code.eikke.com/adir/foofile, which will then be interpreted as http://code.eikke.com/index.php?dir=adir&file=foofile. AutoIndex should generate similar code too then. This way, Google (which doesn't like GET arguments) will index my pages too.
Oh, and I want a GNOME iconset. I had to choose between WinXP and KDE...

Started a discussion on kobject-uevents and DBUS on the mailing list today (link). I've been thinking about it last hours, and my proposition is stupid. Kernel events shouldn't be sent out by the DBUS daemon itself. This should be done by some separate daemon.

If only I could get my session bus working :-(

Normally I should be allowed to create a Subversion repository on my domain once more. Jay :-)

After my blog post about xscreensaver and DBUS, jwz, the xscreensaver developer, posted a comment. I mailed him regarding this issue, check "More" for a digest of our discussion.

Had a performance with my orchestra today. We played the first part of the "New World Symphony" by Dvorak, and the Ouverture from "The Barber of Seville" by Rosinni. Some minor mistakes, but it was pretty good. The public was enthousiastic.
Next performance: April 23, Conservatorium Ghent, Belgium.

=> Read more!

Jan 8
DBUS'ified XScreensaver

Didn't have much time to code today, had to visit some family. Had a good meal ;-)

I hacked some DBUS support into XScreensaver today. Xscreensaver *should* send out a signal on the session bus now when the screensaver starts, or when it stops. Now guess what: it doesn't work (for now). Some security thing which disables me from sending events on my session bus :-(

Patch is here.

When this works, I will write a plugin for Gaim, which listens to the session bus. If it catches a screensaver event, it'll set your status to "Away" when the screensaver is started, and make you "Available" when the screensaver is stopped, if you were so when it started.

I created a new subdomain, http://code.eikke.com, where coding stuff will be hosted. I'd need some fancy "index" script, because Apache indexing doesn't work :-( I'd also need a decent Subversion repository. Maybe I should ask the guys who are so kind to host me (you know who you are).

Got some other new DBUS-based idea too, I'll discuss it on the dbus and gnome-desktop mailing lists when I get time.

Sent the mail to the dbus list regarding the kernel events stuff. Now it looks like I wasn't subscribed on that list anymore, and I need moderation... Hope they'll read and allow it soon.

Jan 8
Dbus kernel events part 2

I got the appended strings working, thanks to the patch to udev-ize CUPS (here).

No screenshot for now, this is some of the result (from dbus-monitor):

signal interface=org.kernel.KobjectUevent; member=KobjectUevent; sender=:1.20
string:ACTION=remove
string:DEVPATH=/module/ext2
string:SUBSYSTEM=module
string:SEQNUM=1061
signal interface=org.kernel.KobjectUevent; member=KobjectUevent; sender=:1.20
string:ACTION=add
string:DEVPATH=/module/ext2
string:SUBSYSTEM=module
string:SEQNUM=1062

Some more code-cleanups, and its done :-)

Next thing TODO: get on the DBUS mailing list, ask whether it's usefull to write a patch which incorporates this into DBUS itself (optionally), so one more daemon isn't necessary.

Current code is here. Watch out: it's not completely finished!!!

Jan 7
Kernel Events to DBUS

After my posting on LKML and the following answers and hints, I started hacking a bit.
This ended up in a utility that listens to kernel kobject_uevent events, and sends these to the DBUS System bus, so other applications can listen to DBUS to get kernel messages.

Evidence:

Dbus kernel events
(thumbnail is link to original image)

One problem for now: extra strings I pass with the DBUS message aren't sent. Got to look into this later... I wish there was more DBUS coding documentation, and more samples.

Ikke • LinuxPermalink 1 comment
Jan 7
Gnome, kernel work and Gaim

Currently busy catching up woth new Gnome improvements. Gnome 2.10 (dev 2.9) looks promising once again :-)
I've been on GimpNet (irc.gnome.org) for a while too now, just met scapor who owns this blog. Great source for new Linux-desktop users, and even advanced users can learn new stuff :-) Keep going!

Kernel events were merged into the Linux kernel, which should simplify kernel<->userland interaction a lot. There's a small utility called kdbusd which shows a prototype of listening to these kernel messages, and sends them to the DBus System Daemon. kdbusd could be broken now tough: I didn't test it yet, but it looks like the 2.6.10 uevent implementation is somewhat different than the one Arjan Van Der Ven, Robert M. Love and Kay Sievers wrote.
I started hacking more uevent calls into the vanilla kernel...

One nifty feature in Gaim I wanted to blog about some time ago is the "Expand" feature. I was too lazy to make screenshots in that time tough ;-)
Now I found a nice screenie and explanation of it in the GnomeTux blog I mentioned at the beginnning of this post. Check it here. This is the screenshot:

Stuff on my TODO list:
- Gphoto2 Gnome-VFS provider, so I can browse my Canon Ixus 500 files in Nautilus. The camera does not support usb-storage, so it can't be mounted. Gphoto2 supports it perfectly tough. But I dislike Gthumb...
- Work on Gaim - Evolution links.
- Make some program/plugin/... that enables syncing my new Nokia 3100's Agenda to Evolution's Calendar. There is a lib called Gammu that is capable of extracting data out of this phone, but there is no Evolution link. I'd need to test Gammu first tough (anyone got a DKU5 datacable?).
- Some more stuff I forgot now.

Got to study some more now, bloody chemistry.

Jan 5
Official statement

WE'RE UP AGAIN :-D:-D:-D:-D:-D

I'll explain the downtime later ;-)

Ikke • LifePermalink 1 comment

Categories

Who's Online?

  • Guest Users: 435

Misc

XML Feeds

What is RSS?