QSystemTrayIcon does not show up under VNC session
Unsolved
General and Desktop
-
Hi experts, need your help.
The following code works perfectly directly on PC, but under VNC session the tray icon does not show up.
Tried Ubuntu 20.04 and Ubuntu 22.04. Using tigervnc-standalone-server.QSystemTrayIcon* m_trayIcon = new QSystemTrayIcon(this); m_trayIcon->setIcon(QIcon(":/images/trayicon.svg")); m_trayIcon->setToolTip(tr("SSM")); m_trayIcon->show();
Any suggestions are very valuable. Thanks.
-
Yes, of course, the Xvnc session desktop has a system tray.
The desktop looks exactly as when working directly on a machine.
Yes, there is a space for the icon in a system tray.Yes, the Qt I'm using has a Qt SVG plugin. Also tray icon appear in NoMachine sessions and when running directly on the PC.
I found following logs in system journal when starting the application:
gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55f4ebb3fef0] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowGroup>:0x55f4ea784610] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55f4ebb434d0] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55f4ebb3f710] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowGroup>:0x55f4ea784610] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55f4ebb434d0] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55f4ebb3f710] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowGroup>:0x55f4ea784610] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55f4ebb434d0] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55f4ebb3f710] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowGroup>:0x55f4ea784610] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55f4ebb434d0] is on because it needs an allocation. gnome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55f4ebb3f710] is on because it needs an allocation. nome-shell[2528]: Can't update stage views actor <unnamed>[<MetaWindowGroup>:0x55f4ea784610] is on because it needs an allocation.
-
Does the System Tray Icon Example fail in the same way?