• Welcome to Peterborough Linux User Group (Canada) Forum.
 

Killing Programs graphically (and not) in various desktop environments

Started by fox, February 17, 2019, 02:06:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fox

Admin: This is a split topic from a discussion about desktop features here.

Quote from: Jason Wallwork on February 17, 2019, 12:46:11 PM
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.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

Quote from: fox on February 17, 2019, 02:06:11 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.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

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.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

Quote from: fox 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.

I wonder if it's disabled by some configuration file somewhere in Gnome.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

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 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

Jason

Quote from: fox 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.

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.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

Jason

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.
* Zorin OS 17.1 Core and Windows 11 Pro on a Dell Precision 3630 Tower with an
i5-8600 3.1 GHz 6-core processor, dual 22" displays, 16 GB of RAM, 512 GB Nvme and a Geforce 1060 6 GB card
* Motorola Edge (2022) phone with Android 13

fox

Sorry; I keep getting the two mixed up. I can now confirm that xkill works in Ubuntu.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13