Best/Simplest way to create GUI for linux
Hi,
I need to write a simple application that will run on Linux (not knowing exactly which distribution). I want it to be as native as possible, so the fewer changes i need to make to the end user environment the better (i'd like to avoid 3rd party software installation). The application will be very simple, which will contain a GUI very similar to an installer (Next, Next , OK, Next, etc'...). Any recommendation on which language to use? which GUI libs to use? I am considering using python and tkinter , but that might cause me to have to install/update python on the client. also C++ and QT is another choice i am considering. Any recommendation? |
Quote:
Quote:
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 that 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. |
Quote:
If you want it to be as native as possible, that means packaging your application in a .deb or .rpm file (or similar). That is the "native" way to install applications on Linux. If you do that, there is no need to worry about having to install python, libraries, or other dependencies, as the distribution's package manager will do it for you. |
Quote:
Also, i cannot count on the user to have an internet connection. |
PSE comment on the propositions made in this thread (above and below this post) and the way that they correspond or do not correspond to your needs...
Quote:
|
Quote:
Code:
./configure As far as not having internet to get any dependencies that maybe needed to ensure that your program will run. then you'll have to ensure that it is dependent independent, or have all of the dependencies it needs to run bundled into your means of installing said application. and scripted to install them first and in the order they need to be installed as well. before installing your application. the no installation required, hum java perhaps to just run a program may work. never tried ruining a java program with everything on the usb stick though the environment has to be established first, regardless of what language you use in order for a program to run. I think you need to shift gears and think LINUX first, then get to understand how things are done with Linux in the we don't use GUI install programs to install programs that do not install but only run, first. Then go from there perhaps. you might as well as develop a live Linux usb stick with whatever program you want the user to use so he does not have to install anything nor worry about not having internet. Problem solved. but I could be wrong. |
i use zenity whenever i want a quick-and-dirty menu gui.
|
I forgot something. Or rather: Actively ignored Java, Swing and SWT.
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. |
why don't you re-summarize what it is you are actually wanting to do because you have been adding to this project one post at a time. gather all of your thoughts on this matter into one sock then write it out in a format that everyone body can understand. Thank you
|
Quote:
Single-file executables have a number of drawbacks. You must statically link all libraries (which makes the application huge), and those libraries won't get security updates the way shared libraries do, risking your users' systems. You can also run into compatibility problems if your program communicates with other programs via an API defined in those libraries. Of course, you can do it any way you want. I'm just pointing these things out to save you some support headaches. Also, you haven't told us the scope of your application, or who the target audience is. If this is something for just a few friends, you can get away with non-standard methods - but if you intend to release it into the community, it won't fly very far if it's not packaged. |
If this is a game then look into mojosetup.
|
Google things like "linux kiosk applications." My initial impression of this requirement is that it is a thing which has already been done many times before. You don't have to "start from scratch," frankly, with almost anything these days.
The naturally multi-layered architecture of XOrg/XWindows can be very light-weight: you can have "a windowed graphic presentation" without carrying around the rather-beefy overhead of "a complete desktop/GUI environment." This is ideal for things like kiosks and installers. |
Back in the day you could do simple gui stuff with TK/TCL. I remember it being almost a one liner to make a slider to adjust video brightness. Although never really easy on the eyes.
|
Quote:
|
Quote:
Quote:
It's very simple to use, it looks natively and has a lot standard pre-built stuffs. Take a look: https://techbase.kde.org/Development...th_KDE_Dialogs |
All times are GMT -5. The time now is 06:53 PM. |