Article 6MD6C HowTo open a terminal for output in Debian11 Gnome?

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 Thumbnailsattachment.php?attachmentid=42736&stc=1&
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments