Archive for the ‘Software’ Category

Deskbar and leaftag, last-exit

Monday, March 6th, 2006

Desktop 2.0

Just because the blog writer is open i feel the need to post a screenshot of deskbar working with leaftag (it’s all betaware, but.. it r0cks !)

Choose a file
Choose one or more files, right-click and Tag
Enter the tags
Enter the tags with an Ãœber cool dialog
Enters Deskbar
Summon deskbar enter a tag, and voila ! Desktop 2.0 at your fingertips

Last exit

last-exit is a gtk implementation of the (‘social’ music streaming, gotta hate these web 2.0 buzzwords) client. Needless to say it rocks. Hard.

If you feel the need to save the song you’re currently listening on, you can use a secret patch (ask for it in IRC) that allows to dump the stream and nicely save the playing song when it has finished streaming under a given directory/artist - album - track.mp3

Last-exit player
Last exit player window. with play/pause button, like/dislike, Tag this song, Journal this song, the song metadata, and a save button which does the saving voodoo.

Please note that 0.2 version might not work with recent gstreamers for unclear reasons, the bug has been filed in bugzilla.

DBus Testing Framework

Monday, March 6th, 2006

Hello dbus coders out here, i’m pleased to announce the first release of a dbus testing framework.

What is it ?

You may know that testing dbus services or debugging dbus clients is not always easy since it involves creating services and wiring up things you don’t really want to do in a test script.

This framework (quite a buzzword) allows you to easily setup and run dbus services and clients in a linear python script.

Originally written for the telepathy framework (a inter process communication framework aiming to bring conversation as first-class desktop citizen) (don’t laugh rob), an heavy consumer of dbus stuff, and sponsored by Collabora.

Libnotify Sample

Just to have a teaser, here is a libnotify test sample, it opens a notification bubble and then close it and checks that the closing reason and id is correct:

