Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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).
If you can write shell scripts, take a look at Zenity and Yad.
Quote:
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.
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 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.
Last edited by Michael Uplawski; 03-22-2016 at 02:51 AM.
,
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).
[...]
I am considering using python and tkinter , but that might cause me to have to install/update python on the client.
The two statements above are a bit contradictory.
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.
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.
Well, just to be clear : the optimal situation will be to give the user a single executable file, which will open up the gui (simple installer like gui - next next next...), and thats it - no installation required.
Also, i cannot count on the user to have an internet connection.
Well, just to be clear : the optimal situation will be to give the user a single executable file, which will open up the gui (simple installer like gui - next next next...), and thats it - no installation required.
Also, i cannot count on the user to have an internet connection.
you seem to sound more Windows orientated in doing things. as others have said, deb, rpm, even straight source code using
Code:
./configure
make
make install
--
py.setup
sh myscript.sh
etc..
these are the ways of Linux, unless installing the complete system itself as far as a GUI setup to install applications.
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 forgot something. Or rather: Actively ignored Java, Swing and SWT.
These GUIs can be part of a single jar-file that may also contain all of the remaining program-code.
Execution may be a simple call of the Java executable with the jar-file as argument.
The development is not quick, but the result may be dirty.
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.
Last edited by Michael Uplawski; 03-22-2016 at 01:29 PM.
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
Well, just to be clear : the optimal situation will be to give the user a single executable file, which will open up the gui (simple installer like gui - next next next...), and thats it - no installation required.
Also, i cannot count on the user to have an internet connection.
Optimal for whom? Most everyone in the Linux world (especially newbies) expects pre-compiled applications to be installed via the package manager these days. Building from source is another story.
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.
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.
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.
You can still do it that way, though the 'modern' equivlent is python/tkinter.
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
It rather depends on which DE do you plan to write for, because different DEs has their different libraries that provides GUI elements.
Quote:
Originally Posted by myewaccc1
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?
In KDE I use shell scripting + standard KDE Dialogs
It's very simple to use, it looks natively and has a lot standard pre-built stuffs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.