Zenity offers one of the simplest way to create basic GUI app with shell scripts. But It's heavily bloated and very much Gnome/GTK+3 centric.
So if you're looking for a simple and lightweight zenity alternative, Qarma is for you.
Qarma is a near perfect zenity clone, written in Qt, could be compiled against both Qt5 and Qt4, and supports styling with qt5ct.
How to install Qarma
Till now no major Linux distro picked up Qarma as zenity alternative in their repository, though there's a AUR package for Arch Linux.
So we've to install it from source, though this guide is for Debian based distros, but could be easily implemented for other distros.
First install proper Qt5 compilers, development tools and development libraries and headers.
sudo apt-get install build-essential qt5-default qt5-qmake qtchooser qtbase5-dev libqt5svg5-dev libpng12-dev qtbase5-dev-tools qttools5-dev-tools qtbase5-private-dev libqt5x11extras5-dev
Use git to get the latest Qarma source code.
git clone https://github.com/luebking/qarma.git
cd ~/qarma/ qmake && make -j4
If everything is done right, there should be an executable binary, qarma .
You may want to strip the binary to make it even smaller in size.
strip -s qarma
Now install Qarma system wide,
sudo make install
You may also want to make a deb package before installing, it's a little more convenient.
The final binary after stripping is around 176 KB, pretty lightweight and opens up instantly.
Using qarma as zenity alternative
Every Qarma options are similar to zenity, you just have to replace the word zenity with qarma in your script.
So how it looks ? I think it's pretty cool with the breeze Qt widget style.
Currently qarma depends upon only 52 shared libraries, checked with
ldd ./qarma | wc -l , which is quite acceptable for a Qt based GUI application.
I think it's really useful for those who love Qt and simplicity and don't want to install whole KDE to get KDialog.
So what's are your thoughts about Qarma ? Leave your thoughts in the comment section.
We've just added this to OpenMandriva Lx, and went as far as making the package "Provides: zenity" and including a qarma -> zenity symlink.
Starting with the OpenMandriva Lx 4 release, qarma will be the default package installed if something requires zenity.
Why this late? We simply didn't know of this project earlier -- much like many people don't know about our distro. Looks like a lot of good projects have marketing issues. 😉
Matthias Schuster says
Its not in development since 3 years
There is a fork with Cmake support: https://github.com/fluxer/qarma/commit/e1058e415602515c45239dfc7efc89da24460a2c
Arnab Satapathi says
I hope the the developers will continue to evolve Qarma.