How to create a GUI Package?

Looking for a place to start from.
I would like to create a GUI program for clamav and other antivirus tools I want to use from a usb flash drive that I can test peoples computers for viruses.
Everything would run from the gui including results from the scans etc.
Just looking for a place to start to learn the programming side.

Hi @MAYBL8,

Do you mean you want to create, program it from scratch? Because that would then depend on which language you choose for the job.

If you mean, portable packages that don’t need installation and just run from the drive, it would depend on each package.

More like a GUI front end for terminal packages like clamav, rkhunter etc.
I know there is clamtk.
These would be kind of a menu choice to run when launched from a package shortcut.
I think the easiest language would be python but I am looking for suggestions.

That’s what I thought, basically and the first option there.

You’d need to decide which toolkit you want to use: GTK/Qt/both? And go from there.

Another option, although I doubt this will be a popular option, would be to use Electron. Now that I think about it, it might not bee too bad of an idea. If it’s only a frontend, as you mentioned, then it wouldn’t be required to do any heavy lifting…

Take a look at the source code for Manjaro Hello - it is built using python and gtk

From what I have read is Qt replacing GTK?
Probably both at sometime but for ease I will concentrate on one of them to start.
Thanks for the suggestions. On to some reading.

Whatever suits you, really.
If you want to add desktop integration, you should use a language with a framework for Qt and/or GTK.

Once you have that application running, then you can think about making a package for it.


No…? :face_with_raised_eyebrow:

They are two different toolkits - they both have a learning curve.

A tool like yad can be used with bash to create GUI which has buttons and executes apps.

The endeavouros welcome app is an example of an app build using bash and yad to create a GUI.

1 Like

Where are you listening to hear that? It is, quite literally, saying that KDE will replace Gnome…

Ok I may be wrong with that.
I don’t want to get side tracked.
Looks like the code for manjaro-hello is a good place to start.
Thanks for all the suggestions.
I will post back if I have other questions. I’m sure I will.

1 Like

Does this look like a good place to start:
https://realpython.com/python-gui-tkinter/

If it explains the task at hand in a manner you can understand and has a pace you can follow - it is as good as any.

Programming in python can be a challenge at first - especially the GUI parts - the concept of signal and slot.

Go to jetbrains.com - download the toolbox package - unpack and run it - then from the toolbox install Pycharm Community.

Jetbrains tools has for me been an invaluable resource - and they have a concept of Learn PyCharm from the Welcome window.

If you go the bash script route, checkout William Shotts’s “Writing Shell Scripts”. And then checkout yad examples. Incorporate yad controls if needed. BashFaq answers over 100 questions.

@linux-aarhus is installing pycharm community more helpful this way, than installing from the repository?

In my experience yes. Because you don’t interfere with system files. It runs completely in your home.

I have had a subscription for years.

I actually started long before they began the subscription model with ReSharper in Visual Studio.

When I started coding for Manjaro @jonathon landed an opensource deal with Jetbrains so we could use the All Products Pack for our Manjaro development.

When the deal ran out - I started my own All Products Pack because the price of two single tools was around the same price and now I actively use PyCharm, WebStorm, Rider, Resharper (Visual Studio on Windows).

I have been so acustomed to the ReSharper tool for optimizing my sometimes bad practise in C# - I can’t code without it - it is simply invaluable tool to create better and higher quality code.

I looked at pycharm. It looks a little complicated to use. Has different commands .
The tutorial I was using had me enter
import tkinter as tk
pycharm uses a different syntax to import.

Looking for a simpler ide that I can run code from.
idle doesn’t look like it has a run option on the toolbar.

If you use GTK, the easiest way to jump in is Glade (at least from my experience). Instead of writing everything from ground, you can use GObjects (in your case PyGObjects), so you don’t need to deal with old tutorials about how to create windows with widgets and then figure out why things doesn’t work. Just open Glade create window with widgets you need and focus on signals and connecting things together. At the start, Glade can feel weird, but when you’re used to it, it’s pretty comfortable :slight_smile: For writing code, you can use any text editor you’re used to.

The only con will be, that you need to use Glade and text editor instead of writing everything in one place.

Glade is no longer recommended: Glade Not Recommended – Chris's Design & Development

Perhaps try Cambalache or drafting instead.

Thanks! I didn’t know about Cambalache existence. I’ll give it a try when I back to GTK :slight_smile: