Xfce Forum

Sub domains

You are not logged in.

#1 2013-09-20 17:33:26

Registered: 2012-05-14
Posts: 51

script causes Thunar to run CPU up to 100%


I have this simple script:


while [[ ! $number =~ ^[0-9]+$ ]]; do
    echo "Enter a number:"
    read number

that causes one of my CPUs to run up to 100% when I click on it with the mouse (left click).
It does not allow a number to be entered, it simply does nothing nothing.
But I notice that one of my CPU's runs up to 100%, and I have to kill the process for the script.

When I right click on the script, and select "Run in terminal" (  I have configured a
custom action called "Run in terminal" that has this command :   "xfce4-terminal -e %f --hold"   )
it runs in a terminal correctly, and the CPU does not run up to 100%.

1) Is there anyway for Thunar to know when a script needs to be run in a terminal by mouse right
   clicking, and not with a left click? Nautilus always asks you if you want to "run in terminal" or just "run".
2) Why does the CPU run up to 100% when the script is called by a left mouse click?



Board footer

Powered by FluxBB