Author Topic: Killing Programs graphically (and not) in various desktop environments  (Read 1056 times)

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Admin: This is a split topic from a discussion about desktop features here.

Is this the same extension? Just realized it's an extension to xkill. ....
It's based on xkill, but to implement xkill, you need to include the PID number of the offending application in your command. The name of the actual extension is "Force quit". The description is "Adds a force quit button which launches xkill." As noted above, what it does is turn your cursor into an "X" and as soon as you click on a window of the stuck application, it force quits it. No PID number is necessary.
« Last Edit: February 17, 2019, 07:48:05 pm by Jason Wallwork »
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Killing Programs graphically (and not) in various desktop environments
« Reply #1 on: February 17, 2019, 02:31:12 pm »
It's based on xkill, but to implement xkill, you need to include the PID number of the offending application in your command. The name of the actual extension is "Force quit". The description is "Adds a force quit button which launches xkill." As noted above, what it does is turn your cursor into an "X" and as soon as you click on a window of the stuck application, it force quits it. No PID number is necessary.

No. You're thinking of kill, not xkill. Xkill does exactly what you described above. No PID is necessary. Try it with Ctrl-Alt-Esc.
« Last Edit: February 17, 2019, 02:35:28 pm by Jason Wallwork »
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Re: Killing Programs graphically (and not) in various desktop environments
« Reply #2 on: February 17, 2019, 03:13:43 pm »
There, I learned something else new; I thought that xkill and kill were the same thing. I'll have to try this in gnome. I already tried ctrl-alt-esc in openSUSE Leap and yes, it does the same thing as kill (in Plasma). Neither works in gnome, although perhaps there is a way to implement it other than with the Force quit extension.
« Last Edit: February 17, 2019, 03:21:23 pm by fox »
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Killing Programs graphically (and not) in various desktop environments
« Reply #3 on: February 17, 2019, 04:30:36 pm »
There, I learned something else new; I thought that xkill and kill were the same thing. I'll have to try this in gnome. I already tried ctrl-alt-esc in openSUSE Leap and yes, it does the same thing as kill (in Plasma). Neither works in gnome, although perhaps there is a way to implement it other than with the Force quit extension.

I wonder if it's disabled by some configuration file somewhere in Gnome.
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Re: Killing Programs graphically (and not) in various desktop environments
« Reply #4 on: February 17, 2019, 04:52:03 pm »
Kill works in gnome, but not in the way it does in Plasma, it needs an argument; either a signal specification or a signal number or a pid or a job specification. But the key combo does nothing.
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Killing Programs graphically (and not) in various desktop environments
« Reply #5 on: February 17, 2019, 05:08:19 pm »
Kill works in gnome, but not in the way it does in Plasma, it needs an argument; either a signal specification or a signal number or a pid or a job specification. But the key combo does nothing.

Yes, I meant about the xkill combo. Xkill should work in Gnome the same way it does in Plasma. It's not part of the desktop environment, it's part of the window manager system. kill will work the same way in both environments, too, but it's a bash command.

kill - needs to be provided a PID
xkill - doesn't need to be provided anything

Another tip is that you can use killall and just specify the program name instead of a PID.
« Last Edit: February 17, 2019, 05:21:17 pm by Jason Wallwork »
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline Jason Wallwork

  • President
  • Administrator
  • Hero Member
  • *****
  • Posts: 2158
  • Karma: +5/-0
    • View Profile
Re: Killing Programs graphically (and not) in various desktop environments
« Reply #6 on: February 17, 2019, 08:01:11 pm »
Okay, found a way to do xkill in Gnome using a key combo but I can't test the keyboard shortcut of Ctrl+Alt+Esc as I'm using Ubuntu as a guest on a VM. The host intercepts keyboard shortcuts like this before the guest can.
  • Got to Settings -> Devices -> Keyboard.
  • Click the + button at the bottom of the list to add a custom shortcut.
  • Enter a name for the shortcut
  • For command, enter: xkill
  • Click on the Set Shortcut... button and press the appropriate key combo as above.
Note that it appears that Ctrl+Alt+Esc is set to Switch system controls directly. Whatever that is, it won't work anymore after you switch it to this (i.e. a shortcut can only be a reference to one particular command at a time).

I also used Ctrl-U in the example below for testing.
« Last Edit: February 18, 2019, 02:52:40 am by Jason Wallwork »
Primary: Dell Desktop i5 - 3.2 GHz w/ Kubuntu 19.04 / Win 10 Pro
Secondary/Test:  Toshiba i3 - 1.4 GHz w/ Windows 10 Pro and Linux Du Jour (Ubuntu 19.10 right now)
Sony Xperia XA1 Ultra ( Android 8 ) on Freedom
Huawei MediaPad T3 10 ( Android 7 ) on Virgin

Offline fox

  • Posting Member
  • Hero Member
  • *
  • Posts: 1250
  • Karma: +3/-0
    • View Profile
Re: Killing Programs graphically (and not) in various desktop environments
« Reply #7 on: February 17, 2019, 08:30:38 pm »
Sorry; I keep getting the two mixed up. I can now confirm that xkill works in Ubuntu.
Ubuntu 19.10 and openSUSE Leap on 2011 iMac
Linux Mint Cinnamon 19.2 on "late 2015" 5k iMac
Ubuntu 19.10 and 18.04 on Dell XPS 13 2 in 1