Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPRA v4.4.6 not showing tray icons. #3956

Closed
nentibusarchitectura opened this issue Aug 4, 2023 · 17 comments
Closed

XPRA v4.4.6 not showing tray icons. #3956

nentibusarchitectura opened this issue Aug 4, 2023 · 17 comments
Labels
bug Something isn't working client linux

Comments

@nentibusarchitectura
Copy link

Describe the bug
In version 4.4.6 remote tray icons are not displayed any more it used to work fine until 4.4.5

To Reproduce
Run any application on the remote server that opens a tray icon, it is not displayed in the client, for example "keepassxc" or "systray-x" for Thunderbird, Remmina, etc.

System Information (please complete the following information):

  • Server OS: Ubuntu 20.04.6
  • Client OS: Ubuntu 20.04.6
  • Xpra Server Version : 4.4.6
  • Xpra Client Version: 4.4.6

Additional context
It was possible to download old versions of XPRA before in Ubuntu to downgrade if required but now only versions:

Version: 4.4.6-r29-1
Version: 3.1.5-r0-1
Version: 3.0.6+dfsg1-1build1

Are available now via APT

Would it be possible somehow to download the .debs for v4.4.5???

@nentibusarchitectura nentibusarchitectura added the bug Something isn't working label Aug 4, 2023
@totaam
Copy link
Collaborator

totaam commented Aug 4, 2023

Please specify the exact desktop environment that you are using.
Ideally, please also include the client's output with -d tray.
The release notes for 4.4.6 clearly show some fixes for system trays:
https://github.com/Xpra-org/xpra/blob/v4.4.x/docs/CHANGELOG.md#446-2023-06-15
Perhaps using XPRA_USE_NATIVE_TRAY=0 would help?

@nentibusarchitectura
Copy link
Author

Please specify the exact desktop environment that you are using.

Apologies, I completely forgot to mention desktop: XFCE v4.16

Ideally, please also include the client's output with -d tray.
The release notes for 4.4.6 clearly show some fixes for system trays:
https://github.com/Xpra-org/xpra/blob/v4.4.x/docs/CHANGELOG.md#446-2023-06-15
Perhaps using XPRA_USE_NATIVE_TRAY=0 would help?

Thanks, I will test your suggestions as soon as I get the chance.

@nentibusarchitectura
Copy link
Author

Hi,

XPRA_USE_NATIVE_TRAY=0 set in the client as: in --env=XPRA_USE_NATIVE_TRAY=0 does not have any effect. Shall I set that up in the server too or setting it up in the client should suffice?

This is the output of -d tray

2023-08-04 16:36:14,933 debug enabled for xpra.platform.xposix.gui / ('posix', 'tray')
2023-08-04 16:36:14,960 debug enabled for xpra.client.mixins.window_manager / ('client', 'tray')
2023-08-04 16:36:14,962 debug enabled for xpra.client.mixins.tray / ('tray',)
2023-08-04 16:36:15,016 Xpra GTK3 X11 client version 4.4.6-r29 64-bit
2023-08-04 16:36:15,079  running on Linux Ubuntu 20.04 focal
2023-08-04 16:36:15,079 _NET_SUPPORTING_WM_CHECK window=0xc0008e
2023-08-04 16:36:15,079 _NET_WM_NAME=b'Xfwm4'
2023-08-04 16:36:15,079  window manager is 'Xfwm4'
2023-08-04 16:36:15,081 debug enabled for xpra.client.client_tray / ('tray',)
2023-08-04 16:36:15,081 window icon overlay: /usr/share/xpra/icons/xpra.png
2023-08-04 16:36:15,085 overlay_image=<PIL.PngImagePlugin.PngImageFile image mode=RGBA size=48x48 at 0x7F0DA8401760>
2023-08-04 16:36:15,126 created unix domain socket '/run/user/1000/xpra/clients/brutus.domain.com-420538'
2023-08-04 16:36:15,152 make_tray_menu_helper() tray menu helper classes: (None, <class 'xpra.client.gtk3.tray_menu.GTK3TrayMenu'>)
2023-08-04 16:36:15,167 setup_xpra_tray()
2023-08-04 16:36:15,183 get_tray_title()='Xpra' (items=('Xpra',))
2023-08-04 16:36:15,184 debug enabled for xpra.client.tray_base / ('tray',)
2023-08-04 16:36:15,184 debug enabled for xpra.platform.xposix.appindicator_tray / ('tray', 'posix')
2023-08-04 16:36:15,184 get_native_tray_classes()=[<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>] (USE_NATIVE_TRAY=False)
2023-08-04 16:36:15,184 tray GUESS_GEOMETRY=False
2023-08-04 16:36:15,185 make_tray(0, <Gtk.Menu object at 0x7f0d9cb54c80 (GtkMenu at 0x1be62c0)>, 'Xpra', 'xpra', <function TrayClient.create_xpra_tray.<locals>.xpra_tray_geometry at 0x7f0d9cb1ff70>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_click at 0x7f0da6f9ef70>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_mouseover at 0x7f0d9cb1fe50>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_exit at 0x7f0d9cb1fee0>) tray classes=[<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>, <class 'xpra.client.gtk_base.statusicon_tray.GTKStatusIconTray'>]
2023-08-04 16:36:15,185 set_icon_from_file(/usr/share/xpra/icons/xpra.png) tray_widget=<AyatanaAppIndicator3.Indicator object at 0x7f0d9caac480 (AppIndicator at 0x1550550)>
2023-08-04 16:36:15,186 do_set_icon_from_file('/usr/share/xpra/icons/xpra.png') setting icon theme path='/usr/share/xpra/icons'
2023-08-04 16:36:15,186 do_set_icon_from_file('/usr/share/xpra/icons/xpra.png') setting icon=xpra
2023-08-04 16:36:15,205 setup_xpra_tray(xpra)=Tray(0:Xpra) (<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>)
2023-08-04 16:36:15,212  keyboard settings: rules=evdev, model=pc105, layout=gb
2023-08-04 16:36:15,213 _NET_SUPPORTING_WM_CHECK window=0xc0008e
2023-08-04 16:36:15,213 _NET_WM_NAME=b'Xfwm4'
2023-08-04 16:36:15,215  desktop size is 3200x1080:
2023-08-04 16:36:15,215   :0.0 (846x285 mm - DPI: 96x96) workarea: 3200x1030 at    0x25  
2023-08-04 16:36:15,215     DEL HDMI-A-0     1920x1080 at    0x0    (477x268 mm - DPI: 102x102) workarea: 1920x1030 at    0x25
2023-08-04 16:36:15,215     DEL DisplayPort-1 1280x1024 at 1920x0    (338x270 mm - DPI: 96x96) workarea: 1280x1024 at 1920x0
2023-08-04 16:36:15,249 _NET_SUPPORTING_WM_CHECK window=0xc0008e
2023-08-04 16:36:15,250 _NET_WM_NAME=b'Xfwm4'
2023-08-04 16:36:15,630 enabled remote logging
2023-08-04 16:36:15,631 Xpra X11 seamless server version 4.4
2023-08-04 16:36:15,635 Attached to xpra server at jaironj1:22
2023-08-04 16:36:15,635  (press Control-C to detach)

