Gmail Deskbar

More from Stuart’s House Of Deskbar Stuff: Gmail Deskbar. A Gnome deskbar plugin to search all your mail at Gmail. Grab Gmail Deskbar for yourself now! Edit (as described below) and save into .gnome2/deskbar-applet/handlers.

Notes:
The plugin requires libgmail: install from your distribution (it’s python-libgmail in Ubuntu) or from libgmail.sf.net.
You will need to edit the plugin and hardcode your Gmail username and password into it; look at the file and edit the part at the top where username and password are specified. Yes, this is not good. I would like to use the Gnome keyring to store the username and password, but it’s restricted to internal use for the Gnome desktop and not for applications, and it’s not available for Python anyway. As soon as it’s a public API and wrapped for Python I’ll be happy to use it. If you’re not happy with hardcoding your password, and I don’t blame you, then feel free to not use it.
Like Delicious Deskbar, it demonstrates how to embed your own custom icon in a plugin rather than depending on an external file; convert it to an XPM with the Gimp and then embed in the file.

Let me know if it works for you.

Update: licenced under the GNU GPL version 2.0.

22 Responses to “Gmail Deskbar”

  1. why not try Gmail-notify. Ps yours didn’t work on my 64bit machine.

    Davmor2
  2. davmor2: does gmail-notify search mails or just tell you that you have new mail? The major reason I wouldn’t use that for searching is that it’s not integrated with all my other searching and running in deskbar. I don’t think it not working would have anything to do with 64-bit, since I’m also on 64-bit, unless some of the underlying packages are broken. Can you try running /usr/lib/deskbar-applet/deskbar-applet -w and post the output?

    sil
  3. Hey sil,
    This is working perfectly here on ubuntu dapper. I didn’t see any mention of a license in the script. Can I make some changes and distribute to friends? GPL? Thanks for the info.

    And thanks for the great work!

    Jason
  4. Jason: GPL 2.0.

    sil
  5. [...] Believe the Web2.0 hype. Well, some of it. Much of your data should live online. Switch to Gmail instead of keeping huge local mail archives, simply because Gmail is more searchable — both via the Gmail Web interface or from your desktop via the Gmail plugin for the deskboard-applet. With Gmail you can keep all your mail, and you don’t have to organize it because their search is faster than your ability to figure out the organization plan you had in mind a year ago. I’m sure other mail services are just as nice, but a plugin happens to be available which integrates Gmail into the deskbar and thus into your desktop. Use del.icio.us and tag all interesting pages so they are also searchable from the deskbar. Another upside with keeping your data on other people’s servers is that (let’s face it) Google’s servers are more likely to stay up 24/7 than yours so you can get to your data from any machine, anytime. Similarly, use F-Spot to tag your photos and upload them to Flickr (why Flickr of all the photo upload services on the Web? Because that’s what F-Spot supports, and F-Spot is what Beagle supports!) Use Gmailfs or Box.net to store data you might want to keep accessible at all times. [...]

    egads! ’tis topyli! » Blog Archive » Integrating your personal information space with “The Searchable GNOME”
  6. These are great, thanks for releasing them. After playing with deskbar and beagle today gmail and delicious were the two I was thinking I was missing :)

    The Gmail script isn’t working for me on gentoo with Deskbar 2.14.2, libgmail-0.1.3.3, python2.4.

    I never get any search results. Here is the relevant output from deskbar-applet -w:

    Initializing Gmail Search
    Query Gmail for: RoboCop
    Query del.icio.us for: RoboCop with hystrix
    Exception in thread Thread-1:
    Traceback (most recent call last):
    File “/usr/lib/python2.4/threading.py”, line 442, in __bootstrap
    self.run()
    File “/usr/lib/python2.4/threading.py”, line 422, in run
    self.__target(*self.__args, **self.__kwargs)
    File “/usr/lib/python2.4/site-packages/deskbar/Handler.py”, line 295, in __query_async
    self.__query_async (query_change.new_query)
    File “/usr/lib/python2.4/site-packages/deskbar/Handler.py”, line 287, in __query_async
    res = self.query (qstring, deskbar.DEFAULT_RESULTS_PER_HANDLER)
    File “/home/hystrix/.gnome2/deskbar-applet/handlers/gmail-deskbar-hack.py”, line 162, in query
    matches = [GmailMatch(self, x.subject, x.info[0], qstring)
    AttributeError: ‘GmailThread’ object has no attribute ‘info’

    Got del.icio.us answer for: RoboCop
    Returning del.icio.us answer for: RoboCop

    (Note the delicious one is working with the on_more_information fix you posted on that thread)

    I noticed as well that the gmail deskbar script includes a “_on_more_information” function, but I don’t see such a button when I highlight gmail in the deskbar preferences. I notice that you use it to check that requirements are meant, which is a great idea.

    Please respond to my email address, as I may forget to check back on this page.

    hystrix
  7. Suddenly, the gmail search is not working in my deskbar. I don’t know when it stopped working, just noticed. In the preferences dialog, it’s still listed but you whein i click, it remains unticked.

    topyli
  8. Mmhh… the Gmail-entry in the preferences dialog remains unticked for me too… Same problem with the SSH-plugin for Deskbar from another site btw. Does anyone know what’s wrong there ?( ?

    Andi
  9. Installed with Dapper, changed the user and password fields, but I get this error when trying to check the button:
    Initializing Gmail Search
    Error while initializing Gmail Search:
    Traceback (most recent call last):
    File “/usr/lib/python2.4/site-packages/deskbar/ModuleLoader.py”, line 169, in initialize_module
    context.module.initialize ()
    File “/home/nernst/.gnome2/deskbar-applet/handlers/gmail-deskbar-hack.py”, line 147, in initialize
    self.ga.login()
    File “/usr/lib/site-python/libgmail/__init__.py”, line 318, in login
    pageData = self._retrievePage(redirectURL)
    File “/usr/lib/site-python/libgmail/__init__.py”, line 331, in _retrievePage
    resp = urllib2.urlopen(req)
    File “/usr/lib/python2.4/urllib2.py”, line 130, in urlopen
    return _opener.open(url, data)
    File “/usr/lib/python2.4/urllib2.py”, line 356, in open
    req = meth(req)
    File “/usr/lib/python2.4/urllib2.py”, line 943, in do_request_
    raise URLError(’no host given’)
    URLError:

    Neil
  10. I just installed the python script, same error :
    Initializing Gmail Search
    Error while initializing Gmail Search:
    Traceback (most recent call last):
    File “/usr/lib/python2.4/site-packages/deskbar/ModuleLoader.py”, line 169, in initialize_module
    context.module.initialize ()
    File “/home/fufu/.gnome2/deskbar-applet/handlers/gmail-deskbar-hack.py”, line 147, in initialize
    self.ga.login()
    File “/usr/lib/site-python/libgmail/__init__.py”, line 318, in login
    pageData = self._retrievePage(redirectURL)
    File “/usr/lib/site-python/libgmail/__init__.py”, line 331, in _retrievePage
    resp = urllib2.urlopen(req)
    File “/usr/lib/python2.4/urllib2.py”, line 130, in urlopen
    return _opener.open(url, data)
    File “/usr/lib/python2.4/urllib2.py”, line 356, in open
    req = meth(req)
    File “/usr/lib/python2.4/urllib2.py”, line 943, in do_request_
    raise URLError(’no host given’)
    URLError:

    Zbbfufu
  11. If you’re getting the “no host given” error then you need a newer version of libgmail; 0.1.4 doesn’t work, 0.1.5.1 does. I will look at monkeypatching from inside Gmail Deskbar if I get time.

    sil
  12. Sure enough, search works when using libgmail 0.1.5.1. Thanks!

    topyli
  13. when i run d/usr/lib/deskbar-applet/deskbar-applet -w
    i get:

    ErrorDuringImport: problem in /home/jeg/.gnome2/deskbar-applet/handlers/delicious-deskbar.py - AttributeError: ‘module’ object has no attribute ‘Match’

    and gmail does not appear in preferences. there is a similar error for
    delicious, but it does appear in preferences, so maybe this is a red herring.

    this is on ubuntu edgy-eft

    jganong
  14. i moved gmail-deskbar-hack.py to /usr/lib/deskbar-applet/handlers/ it it works now.

    jganong
  15. [...] posted on October 14, 2006 at 10:18 pm. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Trackbacks stink, but you can post acomment. [...]

    db79 » Scott’s Gmail Deskbar
  16. Just wanted to note that I had the same problem as jganong on Ubuntu Edgy. His fix works fine for me, but it’s obviously unsuitable to a machine with more than one user. Would a fix be possible?

    Benjamin Hawkes-Lewis
  17. Benjamin: I can’t replicate the problem, it seems. I’ll work on it…

    sil
  18. Hi there,

    great plugin! Like someone above posted, I had to move the script to /usr/lib/deskbar-applet/handlers to get it to work (meaning show in the settings dialog of deskbar). I’m using Ubuntu Feisty Fawn, if that is any help.

    Are you still continuing this and/or open for feature requests?

    Anyway great plugin for gmail-junkies :)

    martin
  19. martin: I’m not actually using Deskbar at the moment, so I’m not hacking on this plugin much. If you’re interested in taking it over, let me know!

    sil
  20. Hi, i have a problem with the plugin, it’s the error message:

    07-28 18:42 deskbar.core.ModuleLoader ERROR Error loading the file: /home/guillaume/.gnome2/deskbar-applet/modules-2.20-compatible/gmail-deskbar.py.
    Traceback (most recent call last):
    File “/usr/lib/python2.5/site-packages/deskbar/core/ModuleLoader.py”, line 99, in import_module
    mod = pydoc.importfile (filename)
    File “/usr/lib/python2.5/pydoc.py”, line 259, in importfile
    raise ErrorDuringImport(path, sys.exc_info())
    ErrorDuringImport: problem in /home/guillaume/.gnome2/deskbar-applet/modules-2.20-compatible/gmail-deskbar.py - : No module named Utils

    I have the 2.22.2.1 version of deskbar, any idea? (it looks like i have the file Utils.py but it can’t find it)

    Guillaume86
  21. Guillaume86: cor, no idea. I don’t use Deskbar (or this plugin) any more, I’m afraid…

    sil
  22. i’ve found, it’s just that the old plugins are not compatible anymore, i will try to make it work if i find time…

    Guillaume86

Leave a Reply

OpenID is a decentralised authentication system. If you use LiveJournal or Vox you already have an OpenID; just use the URL of your homepage there. See also how to get yourself an OpenID.