Bug 350468 - VirtualBox won't launch when pinned to Icon Only Task Manager, but launches fine from K Menu
Summary: VirtualBox won't launch when pinned to Icon Only Task Manager, but launches f...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Icons-only Task Manager (show other bugs)
Version: master
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-21 22:31 UTC by Rand All
Modified: 2017-02-07 07:16 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
As requested, ~/.config/plasma-org.kde.plasma.desktop-appletsrc (21.76 KB, text/plain)
2015-08-12 18:33 UTC, Rand All
Details
Output xwininfo (772 bytes, text/plain)
2015-09-07 11:25 UTC, schallah4u
Details
Output xprop (4.33 KB, text/plain)
2015-09-07 11:27 UTC, schallah4u
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rand All 2015-07-21 22:31:15 UTC
I'm using KDE Framework 5.12.0 and Plasma 5.3.2-3.fc22 and KDE Apps 15.04.0. All this is on Fedora 22.
I have Oracle VirtualBox 5.0 installed. When I launch VBox from the K Menu it works fine.
But when I pin VBox to the Icon Only Task Manager and try to launch it from there I get an error message: "Access denied to /usr/lib/virtualbox/VirtualBox."

I'm guessing this is because the VirtualBox executable is marked setuid:

~ $ ls -l  /usr/lib/virtualbox/VirtualBox
-r-s--x--x. 1 root root 35208 Jul  9 05:43 /usr/lib/virtualbox/VirtualBox


Reproducible: Always

Steps to Reproduce:
1. Install VirtualBox on Fedora 22
2. Tell Icon Only Task Manager to "Show a Launcher When Not Running" for VBox
3. Try to start VBox by clicking the button on the Task Manager
4. Failure!

Actual Results:  
Message box saying "Access denied to /usr/lib/virtualbox/VirtualBox."

Expected Results:  
VBox should launch
Comment 1 John 2015-08-06 18:24:26 UTC
Similar behavior confirmed on the following config:
Fedora 22, kernel 4.1.3-201.fc22.x86_64
Plasma Package: kf5-plasma.x86_64 5.12.0-2.fc22
VirtualBox 5.0.0 r101573

If I launch VirtualBox from the K Menu and then pin the main VirtualBox window (not a window created by launching a VM) to the icons-only taskbar, after closing the main VirtualBox window, I can successfully open it from the icon in the taskbar.  

In my case, though, I actually want to an icon to show up in the taskbar for a *specific* VM.  If I lauch VirtualBox, then launch a VM and then configure (via the VM's icon settings) to "Show a launcher when not running", the icon persists after the VM is shut down.  Once I click on that icon again to launch the VM directly, I receive the message box that states, "Access denied to /usr/lib/virtualbox/VirtualBox."

Only way I've found to "work around" this is to create a shortcut to the VM on my desktop (via VirtualBox's Machine -> Create Shortcut... menu.  I can then drag that shortcut into the Panel so that it is situated near the icons-only taskbar and can successfully launch the VM from that icon.  This is less than optimal as once I launch the VM additional space is taken up on the Panel via the taskbar icon that represents the running instance of the VM.
Comment 2 David Edmundson 2015-08-08 00:59:35 UTC
For me, following your steps I get the manager appear when I click the launcher.

Can you attach you ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Comment 3 Rand All 2015-08-12 18:33:48 UTC
Created attachment 94007 [details]
As requested, ~/.config/plasma-org.kde.plasma.desktop-appletsrc
Comment 4 schallah4u 2015-08-17 19:37:02 UTC
Similar behavior in Kubuntu:
Kubuntu 15.04, kernel 3.19.0-generic, x64
Plasma: 5.3.2
Qt-Version: 5.4.1
VirtualBox 5.0.2 r102096

ls -l  /usr/lib/virtualbox/VirtualBox
-r-s--x--x 1 root root 35224 Aug 13 18:44 /usr/lib/virtualbox/VirtualBox
Comment 5 Eike Hein 2015-09-01 16:57:54 UTC
Please open your VM window and then run xwininfo and xprop in a terminal, click on the window, and attach both outputs. It may not be possible to create per-VM launchers depending on what metadata Vbox makes available in the window hints, but we'll look into it.
Comment 6 schallah4u 2015-09-07 11:25:46 UTC
Created attachment 94447 [details]
Output xwininfo
Comment 7 schallah4u 2015-09-07 11:27:03 UTC
Created attachment 94448 [details]
Output xprop
Comment 8 NW 2017-01-30 10:04:07 UTC
Same issue here, running KDE Neon 5.8.5 with official VirtualBox PPA.

When trying to launch VirtualBox from the icon-only task manager, the following error message appears:

Access denied to /usr/lib/virtualbox/VirtualBox

Launching it from the normal application launcher menu works just fine though.

Can you please fix it?
Comment 9 Eike Hein 2017-01-30 11:40:15 UTC
Patch under review: https://phabricator.kde.org/D4346
Comment 10 Eike Hein 2017-01-30 12:14:15 UTC
Git commit 6f99f0dd99efd2d913f18f6911e35c4f4a96d74d by Eike Hein.
Committed on 30/01/2017 at 12:01.
Pushed by hein into branch 'Plasma/5.8'.

Drop legacy fixup rule for VirtualBox.

Summary:
Versions of VirtualBox packaged on Neon and Fedora now have
a proper WM_CLASS:
Fedora: WM_CLASS(STRING) = "VirtualBox", "VirtualBox"
Neon: WM_CLASS(STRING) = "Qt-subapplication", "VirtualBox"

And install a matching virtualbox.desktop.

We can therefore drop this rule.

Side note: The rule should actually still have worked, but
for some reason KServiceTypeTrader refuses to match a .desktop
with 'Exec=VirtualBox %U' when we query for 'VirtualBox', as
extracted from cmdline. I'm talking to dfaure about it.

Reviewers: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D4346

M  +0    -1    libtaskmanager/taskmanagerrulesrc

https://commits.kde.org/plasma-workspace/6f99f0dd99efd2d913f18f6911e35c4f4a96d74d
Comment 11 NW 2017-02-04 14:15:51 UTC
Unfortunately this patch doesn't seem to have made it into KDE Neon 5.9.0.

Could you possibly push it to KDE Neon?
Comment 12 Eike Hein 2017-02-07 07:16:45 UTC
This was committed after 5.9.0 was tagged and will be part of the 5.9.1 release, so distributions will pick it up then. If you think this is critical enough to backport it to 5.9.0 immediately (I would disagree with you fwiw) you need to pick it up with the Neon folks.