Category Archives: tips&tricks

Configuring pidgin to work with BIP

I’ve been using pidgin for some time now, as a mean to centralize all my IM communications. I really think it’s a great tool mainly because you can easily add ANY type of IM account to it… XMPP/Jabber, ICQ, MSN, Google Talk, IRC, etc… and also because it’s really cross-platform! The only problem is when I started working with Collabora and realized I was bothering people bad by constantly logging in and out of every automatic channels I had registered in pidgin. My situation is not unique, as I’m sure every developer/engineer with cross-platform tasks and/or multiple virtualized systems must encounter this frequent need for rebooting, thus, making the whole IRC community annoyed with /join and /quit messages.

The Collabora people I’m working with are in favor of using BIP, a nice IRC proxy. That being said, I thought I could offer the web a little tutorial on how to configure pidgin to work nicely with BIP, because there are some non-obvious parameters to set both on the bip and pidgin sides. I assume hereafter that you’re wise enough to read thoroughly and understand fairly the provided bip documentation. So the following tutorial will assume you’ve configured your “bip.conf” to something acceptable and that you’ve tried setting accounts in pidgin to point to your bip IRC proxy on the chosen port with proper passwords.

get ready :

IMO, the biggest challenge any pidgin user will experience when configuring his client for IRC Proxy is to overcome the sudden but painful understanding of the following fact : pidgin won’t let you create multiple IRC accounts unless they have different ‘server’ AND ‘user’ fields !  But of course, the problem is that all of your BIP-IRC servers (set in bip.conf) must be accessed using the same server (the host on which you’re running bip) and of course, you wanna log into your channels using the same username and/or nick !  So at first, I was stunned to realize that pidgin wouldn’t let me create my different accounts and considered them duplicates !! You gotta face the “an account already exists with the specified criteria” message many times to understand my despair.

But there is actually a very nice solution to this. Let’s make use of the BIP “ignore_first_nick” option! The following steps assume you’ve got a decently-configured BIP sitting (not running) on <>, and that you’re about to create, let say, 2 IRC server accounts in pidgin. Do the following :

  1. In piding, go to your accounts by striking Ctrl-A and add the first account by pressing the “Add…” button.
  2. Choose the IRC protocol
  3. Here, instead of typing your preferred username (which will become your nick if no other options are set), type a significant name that will identify the IRC server, e.g., “mozilla” if the intended IRC server is to be
  4. Enter your BIP server, i.e. the host on which BIP will run. For example,
  5. Typein your special BIP password (you’ve read the bip documentation, haven’t you !?) which is made up of three things separated by colons:  <the bip-username>:<your secret BIP password>:<the chosen BIP connection from your bip.conf connection list>. Now let’s say you have previously added a “connection” sub-section named ‘mozilla’ in your server-side bip.conf under the “user’ section named “erik23”. You would then enter “erik23:<mypassword>:mozilla.
  6. Click the “advanced” tab and enter the chosen port number which appears in the coresponding “network” section in bip.conf.
  7. Leave the “Username” and “Real name” blank. Bip’s gonna take care of that.
  8. Check “SSL” if your host needs it to be accessed. Click “Save”.
  9. Do the same steps for all your IRC servers, changing all the appropriate fields in concordance to what’s set in bip.conf. Remember to choose relevant usernames to identify the connections.

Once you’ve setup your accounts, the one thing you wouldn’t want is to log in your channels under the nick ‘mozilla’ or ‘freenode’ !!  So edit your bip.conf file :

  • In your “user” section, for all your “connection” sub-sections, add the following line:
ignore_first_nick = true;
  • in your “user” section, add the following lines
default_nick = <your chosen nickname>;
default_user = <your chosen username>;
default_realname = <your real name>

This will ignore on connect whatever username/nick your entered in your pidgin accounts and force it to those fields you entered in bip.conf. So now, you can have many meaningful pidgin accounts that all point to the same proxy server without having to use different username/nicknames.

The last thing I consider important while using proxy IRC servers with pidgin, is to enable the “persistency” of all your channels. That way, when you close your channel window, you stay logged-in. This is pretty simple :

  1. In your pidgin “Buddy list”, cclick the [Buddies] menu and then “Add Chat…”
  2. type in your #channel name, alias if needed. (it’s better to set channel passwords directly in BIP, so leave this one out). Choose a group for that Chat room.
  3. Check BOTH “autologin” AND “Remain in chat after window is closed”.
  4. click “Add”

and you’re good to go !  Happy ircing !


Installing Collabora gtimelog under Windows XP

My first week at Collabora was mainly stuffed with acclimating tasks (reading wikis) and getting all set with my three-platform system. One annoying thing every cross-platform developer come across at some point is setting up clients and programs once for each platform and for each box in the office.  My office’s got 2 main machines with 3 OS each. So do the maths !  Even if I tend to speed things up by installing programs with already-copied config files, the installation process must be done manually (I don’t want to ghost my disks !) for each platform/system.

One program I had to install, amongt others, was Collabora’s version of gTimeLog.  This home-hacked version enhanced this renowned timeloging client by adding server-side features and standardized tasks lists. My task, hereafter, is to offer the web a clear mini-tutorial of the how-to for installing TimeLog under Windows XP.

  • First, you need a good linux-like environment and a native software port. I like to use MinGW for that. You can easily get “MozillaBuild” which includes MinGW and Msys along with a bundle of tools, from “Mozilla’s build prerequisites” page under the MozillaBuild header. At the time of writing this paper, the newest version was 1.4, available here.
  • Start by downloading gtimelog sources (For those working for Collabora, download the git repository instead, as explained here).
  • Run a new MinGW shell by double-clicking on C:\mozilla-build\start-msvc8.bat  (for those who have Microsoft Visual C++ 2005 – if you’ve got another version, choose the .bat accordingly). You should get a black shell. You can close it for now.
  • Install the PyGTK dependencies
    • Download and install the most recent GTK+ bundle for Windows found here. At the time of writing this article, the newest gtk+-bundle was 2.16.4. (To fully install this bundle you need to uncompress its contents in a folder and manually add the bin subfolder to the system path by adding “SET PATH=%PATH%;C:\<path_to_your_GTK+-bin_dir>” to your start-msvcXX.bat file and restarting the minWG shell)
    • Download and install the most recent version of PyCairo and be careful to choose a version that matches your current Python version (see the XX in C:\mozilla-build\pythonXX for version info)
    • Download and install the most recent version of PyGObject and be careful to choose a version that matches your current Python version (see the XX in C:\mozilla-build\pythonXX for version info)
    • Download and install the most recent version of PyGtk and be careful to choose a version that matches your current Python version (see the XX in C:\mozilla-build\pythonXX for version info)
    • Download and install the most recent version of libGlade
  • Install the gTimeLog dependencies
    • Download and install the right M2Crypto toolkit for your python version from here.
  • Build and install gTimelog by opening another minGW shell and by typing :
cd <dir_to_gtimelog_sources>
python build
python install
  • You should find no error messages in the associated output. If you’ve got something like “The application has failed to start because libglib-2.0-2.dll was not found”, then be sure to add “SET PATH=%PATH%;C:\<path_to_your _GTK+-bin_dir>” to your start-msvcXX.bat file and restart the minWG shell
  • If you’re using the Collabora’s hack of gTimeLog, don’t forget to update .gtimelogrc to the example found at before restarting the whole thing!

Enjoy !