Using: Ubuntu 10.04 Lucid
Even though it the logs show the icon_file is detected, the icon does not show in my tray notification area. There's a smallish (10px) blank space which I can click to get the menu.
None of the menu items have icons either, some have a no-entry style icon, which I think means bad image, or similar.
I'm happy to help debug, but I'm not sure where to start.
Log:
$ xpra attach -d all |& head -n 20 parse_shortcuts(['meta+shift+F4:quit']) parse_shortcuts(['meta+shift+F4:quit'])={'F4': (['meta', 'shift'], 'quit')} get_icon_filename(xpra.png)=/usr/share/xpra/icons/xpra.png, exists=True set default window icon to /usr/share/xpra/icons/xpra.png get_icon_filename(information.png)=/usr/share/xpra/icons/information.png, exists=True get_icon_filename(configure.png)=/usr/share/xpra/icons/configure.png, exists=False get_icon_filename(slider.png)=/usr/share/xpra/icons/slider.png, exists=True get_icon_filename(keyboard.png)=/usr/share/xpra/icons/keyboard.png, exists=True get_icon_filename(retry.png)=/usr/share/xpra/icons/retry.png, exists=True get_icon_filename(quit.png)=/usr/share/xpra/icons/quit.png, exists=True get_icon_filename(close.png)=/usr/share/xpra/icons/close.png, exists=True get_tray_icon_filename using default: /usr/share/xpra/icons/xpra.png write thread: waiting for data to write read thread: waiting for data to arrive 'setxkbmap -query' failed with exit code 255
oh great, another broken Ubuntu API to fix... I assume you are using "Unity", and I have experienced something similar with WinSwitch
: IIRC the old API in 10.04 fails to use the absolute path we give it, and fails even further by not even placing some kind of placeholder icon there... sigh
Not using Unity yet, still Gnome v2, afaik. (I think Unity comes with Gnome v3?)
I see this under KDE 4 as well. (kubuntu 11.04)
Hah, it may well be that the code tries to use the new Ubuntu "indicator" API (re-inventing another wheel: tray icon under another name) since it is installed, but it may not be functional since you are not using the unity desktop... great, now I need to find a way to detect if the API actually works before using it.
I'm on debian; winswitch shows icons in the tray and the menu, but xpra does not (apart from the ✓ beneath Bell etc.).
Hints for debugging appreciated.
Confirmed: as I expected it uses the appindicator
API if it is present before trying to use the gtk.StatusIcon
API, and since this re-invented wheel doesn't work properly (especially in Ubuntu 10.x)... You end up with the missing tray icon (this one is fixable) and missing menu entry icons (not fixable - this is a "feature").
I have also noticed that the encoding
menu does not work, whereas the other menus more or less do - albeit without the icons.
Until I can figure out what to do with this horror, you can apply this patch to disable appindicator completely:
Index: xpra/xposix/gui.py =================================================================== --- xpra/xposix/gui.py (revision 296) +++ xpra/xposix/gui.py (working copy) @@ -88,6 +88,7 @@ return False def setup_appindicator(self, tray_icon_filename): + return False try: import appindicator #@UnresolvedImport filename = self.get_tray_icon_filename(tray_icon_filename)
Next I will have to figure out in which case to use one API over the other... fun, not.
These test results are absolutely shocking:
All other distros work just fine with statusicon, so really this is only an Ubuntu thing.
So, it looks like we will need to detect the desktop environment ("${DESKTOP_SESSION}"
) as well as the Ubuntu release ("lsb_release -a"
?) to decide on which api to use... How about debian?
Is there a better way to detect this brokenness?
IMNSHO: this sort of API breakage is a disgrace, re-inventing an existing API rather than extending it was a bad idea, but this level of incompetence beggars belief. Yes, you Ubuntu.
Some values collected:
DESKTOP_SESSION="kde"
DESKTOP_SESSION="ubuntu-2d"
DESKTOP_SESSION="LXDE"
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.04.3 LTS Release: 10.04 Codename: lucid
$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.10 DISTRIB_CODENAME=maverick DISTRIB_DESCRIPTION="Ubuntu 10.10"
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.04 Release: 11.04 Codename: natty $ lsb_release -r Release: 11.04
$ lsb_release -r Release: 11.10 $
All Ubuntu versions tested had /etc/lsb-release... maybe this can be used to discriminate early? etc..
r310 fixes this: we only enable the "appindicator" crap on Ubuntu 11.10 and later.
Still doesn't work for me with 0.7.31 -- debian unstable, x86_64.
I don't think this will help ...
$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux testing (wheezy) Release: testing Codename: wheezy
Perhaps this is better?
$ qdbus org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.GetServerInformation Plasma KDE 1.0 1.1
Or just make it configurable which one to use ...
Putting return False
in setup_appindicator
doesn't help, either.
wheezy + gnome3 showing the tray with icons
wheezy + kde plasma
wheezy + lxde
wheezy + xfce
As can be seen in the 4 screenshots above, a fresh default installation of wheezy works just fine with all desktop environments tested.
Maybe you have an old version of the package files still installed? To allow me to reproduce, please create a brand new user and specify which desktop environment to use, and any other details that might be relevant.
btw, notifications and tray icons are different things, only loosely related
I'm using r313 under kubuntu 11.04 and I am still not seeing tray icons.
kde plasma login
kdeplasma shows tray icon
I have just tried again with a brand new user created for the occasion, also tested both KDE/plasma and KDE/openbox session types. The tray icon is there every time, and so are the icons in the tray menu. Screenshots included.
If you want me to be able to fix this, you are going to have to give me steps to reproduce, as this is a brand new / clean install of Kubuntu 11.04 done for the occasion and it works just fine... I cannot fix something that I cannot see. You should probably try with a new user first to rule out user settings, then do a clean install of Kubuntu in a virtual machine like I did to rule out installation problems.
Ah, I figured out what's wrong - xpra is looking in the wrong place for the icons on my system.
I changed get_tray_icon_filename() to print the path being used, and it showed:
/opt/xpra/xpra-r313/install/lib/python/xpra/xposix/icons/xpra.png
which is odd because there is no icons directory under the xposix directory.
When I created a link from .../xposix/icons to /opt/xpra/share/xpra/icons and restarted the client, everything was working properly.
So, do I have my machine set up incorrectly? I extract everything to /opt/xpra/xpra-xxxx and build under that directory. For whatever build I am using, I link bin, share, and lib in /opt/xpra to /opt/xpra/xpra-xxxx/install. That is:
doole@andammo:/opt/xpra$ ls -l lrwxrwxrwx 1 doole doole 21 2011-11-30 11:35 bin -> xpra-r313/install/bin lrwxrwxrwx 1 doole doole 21 2011-11-30 11:35 lib -> xpra-r313/install/lib lrwxrwxrwx 1 doole doole 23 2011-11-30 11:35 share -> xpra-r313/install/share drwxr-xr-x 10 doole doole 4096 2011-11-03 14:58 xpra-0.0.7.30 drwxr-xr-x 10 doole doole 4096 2011-11-25 10:55 xpra-r305 drwxr-xr-x 10 doole doole 4096 2011-11-30 11:35 xpra-r313
To run xpra, I do:
export PYTHONPATH=/opt/xpra/lib/python /opt/xpra/bin/xpra
Is there something I should be doing differently?
Ah, another insight. The path seems to be sensitive to whatever directory I issue the xpra command from. When I restarted the client just now, I was in my home directory and the reported icon path was /home/doole/icons/.
So it seems that, in my environment at least, xpra is looking in $PWD/icons.
I have no idea how/why you ended up using this sort of path for installation, please refer to the build instructions on this page and it should just work.
I don't have root access on all the machines that I use, so I can't do the formal install.
I'm therefore compiling just for myself using the do-build script (as mentioned on that page). I don't want to have to change my PATH and PYTHONPATH every time I pull down a new version of xpra, so I link the bin, lib, and share directories into the /opt/xpra directory so I have a consistent location.
Here's a change that worked for me. In xposix/gui.py, I changed get_data_dir() as follows:
Removed:
return os.getcwd()
Added:
# Otherwise assume we've got a local install (from do-build) return os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../share/xpra"))
merged with a path test in r324 to avoid breaking other platforms: the win32 build in the installer relies on os.getcwd()
to find the icons.
Thanks!
r324 works for me. Thanks.
Are you sure that the bug is fixed? I have installed your ppa package into ubuntu unity 11.10, kubuntu 11.10, and an old ubuntu 10.04 (with gnome2) and I can see the icon only on the last one.
Just verified again in a virtual machine and both unity 11.10 and kubuntu worked fine. See screenshots.
Are you sure that the user you are running as is the same as your desktop session? (ie: not trying to run as root for example) If not, you will get some warnings like these:
libappindicator-WARNING **: Unable to send signal for NewStatus: The connection is closed
When running with: xpra -d all attach ...
, you can see near the top of the debug messages:
... detected Ubuntu release [11, 10] get_tray_icon_filename using default: /usr/bin/../share/xpra/icons/xpra.png ...
And this file exists and is installed by the packages.
If this does not help, please post the full command lines you are using and client debug log.
Ubuntu 11.10 + KDE showing the tray icon
Ubuntu 11.10 + Unity showing the tray icon
Sorry I hope I have not make a mistake, but I am talking about winswitch_applet and not xpra. Am I right?
ahhhhhh, this is Xpra's bug tracker, winswitch's is here...
New ticket: https://winswitch.org/trac/ticket/193
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/43