Home Linux Community Community Blogs Desktops Easily suspending programs

Easily suspending programs

Have you ever been faced in a situation where your computer gets totally frozen, and you can barely move you mouse cursor, and wished that there is a pause button, like the control + alt + Escape from KDE that kills the selected applications window.

Now you can! - with my little BASH script.

(If the paste expires, please notify me, and I post a fresh one ;) )

What the script does:
when the script is connected with a keyboard shortcut, when one pressed the combo:
control + alt + ~ or the chosen combination, the mouse cursor will change to a cross, which we can now click on any window, than the program will suspend using the STOP signal.

Another shortcut is used to wake the application, it's the same procedure, point and click the suspended applications window :D.

This is an exported settings file for the shortcuts in KDE4, just change $HOME to your path to the script, and than import it using KDE4 System Settings in the category Input Actions.

It works on programs made in>
Python, C, C++, mono-C#,  perl and other languages, except for Java, which has one central virtual machine that loads Java classes.

Usage of my scrpt, for instance, one needs to search something, but the system is overloaded due to the programming IDE (like Eclipse), so it points to the Eclipse window, the scripts the PID from the xwindow-id and suspends the application with kill -STOP ourPid.

Looking forward to make my GNU/Linux box faster and more usable :), despite my machines power  :D.

P.S: if someone knows any better script/program or have made one, please give me a link, please :).




Subscribe to Comments Feed

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board

/** BC-056 Ameex changes to add tracking code - 2016-01-22 **/ ?>