Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.98k stars 169 forks source link

App tray icon didn't show on windows #4241

Open cadem opened 5 months ago

cadem commented 5 months ago

I attach to app on windows, this app will run with a tray icon. I attached this session successfully, this app window showed. But this app tray icon didn't show on my windows client. The xpra tray icon showed, and I start fcitx with this app, fcitx tray icon showed too. How do I check this problem? I didn't find any error output related to tray in xpra server log.

totaam commented 5 months ago

Please provide more details as per https://github.com/Xpra-org/xpra/wiki/Reporting-Bugs

You can run both client and server with -d tray to enable tray debug logging. There should be messages shown when you start this unspecified application.

cadem commented 5 months ago

I got client output as follow, but I didn't find any error, server log is too log, I didn't paste, but I didn't find any error.

C:\Users\cadem>"C:\Program Files\Xpra\Xpra_cmd.exe" -d tray attach ssh://ubuntu@127.0.0.1:40225/101
2024-05-30 14:44:32,743 debug enabled for ['xpra.client.mixins.windows', 'client', 'tray']
2024-05-30 14:44:32,760 debug enabled for ['xpra.client.mixins.tray', 'tray']

2024-05-30 14:44:32,872 Xpra GTK3 client version 6.0.1-r0
2024-05-30 14:44:33,253  running on Microsoft Windows Microsoft Windows 11 家庭中文版
2024-05-30 14:44:33,253  cpython 3.11
2024-05-30 14:44:37,336 debug enabled for ['xpra.client.gui.client_tray', 'tray']
2024-05-30 14:44:37,339 window icon overlay: C:\Program Files\Xpra\share\xpra\icons\xpra.png
2024-05-30 14:44:37,382 overlay_image=<PIL.PngImagePlugin.PngImageFile image mode=RGBA size=48x48 at 0x208559F4790>
2024-05-30 14:44:38,155 GStreamer version 1.24.3
2024-05-30 14:44:38,172 created named pipe 'Xpra\32184'
2024-05-30 14:44:38,387 make_tray_menu_helper() tray menu helper classes: (None, <class 'xpra.client.gtk3.tray_menu.GTKTrayMenu'>)
2024-05-30 14:44:38,396 keyboard layout 'Chinese (Simplified) - US Keyboard' : 'cn' (0x804)
2024-05-30 14:44:39,531 OpenGL accelerate missing: numpy_formathandler
2024-05-30 14:44:39,544 OpenGL enabled on 'AMD Radeon(TM) Vega 8 Graphics'
2024-05-30 14:44:39,746 setup_xpra_tray()
2024-05-30 14:44:39,812 get_tray_title()='Xpra' (items=('Xpra',))
2024-05-30 14:44:39,816 debug enabled for ['xpra.platform.win32.NotifyIcon', 'tray', 'win32']
2024-05-30 14:44:39,816 debug enabled for ['xpra.platform.win32.NotifyIcon', 'tray', 'geometry']
2024-05-30 14:44:39,818 loading ctypes NotifyIcon functions
2024-05-30 14:44:39,820 WM_TRAY_EVENT=294
2024-05-30 14:44:39,822 debug enabled for ['xpra.client.gui.tray_base', 'tray']
2024-05-30 14:44:39,823 debug enabled for ['xpra.platform.win32.tray', 'tray', 'win32']
2024-05-30 14:44:39,826 tray GUESS_GEOMETRY=True
2024-05-30 14:44:39,827 make_tray(0, <Gtk.Menu object at 0x000002087de47880 (GtkMenu at 0x0000020856a4e550)>, 'Xpra', 'xpra', <function TrayClient.create_xpra_tray.<locals>.xpra_tray_geometry at 0x0000020863df99e0>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_click at 0x0000020863df9800>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_mouseover at 0x0000020863df98a0>, <function TrayClient.create_xpra_tray.<locals>.xpra_tray_exit at 0x0000020863df9940>) tray classes=[<class 'xpra.platform.win32.tray.Win32Tray'>, <class 'xpra.client.gtk3.statusicon_tray.GTKStatusIconTray'>]
2024-05-30 14:44:39,828 calculate_offset() x=0, y=0
2024-05-30 14:44:39,828 win32NotifyIcon: app_id=0, title='Xpra'
2024-05-30 14:44:39,829 LoadImage(C:\Program Files\Xpra\share\xpra\icons\xpra.ico) using image type=ICON
2024-05-30 14:44:39,829 GetModuleHandleExA(..)=0x7ff710e60000
2024-05-30 14:44:39,829 RegisterClassExA(win32NotifyIcon)=50396
2024-05-30 14:44:39,831 LoadImage(C:\Program Files\Xpra\share\xpra\icons\xpra.ico)=0x1c162147
2024-05-30 14:44:39,831 create_tray_window()
2024-05-30 14:44:39,831 CreateWindowExA(0, 50396, 'Xpra StatusIcon Window', 524288, -2147483648, -2147483648, 0, 0, 0, 0, 140699117158400, 0)
2024-05-30 14:44:39,844 NotifyIconWndProc(1184460, 36, 0, 805199400688) instance=None, message(36)=None
2024-05-30 14:44:39,845 NotifyIconWndProc(1184460, 129, 0, 805199400640) instance=None, message(129)=None
2024-05-30 14:44:39,854 NotifyIconWndProc(1184460, 131, 0, 805199400720) instance=None, message(131)=None
2024-05-30 14:44:39,857 NotifyIconWndProc(1184460, 1, 0, 805199400624) instance=None, message(1)=None
2024-05-30 14:44:39,858 create_window() hwnd=0x1212cc
2024-05-30 14:44:39,858 TASKBAR_CREATED=49279
2024-05-30 14:44:39,858 make_nid(..)=<xpra.platform.win32.NotifyIcon.getNOTIFYICONDATAClass.<locals>._NOTIFYICONDATA object at 0x0000020863dc1010> tooltip='Xpra', app_id=0, actual flags=MESSAGE, ICON, TIP, GUID
2024-05-30 14:44:40,058 Shell_NotifyIcon ADD=1
2024-05-30 14:44:40,059 setup_xpra_tray(xpra)=Tray(0:Xpra) (<class 'xpra.platform.win32.tray.Win32Tray'>)
2024-05-30 14:44:40,059 NotifyIconWndProc(1184460, 799, 1, 0) instance=win32NotifyIcon(0x0), message(799)=None
2024-05-30 14:44:40,104 Connected (version 2.0, client OpenSSH_8.9p1)
2024-05-30 14:44:40,255 Authentication (publickey) successful!
2024-05-30 14:44:40,515 ssh server OS is 'linux-gnu'
2024-05-30 14:44:40,646 paramiko SSH agent forwarding enabled
2024-05-30 14:44:40,659  keyboard settings: layout=cn
2024-05-30 14:44:40,664  desktop size is 3840x1080:
2024-05-30 14:44:40,664   Default (1016x285 mm - DPI: 96x96) workarea: 3840x1040
2024-05-30 14:44:40,665     PHL 273V7        1920x1080 at    0x0    (598x336 mm - DPI: 82x82) workarea: 1920x999
2024-05-30 14:44:40,665     Huaqin Huaqin PnP Monitor 1920x1080 at 1920x0    (275x183 mm - DPI: 177x150) workarea: 1920x1040 at 1920x0
2024-05-30 14:44:40,850  SSH: 'Warning: XDG_RUNTIME_DIR is not defined'
2024-05-30 14:44:40,876  SSH: " and '/run/user/1000' does not exist"
2024-05-30 14:44:40,877  SSH: " using '/tmp'"
2024-05-30 14:44:41,289 set_icon() using filename='C:\\Program Files\\Xpra\\share\\xpra\\icons\\xpra.ico'
2024-05-30 14:44:41,289 set_icon_from_file(C:\Program Files\Xpra\share\xpra\icons\xpra.ico) tray_widget=win32NotifyIcon(0x0)
2024-05-30 14:44:41,290 set_icon(C:\Program Files\Xpra\share\xpra\icons\xpra.ico)
2024-05-30 14:44:41,290 do_set_icon(0x1c162147)
2024-05-30 14:44:41,291 make_nid(..)=<xpra.platform.win32.NotifyIcon.getNOTIFYICONDATAClass.<locals>._NOTIFYICONDATA object at 0x0000020863dc3c80> tooltip='Xpra', app_id=0, actual flags=ICON, GUID
2024-05-30 14:44:41,299 make_nid(..)=<xpra.platform.win32.NotifyIcon.getNOTIFYICONDATAClass.<locals>._NOTIFYICONDATA object at 0x0000020863dc3c80> tooltip='Xpra', app_id=0, actual flags=ICON, GUID
2024-05-30 14:44:41,926 enabled remote logging
2024-05-30 14:44:41,929 Xpra X11 seamless server version 6.0
2024-05-30 14:44:41,955 Attached to xpra server at ssh://ubuntu@127.0.0.1:40225/101
2024-05-30 14:44:41,957  (press Control-C to detach)

