LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Michael Uplawski
User Name
Password

Notices


Rate this Entry

Answers to “Best/Simplest way to create GUI for linux”

Posted 03-29-2016 at 01:53 AM by Michael Uplawski
Updated 08-01-2017 at 03:20 AM by Michael Uplawski (orthography)

The original discussion is here: Best/Simplest way to create GUI for linux and should be consulted, as it contains much more information than I plan to summarize here.

In fact. The blog entry is an answer to the posting #9 in the very discussion, referenced above. Darn. The guy is right, isn't he?

Introductory stuff and reflection. What's the question actually?
You are an US dominated community on LQ. Sorry to say, but this is important if we have to deal with questions like this one. With the time and the experience made on different discussion platforms and environments, I have developed an alarm-system which triggers the siren each time that superlatives hit me before I can entirely grasp the topic of a discussion. What follows is not very spectacular, though: Do as if the superlatives were not there and read again, slowly. This changes much.

The more verbose textual description of a task at hand, often times reveals that qualifying adjectives and adverbs are of no use whatsoever to convey the message or the question. I do not understand what imposes their use each time and put it away as one of those “cultural things” which make the English language easy to learn but hard to use.

So, what remains is just: Ways to create a GUI for Linux. Aha !

But the mentioned verbose textual description of the problem concerns a (very) “simple application”, not a “simple GUI”. And the author hints at having some programming background as he mentions some GUI libraries and -frameworks.

Let us first put it all together, else my own contribution will not be well understood in all its detail.

Ways to create a GUI for a simplistic Linux application

I can already see it before my eyes, now.

The remainder is a full-quote from my own two relevant posts (of three) in the original thread.

My answers
1.) If you can write shell scripts, take a look at Zenity and Yad.
Where you write “simple” for the application, it is not quite clear if the simplicity applies to the user-interface or the underlying application code. As you lay emphasize on the GUI-aspect, I cling to my suggestion of a shell-script that you write against Zenity or Yad. This allows a potential end-user to quickly make her/his own modifications, when necessary. You would concentrate all variable-definitions on top of the script. This is very comfortable.

When you talk about python and C++, you enter another universe. Between tkinter and Qt, you find other frameworks which should be considered, notably gtk2 and gtk3. Also, semi-graphics like with newt or ncurses are a possibility.

If you have experience with Qt, you know how to write a simple interface and the robustness of this framework should make the decision easy. Small projects with Qt are fun to write. Personally I cannot give you more recommendations. Myself I have written some nice GUIs with Ruby/Gtk2 and -3. The Python-bindings should work just as well or even better than in Ruby... But coding C++ with Qt “feels” more natural to me, although (or because) it asks for a more scrupulous project-organization.

Anyway.., I believe that you should try Yad.
2.) I forgot something. Or rather: Actively ignored Java, Swing and SWT.
  1. These GUIs can be part of a single jar-file that may also contain all of the remaining program-code.
  2. Execution may be a simple call of the Java executable with the jar-file as argument.
  3. The development is not quick, but the result may be dirty.
  4. In theory, the program and the GUI can be platform-independent.

For a small application (huge compared to C++, Python, Ruby, Shell-scripting... a bunch of alternatives), Java may be a possible answer. If you are lucky.

If not, the program is not working alike or not at all on all platforms, the user chooses a virtual machine which is accidentally (only) this time not compatible with your choice of code and libraries, something in SWT or Swing has changed or in the Java-standard, which renders your project incompatible with itself (and String an undefined class, remember that one?).

You don't get money for it - don't code Java.
Views 121 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 11:37 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration