Force Quit Keyboard Shortcut

ThomasB2k
  12 years ago
  75

When you’re using Linux with the GNOME UI, don’t you hate it when you have to go into the terminal or add the force quit button to the panel just so you can exit an unresponsive program? In this very quick tutorial, I’m going to show you how you can assign the force quit command to a key, so when a program stops working, you can close it with the press of a button and a click of the mouse.

First, open up your GNOME menu and go to System > Preferences> Keyboard Shortcuts.

Second, click “Add” and a window should come up with 2 text boxes, labeled “Name” and “Command.” In Name, type “Force Quit” and in the Command box, type “xkill” and press Apply.

Scroll down to Custom Shortcuts in the Keyboard Shortcuts window and you’ll see Force Quit on the left side and Disabled on the right side. Click on Disabled once, and press a combination of keys on your keyboard. I used the Super (Windows logo) key and Escape, but you can use whatever you want, just as long as it doesn’t conflict any of your other shortcuts. Now Disabled will be changed to whatever keys you pressed.

Close out of the Keyboard Shortcuts window and you’re done! When ever you press your key combination, your cursor will change to crosshairs, or a skull and bones, or at least something different than just the arrow. Whatever window you click on will be forced to close, killing all of it’s processes.

If you find yourself to have accidentally pressed your force quit keys, then just right click and it’ll close out of the force quit mode.

Comments
cecilieaux 8 years ago

Works perfectly 6 years later in Mint Cinnamon 17.3


MagicMint 9 years ago

It’s the easiest way to call xkill in my eyes, hence it’s the most useful too.


Kafka 10 years ago

very usefull
thx :)


jahid_0903014 10 years ago

nice!


notsobad 10 years ago

I knew about xkill but never thought of using it this way great Idea!!!


sujitnag 11 years ago

good use the utility.


robertgaul03 12 years ago

i have lisa but the force quit button doesn`t work. also if i press ALT+F2, not working. why?


jkotesh 12 years ago

@ThomasB2k Thank you


ThomasB2k 12 years ago

@jkotesh, right click.


jkotesh 12 years ago

how to cancel the command once the combination is pressed, as this one is really useful but at times it annoys when entered the combinattion and there is nothing that i can exit,,,which irritates me, so i click on taskbar,, which comes back after restart,,, and doesn't hurt me,,


IslandWolf 12 years ago

Useful tool, easy to follow directions. Well done!


aspir8or 13 years ago

Thanks. I had previously added hotkeys to the "Switch to workplace" options (8 workplaces) but I didn't know about xkill. Nice keyboard alternative to the "Force quit" button you can add to the panel.


sdim 13 years ago

Great tool. Many thanks.


Labby 13 years ago

Awesome! Thanks for that.


blueXrider 13 years ago

Nice, can be handy


ivy_s 13 years ago

Very good.
Thanks you


sayan_acharjee 13 years ago

Good one!!


noztox 13 years ago

thanks, alternative click right in panel -> click add to panel -> search & click "force quit" -> click add & close


farmer 13 years ago

A lot better than having to reboot.


Tonya 13 years ago

Many thanks!


ianxl 13 years ago

A useful tip. - Thank you! 8~)


pnash1 13 years ago

very handy


jerryclement 13 years ago

Thanks, user from Ubuntu.


itonggant 13 years ago

thanks...


distrohopper 14 years ago

ctrl + alt + esc should also work in KDE


hezy 14 years ago

xkill has a default keyboard shortcut in mint xfce: ctrl + alt + esc


SeventhReign 14 years ago

I've been using gnome-do/Alt-F2 + xkill to do this for forever, but I like this way alot better.


ddavid123 14 years ago

Back in days when I used Mandrake 9.1, I used this feature. But in the last 4-5 years, it has disappeared! Thanks for the tutorial!


chamfay 14 years ago

thanks


TheBigGeeUK 14 years ago

Nice tutorial. Thanks for that!


ThomasB2k 14 years ago

You cancel it by right clicking, like it says in the last line of the tutorial.


DragonTrainer 14 years ago

The only problem I see with this is the fact that when you press the combination, you can't cancel the command. You must to click in something to kill it; if you press ESC or the combination again, the system still asks for something to kill.

That doesnt means that this is bad or useless; I've already added it to the shortcuts (in my case with Super+K) in case of emergency.


ThomasB2k 14 years ago

Yes, but why even take up space on the panel with a force quit button?


hunterm 14 years ago

You don't have to go into the terminal to add a force quit button to the panel. ;) Good tip.


Joeasaurus 14 years ago

Nice, Thanks.


ThomasB2k 14 years ago

I'm happy to help :)


thx1138 14 years ago

Excellent. Thank you.


choneycutt5000 14 years ago

I've been using Gnome for a couple of years now and it never occurred to me that I could do this. Great tip, thanks.


Aurimas_St 14 years ago

Because I'm new to linux - this tutorial was helpful. Thank you.