GithubHelp home page GithubHelp logo

Comments (49)

totaam avatar totaam commented on May 21, 2024

2011-11-15 17:06:51: antoine changed status from new to accepted

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-15 17:06:51: antoine edited the issue description

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-15 17:09:56: antoine commented


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

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-15 17:45:55: Norman Rasmussen commented


Not using Unity yet, still Gnome v2, afaik. (I think Unity comes with Gnome v3?)

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-15 21:39:38: ddoole commented


I see this under KDE 4 as well. (kubuntu 11.04)

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-16 04:52:33: antoine commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-24 11:40:48: pmarek commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-24 17:55:58: totaam commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-24 17:55:58: totaam

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-25 21:35:38: totaam commented


These test results are absolutely shocking:

  • 10.04 + appindicator support is just plain awful: in gnome the tray icon is missing, the menu entries do not have any icons either, it does not work at all in lxde or xfce (not shown, no api errors either), shows up in KDE but the sub-menus are not working and it does not respond to left clicks!
  • 10.04 + statusicon works (tested in gnome, lxde, xfce and KDE)
  • 10.10 + appindicator and statusicon do not work anywhere!!? I can't see them/find them anywhere in gnome or lxde!
  • 11.04 + appindicator works but is missing the tray icon in lxde, also unusable in KDE: ugly, no-left click and the encoding submenu fills the whole screen!
  • 11.04 + statusicon works in unity and lxde, but is placed at the right edge of the screen in unity..
  • 11.10 + appindicator works
  • 11.10 + statusicon does not work: no api failure, nothing shown, nothing! (only works in xfce)

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"
  • 10.04:
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 10.04.3 LTS
Release:	10.04
Codename:	lucid
  • 10.10:
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
  • 11.04:
$ 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
  • 11.10:
$ lsb_release -r
Release:	11.10
$ 

All Ubuntu versions tested had /etc/lsb-release... maybe this can be used to discriminate early?
etc..

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-25 21:35:38: totaam

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-25 21:35:38: totaam

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-25 21:35:38: totaam

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-25 21:35:38: totaam

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-26 11:40:22: totaam changed status from accepted to closed

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-26 11:40:22: totaam changed resolution from ** to fixed

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-26 11:40:22: totaam commented


r310 fixes this: we only enable the "appindicator" crap on Ubuntu 11.10 and later.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-29 08:16:02: pmarek commented


Still doesn't work for me with 0.7.31 -- debian unstable, x86_64.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-29 08:23:01: pmarek commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-29 09:20:52: totaam uploaded file wheezy-gnome3.png (91.4 KiB)

wheezy + gnome3 showing the tray with icons
wheezy-gnome3.png

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-29 09:21:04: totaam uploaded file wheezy-kdeplasma.png (281.4 KiB)

wheezy + kde plasma
wheezy-kdeplasma.png

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-29 09:21:15: totaam uploaded file wheezy-lxde.png (152.8 KiB)

wheezy + lxde
wheezy-lxde.png

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-29 09:31:10: totaam uploaded file wheezy-xfce.png (165.1 KiB)

wheezy + xfce
wheezy-xfce.png

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-29 09:32:52: totaam commented


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

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-30 16:41:35: ddoole commented


I'm using r313 under kubuntu 11.04 and I am still not seeing tray icons.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-30 18:11:12: totaam uploaded file natty-kdelogin.png (372.4 KiB)

kde plasma login
natty-kdelogin.png

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-30 18:12:00: totaam uploaded file natty-kdeplasma-xpratrayshown.png (241.2 KiB)

kdeplasma shows tray icon
natty-kdeplasma-xpratrayshown.png

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-30 18:17:49: totaam commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-30 18:45:04: ddoole commented


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](../commit/6dd1ff9dce7220c075d4f6ee534eda20fe3fc412)/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](../commit/6dd1ff9dce7220c075d4f6ee534eda20fe3fc412)/install/bin
lrwxrwxrwx  1 doole doole   21 2011-11-30 11:35 lib -> xpra-[r313](../commit/6dd1ff9dce7220c075d4f6ee534eda20fe3fc412)/install/lib
lrwxrwxrwx  1 doole doole   23 2011-11-30 11:35 share -> xpra-[r313](../commit/6dd1ff9dce7220c075d4f6ee534eda20fe3fc412)/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](../commit/d3fac20753f08314f5e39dbe7dd8e9957021553c)
drwxr-xr-x 10 doole doole 4096 2011-11-30 11:35 xpra-[r313](../commit/6dd1ff9dce7220c075d4f6ee534eda20fe3fc412)

To run xpra, I do:

export PYTHONPATH=/opt/xpra/lib/python
/opt/xpra/bin/xpra

Is there something I should be doing differently?

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-11-30 20:47:37: ddoole commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-12-01 07:14:07: totaam commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-12-01 14:16:22: ddoole commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-12-01 21:55:15: ddoole commented


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"))

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-12-02 09:48:09: totaam commented


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!

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-12-02 09:48:09: totaam

from xpra.

totaam avatar totaam commented on May 21, 2024

2011-12-02 14:31:47: ddoole commented


r324 works for me. Thanks.

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-20 19:40:01: totaam

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-26 11:21:12: mgiammarco changed status from closed to reopened

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-26 11:21:12: mgiammarco changed resolution from fixed to **

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-26 11:21:12: mgiammarco commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-27 10:36:22: antoine commented


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.

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-27 10:37:03: antoine uploaded file KDE-Ubuntu-11.10.png (52.4 KiB)

Ubuntu 11.10 + KDE showing the tray icon
KDE-Ubuntu-11.10.png

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-27 10:37:20: antoine uploaded file Unity-Ubuntu-11.10.png (108.6 KiB)

Ubuntu 11.10 + Unity showing the tray icon
Unity-Ubuntu-11.10.png

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-27 19:49:45: mgiammarco commented


Sorry I hope I have not make a mistake, but I am talking about winswitch_applet and not xpra. Am I right?

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-27 20:02:53: antoine changed status from reopened to closed

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-27 20:02:53: antoine changed resolution from ** to fixed

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-27 20:02:53: antoine commented


ahhhhhh, this is Xpra's bug tracker, winswitch's is here...

from xpra.

totaam avatar totaam commented on May 21, 2024

2012-02-27 20:05:56: antoine commented


New ticket: [https://winswitch.org/trac/ticket/193]

from xpra.

totaam avatar totaam commented on May 21, 2024

2019-02-21 13:36:58: antoine commented


See also #406, #2161

from xpra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.