Bug 394610

Summary: Virtualbox gets additional icons when launched
Product: [Plasma] plasmashell Reporter: Nate Graham <nate>
Component: Icons-only Task ManagerAssignee: Eike Hein <hein>
Severity: normal CC: plasma-bugs
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=393787
Latest Commit: Version Fixed In:
Attachments: Screen recording of the bug
`xprop` output of Virtualbox's main window
`xprop` output of a Virtualbox VM window
virtualbox.desktop file

Description Nate Graham 2018-05-23 13:20:04 UTC
Created attachment 112827 [details]
Screen recording of the bug

I have a pinned Virtualbox icon in my Icons-Only task Manager.

When I click on it, Virtualbox launches but creates a new button for all of its windows. the new button has a different icon, depending on how may windows are open.

Screen recording attached. The issue reminds me a bit of https://bugs.kde.org/show_bug.cgi?id=393787

This behavior is new to Kubuntu 18.04 with Virtualbox 5.2.10. I did not see it with the older version of Virtualbox bundled with Kubuntu 17.10. I was using the same Plasma version in both Ubuntu versions.
Comment 1 Nate Graham 2018-05-23 13:20:34 UTC
Created attachment 112828 [details]
`xprop` output of Virtualbox's main window
Comment 2 Nate Graham 2018-05-23 13:20:59 UTC
Created attachment 112829 [details]
`xprop` output of a Virtualbox VM window
Comment 3 Nate Graham 2018-05-23 13:21:47 UTC
Created attachment 112830 [details]
virtualbox.desktop file
Comment 4 Nate Graham 2018-05-23 13:22:25 UTC
Upstream Ubuntu bug that I filed, in case there's any relevant information in there: https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1769417
Comment 5 Nate Graham 2018-05-23 13:24:18 UTC
$  (master) ps aux | grep -i virt
nate     13657  0.0  0.1 178460 13612 ?        S    07:13   0:00 /usr/lib/virtualbox/VBoxXPCOMIPCD
nate     13662  0.2  0.3 972528 25240 ?        Sl   07:13   0:01 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
nate     13682 29.4 15.4 4013988 1243356 ?     Sl   07:13   2:59 /usr/lib/virtualbox/VirtualBox --comment Neon 2 --startvm 35dc1492-14b5-4be8-af1b-ea5b3dadf0f8 --no-startvm-errormsgbox
nate     14157  0.0  0.0  16504  1068 pts/3    S+   07:24   0:00 grep --color=auto -i virt
Comment 6 Eike Hein 2018-05-23 13:30:03 UTC

This is an application bug. The WM_CLASS for the two windows is "VirtualBox Manager" and "VirtualBox Machine" respectively, which doesn't match the .desktop file name (virtualbox). The .desktop file also doesn't contain a StartupWMClass key that maps to either. The executables names in the process command line also don't map to the Exec= key of the .desktop file.

This should be reported to VirtualBox upstream because it's just plain super broken.

In the meantime, we can add hack-around mappings to taskmanagerrulesrc:

Comment 7 Eike Hein 2018-05-23 13:31:48 UTC
https://www.virtualbox.org/ticket/12534 claims this should be fixed, but we can still add the mappings if people still use versions where this is a problem.
Comment 8 Eike Hein 2018-05-23 13:36:53 UTC
It's still the same in the VirtualBox packaged in Fedora 28. The alleged fix is six months old though and I don't know their release cycle.
Comment 9 Nate Graham 2018-05-23 16:41:05 UTC
Fixed with https://phabricator.kde.org/D13060