Gedit File Search Plugin 0.5 brings translations

August 1, 2011

The new release of Gedit File Search Plugin is now available! Its major new feature is that the plugin can now be translated, thanks to the work of Jean-Philippe Fleury. He has also contributed a French translation. A Russian translation was done by Andrey Sitnik, and I’ve added a German one.

In addition, the plugin code is now in an own directory so it doesn’t clutter up the Gedit plugins directory. Also, some other minor improvement have been added.

What are you waiting for? Download the plugin and enjoy. And if you don’t enjoy it :-) leave a comment, please!


Gedit File Search Plugin 0.4 released

May 10, 2011

There’s a new version available of the Gedit File Search Plugin, this time with only a few minor changes:

  • the file search can now be accessed from context menu of File Browser in left pane
  • the “Browse…” dialog now also shows remote directories (note that searching in remote directories might be quite slow, though)
  • when double-clicking on a result line, all matches are now highlighted in the document window (thanks to Rob for the basic implementation)

Download and enjoy :-) and if you see any problems (or see no problems at all), leave some feedback below!

gnome-shell: First Impressions

April 17, 2011

Just did some experimenting with new gnome-shell. Overall the usability seems to be nice; I could get used to it. The “cheat sheet” is a big help (not sure whether that’s a good or bad thing :)

Hard Problems:

  • too slow; this might be due to being run while lots and lots of applications were running on another display; or maybe the onboard Nvidia 8300 GPU is too slow for gnome-shell. Anyway switching to Overview takes about half a second, which is not acceptable for the overall usage concept.
  • no applets for CPU load monitor or system sensors. It seems that the old systray protocol is still supported, so maybe it would be sufficient to find a systray-implemented replacement for gnome-system-monitor applet. Also, no weather info in clock (I really got used to that in Gnome 2).

Soft Problems:

  • I’m missing some “rest mode” on the new desktop :-) Somehow with g-s there’s always some window occupying the screen, so there’s always some task right in front of my attention. With other desktops I could use the window’s Minimize buttons to make all windows disappear temporarily and get a mostly clean view of background image and some file icons, while all applications are reduced to some noise in the taskbar. I haven’t found a similar view in g-s yet, and it’s a bit unnerving.
  • the Applications tab in Overview takes some seconds to load, probably to display the gazillions of applications I have installed over the years. Not much of a problem if people always use the Search Bar, but still for hunter/gatherer people like me the entire Applications list becomes useless due to the lag.
  • which leads to the next point: I’d have appreciated some improvements over the Alt+F2 dialog in Gnome 2; instead it now has even fewer features. Maybe third-party tools like Gnome-Do will fill this gap.

Overall it’s certainly an interesting new desktop. If/when my home or work system becomes capable of running g-s, I will consider switching; and maybe the problems mentioned are fixed by then as well :-)

Gedit File Search Plugin 0.3 is available

March 1, 2011

Much time has passed, but after one and a half years there is finally a new release available of the Gedit File Search plugin.
This version contains mostly changes by external contributors:

  • from Martin Bonnin comes the automatic completion of directory names, and various bug fixes
  • yet another bugfix came from soiamso
  • both Strandjata and Rob have sent own implementations of the “Search for Whole Word” option
  • finally, there are now Expand All / Collapse All items in the context menu for the results

I’d like to thank all these people for their work to make this plugin better!

So, if you are looking for a simple and robust way to search through a whole directory in Gedit, download the plugin and give it a try! And if you see anything that bugs you, or that doesn’t work, or that makes you happy: leave some feedback below!

Side Note: Starting Multiple DevHelp Instances

December 4, 2009

Some time ago, a Gedit Master revealed on IRC that you can start multiple independent Gedit processes by setting the TMPDIR environment variable to another directory (the idea can be evolved into a small script).

Turns out this also works for DevHelp – hooray! Now if there was just a way to get this working for Nautilus; the devs broke this feature some releases ago, and I haven’t seen a cure so far.

Gedit File Search Plugin 0.2 is out

August 13, 2009

After long hiatus, there’s a new version of the File Search plugin for Gedit. However, the only visible change is that results are now sorted. Most changes have happened under the hood meanwhile, by reorganizing the search implementation. Hopefully this will allow for some more goodies in the future (Progress bar? Integration with some Project Manager plugin?); but for now I’m glad that this change is done.

So please give it a try, and if you notice anything weird about it, please leave a comment! I’m especially interested to hear if there’s any visible slowdown due to sorting… Theoretically it should be slower, but in practice it shouldn’t be noticeable.

