Hi,
I Hi,
Upgraded to xpra 3.0.8-r25889 from version 2-something using the xpra repository, and the tray icon disappeared. In running Ubuntu 18.04 with i3 as window manager on the client. At the same time I upgraded the server from 0.17.something to the same xpra version. Before the upgrade of xpra the tray icon was there on the client. I used it a lot to change quality etc.
Attach with xpra attach ssh:username@server:displaynr --tray=yes
So with server 0.17.* on Debian stretch and client 2-something on Ubuntu 18.04 with i3 the tray icon worked. With xpra 3.0.8-r25889 the tray icon is no longer shown, even if I add --tray to the attach command. Also tried attaching with the gui but no change. Tried reboot of client.
Created bug report using your tool.
Best regards, Jonathan
Bug report
At the same time I upgraded the server from 0.17.something to the same xpra version. Before the upgrade of xpra the tray icon was there on the client.
The server version should have no bearing on the client tray showing or not.
Please post the client output running with:
xpra attach ssh://username@server:sshport/displaynr --tray=yes -d tray
Output of text (replaced server and user name):
$ xpra attach ssh://<hidden username>@hidden.server.net/9677 --tray=yes -d tray renderer 'Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)' enabled (found in both blacklist and whitelist) 2020-04-06 11:23:03,906 Xpra GTK3 X11 client version 3.0.8-r25889 64-bit 2020-04-06 11:23:03,986 running on Linux Ubuntu 18.04 bionic 2020-04-06 11:23:03,987 _NET_SUPPORTING_WM_CHECK window=0x1600063 2020-04-06 11:23:03,988 _NET_WM_NAME=b'i3' 2020-04-06 11:23:03,988 window manager is 'i3' 2020-04-06 11:23:04,010 overlay_image=<PIL.PngImagePlugin.PngImageFile image mode=RGBA size=48x48 at 0x7FD9D5C59EB8> 2020-04-06 11:23:04,011 Warning: failed to import opencv: 2020-04-06 11:23:04,011 No module named 'cv2' 2020-04-06 11:23:04,011 webcam forwarding is disabled 2020-04-06 11:23:04,350 GStreamer version 1.14.5 for Python 3.6.9 64-bit 2020-04-06 11:23:04,428 make_tray_menu_helper() tray menu helper classes: (None, <class 'xpra.client.gtk3.tray_menu.GTK3TrayMenu'>) 2020-04-06 11:23:04,448 No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate' 2020-04-06 11:23:04,589 renderer 'Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)' enabled (found in both blacklist and whitelist) 2020-04-06 11:23:04,652 OpenGL enabled with Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) 2020-04-06 11:23:04,988 Connected (version 2.0, client OpenSSH_7.4p1) 2020-04-06 11:23:05,335 SSH password authentication failed: 2020-04-06 11:23:05,336 ('Bad authentication type', ['publickey', 'password']) (allowed_types=['publickey', 'password']) please enter the SSH password for <hidden username>@hidden.server.net>: 2020-04-06 11:23:10,580 Authentication (password) successful! 2020-04-06 11:23:10,792 keyboard settings: rules=evdev, model=pc105, layout=se 2020-04-06 11:23:10,793 _NET_SUPPORTING_WM_CHECK window=0x1600063 2020-04-06 11:23:10,793 _NET_WM_NAME=b'i3' 2020-04-06 11:23:10,798 desktop size is 3840x1080 with 1 screen: 2020-04-06 11:23:10,799 :0.0 (1016x285 mm - DPI: 96x96) 2020-04-06 11:23:10,799 eDP-1 1920x1080 at 1920x0 (309x173 mm - DPI: 157x158) 2020-04-06 11:23:10,799 HDMI-1 1920x1080 (527x296 mm - DPI: 92x92) 2020-04-06 11:23:10,902 no ethtool interface speed available for ppp0 2020-04-06 11:23:10,949 _NET_SUPPORTING_WM_CHECK window=0x1600063 2020-04-06 11:23:10,950 _NET_WM_NAME=b'i3' 2020-04-06 11:23:10,952 setup_xpra_tray() 2020-04-06 11:23:11,003 get_tray_title()=('hidden.server.net', 22) (items=(b"('hidden.server.net', 22)",)) 2020-04-06 11:23:11,005 tray GUESS_GEOMETRY=False 2020-04-06 11:23:11,005 make_tray(0, <Gtk.Menu object at 0x7fd9b18307e0 (GtkMenu at 0x3d002a0)>, "('hidden.server.net', 22)", 'xpra', <function TrayClient.create_xpra_tray.<locals>.xpra_tray_geometry at 0x7fd9b15bd598>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_click at 0x7fd9df13ad90>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_mouseover at 0x7fd9b15bd510>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_exit at 0x7fd9b15bd400>) tray classes=[<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>, <class 'xpra.client.gtk_base.statusicon_tray.GTKStatusIconTray'>] 2020-04-06 11:23:11,006 set_icon_from_file(/usr/share/xpra/icons/xpra.png) tray_widget=<AppIndicator3.Indicator object at 0x7fd9b159c900 (AppIndicator at 0x2d75390)> 2020-04-06 11:23:11,006 do_set_icon_from_file(/usr/share/xpra/icons/xpra.png) setting icon theme path=/usr/share/xpra/icons 2020-04-06 11:23:11,006 do_set_icon_from_file(/usr/share/xpra/icons/xpra.png) setting icon=xpra 2020-04-06 11:23:11,047 setup_xpra_tray(xpra)=Tray(0:('hidden.server.net', 22)) 2020-04-06 11:23:11,117 enabled remote logging 2020-04-06 11:23:11,119 Xpra GTK3 X11 server version 3.0.8-r25889 64-bit 2020-04-06 11:23:11,120 running on Linux Debian 9.12 stretch 2020-04-06 11:23:11,134 Attached to ssh://<hidden username>@hidden.server.net/9677 2020-04-06 11:23:11,135 (press Control-C to detach) 2020-04-06 11:23:11,156 get_tray_title()=Xsession, xterm\n('hidden.server.net', 22) (items=(b'Xsession, xterm', b"('hidden.server.net', 22)")) 2020-04-06 11:23:11,182 get_tray_title()=Xsession, xterm\n('hidden.server.net', 22) (items=(b'Xsession, xterm', b"('hidden.server.net', 22)")) 2020-04-06 11:23:11,198 _NET_SUPPORTING_WM_CHECK window=0x1600063 2020-04-06 11:23:11,198 _NET_WM_NAME=b'i3' 2020-04-06 11:23:11,219 _NET_SUPPORTING_WM_CHECK window=0x1600063 2020-04-06 11:23:11,220 _NET_WM_NAME=b'i3' 2020-04-06 11:23:11,226 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22)) 2020-04-06 11:23:11,265 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22)) 2020-04-06 11:23:11,266 server does not support xi input devices 2020-04-06 11:23:11,266 server uses: xtest 2020-04-06 11:23:12,057 set_icon(None) using filename=/usr/share/xpra/icons/xpra.png 2020-04-06 11:23:12,057 set_icon_from_file(/usr/share/xpra/icons/xpra.png) tray_widget=<AppIndicator3.Indicator object at 0x7fd9b159c900 (AppIndicator at 0x2d75390)> 2020-04-06 11:23:12,057 do_set_icon_from_file(/usr/share/xpra/icons/xpra.png) setting icon theme path=/usr/share/xpra/icons 2020-04-06 11:23:12,057 do_set_icon_from_file(/usr/share/xpra/icons/xpra.png) setting icon=xpra
Just to clarify, I upgraded both the client and server to the same version at the same time.
Thank you for the quick response!
TIL:
make_tray(0, <Gtk.Menu object at 0x7fd9b18307e0 (GtkMenu at 0x3d002a0)>, "('hidden.server.net', 22)", 'xpra', \ <function TrayClient.create_xpra_tray.<locals>.xpra_tray_geometry at 0x7fd9b15bd598>, \ <function TrayClient.create_xpra_tray.<locals>.xpra_tray_click at 0x7fd9df13ad90>, \ <function TrayClient.create_xpra_tray.<locals>.xpra_tray_mouseover at 0x7fd9b15bd510>, \ <function TrayClient.create_xpra_tray.<locals>.xpra_tray_exit at 0x7fd9b15bd400>) \ tray classes=[<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>, <class 'xpra.client.gtk_base.statusicon_tray.GTKStatusIconTray'>]
So we're using AppindicatorTray
which is the new thing we're supposed to use to have any chance of seeing a tray menu on all the newer desktop environments (gnome-shell, unity, etc).
But since you're using i3, you probably want GTKStatusIconTray
instead.
Try:
XPRA_USE_NATIVE_TRAY=0 xpra attach ...
Assuming that this fixes things, we may need to be more clever about choosing the tray implementation to use. Please also post the output of:
python3 -c "from xpra.os_util import *;print(is_unity(), is_gnome(), is_Fedora(), is_kde())"
Replying to Antoine Martin:
Try:
XPRA_USE_NATIVE_TRAY=0 xpra attach ...
It now appears, but I have to keep the mouse button pressed the entire time I want the menus to show. If I release they disappear directly. It is possible to select things though, releasing on for example 50% quality selects that.
Assuming that this fixes things, we may need to be more clever about choosing the tray implementation to use. Please also post the output of:
python3 -c "from xpra.os_util import *;print(is_unity(), is_gnome(), is_Fedora(), is_kde())"
Output:
$ python3 -c "from xpra.os_util import *;print(is_unity(), is_gnome(), is_Fedora(), is_kde())" False True False False
A question regarding this, does the AppIndicator thing mean that the tray icon will be showed by default in GNOME, or is that still broken by default?
A question regarding this, does the AppIndicator thing mean that the tray icon will be showed by default in GNOME, or is that still broken by default?
It should work for most DEs, but not in GNOME because they want every application in the world to re-write their systray code using their ever changing javascript API (sheer lunacy). So in order to make it work on GNOME, you will also need to install topicons.
$ python3 -c "from xpra.os_util import *;print(is_unity(), is_gnome(), is_Fedora(), is_kde())" False True False False
That's odd, you matched is_gnome()
, can you please post:
$ env | grep XDG_
Replying to Antoine Martin:
That's odd, you matched
is_gnome()
, can you please post:$ env | grep XDG_
$ env | grep XDG_ XDG_MENU_PREFIX=gnome- XDG_VTNR=2 XDG_SESSION_ID=2 XDG_SESSION_TYPE=x11 XDG_DATA_DIRS=/usr/share/gnome:/usr/share/i3-gnome:/usr/local/share/:/usr/share/ XDG_SESSION_DESKTOP=i3-gnome XDG_CURRENT_DESKTOP=GNOME XDG_SEAT=seat0 XDG_RUNTIME_DIR=/run/user/1000 XDG_CONFIG_DIRS=/etc/xdg/xdg-i3-gnome:/etc/xdg
Forgot I installed i3 using i3-gnome. That could confuse things for you I guess.
I've noticed another weird thing regarding this, there is a 'b' in places where it should not be several places in the xpra logs. For example the line:
2020-04-06 11:23:03,988 _NET_WM_NAME=b'i3'
In the first log I posted. When I changed settings in the Tray icon menu the quality severely deteriorated and the settings did not have any effect. When I looked in the ~.xpra/:9677.log on the server I did see the same 'b' in places where it should not be:
ESC[33m2020-04-06 12:11:45,876 Warning: client specified 'b'auto'' encoding,ESC[0m ESC[33m2020-04-06 12:11:45,876 but it only supports: h264, vp9, vp8, mpeg4, png, png/P, png/L, webp, rgb, jpeg, h265, mpeg1, mpeg2ESC[0m ESC[31m2020-04-06 12:11:45,876 Error: encoding b'auto' is not supported by this serverESC[0m ESC[36m2020-04-06 12:11:47,890 client 3 @30.973 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22))ESC[0m ESC[36m2020-04-06 12:11:58,706 client 3 @41.786 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22))ESC[0m ESC[36m2020-04-06 12:11:59,313 client 3 @42.416 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22))ESC[0m ESC[36m2020-04-06 12:12:06,134 client 3 @49.187 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22))ESC[0m ESC[36m2020-04-06 12:12:33,703 client 3 @16.810 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22))ESC[0m ESC[36m2020-04-06 12:12:34,057 client 3 @17.169 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22))ESC[0m ESC[36m2020-04-06 12:12:36,765 client 3 @19.814 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:('hidden.server.net', 22))ESC[0m ESC[36m2020-04-06 12:13:47,568 client 3 @30.665 popup_menu(<Gtk.StatusIcon object at 0x7f7df76ea900 (GtkStatusIcon at 0x3230700)>, 3, 6150071, ()) modifiers_mask=<flags GDK_BUTTON3_MASK of type Gdk.ModifierType>ESC[0m ESC[36m2020-04-06 12:13:47,577 client 3 @30.666 handle_click(2, 0)ESC[0m ESC[36m2020-04-06 12:13:47,577 client 3 @30.666 may_guess() GUESS_GEOMETRY=False, current guess=NoneESC[0m ESC[36m2020-04-06 12:13:47,578 client 3 @30.666 xpra_tray_click(2, 1, 0)ESC[0m ESC[36m2020-04-06 12:13:47,578 client 3 @30.667 xpra_tray_click(2, 0, 0)ESC[0m ESC[36m2020-04-06 12:13:49,265 client 3 @32.368 activate_menu(<Gtk.StatusIcon object at 0x7f7df76ea900 (GtkStatusIcon at 0x3230700)>) modifiers_mask=<flags GDK_BUTTON1_MASK of type Gdk.ModifierType>ESC[0m ESC[36m2020-04-06 12:13:49,283 client 3 @32.369 handle_click(1, 0)ESC[0m ESC[36m2020-04-06 12:13:49,284 client 3 @32.369 may_guess() GUESS_GEOMETRY=False, current guess=NoneESC[0m ESC[36m2020-04-06 12:13:49,284 client 3 @32.370 xpra_tray_click(1, 1, 0)ESC[0m ESC[36m2020-04-06 12:13:49,285 client 3 @32.370 xpra_tray_click(1, 0, 0)ESC[0m ESC[33m2020-04-06 12:13:54,024 Warning: client specified 'b'h264'' encoding,ESC[0m ESC[33m2020-04-06 12:13:54,025 but it only supports: h264, vp9, vp8, mpeg4, png, png/P, png/L, webp, rgb, jpeg, h265, mpeg1, mpeg2ESC[0m ESC[31m2020-04-06 12:13:54,025 Error: encoding b'h264' is not supported by this serverESC[0m ESC[36m2020-04-06 12:13:59,808 client 3 @42.917 activate_menu(<Gtk.StatusIcon object at 0x7f7df76ea900 (GtkStatusIcon at 0x3230700)>) modifiers_mask=<flags GDK_BUTTON1_MASK of type Gdk.ModifierType>ESC[0m ESC[36m2020-04-06 12:13:59,822 client 3 @42.918 handle_click(1, 0)ESC[0m ESC[36m2020-04-06 12:13:59,822 client 3 @42.918 may_guess() GUESS_GEOMETRY=False, current guess=NoneESC[0m ESC[36m2020-04-06 12:13:59,823 client 3 @42.918 xpra_tray_click(1, 1, 0)ESC[0m ESC[36m2020-04-06 12:13:59,823 client 3 @42.919 xpra_tray_click(1, 0, 0)ESC[0m ESC[33m2020-04-06 12:14:03,689 Warning: client specified 'b'png/L'' encoding,ESC[0m ESC[33m2020-04-06 12:14:03,689 but it only supports: h264, vp9, vp8, mpeg4, png, png/P, png/L, webp, rgb, jpeg, h265, mpeg1, mpeg2ESC[0m ESC[31m2020-04-06 12:14:03,689 Error: encoding b'png/L' is not supported by this serverESC[0m
Xpra seems stuck in a mode with very bad quality pictures (text in Eclipse unreadable), and I can't change from it using the tray menu. Even changing to grayscale png had no effect, due to the name miss-match.
TILs:
XDG_SESSION_DESKTOP=i3-gnome XDG_CURRENT_DESKTOP=GNOME
Forgot I installed i3 using i3-gnome. That could confuse things for you I guess.
r25996 should fix that. You can apply it by hand (it's small), or wait for the next stable update.
Warning: client specified 'b'auto'' encoding
Thanks for reporting this, fixed in r25997.
Replying to Antoine Martin:
r25996 should fix that. You can apply it by hand (it's small), or wait for the next stable update.
OK thank you!
When do you think the next stable will be released?
When do you think the next stable will be released?
Maybe next weekend, maybe later. Hard to say.
I looked for the file encoding_server.py to try to hand fix that issue (https://www.xpra.org/trac/changeset/25997/xpra). Ran
sudo apt-file list xpra | grep encoding
on the server, but the file was not found? Is it possible to hand fix that issue?
And thank you for the very quick replies and great help!
on the server, but the file was not found? Is it possible to hand fix that issue?
Both patches have already been applied to the v3.0.x branch: r25998 + r25999. So those files definitely exist in your v3.0.x installation.
Hi,
Tested hand editing both the fixes. r25999 unfortunately did not work. The code was placed between functions. I interpreted it to belong in is_gnome(), so moved it there on my installation:
def is_gnome(): if os.environ.get("XDG_SESSION_DESKTOP", "").split("-", 1)[0] in ("i3", "ubuntu", ): #"i3-gnome" is not really gnome... ie: the systray does work! return False return os.environ.get("XDG_CURRENT_DESKTOP", "").lower().find("gnome")>=0
Now it works, at least on my client. Was the code intended to be in is_gnome()?
The other change r25998 works fine on the server.
Thank you so much for these fixes!
Did fiddle around a bit more with the settings. I can change encoding, but as soon as I touch the Quality setting it seems it is stuck on a very low setting, unreadable text. Perhaps another fix is needed on the quality as well? After I've touched the Quality setting there is no going back, except changing to rgb.
r25999 unfortunately did not work. The code was placed between functions. I interpreted it to belong in is_gnome()
Right, the patch
command is absolute garbage. How on earth does it keep on messing this up so badly, yet at other times fail to apply a patch because of a very slight difference in the context!??
Fixed in r26004.
as soon as I touch the Quality setting it seems it is stuck on a very low setting
Will check.
as soon as I touch the Quality setting it seems it is stuck on a very low setting
That's fixed in r26009 + r26010 and will be in the next stable update.
(and it had been broken for a while too!)
Replying to Antoine Martin:
as soon as I touch the Quality setting it seems it is stuck on a very low setting
That's fixed in r26009 + r26010 and will be in the next stable update.
(and it had been broken for a while too!)
I hand edited those changes and I can now change the quality without xpra getting stuck in a very low setting. Thank you!
However I have noticed another thing... In an earlier comment I mentioned that I had to keep the mouse pressed to access the xpra tray menu. Unfortunately Eclipse behaves similarly, and mouse presses seems confused with accessing the clipboard somehow. For example to right click on a file in Eclipse I have to keep the mouse pressed. Left click mostly does not work. I see that the Xpra icon gets replaced with a clipboard icon when I click. The ~/.xpra/:9677.log file on the server contains a lot of errors regarding the clipboard:
2020-04-07 09:26:27,475 client is requesting an unknown target: 'resource-transfer-format:1586182768802:944468364'ESC[0m 2020-04-07 09:26:27,475 valid targets: TIMESTAMP, TARGETS, MULTIPLE, SAVE_TARGETS, text/html, text/_moz_htmlcontext, text/_moz_htmlinfo, UTF8_STRING, COMPOUND_TEXT, TEXT, STRING, text/plain;charset=utf-8, text/plain, text/x-moz-url-privESC[0m ESC[33m2020-04-07 09:26:28,001 client 2 @20.414 Warning: CLIPBOARD selection request for 'resource-transfer-format:1586182768802:944468364' timed outESC[0m ESC[33m2020-04-07 09:26:28,053 client 2 @20.415 request 32 at time=0ESC[0m 2020-04-07 09:26:28,351 client is requesting an unknown target: 'resource-transfer-format:1586182768802:944468364'ESC[0m 2020-04-07 09:26:28,351 valid targets: TIMESTAMP, TARGETS, MULTIPLE, SAVE_TARGETS, text/html, text/_moz_htmlcontext, text/_moz_htmlinfo, UTF8_STRING, COMPOUND_TEXT, TEXT, STRING, text/plain;charset=utf-8, text/plain, text/x-moz-url-privESC[0m ESC[33m2020-04-07 09:26:28,890 client 2 @21.290 Warning: CLIPBOARD selection request for 'resource-transfer-format:1586182768802:944468364' timed outESC[0m ESC[33m2020-04-07 09:26:28,967 client 2 @21.292 request 33 at time=0ESC[0m 2020-04-07 09:26:28,979 client is requesting an unknown target: 'resource-transfer-format:1586182768802:944468364'ESC[0m 2020-04-07 09:26:28,979 valid targets: TIMESTAMP, TARGETS, MULTIPLE, SAVE_TARGETS, text/html, text/_moz_htmlcontext, text/_moz_htmlinfo, UTF8_STRING, COMPOUND_TEXT, TEXT, STRING, text/plain;charset=utf-8, text/plain, text/x-moz-url-privESC[0m ESC[33m2020-04-07 09:26:29,582 client 2 @21.929 Warning: CLIPBOARD selection request for 'resource-transfer-format:1586182768802:944468364' timed outESC[0m ESC[33m2020-04-07 09:26:29,583 client 2 @21.930 request 34 at time=0ESC[0m
Another application (p4v) works fine when mouse is pressed though.
I hand edited those changes and I can now change the quality without xpra getting stuck in a very low setting. Thank you!
Please close this ticket as fixed and create new one(s) for other issues.
... Eclipse behaves similarly, and mouse presses seems confused with accessing the clipboard somehow For example to right click on a file in Eclipse I have to keep the mouse pressed. Left click mostly does not work. I see that the Xpra icon gets replaced with a clipboard icon when I click.
Please try running the client with:
XPRA_CLIPBOARD_NOTIFY=0 xpra attach ...
Does that help? (maybe this should be the default now?) If not, maybe #2359 does? (ibus problem?)
The log file on the server contains a lot of errors regarding the clipboard:
Those are warnings that Eclipse is requesting invalid targets, as of r26013 we will only log those warnings once to avoid spamming the logs.
#2715 created
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2713