2024-05-30 14:44:42,507 get_tray_title()='bytedance-feishu-stable\n127.0.0.1:40225' (items=('bytedance-feishu-stable', '127.0.0.1:40225'))
2024-05-30 14:44:43,037 get_tray_title()='bytedance-feishu-stable\n127.0.0.1:40225' (items=('bytedance-feishu-stable', '127.0.0.1:40225'))
2024-05-30 14:44:43,038 set_tooltip('bytedance-feishu-stable\n127.0.0.1:40225')
2024-05-30 14:44:43,039 make_nid(..)=<xpra.platform.win32.NotifyIcon.getNOTIFYICONDATAClass.<locals>._NOTIFYICONDATA object at 0x0000020863fbb650> tooltip='bytedance-feishu-stable\n127.0.0.1:40225', app_id=0, actual flags=MESSAGE, ICON, TIP, GUID
2024-05-30 14:44:43,574 NotifyIconWndProc(1184460, 28, 1, 20792) instance=win32NotifyIcon(0x0), message(28)=None

(Xpra_cmd.exe:32184): Pango-WARNING **: 14:44:44.040: couldn't load font "DejaVu Serif Not-Rotated 59.797", falling back to "Sans Not-Rotated 59.797", expect ugly output.

(Xpra_cmd.exe:32184): Pango-WARNING **: 14:44:44.056: couldn't load font "URW Bookman Not-Rotated 52.762", falling back to "Sans Not-Rotated 52.762", expect ugly output.
2024-05-30 14:44:44,067 UI thread is now blocked
2024-05-30 14:44:44,139 running, 1 windows
2024-05-30 14:44:44,160 set_tray_icon() DYNAMIC_TRAY_ICON=True, tray=Tray(0:Xpra)
2024-05-30 14:44:44,161 set_tray_icon() 1 windows, 1 icons, 0 missing
2024-05-30 14:44:44,162 set_tray_icon() using unique RGBA icon: 64x64 (has-alpha=True)
2024-05-30 14:44:44,169 set_icon_from_data('16384 pixels', True, 64, 64, 256, None)
2024-05-30 14:44:44,170 resizing tray icon to 16x16
2024-05-30 14:44:44,173 do_set_icon(0x7b40719)
2024-05-30 14:44:44,173 make_nid(..)=<xpra.platform.win32.NotifyIcon.getNOTIFYICONDATAClass.<locals>._NOTIFYICONDATA object at 0x00000208640a9130> tooltip='bytedance-feishu-stable\n127.0.0.1:40225', app_id=0, actual flags=ICON, GUID
2024-05-30 14:44:44,214 UI thread is running again, resuming
2024-05-30 14:44:44,296 set_tray_icon() DYNAMIC_TRAY_ICON=True, tray=Tray(0:Xpra)
2024-05-30 14:44:44,298 set_tray_icon() 1 windows, 1 icons, 0 missing
2024-05-30 14:44:44,299 set_tray_icon() using unique RGBA icon: 64x64 (has-alpha=True)
2024-05-30 14:44:44,302 set_icon_from_data('16384 pixels', True, 64, 64, 256, None)
2024-05-30 14:44:44,302 resizing tray icon to 16x16
2024-05-30 14:44:44,306 do_set_icon(0x5d30c57)
2024-05-30 14:44:44,307 make_nid(..)=<xpra.platform.win32.NotifyIcon.getNOTIFYICONDATAClass.<locals>._NOTIFYICONDATA object at 0x00000208640a8f80> tooltip='bytedance-feishu-stable\n127.0.0.1:40225', app_id=0, actual flags=ICON, GUID
2024-05-30 14:45:46,723 NotifyIconWndProc(1184460, 26, 20, 805199407768) instance=win32NotifyIcon(0x0), message(26)=None
2024-05-30 14:45:46,757 NotifyIconWndProc(1184460, 28, 0, 10352) instance=win32NotifyIcon(0x0), message(28)=None
2024-05-30 14:45:46,823 NotifyIconWndProc(1184460, 28, 1, 10352) instance=win32NotifyIcon(0x0), message(28)=None
2024-05-30 14:45:54,572 NotifyIconWndProc(1184460, 28, 0, 9908) instance=win32NotifyIcon(0x0), message(28)=None
totaam commented 5 months ago

Once again, please provide more information.

I have no idea what I am looking at in your log. When did you launch your unspecified application? What timestamp? Did anything show up in the log at that point?