Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Applets | Applets Problems with Cairo Dock applets - Gmail and Xchat
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Applets | Applets

Subjects Author Language Messages Last message
[Locked] Problems with Cairo Dock applets - Gmail and Xchat
Page : 1 2
Guest English 38 kevdog [Read]
29 March 2013 à 13:13

kevdog, Sunday 24 March 2013 à 22:06


Subscription date : 20 March 2013
Messages : 20
packer -Ss python2-gobject
extra/python2-gobject 3.4.2-1 [installed]
Python 2 bindings for GObject
extra/python2-gobject2 2.28.6-8 [installed]
Python 2 bindings for GObject2

They were previously installed -- I didn't just install them.

But it did get me thinking - I installed python-gobject and python-gobject2 which were specifically gobject bindings for python3.

I then restarted the cairo dock and got a different error:
$ cairo-dock -c


    Cairo-Dock version : 3.2.0
    Compiled date : Mar 22 2013 23:02:55
    Built with GTK : 3.6
    Running with OpenGL: 0

sh: line 1: 18385 Killed ./"CpuWatcher" 4 "/org/cairodock/CairoDock/CpuWatcher" "/home/kevdog/.config/cairo-dock/current_theme/plug-ins/CpuWatcher/CpuWatcher.conf" "/home/kevdog/.config/cairo-dock" cairo-dock 18353
warning : (/home/kevdog/src/cairo-dock-plug-ins/Dbus/src/applet-dbus.c:cd_dbus_register_module_in_dir:180)
file /home/kevdog/.config/cairo-dock/third-party/demos/auto-load.conf should not be here
warning : (/home/kevdog/src/cairo-dock-plug-ins/Dbus/src/applet-dbus.c:cd_dbus_register_module_in_dir:180)
file /home/kevdog/.config/cairo-dock/third-party/FTP/auto-load.conf should not be here
Traceback (most recent call last):
File "/usr/lib/cairo-dock/cairo-dock-launcher-API-daemon", line 33, in <module>
import dbus, dbus.service
ImportError: No module named 'dbus'
Traceback (most recent call last):
File "./Xchat", line 35, in <module>
import dbus
ImportError: No module named 'dbus'
Traceback (most recent call last):
File "./Pidgin", line 34, in <module>
import htmllib
ImportError: No module named 'htmllib'
cairo_dock_create_surface_from_image_simple: assertion `cImageFile != NULL' failed
SET default image: /usr/share/cairo-dock/plug-ins/Recent-Events/icon.svg
Traceback (most recent call last):
File "./Gmail", line 18, in <module>
from CDApplet import CDApplet, _
File "/usr/lib/python3.3/site-packages/CDApplet.py", line 36, in <module>
import dbus
ImportError: No module named 'dbus'
CpuWatcher : Config retrieved + Timer started
CpuWatcher has been started.
sh: ./CairoBzr: No such file or directory
_cd_find_volume_name_from_drive_name: assertion `pDrive != NULL' failed
cairo_dock_draw_subdock_content_on_icon (Terminal)
drawing OK
cairo_dock_draw_subdock_content_on_icon (mnt_sshfs)
drawing OK
cairo_dock_draw_subdock_content_on_icon (EOLUser)
drawing OK
Number of cores : 2
warning : (/home/kevdog/src/cairo-dock-core/src/gldit/cairo-dock-launcher-manager.c:cairo_dock_launch_command_sync_with_stderr:448)
which: no kwin in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/bin/core_perl:/usr/lib/qt4/bin)
which: no xfwm4 in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/bin/core_perl:/usr/lib/qt4/bin)

So what I did then was install the python-dbus package -- and restarted

