KDE desktop switching is dangerous and needs to be disabled

Bug #1421219 reported by JVD on 2015-02-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kubuntu-meta (Ubuntu)

Bug Description

I just lost several hours work after inadvertently pressing the KDE "Desktop Switch" keystroke.
When I switched back to the desktop I was using, KDE informed me that
 "Desktop #1 session was restored successfully."
But all the applications I was running on that desktop lost their contexts.
It appears when you do a desktop switch in Plasma , it kills ALL processes
in the task bar, and then when you switch back to that desktop, it attempts
to restore their execution contexts (and fails).
Ubuntu should not be foisting such dangerous, untested and poorly coded
software on users.
KDE's desktop switching really needs to be completely disabled, and if enabled,
on receipt of a desktop switch keystroke, a message dialog like :
  "Warning - about to kill all running applications on Desktop #1 - do you want to proceed? "
should be issued before allowing the desktop switch to occur only if the user presses the 'Yes' button.

JVD (jason-vas-dias) wrote :

Sorry, should have added environmental information :

   x86_64 (Haswell) 8 core i7-4770 CPU @ 3.40GHz
   VERSION="14.04.1 LTS, Trusty Tahr"

Fully up-to-date as of 2015-02-12, with KDE:
ii kde-plasma-desktop 5:78ubuntu13 amd64 KDE Plasma Desktop and minimal set of
ii kde-standard 5:78ubuntu13 all KDE Plasma Desktop and standard set of applications

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1421219/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
tags: added: kubuntu trusty
affects: ubuntu → kubuntu-meta (Ubuntu)
Scarlett Gately Moore (sgclark) wrote :

I need to know what KDE "Desktop Switch" keystroke you pressed exactly, because I cannot reproduce this..

Jonathan Riddell (jr) wrote :

What is the KDE "Desktop Switch" keystroke ?

JVD (jason-vas-dias) wrote :

It took me a while to discover this myself, by inadvertently pressing it -
I then went through every KDE "hot" key setting and disabled them ALL .
I think the one I pressed is hidden in :
 System Settings -> Workspace Behaviour -> Virtual Desktops -> "Switching" Tab
There you see key stroke definitions for actions like :
 'Switch One Desktop Down'
 'Switch to Next Desktop'
Since I've now removed all the definitions , I don't know exactly which one I pressed.
But I don't think it matters which one was pressed.
KDE's mechanism of switching desktops is fatally flawed and dangerous:
On a Desktop Switch, plasma attempts to kill every application that has a window open on your current desktop,
and when you switch back to that desktop, it attempts to "Restore" each application that it killed .
Perhaps for some applications based on the KDE / Qt framework this might work, but certainly not
for applications like emacs or xterm, with which I do 95% of my work .
When I pressed the desktop switch key, all my xterms, which were running applications on remote hosts,
were killed . Then when I switched back to the original desktop, KDE displayed a really annoying message
(in the context) that was something like "Desktop #1 Session Restored successfully" - only in no sense was
it successful : all the xterm windows I had previously running commands on remote hosts were restored,
but the commands they were running were not - they all ran new shell login sessions; the emacs I had running
did luckily have time to dump all the files it was editing to '.#$file#' recovery files, but when a new instance
was restored when switching back to the original desktop, it has started a new session (was editing no files),
and I had to search for all the '.#*' recovery files and recover them manually . All the work I was doing with
remote applications in the xterms , and in applications on other hosts / VMs connecting to the local X server
via TCP:6000 , was lost.
I don't have time to halt all my work and debug KDE desktop switching .
I've disabled the keystrokes for now, so this should no longer be an issue for me,
but I know there is probably some other desktop switching mechanism enabled that could
be used to kill my desktop session, and I think it is wrong that such dangerous code
should be left enabled by default ready to destroy the work of other unsuspecting users.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers