Skip to content
Герхард PICCORO Lenz McKAY edited this page Dec 18, 2025 · 4 revisions

EasyBashGUI about

EasyBashGUI is a Bash functions library for *BSD and GNU/Linux that aims to give simple GUI functions using yad, gtkdialog, kdialog, zenity, Xdialog, (c)dialog, whiptail or bash builtins depending on desktop running or not, Yad/Gtkdialog/Xdialog installed or not and, eventually, X server running or not.

So, if bash programmer writes:

message 'Thanks for using this program'

.. has not to worry in which environment his program runs, and which dialog is more appropriate.

Modes of use

You can use as system-wide module lib or as built-in quick start module embedded!

Quick start usage

Let's assume you have the EBG installed on system-wide, then there are only few steps :

echo -e "source easybashgui\nmessage hola" > newprogram

bash newprogram

That's it !!!!! Easy! of course this assumed you already global installed EBG!

Quick developer usage

But what if we want everything to be within our project, as developers or embedding the EBG?, to make our program independent of the installation:

mkdir ~/Devel && cd ~/Devel && git clone https://github.com/BashGui/easybashgui

cd ~/Devel/easybashgui

ln -s lib/easybashlib easybashlib && ln -s lib/easybashgui.lib easybashgui.lib

echo -e "source src/easybashgui\nmessage hola" > ~/Devel/easybashgui/newprogram

bash ~/Devel/easybashgui/newprogram

That's it !!!!! You develop your first GUI script!

EasyBashGUI - installation

Simplified way to code bash made GUI frontend dialogs! - Installation document!

IMPORTANT there are packages ready to use at OBS bashgui build service just visit and use with your Linux distribution package manager!

Requirements

User module install

This way you will use it inside your new project "newprj" program, first download and decompress, later echoes the required minimal files and start your code:

This will download the EBG version 12.0.5 but you must check the last versions at the release page: https://github.com/BashGui/easybashgui/releases

wget https://github.com/BashGui/easybashgui/archive/refs/tags/12.0.5.tar.gz

mkdir -p ~/Devel/newprj && tar -zxvf 12.0.5.tar.gz -C ~/Devel/newprj

cd ~/Devel/newprj && ln -s lib/easybashlib easybashlib && ln -s lib/easybashgui.lib easybashgui.lib

echo -e "source src/easybashgui\nmessage hola" > ~/Devel/newprj/newprogram

bash ~/Devel/newprj/newprogram

System wide install

This way you will use it in any project by only sourced one standard line, because will be available for all the system:

  1. Install the requirements (check first part of this document)
  2. download EBG from https://github.com/BashGui/easybashgui/releases
  3. extract all files, you will have a directory with lib and src dirs!
  4. inside the new extracted dir EasyBashGui do make install as root!

But beware that if you assumed system wide install, the target system of your new script will already have installed the EBG package/programs, check paths in next section.

Install paths

Component System wide path User mode path
easybashgui $(DESTDIR)/usr/bin $(USERDIR)/ or ./
easybashgui-debug $(DESTDIR)/usr/bin $(USERDIR)/ or ./
easybashgui.lib $(DESTDIR)/usr/lib/easybashgui $(USERDIR)/lib/ or ./lib
easydialog-legacy $(DESTDIR)/usr/bin $(USERDIR)/ or ./
easybashlib $(DESTDIR)/usr/lib/easybashgui $(USERDIR)/lib/ or ./lib
easybashgui.1.gz $(DESTDIR)/usr/share/man/man1 Not necesary
icons/*xpm $(DESTDIR)/usr/share/easybashgui $(USERDIR)/icons/

System wide usage vs module user usage

Just after install read full documentation README.md, the only difference is the source endpoint line and the clean final line.

Explanation is on README.md System wide usage vs module user usage section.

In summary; you should get the endpoint like:

  • If you installed system wide: source easybashgui and EBG will clean automatically
  • If you are using from path: source ./easybashgui and last line must be clean_temp

And... enjoy !! :-)

Packaging

Before read, there are already made package at build result! you can visit and check it for starting point!

For distro maintainers EBG are a simple and easy to maintain project, but due it relies on backend and coreutils programs there are some directions:

  • Minimalist people should depends on coreutils! we used some command like wc, type, cut and bash and we relies on their important features that busybox neither dash/sh can provide it!
  • backends (frontends) are not dependencies, but (c)dialog it is!, we are aware that we need a backend, but dialog is the backend that must be placed as a dependency, but since not only, because cdialog its the best dependency! from its own but it has fewer functionalities in itself, "dialog" is by far compatible with everything created since the beginning of times.
  • don't recommend any backend (frontend), it's not necessary!, not so much package managers have the suggestion part like Debian, but please don't recommend any backend, the EBG must use the already provided one and present in your env ! your project that will implement EBG will manage those depends and recommends!
  • follows installation paths the EBG does not put any file outside of the right place, so please don't change anything!
  • none of the requirements are build requirements! yeah, EBG it's fully runtime script!

Projects that already uses EBG must depends on it, and must not depends on specific frontend GUI (by example, kdialog or zenity), unless will have a detection way or specific feature.

see also

Bash!Karaoke or LXDE Menu Manager is an idea of what you can achieve with this library... ( you would take a look at my scripts page here, also... )

If you want something similar for the web, please, take a look at EasyBashWEB (http://sites.google.com/site/easybashweb) EasyBashWEB aims to be for Web what EasybashGUI is for local machine.

This to make bash programmer life... easy !

         Vittorio Cagnetta

Clone this wiki locally