This is the output (it looks like now its giving a lot more useful information -- particularly in regards to the Gmail plugin:
$ cairo-dock -c


    Cairo-Dock version : 3.2.0
    Compiled date : Mar 22 2013 23:02:55
    Built with GTK : 3.6
    Running with OpenGL: 0

sh: line 1: 18574 Killed ./"CpuWatcher" 4 "/org/cairodock/CairoDock/CpuWatcher" "/home/kevdog/.config/cairo-dock/current_theme/plug-ins/CpuWatcher/CpuWatcher.conf" "/home/kevdog/.config/cairo-dock" cairo-dock 18543
warning : (/home/kevdog/src/cairo-dock-plug-ins/Dbus/src/applet-dbus.c:cd_dbus_register_module_in_dir:180)
file /home/kevdog/.config/cairo-dock/third-party/demos/auto-load.conf should not be here
warning : (/home/kevdog/src/cairo-dock-plug-ins/Dbus/src/applet-dbus.c:cd_dbus_register_module_in_dir:180)
file /home/kevdog/.config/cairo-dock/third-party/FTP/auto-load.conf should not be here
cairo_dock_create_surface_from_image_simple: assertion `cImageFile != NULL' failed
SET default image: /usr/share/cairo-dock/plug-ins/Recent-Events/icon.svg
Traceback (most recent call last):
File "./Pidgin", line 34, in <module>
import htmllib
ImportError: No module named 'htmllib'
CpuWatcher : Config retrieved + Timer started
Launcher-API-Daemon: registered as Unity: <dbus.service.BusName com.canonical.Unity on <dbus._dbus.SessionBus (session) at 0xb6c4235c> at 0xb6c4f4cc>
connect...
-> connected to cairo-dock
new owner: :1.130
sh: ./CairoBzr: No such file or directory
CpuWatcher has been started.
Traceback (most recent call last):
File "./Gmail", line 22, in <module>
import gtk # used for Menu class displaying inbox
ImportError: No module named 'gtk'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./Gmail", line 25, in <module>
from gi.repository import GLib as glib
File "/usr/lib/python3.3/site-packages/gi/init.py", line 27, in <module>
from ._gi import _API, Repository
ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))
_cd_find_volume_name_from_drive_name: assertion `pDrive != NULL' failed
cairo_dock_draw_subdock_content_on_icon (Terminal)
drawing OK
which: no xchat-gnome in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/bin/core_perl:/usr/lib/qt4/bin)
cairo_dock_draw_subdock_content_on_icon (mnt_sshfs)
drawing OK
cairo_dock_draw_subdock_content_on_icon (EOLUser)
drawing OK
Number of cores : 2
warning : (/home/kevdog/src/cairo-dock-core/src/gldit/cairo-dock-launcher-manager.c:cairo_dock_launch_command_sync_with_stderr:448)
which: no kwin in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/bin/core_perl:/usr/lib/qt4/bin)
which: no xfwm4 in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/bin/core_perl:/usr/lib/qt4/bin)

So in effect I don't know if its the code that's messed up or is the problem that it can't find the module named 'gtk"??
I don't have a specific python-gtk library. It sounds like I might be missing another library.

fabounet, Sunday 24 March 2013 à 23:21


Subscription date : 30 November 2007
Messages : 17118
ImportError: No module named 'gtk'

I think that the gtk module is named 'pygtk', this is to spice things a little bit

about the gobject import error, the code in the applet seems correct (from gi.repository import GLib as glib), I don't see why it complains (especially since it works nicely for me with python 3.2.3, and I have the same code in my /usr/lib/python3/dist-packages/gi/init.py line 27)

kevdog, Monday 25 March 2013 à 00:51


Subscription date : 20 March 2013
Messages : 20
Hmm -- I installed pygtk but still got the same error (I actually had it installed before when I posted the last message). I'm kind of out of ideas on this one.
BTW my subdirectory for these packages is a little bit different than in ubuntu -- it /usr/lib/python3.3/site-packages.

My line 27 from /usr/lib/python3.3/site-packages/gi/init.py is:
from ._gi import _API, Repository

Something tells me this is kind of a bogus error which means something was screwed up prior to calling this line of code -- its just that the error finally got caught on this line. I've seen strange things like this before where the error produced isn't really where the error is. I'm wondering if this is one of those cases.

Looking over the Gmail.py code I think I understand what is going on:

The first part of the code reads like this:
try:
    
import glib # used for timer
    
import gtk # used for Menu class displaying inbox
    
import libxml2 # used to parse XML content from Gmail inbox
except:
    
from gi.repository import GLib as glib
    from gi
.repository import Gtk as gtk
    from gi
.repository import Gdk as gdk
    from lxml import etree


In order to get to the except part -- doesn't the try block need to fail? (Or is this an incorrect assumption??). Anyway I think its failing on the first line of the except block.

How do I know is the import libxml2 statement is actually working?? At least in my packages libxml2 is actually python-lxml. Does this make a difference: (Here is what pacman lists for packages:

extra/python-lxml 3.1.0-1 [installed]
Python3 binding for the libxml2 and libxslt libraries

Its also possible the import statement import glib isn't working since I don't think I have a specific python binding for glib (or least I'm not aware of). I do have glib2 installed however, however those are C bindings (which I'm not sure that's what is needed??).
I'm also assuming the import gtk is referring to the pygtk library -- which I do have installed.

matttbe, Monday 25 March 2013 à 07:31


Subscription date : 24 January 2009
Messages : 12573
In fact, on the first part it tries to import python2 specific modules and if there is a problem, it'll load python3 modules.

Can you launch python from a terminal and then launch these commands:
from gi.repository import GLib as glib
from gi.repository import Gtk as gtk
from gi.repository import Gdk as gdk
from lxml import etree
Then, can you post the errors on ArchLinux forums? Maybe it needs something special for ArchLinux (or non-debian distributions) or maybe a package is missing...

fabounet, Monday 25 March 2013 à 12:47


Subscription date : 30 November 2007
Messages : 17118
so yes, it should fail on the "import glib", then jump tp the "except" part, and that should work.
so definitely, running the code of the applet line by line in a python console can help.

kevdog, Tuesday 26 March 2013 à 02:35


Subscription date : 20 March 2013
Messages : 20
Am I doing something wrong?? Nothing is happening:

$ python
Python 3.3.0 (default, Dec 22 2012, 21:14:17)
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GLib as glib
>>> from gi.repository import Gtk as gtk
>>> from gi.repository import Gdk as gdk
>>> from lxml import etree
>>>

fabounet, Tuesday 26 March 2013 à 09:11


Subscription date : 30 November 2007
Messages : 17118
so it means it's working, which is a good news.
can you try with the whole "try .. except" block ?
does the applet work now that you have installed pygtk ?

kevdog, Wednesday 27 March 2013 à 04:30


Subscription date : 20 March 2013
Messages : 20
So to kind of put this thread to bed -- this is what I found out and then actually did

I typed the script letter for letter within python launched from a terminal -- I received no errors and eventually I had to end the script b/c of the various subroutines. When I ended up running the exact same commands from file however -- I would always get the same error:

/Gmail", line 25, in <module>
from gi.repository import GLib as glib
File "/usr/lib/python3.3/site-packages/gi/init.py", line 27, in <module>
from ._gi import _API, Repository
ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))
_cd_find_volume_name_from_drive_name: assertion `pDrive != NULL' failed

I have no idea why this seemed to work when typing the commands, but failed with a script. I'm certain there is an explanation but I know nothing about python to know why.

In desperation, I just changed the command at the top of the file to use python2 rather than just python (which is python 3.3). When I did this -- the script worked as expected. No questions asked.
So in the end, I'll just chalk this up to a script needing python2.7 (or a version 2.x of python, rather than 3.x). Such a simple change!!

fabounet, Wednesday 27 March 2013 à 11:04


Subscription date : 30 November 2007
Messages : 17118
I can't understand why either
whether I force python2 or python3, it works in both case; it's so strange, but well, you found a workaround so...

matttbe, Wednesday 27 March 2013 à 11:26


Subscription date : 24 January 2009
Messages : 12573
Is it maybe possible to report this bug to ArchLinux forums? This problem is maybe specific to your distribution...

kevdog, Wednesday 27 March 2013 à 14:25


Subscription date : 20 March 2013
Messages : 20
Any reason I can't make Firefox a launcher??

Here's what I get when I select Make it a Launcher:
cairo_dock_register_class_full: assertion `cDesktopFile != NULL || cClassName != NULL' failed