Btw. many thanks for your feedback so far! It’s really good to see how the plugin is used “in the wild”, and I’m planning to get lots of the ideas and comments into the next version – hopefully without such a long delay this time :-)

Python+GTK: Getting the GError Message from a GPointer

June 28, 2009

In extension to the PyGTK FAQ entry “How can I access data returned with a gpointer?”, here’s a little snippet that extracts the GError message string from a GPointer object.

If for example you want to handle the WebKit.WebView load-error signal in a PyGTK application, you get the error description as gobject.GPointer. However, the C Webkit reference says that the parameter is a GError.

The GError C type looks like this:

typedef struct {
  GQuark       domain;
  gint         code;
  gchar       *message;
} GError;

GQuark is just a guint32.

So the gpointer points to a GError structure, and at the 8th byte in that structure there’s a char* with the message. Here’s how this message string can be extracted:

def _on_load_error (self, browser, frame, uri, gerror):
    ptrValue = int( str(gerror)[13:-1], 16 )
    StringPtrType = ctypes.POINTER(ctypes.c_char_p)
    messagePtr = ctypes.cast(ptrValue + 8, StringPtrType)
    messageText = messagePtr[0]
    print "error occurred while loading %s: %s" % (uri, messageText)

In line 3 we define a new ctypes type (StringPtrType) which is equivalent to a char**. In line 4 we create such a char** (messagePtr), and in line 5 this is dereferenced to get the char*, which is then printed.

Now, as this snippet directly accesses memory structures, chances are that any mistake will make the Python interpreter crash. Also, I’m not sure whether this is portable to other Python implementations or to other architectures; so for any real-world use cases, it would be better to change the library to return the error in a proper format instead of a gpointer.

Installing Gnome DVB Daemon on Ubuntu Jaunty

June 3, 2009

In the last few months there have appeared various blog postings on Planet Gnome about a mysterious Gnome DVB Daemon ( So I decided to give it a try on a Ubuntu Jaunty system with a DVB-T USB stick. The hardware itself was detected just fine by the kernel, and after some w_scan fiddling Totem also offered live watching; but I wanted to see if there’s something more user-friendly available, mainly for scanning and for EPG.

For the impatient: yes, after finishing the crazy building and installation steps, it looks quite promising.

So, installation time:

Install GStreamer 0.10.23

Install Gnome RTSP Server

Install newer libgee (Jaunty only ships 0.1.3)

Install Gnome DVB Daemon

Install data files etc.

  • sudo apt-get install dvb-utils

Move Totem plugin to correct location (well… at least, on my system Totem doesn’t look in /usr/local/lib/totem/plugins/):

  • sudo cp -r /usr/local/lib/totem/plugins/dvb-daemon/ /usr/lib/totem/plugins/

Fix Totem plugin (here, Totem failed to load the plugin with error message "Non-ASCII character '\xc3' in file /usr/lib/totem/plugins/dvb-daemon/ on line 1," etc.):

  • sudo gedit /usr/lib/totem/plugins/dvb-daemon/
  • add this as first line in the file (before the Copyright line):

    # coding=utf8

For running Gnome DVB Daemon, have a look at the User Guide at . EPG, scheduled recording, and the Totem plugin (for live viewing, or viewing recordings) should work fine. Basically run gnome-dvb-setup to scan for channels, then run gnome-dvb-control, go to Preferences dialog to set up “groups” (using the channel file saved in gnome-dvb-setup), and that’s it.

Some quirks I noticed so far:

  • when using the plugin for first time after starting Totem, it will try to install a decoder for “private/teletext” but doesn’t find a matching package – that doesn’t seem to do any harm, though.
  • viewing live video in Totem using the plugin often fails with error message “Could not read from resource.” (and if you run totem on console, you can also see a “503 (Service Unavailable)” error message). No idea what causes this.
  • EPG data in gnome-dvb-control is not available for all channels. Maybe it needs some more time to collect data, or maybe DVB signal is too weak. Unfortunately the GUI doesn’t indicate in the station list for which stations it has EPG data available.

Log in for commenting?

March 1, 2009

Funny that there are still blog posts where users are required to log in before posting a comment. I wonder how many readers would go through the hassle of creating an account and logging in just to respond to a provocative post or to point out a flaw in the post.

Maybe the blog authors are always logged in and don’t even realize the hurdles they put up for others?

Gedit File Search Plugin 0.1 released

February 15, 2009

Yesterday I made the first “official release” of my File Search plugin for Gedit. If you are missing a comfortable yet feature-rich file search functionality in Gedit, this might be for you. Download the plugin and give it a try!

I’m interested in your feedback! So if you like it or dislike it, or have suggestions for improvements, leave me a comment below!