2023-08-04 16:36:15,639 get_tray_title()='xfce4-terminal\nssh://username@jaironj1/100' (items=('xfce4-terminal', 'ssh://username@jaironj1/100'))
2023-08-04 16:36:15,646 get_tray_title()='xfce4-terminal\nssh://username@jaironj1/100' (items=('xfce4-terminal', 'ssh://username@jaironj1/100'))
2023-08-04 16:36:15,840 tray 4 metadata=typedict({'xid': '0x4000ab', 'has-alpha': True, 'client-machine': 'krang.domain.com', 'pid': 814, 'title': 'SysTray-X', 'command': b'/usr/bin/xpra start :100 --start-after-connect=/usr/bin/xfce4-terminal --start-via-proxy=no --start-new-commands=yes --opengl=no --pulseaudio=no --microphone=no --speaker=no --daemon=no --webcam=no --systemd-run=no --env=XPRA_MIN_CLIPBOARD_COMPRESS_SIZE=99999999', 'opaque-region': (), 'tray': True})
2023-08-04 16:36:15,840 get_native_system_tray_classes()=[<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>] (USE_NATIVE_TRAY=False)
2023-08-04 16:36:15,840 make_system_tray(4, None, 'SysTray-X', None, <function WindowClient.setup_system_tray.<locals>.tray_geometry at 0x7f0d95fc0e50>, <function WindowClient.setup_system_tray.<locals>.tray_click at 0x7f0d9ca85040>, <function WindowClient.setup_system_tray.<locals>.tray_mouseover at 0x7f0d95fc0f70>, <function WindowClient.setup_system_tray.<locals>.tray_exit at 0x7f0d95fc0dc0>) system tray classes=[<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>, <class 'xpra.client.gtk_base.statusicon_tray.GTKStatusIconTray'>]
2023-08-04 16:36:15,840 set_icon_from_file(xpra.png) tray_widget=<AyatanaAppIndicator3.Indicator object at 0x7f0d95fd2e80 (AppIndicator at 0x1550b50)>
2023-08-04 16:36:15,840 do_set_icon_from_file('xpra.png') setting icon=xpra
2023-08-04 16:36:15,840 setup_system_tray(gtk3.client, 4, 4, 64, 64, 'SysTray-X') tray_widget=Tray(4:SysTray-X)
2023-08-04 16:36:15,841 ClientTray(gtk3.client, 4, 64, 64, Tray(4:SysTray-X), False, <mmap.mmap object at 0x7f0d9c7d2ad0>)
2023-08-04 16:36:15,841 process_new_tray(['new-tray', 4, 64, 64, {'xid': '0x4000ab', 'has-alpha': True, 'client-machine': 'krang.domain.com', 'pid': 814, 'title': 'SysTray-X', 'command': b'/usr/bin/xpra start :100 --start-after-connect=/usr/bin/xfce4-terminal --start-via-proxy=no --start-new-commands=yes --opengl=no --pulseaudio=no --microphone=no --speaker=no --daemon=no --webcam=no --systemd-run=no --env=XPRA_MIN_CLIPBOARD_COMPRESS_SIZE=99999999', 'opaque-region': (), 'tray': True}]) tray=ClientTray(4:SysTray-X)
2023-08-04 16:36:15,854 running, 5 windows, 1 tray
2023-08-04 16:36:15,854 ClientTray(4:SysTray-X).draw_region(0, 0, 64, 64, 'rgb32', '7951 bytes', 256, 1, typedict({'rgb_format': 'RGBA', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d9caa7310>])
2023-08-04 16:36:15,860 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:Xpra)
2023-08-04 16:36:15,862 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:Xpra)
2023-08-04 16:36:15,862 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:Xpra)
2023-08-04 16:36:15,959 ClientTray(4:SysTray-X).reconfigure(False) geometry=None
2023-08-04 16:36:15,959 ClientTray(4:SysTray-X).reconfigure() guessing location using size=None
2023-08-04 16:36:15,959 ClientTray(4:SysTray-X).reconfigure(False) sending configure for geometry=[0, 0, 64, 64] : (0, 0, 64, 64, {'encoding.transparency': True, 'encodings.rgb_formats': ['RGBA', 'RGB', 'RGBX']})
2023-08-04 16:36:15,959 ClientTray(4:SysTray-X).after_draw_update_tray(True, )
2023-08-04 16:36:15,960 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d95fd4370>, data: True
2023-08-04 16:36:15,960 ClientTray(4:SysTray-X).set_tray_icon(rgb32, 64, 64, 256, 16384 bytes)
2023-08-04 16:36:15,961 set_icon_from_data('16384 pixels', True, 64, 64, 256) using temporary file /run/user/1000/xpra/tmp/tray6ij32y38.png
2023-08-04 16:36:15,962 do_set_icon_from_file('/run/user/1000/xpra/tmp/tray6ij32y38.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:15,962 do_set_icon_from_file('/run/user/1000/xpra/tmp/tray6ij32y38.png') setting icon=tray6ij32y38
2023-08-04 16:36:15,962 ClientTray(4:SysTray-X).reconfigure(False) geometry=None
2023-08-04 16:36:16,065 ClientTray(4:SysTray-X).draw_region(0, 0, 64, 64, 'rgb32', '7951 bytes', 256, 2, typedict({'rgb_format': 'RGBA', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d95fc0310>])
2023-08-04 16:36:16,071 ClientTray(4:SysTray-X).after_draw_update_tray(True, )
2023-08-04 16:36:16,071 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d95fd4370>, data: True
2023-08-04 16:36:16,073 ClientTray(4:SysTray-X).set_tray_icon(rgb32, 64, 64, 256, 16384 bytes)
2023-08-04 16:36:16,075 set_icon_from_data('16384 pixels', True, 64, 64, 256) using temporary file /run/user/1000/xpra/tmp/trayhzezkdw9.png
2023-08-04 16:36:16,075 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayhzezkdw9.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:16,075 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayhzezkdw9.png') setting icon=trayhzezkdw9
2023-08-04 16:36:16,075 ClientTray(4:SysTray-X).reconfigure(False) geometry=None
2023-08-04 16:36:16,207 set_icon(None) using filename='/usr/share/xpra/icons/xpra.png'
2023-08-04 16:36:16,207 set_icon_from_file(/usr/share/xpra/icons/xpra.png) tray_widget=<AyatanaAppIndicator3.Indicator object at 0x7f0d9caac480 (AppIndicator at 0x1550550)>
2023-08-04 16:36:16,207 do_set_icon_from_file('/usr/share/xpra/icons/xpra.png') setting icon theme path='/usr/share/xpra/icons'
2023-08-04 16:36:16,207 do_set_icon_from_file('/usr/share/xpra/icons/xpra.png') setting icon=xpra
2023-08-04 16:36:16,299 ClientTray(4:SysTray-X).draw_region(0, 0, 64, 64, 'rgb32', '7951 bytes', 256, 3, typedict({'rgb_format': 'RGBA', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d95fc0310>])
2023-08-04 16:36:16,310 ClientTray(4:SysTray-X).after_draw_update_tray(True, )
2023-08-04 16:36:16,310 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d95fd4370>, data: True
2023-08-04 16:36:16,312 ClientTray(4:SysTray-X).set_tray_icon(rgb32, 64, 64, 256, 16384 bytes)
2023-08-04 16:36:16,313 set_icon_from_data('16384 pixels', True, 64, 64, 256) using temporary file /run/user/1000/xpra/tmp/trayazeexkft.png
2023-08-04 16:36:16,313 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayazeexkft.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:16,314 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayazeexkft.png') setting icon=trayazeexkft
2023-08-04 16:36:16,314 ClientTray(4:SysTray-X).reconfigure(False) geometry=None
2023-08-04 16:36:16,841 ClientTray(4:SysTray-X).reconfigure(True) geometry=None
2023-08-04 16:36:16,842 ClientTray(4:SysTray-X).reconfigure(True) sending configure for geometry=[0, 0, 64, 64] : (0, 0, 64, 64, {'encoding.transparency': True, 'encodings.rgb_formats': ['RGBA', 'RGB', 'RGBX']})
2023-08-04 16:36:16,849 ClientTray(4:SysTray-X).draw_region(0, 0, 64, 64, 'rgb32', '7951 bytes', 256, 4, typedict({'rgb_format': 'RGBA', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d95fc0310>])
2023-08-04 16:36:16,850 ClientTray(4:SysTray-X).after_draw_update_tray(True, )
2023-08-04 16:36:16,850 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d95fd4370>, data: True
2023-08-04 16:36:16,850 ClientTray(4:SysTray-X).set_tray_icon(rgb32, 64, 64, 256, 16384 bytes)
2023-08-04 16:36:16,852 set_icon_from_data('16384 pixels', True, 64, 64, 256) using temporary file /run/user/1000/xpra/tmp/trayu00urut5.png
2023-08-04 16:36:16,852 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayu00urut5.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:16,852 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayu00urut5.png') setting icon=trayu00urut5
2023-08-04 16:36:16,852 ClientTray(4:SysTray-X).reconfigure(False) geometry=None
2023-08-04 16:36:17,375 ClientTray(4:SysTray-X).draw_region(0, 0, 64, 64, 'rgb32', '7951 bytes', 256, 5, typedict({'rgb_format': 'RGBA', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d95fc0820>])
2023-08-04 16:36:17,381 ClientTray(4:SysTray-X).after_draw_update_tray(True, )
2023-08-04 16:36:17,381 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d95fd4370>, data: True
2023-08-04 16:36:17,382 ClientTray(4:SysTray-X).set_tray_icon(rgb32, 64, 64, 256, 16384 bytes)
2023-08-04 16:36:17,384 set_icon_from_data('16384 pixels', True, 64, 64, 256) using temporary file /run/user/1000/xpra/tmp/trayx82m8pj4.png
2023-08-04 16:36:17,384 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayx82m8pj4.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:17,384 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayx82m8pj4.png') setting icon=trayx82m8pj4
2023-08-04 16:36:17,384 ClientTray(4:SysTray-X).reconfigure(False) geometry=None
2023-08-04 16:36:48,376 tray 1605 metadata=typedict({'xid': '0x4835b8', 'client-machine': 'krang.domain.com', 'pid': 814, 'title': 'Xpra', 'command': b'/usr/bin/xpra start :100 --start-after-connect=/usr/bin/xfce4-terminal --start-via-proxy=no --start-new-commands=yes --opengl=no --pulseaudio=no --microphone=no --speaker=no --daemon=no --webcam=no --systemd-run=no --env=XPRA_MIN_CLIPBOARD_COMPRESS_SIZE=99999999', 'opaque-region': (), 'tray': True})
2023-08-04 16:36:48,376 get_native_system_tray_classes()=[<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>] (USE_NATIVE_TRAY=False)
2023-08-04 16:36:48,376 make_system_tray(1605, None, 'Xpra', None, <function WindowClient.setup_system_tray.<locals>.tray_geometry at 0x7f0d95fafd30>, <function WindowClient.setup_system_tray.<locals>.tray_click at 0x7f0d9c78bdc0>, <function WindowClient.setup_system_tray.<locals>.tray_mouseover at 0x7f0d95fb7550>, <function WindowClient.setup_system_tray.<locals>.tray_exit at 0x7f0d95fafc10>) system tray classes=[<class 'xpra.platform.xposix.appindicator_tray.AppindicatorTray'>, <class 'xpra.client.gtk_base.statusicon_tray.GTKStatusIconTray'>]
2023-08-04 16:36:48,376 set_icon_from_file(xpra.png) tray_widget=<AyatanaAppIndicator3.Indicator object at 0x7f0d95fb3100 (AppIndicator at 0x216a190)>
2023-08-04 16:36:48,377 do_set_icon_from_file('xpra.png') setting icon=xpra
2023-08-04 16:36:48,377 setup_system_tray(gtk3.client, 1605, 1605, 64, 64, 'Xpra') tray_widget=Tray(1605:Xpra)
2023-08-04 16:36:48,377 ClientTray(gtk3.client, 1605, 64, 64, Tray(1605:Xpra), False, <mmap.mmap object at 0x7f0d9c7d2ad0>)
2023-08-04 16:36:48,377 process_new_tray(['new-tray', 1605, 64, 64, {'xid': '0x4835b8', 'client-machine': 'krang.domain.com', 'pid': 814, 'title': 'Xpra', 'command': b'/usr/bin/xpra start :100 --start-after-connect=/usr/bin/xfce4-terminal --start-via-proxy=no --start-new-commands=yes --opengl=no --pulseaudio=no --microphone=no --speaker=no --daemon=no --webcam=no --systemd-run=no --env=XPRA_MIN_CLIPBOARD_COMPRESS_SIZE=99999999', 'opaque-region': (), 'tray': True}]) tray=ClientTray(1605:Xpra)
2023-08-04 16:36:48,378 ClientTray(1605:Xpra).draw_region(0, 0, 64, 64, 'rgb24', '63 bytes', 192, 1, typedict({'rgb_format': 'RGB', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d9ca85f70>])
2023-08-04 16:36:48,378 ClientTray(1605:Xpra).after_draw_update_tray(True, )
2023-08-04 16:36:48,378 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d5812dca0>, data: True
2023-08-04 16:36:48,379 ClientTray(1605:Xpra).set_tray_icon(rgb24, 64, 64, 192, 12288 bytes)
2023-08-04 16:36:48,379 set_icon_from_data('12288 pixels', False, 64, 64, 192) using temporary file /run/user/1000/xpra/tmp/trayaqnycm3k.png
2023-08-04 16:36:48,379 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayaqnycm3k.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:48,379 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayaqnycm3k.png') setting icon=trayaqnycm3k
2023-08-04 16:36:48,380 ClientTray(1605:Xpra).reconfigure(False) geometry=None
2023-08-04 16:36:48,529 _NET_SUPPORTING_WM_CHECK window=0xc0008e
2023-08-04 16:36:48,530 _NET_WM_NAME=b'Xfwm4'
2023-08-04 16:36:48,609 ClientTray(1605:Xpra).draw_region(0, 0, 64, 64, 'rgb24', '10388 bytes', 192, 2, typedict({'rgb_format': 'RGB', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d9ca85f70>])
2023-08-04 16:36:48,610 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:Xpra)
2023-08-04 16:36:48,610 ClientTray(1605:Xpra).after_draw_update_tray(True, )
2023-08-04 16:36:48,611 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d5812dca0>, data: True
2023-08-04 16:36:48,614 ClientTray(1605:Xpra).set_tray_icon(rgb24, 64, 64, 192, 12288 bytes)
2023-08-04 16:36:48,616 set_icon_from_data('12288 pixels', False, 64, 64, 192) using temporary file /run/user/1000/xpra/tmp/traybyznqhet.png
2023-08-04 16:36:48,616 do_set_icon_from_file('/run/user/1000/xpra/tmp/traybyznqhet.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:48,616 do_set_icon_from_file('/run/user/1000/xpra/tmp/traybyznqhet.png') setting icon=traybyznqhet
2023-08-04 16:36:48,616 ClientTray(1605:Xpra).reconfigure(False) geometry=None
2023-08-04 16:36:48,793 ClientTray(1605:Xpra).draw_region(0, 0, 64, 64, 'rgb24', '1911 bytes', 192, 3, typedict({'rgb_format': 'RGB', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d95fafaf0>])
2023-08-04 16:36:48,793 ClientTray(1605:Xpra).after_draw_update_tray(True, )
2023-08-04 16:36:48,793 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d5812dca0>, data: True
2023-08-04 16:36:48,794 ClientTray(1605:Xpra).set_tray_icon(rgb24, 64, 64, 192, 12288 bytes)
2023-08-04 16:36:48,794 set_icon_from_data('12288 pixels', False, 64, 64, 192) using temporary file /run/user/1000/xpra/tmp/tray_bs_5dzp.png
2023-08-04 16:36:48,794 do_set_icon_from_file('/run/user/1000/xpra/tmp/tray_bs_5dzp.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:48,795 do_set_icon_from_file('/run/user/1000/xpra/tmp/tray_bs_5dzp.png') setting icon=tray_bs_5dzp
2023-08-04 16:36:48,795 ClientTray(1605:Xpra).reconfigure(False) geometry=None
2023-08-04 16:36:49,378 ClientTray(1605:Xpra).reconfigure(True) geometry=None
2023-08-04 16:36:49,379 ClientTray(1605:Xpra).reconfigure(True) sending configure for geometry=[0, 0, 64, 64] : (0, 0, 64, 64, {'encoding.transparency': True, 'encodings.rgb_formats': ['RGBA', 'RGB', 'RGBX']})
2023-08-04 16:36:49,456 ClientTray(1605:Xpra).draw_region(0, 0, 64, 64, 'rgb24', '1911 bytes', 192, 4, typedict({'rgb_format': 'RGB', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d95fafaf0>])
2023-08-04 16:36:49,456 ClientTray(1605:Xpra).after_draw_update_tray(True, )
2023-08-04 16:36:49,456 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d5812dca0>, data: True
2023-08-04 16:36:49,457 ClientTray(1605:Xpra).set_tray_icon(rgb24, 64, 64, 192, 12288 bytes)
2023-08-04 16:36:49,457 set_icon_from_data('12288 pixels', False, 64, 64, 192) using temporary file /run/user/1000/xpra/tmp/trayyeys04x9.png
2023-08-04 16:36:49,458 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayyeys04x9.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:49,458 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayyeys04x9.png') setting icon=trayyeys04x9
2023-08-04 16:36:49,458 ClientTray(1605:Xpra).reconfigure(False) geometry=None
2023-08-04 16:36:49,672 ClientTray(1605:Xpra).draw_region(0, 0, 64, 64, 'rgb24', '1911 bytes', 192, 5, typedict({'rgb_format': 'RGB', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d9ca85f70>])
2023-08-04 16:36:49,673 ClientTray(1605:Xpra).after_draw_update_tray(True, )
2023-08-04 16:36:49,673 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d5812dca0>, data: True
2023-08-04 16:36:49,673 ClientTray(1605:Xpra).set_tray_icon(rgb24, 64, 64, 192, 12288 bytes)
2023-08-04 16:36:49,674 set_icon_from_data('12288 pixels', False, 64, 64, 192) using temporary file /run/user/1000/xpra/tmp/traypx4zs_gr.png
2023-08-04 16:36:49,674 do_set_icon_from_file('/run/user/1000/xpra/tmp/traypx4zs_gr.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:49,674 do_set_icon_from_file('/run/user/1000/xpra/tmp/traypx4zs_gr.png') setting icon=traypx4zs_gr
2023-08-04 16:36:49,674 ClientTray(1605:Xpra).reconfigure(False) geometry=None
2023-08-04 16:36:53,945 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:Xpra)
2023-08-04 16:36:54,723 ClientTray(1605:Xpra).draw_region(0, 0, 64, 64, 'rgb24', '1911 bytes', 192, 6, typedict({'rgb_format': 'RGB', 'lz4': 2}), [<function WindowClient._do_draw.<locals>.record_decode_time at 0x7f0d95faf3a0>])
2023-08-04 16:36:54,723 ClientTray(1605:Xpra).after_draw_update_tray(True, )
2023-08-04 16:36:54,723 tray backing=<xpra.client.client_tray.TrayBacking object at 0x7f0d5812dca0>, data: True
2023-08-04 16:36:54,723 ClientTray(1605:Xpra).set_tray_icon(rgb24, 64, 64, 192, 12288 bytes)
2023-08-04 16:36:54,724 set_icon_from_data('12288 pixels', False, 64, 64, 192) using temporary file /run/user/1000/xpra/tmp/trayvusqs1dy.png
2023-08-04 16:36:54,724 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayvusqs1dy.png') setting icon theme path='/run/user/1000/xpra/tmp'
2023-08-04 16:36:54,724 do_set_icon_from_file('/run/user/1000/xpra/tmp/trayvusqs1dy.png') setting icon=trayvusqs1dy
2023-08-04 16:36:54,724 ClientTray(1605:Xpra).reconfigure(False) geometry=None
2023-08-04 16:36:54,869 set_tray_icon() DYNAMIC_TRAY_ICON=False, tray=Tray(0:Xpra)

@totaam
Copy link
Collaborator

totaam commented Aug 4, 2023

Apologies, I completely forgot to mention desktop: XFCE v4.16

That's a crucial piece of information.
This is not the default DE on Ubuntu.

set_icon_from_file(xpra.png) tray_widget=<AyatanaAppIndicator3.Indicator object at 0x7f0d95fd2e80 (AppIndicator at 0x1550b50)>

So you're using AyatanaAppIndicator3.
Perhaps the fixes for KWin broke XFCE: #3789
I would have expected XPRA_USE_NATIVE_TRAY=0 to revert back to the old behaviour.

@nentibusarchitectura
Copy link
Author

Upgraded client side to v5.0.0, tray icons still not working.

@totaam
Copy link
Collaborator

totaam commented Sep 1, 2023

As per https://github.com/Xpra-org/xpra/wiki/Platforms, XFCE on Ubuntu is Tier-3.
I do not have the time to investigate this, sorry.

@nentibusarchitectura
Copy link
Author

:-/

@nentibusarchitectura
Copy link
Author

System Information:

Server OS: Ubuntu 20.04.6
Client OS: Fedora 38
Xpra Server Version : 4.4.6
Xpra Client Version: 4.4.6

Installed Fedora 38, stock gnome desktop with Wayland as client.

Installed xpra 4.4.6 from the default Fedora repositories

Tried to attach to my server, got this non-critical error:

[username@fedora xpra]$ Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/xpra/client/client_base.py", line 1150, in call_handler
    handler(packet)
  File "/usr/lib64/python3.11/site-packages/xpra/client/mixins/window_manager.py", line 538, in _process_new_tray
    tray = self.setup_system_tray(self, app_id, wid, w, h, metadata)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/xpra/client/mixins/window_manager.py", line 601, in setup_system_tray
    assert tray_widget, "could not instantiate a system tray for tray id %s" % wid
AssertionError: could not instantiate a system tray for tray id 13

At this point how much I dislike gnome can't be put on words... I understand this is not xpra's fault, gnome still refuses for no good reason to support tray icons.

sudo dnf install gnome-shell-extension-appindicator gnome-extensions-app

Ran:

gnome-extensions-app

Enabled the appindicator extension so I can get icons on gnome

Rebooted

Ran XPRA aggain attaching to my server (Server runs Ubuntu 20.04)

Tray icons do not show using xpra 4.4.6 on Fedora 38 either, all I see is XPRA's icon in the tray area but nothing from the server. (attached screenshot, note most of the menu is also non-functional but this is a different story)

xfce_fedora38

Log: https://gist.github.com/nentibusarchitectura/7e2b532f46e991d2e9e6ae2d9626eae8

-------------------8<------------------------

System Information:

Server OS: Ubuntu 20.04.6
Client OS: Fedora 38
Xpra Server Version : 4.4.6
Xpra Client Version: 5.0.1

Then tried with xpra 5.0.1 stock gnome desktop with Wayland as client too and exactly the same results, still no tray icons, this time with some extra errors in the log:

2023-09-08 17:54:53,106 failed to load `AyatanaAppIndicator3`
Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/xpra/platform/posix/appindicator_tray.py", line 29, in <module>
    gi.require_version("AyatanaAppIndicator3", "0.1")  # @UndefinedVariable
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace AyatanaAppIndicator3 not available
2023-09-08 17:54:53,107 loaded `AppIndicator3`

Here is the log: https://gist.github.com/nentibusarchitectura/b4a5c15e815f61eeb781b117a363d1b6

@totaam
Copy link
Collaborator

totaam commented Sep 9, 2023

Found in your log:

  • --encoding=rgb - usually a terrible idea, don't do that
  • --compress=9 - just as bad

My guess is that you want --quality=100.


At least you managed to enable the extension!
On my Fedora desktop, you can't: no errors, no feedback, it just cannot be enabled.
I have very little time to devote to things that Gnome seems to break intentionally.
In any case, the appindicator "tray" implementation is incapable of forwarding regular X11 trays properly as it's limited to showing a menu and X11 trays are not. So even if it did somehow run, it would be mostly useless for forwarding.
Try MacOS or MS Windows as clients, those have not broken their tray API (for almost 30 years in the case of win32).

Some pointers:

totaam added a commit that referenced this issue Sep 9, 2023
this is a workaround for an appindicator bug that ignores all the menu updates once we have called 'set_menu()'
@totaam
Copy link
Collaborator

totaam commented Sep 9, 2023

I managed to enable it in the end, and tried to make it easier / automatic for others to do so when installing xpra-client-gnome: #2197 (comment)

note most of the menu is also non-functional but this is a different story

Rather than figuring out which version of appindicator broke this (upstream doesn't seem active), I ended up changing when and how we generate the menu to workaround the issue.


As for system tray forwarding... like I said above, use an OS with a usable API 😞
So I think I will close this ticket as wontfix / cantfix because no API exists to provide a "real" system tray on gnome-shell.

totaam added a commit that referenced this issue Sep 9, 2023
this is a workaround for an appindicator bug that ignores all the menu updates once we have called 'set_menu()'
@nentibusarchitectura
Copy link
Author

nentibusarchitectura commented Sep 11, 2023

Found in your log:

* `--encoding=rgb` - usually a terrible idea, don't do that

* `--compress=9` - just as bad

My guess is that you want --quality=100.

Interesting.

Why these seemingly horrible settings end in people's configurations is because at some point in the past it fixed some issue real or perceived. XPRA for me is a god send, it is the best thing since sliced bread to work remotely but it broke often in the past, and when it did I had to find a way to make it work with my poor understanding as an end user and what I could find online at the time.

These settings are the result of tons of experimentation, I have been using them since v3.x and these allowed me to work with as little latency and as reliably as I could (same as with the 8 bit encoding I often use and that you so kindly fixed back on 4.4.5).

I will experiment with --quality=100, I appreciate your suggestions a lot.

At least you managed to enable the extension! On my Fedora desktop, you can't: no errors, no feedback, it just cannot be enabled. I have very little time to devote to things that Gnome seems to break intentionally. In any case, the appindicator "tray" implementation is incapable of forwarding regular X11 trays properly as it's limited to showing a menu and X11 trays are not. So even if it did somehow run, it would be mostly useless for forwarding. Try MacOS or MS Windows as clients, those have not broken their tray API (for almost 30 years in the case of win32).

I hate Gnome with a passion, I only deployed it because you mentioned that Fedora is supported, but I don't want to use Gnome, believe me I would prefer to chew glass instead.

Regarding the client I can't use Windows, and I can't use Macs either, I need my Server and Client to be Linux, I don't care too much about the distro, but it has to be Linux, so if troubleshooting in Fedora is better for you I can make the effort to move to Fedora and troubleshoot there.

As per tray API support XFCE (and MATE) has had stable tray support for years and it has been working with XPRA since v3 which is when I started using XPRA on pretty much any distro, the tray broke from 4.4.6 onwards, it was running fine in 4.4.5.

All this time I have been on Ubuntu and the tray worked fine all these years, I haven't changed or updated the OS or desktop in the client, the tray broke with XPRA v4.4.6.

If I deploy Fedora with XFCE, could or would you please be able look into the tray issue?

At this point I'm even willing to sponsor/donation for the work, I really need the tray icons... it is a pain not being able to see the tray icons for my work.

@totaam
Copy link
Collaborator

totaam commented Sep 11, 2023

is because at some point in the past it fixed some issue real or perceived

Could well be real, in some rare specific cases, it is the correct solution.
The problem comes from people blindly copying command lines from the interwebs, which is perpetuating the idea that tweaking --encoding= is good idea - it very rarely is.

the tray broke from 4.4.6 onwards, it was running fine in 4.4.5

Then it should be fixable. From the 4.4.6 changelog:

@nentibusarchitectura
Copy link
Author

nentibusarchitectura commented Sep 11, 2023

I have been doing some testing

I deployed all the build tools, dependencies, etc to build XPRA on Fedora 38 and deployed XFCE 4.18 (standard on F38)

The tray icons works until commit: 15062ac (but the main menu does not.)

The tray stops working from commit: 5acbde2 onwards.

commit 5acbde2f5f519394f56d3de1acf8f896c6097f1e <---- Tray doesn't work any more from here onwards.
Author: totaam <[email protected]>
Date:   Thu May 25 20:51:56 2023 +0700

    fixup module path and garbled patch

commit 15062aca4dc927b9091ed517f54aa6678a83cb07 <---- Tray works but menu doesn't
Author: totaam <[email protected]>
Date:   Thu May 25 20:45:51 2023 +0700

    compatibility with the latest cx_Freeze

commit 55608da0a0cf9b923716b9950863ec557d363b1d <---- Both tray and menu work.
Author: totaam <[email protected]>
Date:   Thu May 25 20:44:14 2023 +0700

    don't try to use Gtk.StatusIcon on wayland

To be able to compile 15062ac and 55608da I had to change the following file:

diff --git a/xpra/platform/xposix/gui.py b/xpra/platform/xposix/gui.py
index f3cc391cc..2767f8b48 100644
--- a/xpra/platform/xposix/gui.py
+++ b/xpra/platform/xposix/gui.py
@@ -144,7 +144,6 @@ def _try_load_appindicator():
              traylog("cannot load appindicator tray", exc_info=True)
              traylog.warn("Warning: appindicator library not found")
              traylog.warn(" you may want to install libappindicator")
-@@ -124,8 +137,6 @@ def get_native_tray_classes():
              if get_saved_env_var("XDG_CURRENT_DESKTOP", "").upper().find("GNOME")>=0:
                  traylog.warn(" With gnome-shell, you may also need some extensions:")
                  traylog.warn(" 'top icons plus' and / or 'appindicator'")

Hope this be of help.

@totaam
Copy link
Collaborator

totaam commented Sep 12, 2023

  • 25302e1 : running with XPRA_USE_NATIVE_TRAY=0 should have the same effect and disable appindicator (though this may also break xpra's own system tray - assuming that this one was working?)
  • 0a1819f is suspicious, you're running an X11 desktop and perhaps appindicator is not a good choice there, so again, setting XPRA_USE_NATIVE_TRAY=0 might help going back to using Gtk.StatusIcon
  • 55608da - I doubt that XFCE is detected as Wayland, but who knows?

In my case, with a gnome-shell desktop under Wayland, trying to use Gtk.StatusIcon does not work at all, for anything - no errors, but nothing is shown anywhere, hence why we don't use it.

Since the code says:

#could restrict to only DEs that have a broken system tray like "GNOME Shell"?

I've implemented something simple along those lines in 1f32121.
Does that restore the system tray under XFCE?

@nentibusarchitectura
Copy link
Author

nentibusarchitectura commented Sep 12, 2023

I've tried to compile 1f32121 but I get the following message when I try to connect to the server:

image

The latest commit I can compile that doesn't exhibit this "connection error" issue is:

b0c3ced2ea3217ee3d35f15c746ec59ffee09ec3

(The connection error start to appear in commit: 4310795 I think)

And the good news is that on that commit (b0c3ced) if I use XPRA_USE_NATIVE_TRAY=0 the tray works again with XFCE :-D (doesn't work without it)

Regarding what XFCE uses for the systray the xfce4-statusnotifier-plugin

Which according to XFCE's docs implements the freedesktop standard:

The xfce4-statusnotifier-plugin provides a panel area for status notifier items (application indicators). Applications may use these items to display their status and interact with user. This technology is a modern alternative to systray and follows the freedesktop.org specification regarding status notification.

Not sure if this could be of help, Gnome is garbage when it comes to the systray, but I guess all the other desktops use the standard, the systray works fine on XFCE, MATE and KDE.

Thanks again for all your support with this and patience, I'm not a dev and all of this gets complicated for me.

@totaam
Copy link
Collaborator

totaam commented Sep 13, 2023

I've tried to compile 1f32121 but I get the following message when I try to connect to the server:

That's a WIP, either use the latest html5 client with it or wait for the final release.

if I use XPRA_USE_NATIVE_TRAY=0 the tray works again with XFCE
(..)
The xfce4-statusnotifier-plugin provides a panel area for status notifier items (application indicators).

Well, that's odd. This switch makes xpra use Gtk.StatusIcon and not appindicator!

the systray works fine on XFCE, MATE and KDE.

OK, so I've changed it to only use appindicator on X11 gnome: 8deb2da

This will be included in v5.0.2

@totaam
Copy link
Collaborator

totaam commented Sep 17, 2023

And... the fix caused a bug on MacOS: #4006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client linux
Projects
None yet
Development

No branches or pull requests

2 participants