KDE permit logout with Virtual Machine
When a KDE user goes to logout with a Virtual Machine running (in this case VirtualBox, WIN7 VM), it initially prevents the user from logging out if the VM is running. Normally, this is a great feature as it prevents the user from "pulling" the plug" on the VM. However, I have added a VM shutdown script to System Settings > Startup and Shutdown > Autostart which does shutdown the VM when the user logs out. However, it still aborts the actual logout and the user has to log out again.
Is there a way to turn off this feature? |
Quote:
1) mouse click on host desktop so it becomes active then press ctrl - alt - L for a bit longer (if you do this too short then you get logged out and logged in instantly) 2) if you have virtual desktops, just switch to another desktop and press ctrl - alt - L both ways work for me hope this will help |
Thanks, I'll experiment with that, but it's not entirely satisfactory. This workstation is in production in an office and the user is an accountant, not a techy. They can click on things to log out (KDE Launcher > Leave), but would like be more adverse to using a "secrect" key combination than doing the logout twice. Like I said, it's a great feature and one not present in Kubuntu and one reason I chose Slackware/KDE, but if it can't be disabled I'll remove the shutdown script and let the user do it the old way.
|
The message I get is, "KDE Workspace / Logout canceled by '/opt/VirtualBox/VirtualBox'
|
I've done more searching on this. There are DOZENS of posts on the Internet about this issue -- none of them have resolutions. In addition to VirtualBox, other packages exhibiting this phenomenon that I've come across are ckb, seafile, smplayer, Steam, Viber; with distros: Kubuntu, Archlinux, Manjaro.
So, this appears to be a KDE issue, not necessarily related to VirtualBox or Slackware. Do any KDE experts know how to turn this off? So far, none of the above listed reports have a solution, so maybe we just have to live with it. |
Quote:
If you logout then any user running sessions - including vb - will be shut down. Because vb is running whatever os guest then logging out will in fact kill running os in unclean manner assuming that guest os is running some applications. While you can lock user (crtl+alt+L) and switch user with running vb, logging out/killing guest os is not the best idea. I would think that vb is not the best idea for your multiuser setup. |
Aeterna - As mentioned, I do have a KDE shutdown script that works fine to shutdown the VM when a user logs out. What I want is for after that script runs, the logout process to complete and go ahead and log the user out. Instead, the VM is shutdown via the script, but the user gets the message "KDE Workspace / Logout canceled by '/opt/VirtualBox/VirtualBox'" and the user has to Leave/Logout again.
I don't know if this is a KDE thing or a VirtualBox thing. As mentioned in my post #5, lots of other programs exhibit this phenomenon with KDE on platforms other than Slackware. That leads me to believe there is something KDE related. On the other hand the message says, "canceled by ...VirtualBox", and other programs (Thunderbird, LibreOffice, Firefox) don't exhibit this behavior, they just stop; so perhaps it is an issue with VirtualBox. I've submitted a bug report to VirtualBox: https://www.virtualbox.org/ticket/17528 which is actually a re-open request for a bug report on this going back 4 years ago. We'll see if there is any response. |
To make sure that the problem doesn't come from your script please post it and tell us how it runs, in other words what modifications you made so that it runs when the user logs out.
This will also allow us to try to reproduce this behavior, thus confirming the issue. |
in ~/.kde/shutdown/shutdown:
Code:
#!/bin/bash |
I could reproduce this behavior but sorry, no clue.
Incidentally, unless I miss something this script is run by KDE itself without arguments, so $1 being not set mode is always set to powerstate. |
Quote:
What's interesting is that if I shutdown the VM manually from the VM, then logoff there is no such problem, so there must be some communication between VM and KDE to prevent the logout even after a successful ~/.kde/shutdown script. I've tried putting a long sleep in the script after VM shutdown, but that didn't help. Thanks for your extra effort. So far no responses on the VirtualBox ticket. It's probably not a high priority for them. :( |
I don't know if this will work or if it's a good idea but you can logout of KDE using the command
Code:
kquitapp ksmserver |
Ian M: good idea, but it didn't work. I'll check out your search suggestion.
|
All times are GMT -5. The time now is 01:07 AM. |