HowTo open a terminal for output in Debian11 Gnome?
by floppy_stuttgart from LinuxQuestions.org on (#6MD6C)
Hello,
I create an icon on my gnome desktop which start the script below: showing the RAM usage.
So far, the windows open but there is a message coming up: I have to click 3x time on "restart" = "Erneut starten" before I could see the message "RAM usage..". (see attachment) because it is probably hidden behind the message "Der Kindprozess..".
Any proposal HowTo delete this message "Der Kindprozess.." is welcome.
Code:#! /bin/bash
THRESHOLD=5 # Set your desired threshold percentage
# https://www.inmotionhosting.com/support/server/linux/check-memory-usage/
RAM=$(free | awk '/Speicher/{printf("%.2f"), $3/$2*100}')
if [ $(echo "$RAM > $THRESHOLD" | bc) -eq 1 ]; then
gnome-terminal --window-with-profile=RAM --command "echo 'RAM usage is above $THRESHOLD% - Current usage: $RAM%'" --geometry=50x10
fi
Attached Thumbnails
I create an icon on my gnome desktop which start the script below: showing the RAM usage.
So far, the windows open but there is a message coming up: I have to click 3x time on "restart" = "Erneut starten" before I could see the message "RAM usage..". (see attachment) because it is probably hidden behind the message "Der Kindprozess..".
Any proposal HowTo delete this message "Der Kindprozess.." is welcome.
Code:#! /bin/bash
THRESHOLD=5 # Set your desired threshold percentage
# https://www.inmotionhosting.com/support/server/linux/check-memory-usage/
RAM=$(free | awk '/Speicher/{printf("%.2f"), $3/$2*100}')
if [ $(echo "$RAM > $THRESHOLD" | bc) -eq 1 ]; then
gnome-terminal --window-with-profile=RAM --command "echo 'RAM usage is above $THRESHOLD% - Current usage: $RAM%'" --geometry=50x10
fi
Attached Thumbnails