fabounet, Wednesday 27 March 2013 à 15:13


Subscription date : 30 November 2007
Messages : 17118
don't you have a dialog bubble that says it couldn't find the desktop file ?

kevdog, Thursday 28 March 2013 à 17:19


Subscription date : 20 March 2013
Messages : 20
I'm receiving the following error when launching cairo-dock from the command line and then I try to add Firefox by right clicking, etc. On the actual gui -- no bubble actually appears. There is no indication on the Guid itself that the process didn't work. I wondering if I should just default to using python2 for every one of the cairo applets and processes.

fabounet, Thursday 28 March 2013 à 17:29


Subscription date : 30 November 2007
Messages : 17118
there is no link with the applets.
are you using an exotic version of firefox, like an alpha version ?

what gives xprop|grep CLASS, then select the firefox window ?
also, what gives locate firefox.desktop ?

kevdog, Thursday 28 March 2013 à 19:11


Subscription date : 20 March 2013
Messages : 20
I'm using firefox-nightly version -- so I guess this maybe exotic -- 3-28-2013 22.0a1 (that's the version number)

Here are the answers to your questions:
$ locate firefox.desktop
/home/kevdog/.config/cairo-dock/themes/MacOSX/launchers/01firefox.desktop
/usr/share/cairo-dock/themes/Default-Panel/launchers/01firefox.desktop
/usr/share/cairo-dock/themes/Default-Single/launchers/01firefox.desktop
/usr/share/xfce4/helpers/firefox.desktop
/var/abs/extra/firefox/firefox.desktop

$ xprop| grep CLASS
WM_CLASS(STRING) = "Navigator", "Firefox"

fabounet, Friday 29 March 2013 à 00:27


Subscription date : 30 November 2007
Messages : 17118
ok, actually the desktop file should be located in /usr/share/applications
it seems it's not present, this is why the dock doesn't find it (or more precisely, it finds a wrong one, hence the error)

kevdog, Friday 29 March 2013 à 04:56


Subscription date : 20 March 2013
Messages : 20
Which desktop file are you referring to? MacOsX (thats a theme I'm using), Default-Panel, Default-Single, or xfce4? Do I need to create or cp this file? ---

Hey I got a question? Within /usr/share/applications I have a firefox-nightly.desktop file! That's the problem!! It's firefox-nightly.desktop and not firefox.desktop. Where in the cairo dock code can I change this location or is it contained in multiple files?

fabounet, Friday 29 March 2013 à 09:20


Subscription date : 30 November 2007
Messages : 17118
well, first if you want to add a launcher to the dock, you can simply drag and drop it onto the dock from the Application Menu (it's one of the applets, already enabled in any themes)

another solution is to copy this file:
sudo cp /usr/share/applications/firefox-nightly.desktop /usr/share/applications/firefox.desktop
so that the dock can find it.

kevdog, Friday 29 March 2013 à 13:13


Subscription date : 20 March 2013
Messages : 20
Thank you -- copying firefox-nightly.desktop to firefox.desktop did the trick. Cairo found it immediately after I selected add it to the dock.

Applets | Applets

Subjects Author Language Messages Last message
[Locked] Problems with Cairo Dock applets - Gmail and Xchat
Page : 1 2
Guest English 38 kevdog [Read]
29 March 2013 à 13:13


Glx-Dock / Cairo-Dock List of forums Applets | Applets Problems with Cairo Dock applets - Gmail and Xchat Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.