self["notif"] = ("org.freedesktop.Notifications",

id = self["notif"]["Notify"].call("notifname", 0, "", "title", "content",[],{}, 0)

results = self["notif"]["NotificationClosed"].wait()

assert results[0] == id

Documentation and download

You can access the full explanation and tutorial and documentation on this page. For the moment the framework is a single python file available here and you can download the sample tests file to get an idea of what kind of scripts can be written.

Epiphany URL entry in monospace

Wednesday, March 1st, 2006

This is a nice trick i didn’t know about. If you ever wanted to have a monospaced font for your location entry in epiphany (it works with galeon too), because monospace is nice, and easier to correct, and you can spot errors, here is how:

Monospace font in the entry

Put this in a file called ~/.gnome2/epiphanyrc:

style "mono" { font_name = "Bitstream Vera Sans Mono" }
widget_class "*.EphyLocationEntry.*" style "mono"

You can of course tweak the font settings if you want, say, Comic Sans MS 🙂



Friday, February 24th, 2006

A quick note to let you know i’ll be present at the FOSDEM this weekend, and i hope to see some gnome heads there, page about the Brussels event has a great talks schedule and some people coming there, nice !

I’ll be present at the Ubuntu-be meeting, to hear Ploum’s speech… If you are belgian and interested in the initiative, feel free to join !

J’espère aussi que Louvain-li-nux sera dignement representé et qu’on pourra se rencontrer là-bas 😉

Deskbar 2.13.9x series and invest-applet

Saturday, February 4th, 2006

Deskbar Beta

A little update on the deskbar-story. We managed to introduce the incredible new UI in the beta releases of deskbar (2.13.9x series).

This was thanks to the hard work of Mikkel Kamstrup, and the moral support of Nigel Tao.

They both have nice juicy screenshots and screencasts made with the 1337 tool byzanz. They also presents the new icon, with even more Tango love..

Here are new ones just for you !

Beagle matches
Beagle returned some matches
Beagle snippets
Note the snippets now returned by beagle

As always, the more we receive feedback in the bugzilla, the more deskbar will be rocking at the official gnome release.

We also need feedback about the new UI, could it be enabled by default, good/bad points, etc. Come and discusson IRC (#deskbar on gimpnet) or the mailing-list.

Invest Applet

I have made very small changes, cleaned up the code, and removed useless stuff. I doesn’t have any new features..

Fun with python

Friday, January 20th, 2006

Fun python snippets

Here is a short list of python WTF’s i often come across in my own code, debugging
those is quite hard..

Tuples are immutable ?

a = ([],[])

# Modifying a tuple ?
a[0] += [1]

print a

Weird list references:

a = [[None]*4]*3
a[0][0] = 1

print a

Import madness:

* in

* in
import mod1
def set_foo(i):
mod1.FOO = i

* in
from mod1 import *
import mod2
print FOO

Run "python"

Weird variable scoping:

* in
a = 3
def foo():
return a

if __name__ == "__main__":
for a in range(3):
print foo()

* in
from mod1 import *
a = 6
print foo()

Compare "python" and "python"

Of course these snippets are a bit convoluted, but I often find these patterns appearing randomly..

How much of them have you got right without looking at the answer before?

Stock Trading, yay !

Wednesday, January 18th, 2006

On stock trading

Stock trading is fun.. well, when you make money of course. There are days when you wish you didn’t buy that crappy stock, today it’s intel.
They released apparently bad numbers yesterday and took the plunge:

Uh oh !

Invest Applet

This leads me to the introduction of Invest, a replacement/companion for gtik, the stock ticker currently in gnome applets.

Feel the Tango love

It allows one to create a portfolio, and track its progress in terms of gain/losses.
It also features a yahoo graph viewer, with the options found on their website, very nerdy !


In the panel
The panel applet, with the overview dropdown
The Yahoo! chart viewer, with 1337 options
The portfolio editor, note the particularly bad taste of mine..


This is the first release, nothing official yet, but i know there are people who like these things.
I have discussed with Christopher Aillon and he gave me really nice ideas for future developpment.

Maybe this can be integrated in gnome 2.16, if I receive positive feedback 🙂

Download the invest-applet-0.1.0.tar.gz tarball !

Contribute !

I welcome any patch/comment/suggestions. The future applet will have a color indicator instead of numbers in the pane, to take les space and be less anti-private, in case someone is looking over your shoulder. Further improvements also include gconf usage and maybe general applet polishing.

To Flush Or Not To Flush

Friday, December 2nd, 2005

Ok, I swear this is not me.

Moreover, I wasn’t hacking on epiphany, but reading Slashdot !

deskbar-applet hotness

Sunday, October 2nd, 2005

Deskbar Applet

Recently Nigel Tao posted on desktop-devel the announce of deskbar-applet, which was intended as a browser-like keyword-driven url bar. You type a web address, or an email address, or a file name, or some keyword then the arguments, an it shows a popup with possible choices from there, like “Search google for foo”.

See this screencast to see the original idea.

I offered to help and we moved the code to gnome CVS under the “deskbar-applet” cvs module, see instructions at the end of the post to get and try it.


We then worked to integrate it a bit more in the desktop, so here are some highlights:

Type a filename in your home dir, like ~/Report.pdf or foo/bar.txt, and you can open that file with the associated applications. Also works with directories.

Type an email address or website name, and you can write a new mail, or surf the website with associated apps.

Type some terms and it will search through all available programs (the .desktop files). Try for example “text” and you are presented with gvim and gedit, type music and you get rhythmbox, muine banshee and other apps like that, you can then launch the program

Terms are also matched against mozilla/firefox/epiphany bookmarks, so if you have a bookmark for Entagged Website, typing entagged will offer you to launch the browser to that address.

deskbar-applet will also use your smart bookmarks wisely. type a search term (“steve” for example), you are then presented a list of smart bookmarks to use with the entered term. I have a Gnome Bugs bookmark in epiphany, that i use with bug numbers, i can enter a number in deskbar-applet and select the “Search Gnome Bugs for 10000” entry and be there. Same with google for example. This stuff will soon work with firefox, allowing to use its search engines.

More a gadget: type a gtk bookmark (the ones shown in the file selector) and you can open nautilus in it

And you can also get rid of mini-commander applet, since typing a program name allows you to open it directly


Some things that are left to do:

  • Use galago python bindings (which are coming, according to ChipX86) to autocomplete emails by name and addresses, and also integrate with gaim contacts, allowing to send IM’s by typing the name.
  • Use beagle, when available to do some background querying of typed terms
  • React to filesystem changes through gnome-vfs monitoring to add on-the-fly newly installed programs
  • Support for recent files
  • A sane way to handle caching and presenting a good (not too long) list of matches
  • More in the TODO file in the archive/CVS

We would really appreciate any contribution: ideas or backends, core code, etc.

Also worth mentioning is the fact that the startup isn’t threaded and takes some time because it must index all the interesting files each time. This has to be improved of course.

Try it !

I updated the tarball a couple of hours ago wwith an updated version which fixes lots of small bugs, like missing file existance checks and data sanity, redownload if you got an old version.


Deskbar-applet can be checked out with:

cvs co deskbar-applet


Grab the 0.5 tarball here.


For gentoo users there is an ebuild in BreakMyGentoo.

Building and running

It requires python 2.3 and the 2.12 version of gnome-python and gnome-python-extras. Then:

./configure; make; sudo make install

You can also test it uninstalled by running the ./deskbar/deskbar-applet -w in the source directory, this will create the search bar in a standalone window.

Gedit Python Plugins

Friday, September 9th, 2005

I have been putting together a python plugin system for gedit, so far it seems to work:

Gedit showing the python console

I heavily used the nautilus-python, and epiphany source code to see how this is done, thanks to them !

Notice how the window title has been updated by the command in the console. The clever reader may also recognize the same python console as used in epiphany, simply because i just stole all it’s code, thanks Adam Hooper !

Now for the code, it looks like:

import gedit

# Inheriting from gedit.Plugin is the key here
class MyPlugin(gedit.Plugin):
	def __init__(self):

	def activate(self, window):

	def deactivate(self, window):

	def update_ui(self, window):

The three callbacks are the same used for C plugins, you can do your init/deinit stuff and react to UI changes. The other thing to do is to write a xx.gedit-plugin file to tell gedit that there is a plugin:

[Gedit Plugin]
Name=Python Console
Description=A Python Console inside gedit.
Authors=Raphael Slinckx 
Copyright=Copyright © 2005 Raphael Slinckx

You must specify the langage type, so gedit knows which loader to use, and use Module to give the module name of your plugin, generally the filename without the .py extension, but it can also be a directory containing !

Now, Paolo if you don’t mind, you can come back on IRC 🙂