Re: YAD
Reply #4 –
Thank you for the hint.
So I did minor change to the script with following contents>#! /bin/bash
yad --title "RAMFLUSH" --image=/home/tokaro/artwork/images/icons8-ram-94.png
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
eval $@
if [ $? -eq 0 ];
then
yad --info --text "$CMD executed successfully"
else
yad --info --text "$CMD terminated unsuccessfully"
fi
So now it displays in a new dialog with the message "executed successfully".
Is there any other way to use a command which requires root privileges in script run as regular user except the version with sudo I use?
How would you pass the exit code to notification app?
Thanks