Bug 129476

Summary: JJ: Offer to su to root to kill frozen applications running as root
Product: kwin Reporter: Maciej Pilichowski <bluedzins>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: martin+kde, vbatts
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.7.0
Attachments: makes kwin_killer use kauth to kill a root-owned client

Description Maciej Pilichowski 2006-06-20 10:51:09 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    SuSE RPMs

Normally when any app is not responding the appropriate dialog shows up with options -- terminate or continue running.

However, I found that yast while downloading new packages is misbehaving because it not respond to any "abort" button. It is yast bug. But it is KDE bug that it can't kill such app -- I couldn't turn off the computer. KDE didn't show the normal dialog about terminating the app. The only choise was hard-reset but it is a bit dangerous.
Comment 1 Philip Rodrigues 2006-06-21 18:38:58 UTC
Did kill -9 work?
Comment 2 Maciej Pilichowski 2006-06-21 22:10:43 UTC
Yes and no. I (user) cannot kill it -- "operation not permitted", root can.

Maybe it would look strange, but than dialog for root password would be a good idea, to kill all such applications.
Comment 3 Philip Rodrigues 2007-01-29 23:18:40 UTC
Reclassifying
Comment 4 Lubos Lunak 2007-03-23 16:22:23 UTC
JJ: Client::killProcess() in kwin/client.cpp and kwin/killer/ .
Comment 5 Vincent Batts 2009-12-04 06:34:46 UTC
it seems that in kwin/killer/killer.cpp
there could be a property of the uid owner of the pid, and do an
  if( uid = "0" ) 
at the bottom, as to how to prompt for kdesu auth, without trimming the cmd and straight running a command line argument, is a little beyond me.
Comment 6 Mikael Gerdin 2010-06-15 12:56:16 UTC
Created attachment 48026 [details]
makes kwin_killer use kauth to kill a root-owned client

Borrowed the code that ksysguard uses to kill processes using elevated privileges.
Instead of using kdesu I use KAuth.
Comment 7 Martin Flöser 2010-06-15 17:58:03 UTC
Would you mind to publish the patch on http://reviewboard.kde.org for group 
kwin? We are currently in feature freeze and have to wait till trunk opens up 
again. A patch attached to a bug is easily lost and won't be lost with 
reviewboard.
Comment 8 Martin Bednar 2011-02-05 20:21:04 UTC
patch in reviewboard : http://reviewboard.kde.org/r/4460/
Closable?
Comment 9 Martin Flöser 2011-03-07 18:04:37 UTC
Git commit 189483d8369877eab49f46baecd6af7f442f629a by Martin Gr����lin.
Committed on 07/03/2011 at 18:03.
Pushed by graesslin into branch 'master'.

Add KAuth support to KWin process killer

See http://svn.reviewboard.kde.org/r/4460/
Thanks to Mikael Gerdin for the patch.
CCMAIL: mikael.gerdin@gmail.com
FEATURE: 129476
FIXED-IN: 4.7.0

M  +18   -3    kwin/killer/killer.cpp     

http://commits.kde.org/kde-workspace/189483d8369877eab49f46baecd6af7f442f629a