Shell Script and Progress Bar or GUI Wrapper

Hi,
I have shell script that I am running under Ubuntu as root.
Is it possible to hide the command window and show the user some sort of progress /random progress bar / or other form of GUI interaction?
On MAC, I have been using Platypus but on Ubuntu I am not sure what to do.

Hi.

Not an answer, but for those who (like me) have not seen or used Platypus :

Description:          Platypus is a program for creating application wrappers
                      around scripts, i.e. creating Mac OS X applications that
                      execute a script they are bundled with. Scripts can thus
                      be run transparently from the graphical window environment
                      without having to resort to using the command line
                      interface. It supports drag and drop on created apps,
                      running as root using Authentication Manager and more.

From port also available from brew

On a system like:

OS, ker|rel, machine: Apple/BSD, Darwin 18.6.0, x86_64
Distribution        : macOS 10.14.5 (18F132), Mojave
port - ( local: /opt/local/bin/port, 2018-10-03 )
brew - ( local: /usr/local/bin/brew, 2017-06-03 )

Best wishes ... cheers, drl

1 Like

You could pretty up your script using whiptail:

Here is an example script:

{
 sleep 3
 echo 25
 sleep 3
 echo 50
 sleep 3
 echo 75
 sleep 3
 echo 100
 sleep 1

} | whiptail --gauge "Naveedan's task" 6 60 0

The sleep commands simulate work you script is performing. You will probably want to calculate the percentage complete in your script rather than have arbitrary hard-coded echo statements.

2 Likes

You could try this:
I wrote it about 6 years ago for unix.com as a horizontal VU meter but is would be easy to modify...

At A Glance Coloured Real Time Bargraph Generator...

1 Like

Hi,

I will give a try to Whiptail, thanks for information.