20/04/08
Gmail Notifier v1.6.2a

Nouvelles modifications de Gmail Notifier[1], après l'implémentation de pynotify, ce sont des modifications, moins visibles, destinées à rendre Gmail Notifier compatible avec les systèmes 64 bits
Grâce au rapport d'erreur de Emralegna sur les forums de Ubuntu-fr.org[2] :
emralegna@Aegis:~/gmail-notify$ ./notifier.py
Traceback (most recent call last):
File "./notifier.py", line 12, in <module>
import pytrayicon
ImportError: /home/emralegna/gmail-notify/pytrayicon.so: mauvaise classe ELF: ELFCLASS32
me permettant de découvrir que pytrayicon.so étant compilé sous un système 32 bits ne pouvait être compatible 64 bits[3]. Il fallait donc trouver une solution…

compatible 64 bits
Pour rendre Gmail Notifier compatible 64 bits[4], la librairie[5] pytrayicon.so, pour gérer une icône interactive dans la systray, a été abandonnée au profit de l'utilisation du module egg.trayicon issu du paquet python-gnome2-extras.
Comme le nombre de dépendances commence à se faire relativement conséquent, j'en ai profité pour ajouter un début de gestion des exceptions sur les imports.
import sys try: import pygtk #tell pyGTK, if possible, that we want GTKv2 pygtk.require("2.0") except: #Some distributions come with GTK2, but not pyGTK pass try: import gtk except: print "You need to install pyGTK or GTKv2", sys.exit(1) try: import pynotify except: print "You need to install the pynotify python package (python-notify)" try: import egg.trayicon as trayicon # egg == python-gnome2-extras except: print "You need to install the egg python package (python-gnome2-extras)" import time import os import warnings import ConfigParser import xmllangs import GmailConfig import GmailPopupMenu import gmailatom
Télécharger : Gmail Notifier v1.6.2a
Gmail Notifier v1.6.2a (archive, ±48 Ko).
signature MD5 : 2df39167c5920b82de9aa7dc7eac0def
NOTFIER_VERSION='v1.6.2a' ARCHIVE="gmail-notify.${NOTFIER_VERSION}.tar.gz" cd '/opt' sudo wget "http://blogosx.homeunix.org/share/apps/gmail-notify/${ARCHIVE}" sudo tar -xvzf "${ARCHIVE}" && sudo rm "${ARCHIVE}" sudo chown -hR root 'gmail-notify' && sudo chgrp -hR root 'gmail-notify' sudo chmod -R 755 'gmail-notify' cd '/usr/bin' sudo touch 'gmail-notifier' && sudo chmod 755 'gmail-notifier' sudo gedit 'gmail-notifier'
#!/bin/bash exec '/opt/gmail-notify/notifier.py'
Notes
[1] voir ce billet : Gmail Notifier (pynotify)
[2] testeurs pour Gmail Notifier (libnotify)
[3] Gmail notifier gives error: "wrong ELF class: ELFCLASS32"
