s/Apache/lighttpd/

NerdOCRACY, the server hosting barisione.org, moved to lighttpd as it’s less resource-hungry and easier to configure.

I had only some problems with WordPress, to have clean addresses like http://www.example.com/about instead of something like http://www.example.com/?p=123 it uses this htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

I resolved using server.error-handler-404 as suggested on snippets.dzone.com:

$HTTP["host"] == "www.example.com" {
    server.document-root = "/usr/share/wordpress"
    server.error-handler-404 = "/index.php"
}

Some notes on my SOC proposal

Reading some comments on my SOC proposal I have the impression that someone didn’t understand what I’m going to work on, I don’t want to write yet another Samba-like program but an application to send files over a LAN without the need to share folders.

Systems like Samba or FTP are useful at home or work when you want to permanently share a folder, but often people just want to quickly send a file to some specific person. For that you do not want to first put it in your shared files and then tell your contact that he/she can find it there. Moreover using Samba or FTP means that you have to handle permissions and passwords or just have a public folder available to everyone, which could be a security problem. So on occasional situations just right-clicking on a file and using “Send to” (through a nautilus-send-to back-end) to send this file to a person is a lot nicer.

Recently Xavier Claessens, the author of gossip-telepathy, started to work on grapevine, a modular version of gossip using Nokia’s mission control. A good idea would be to work on it adding file transfers capabilities instead of writing a separate GUI, this way other protocols could benefit of my work, making easy to send files using every chat protocol.

Note that I’m not going to invent new protocols, I will use XMPP (aka Jabber) and in particular I want to work on telepathy-salut, a Telepathy connection manager for XEP-0174, the protocol used by iChat for serverless chats on a LAN. For file transfer stuff I’m going to base my work on the code written by Mads Chr. Olesen for the last year soc on collaborative applications using Telepathy.

Update: The project has been accepted and it’s now called Telekinesis.

purge included among the official Mercurial extensions

When using CVS I always use cvspurge (from the CVS Utilities package) to delete the auto generated files that are not deleted by make distclean, this is useful to test local and uncommitted changes in the otherwise clean source tree.

This is why some months ago I wrote a purge extension for Mercurial. Now my code, improved by Emanuele, has been included among the official extensions so it will be shipped in the Mercurial packages of all distros.

Simple user-to-user file transfer without configuration in a LAN

There are many solutions to share one or more files, from setting up a Samba share, to a personal directory in a HTTP or FTP server, they have one big common flaw: they do not “just work”. As a consequence people often use services relying on an external server (such as email and chat), or removable devices. In some cases it is not even reasonable to do server-based communication, as is the case of meshed networks.

An ideal system should automatically discover other users in the neighborhood, list them and let the user choose who to send files. The system should also work without any configuration, without the need to tell one’s IP address, and without requiring any operation from the administrator, such as setting up a server or configuring a service.

For my dissertation I’m going to develop a program to satisfy those needs enabling users to easily send and share files over a LAN and I want to propose it as a Summer of Code project for GNOME. Detailed proposal here. Anyone want to mentor me?

Update: The project has been accepted and it’s now called Telekinesis.

GRegex in GLib

This morning I committed GRegex to svn, so glib 2.14 will have regular expression support. GRegex is a wrapper around the PCRE library by Philip Hazel that has several interesting features:

GRegex has a nice GLib-ish API that wraps PCRE functions and adds other features:

New mobile phone and Bluetooth

My two years old mobile phone died, so I bought a Nokia 6111, a small, nice and very usable phone.

This is my first Bluetooth mobile phone, so I tried for the first time Bluetooth on my MacBook. On Debian it works out of the box (you only need the bluetooth package), but Debian doesn’t have packages for GNOME Bluetooth, so I tried the packages from tuxfamily.org. To use them install the GPG key:

wget http://download.tuxfamily.org/osrdebian/61B8DB62.gpg -O- | apt-key add -

Then add the repository to /etc/apt/sources.list:

deb http://download.tuxfamily.org/osrdebian unstable gnome-bluetooth

gnome-obex-server (the program used to receive files) works, but gnome-obex-send (the program used to send files) cannot list devices even if “hcitool scan” is working correctly. This Ubuntu bug describes the problem and suggests to use “hciconfig hci0 inqmode 0”, but it doesn’t work for me.

I’m going to use Bluetooth only a few times and I’m lazy, so I decided not to solve this problem and to use a simple script to send files to other devices:

#! /bin/sh

if [ $# -lt 2 ]; then
    echo "Usage: $0 DEVICE-NAME FILES"
    exit
fi

ADDR=`hcitool scan | grep $1 | awk '{ print $1; }'`
if [ -n "$ADDR" ]; then
    shift
    gnome-obex-send -d $ADDR "$@"
else
    echo "Device `$1' not found" >&2
fi

A more annoying problem is that, when I try to use Bluetooth, I get disconnected from wireless. Dear Lazyweb, how can I solve this?

WinCalendarTime 1.0

Not as useful as the Gnome clock applet, but still useful when you are forced to use Windows XP, WinCalendarTime replaces the standard Windows clock with an enhanced one, if you click on it a calendar is displayed.

WinCalendarTime

This new version contains only some bug fixes. I’m using Windows only a few hours per month, so I’m not going to work on new versions, if you want something better just switch to Gnome 🙂

Update: I was asked how to translate WinCalendarTime in other languages, if you are intersted read this.

GtkSourceView licensing

GtkSourceView is currently licensed under GPL but it should be relicensed under LGPL, the main authors agree on this but we have to ask to every contributor. Is anyone volunteering to get all the permissions?

I have extracted a list of contributors from the ChangeLog, but it may be incomplete and contain translators, that should be excluded.

If you are interested to help add a comment to bug #159134, to get more information you can contact paolo or me on the #gedit channel on irc.gnome.org.

gnome-main-menu

Recently Miguel de Icaza blogged about version 2 of gnome-main-menu, available from Gnome’s SVN, so I decided to give it a try.

I’m using gnome-main-menu both on my every day environment (Gnome 2.16 from Debian Experimental) and on the Gnome I build from SVN using jhbuild. For the latter I patched gnome-desktop and gnome-panel with the files found in gnome-main-menu/patch.

gnome-main-menu
gnome-main-menu in action

The version I compiled is uglier than the one shown in the previous screenshot (copied from Miguel’s blog) and it’s lacking some features, such as the “Shutdown” button, does someone know why?

I prefer the newer version because it’s more usable but it isn’t perfect. First of all it’s slow, it leaks memory (it’s using 200 MB after some hours!), but I’m sure that these problems will be solved before a stable release.

I like the idea of the “Applications”, “Documents” and “Places” buttons but I don’t like how they look, they make the interface too chaotic. Moreover they are buttons but behave like tabs.
Probably people using a single panel layout prefer to have only the “Computer” button in the panel but I’d like to put the three buttons directly in the panel, as done by Gimmie. Another idea to steal from Gimmie is the use of different border colors for the different sections.

A thing I hate is to have an external window when “More Applications…” is clicked, why not to put the application links directly in the menu? Windows Vista does it when you click on “All Programs”, but it sucks because the menu is long and deeply nested. The normal menus in Gnome do not have these problems so I would like to have them in the main menu, as in the following mockup.

Applications in gnome-main-menu
Mockup: Kill the application browser

I like the search box at the top, but it opens the beagle-search window! I want the results in the same window! I want to type “gedit” and press return to open my beloved text editor!

Search results in gnome-main-menu
Mockup: Search results in the menu

In gimmie there is a “People” window, would it be possible to have something similar in gnome-main-menu?