Linux.com

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 :).

 

 

Comments

Subscribe to Comments Feed

Upcoming Linux Foundation Courses

  1. LFD211 Introduction to Linux for Developers
    08 Dec » 09 Dec - Virtual
    Details
  2. LFS220 Linux System Administration
    08 Dec » 11 Dec - Virtual
    Details
  3. LFS520 OpenStack Cloud Architecture and Deployment
    08 Dec » 11 Dec - Virtual
    Details

View All Upcoming Courses


Who we are ?

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

More About the foundation...

Frequent Questions

Join / Linux Training / Board