What language to use to create Linux programs?

Contribute code to SolydXK and make it even better.
Deleted User 2764

What language to use to create Linux programs?

Postby Deleted User 2764 » 27 Jan 2014 01:49

What is a good language to use to create Linux GUI-based programs? Is there something that can make applications that will run cross-platform (ie. KDE, Gnome, Mate, Cinnamon, Xfce, etc.) without one having to write the program several times (one for each desktop environment)?

I have assumed that would be C++ but what to build the GUI parts with?

I've also seen people using Java. I am using two programs (not in the repos though) that are Java: jCodeCollector and J7Z (a zip GUI that supports 7Zip, Zip, etc.) These work pretty well but don't always pick up the theme of the desktop environment.

I would like to be able to make programs that would work on and use the desktop themes but not have to write the same program several times once for each desktop.

What is the best solution for this?

kurotsugi
Posts: 2228
Joined: 09 Jan 2014 00:17

Re: What language to use to create Linux programs?

Postby kurotsugi » 27 Jan 2014 11:21

C, java, phyton, C++, mono, bash, everything should work. the GUI and the language is two different thing. depends on what your preferences is, you can use GTK or Qt to create GUI of your program.

Deleted User 2764

Re: What language to use to create Linux programs?

Postby Deleted User 2764 » 27 Jan 2014 13:17

That's the whole problem. Which will work in all desktop environments without breaking the theme; qt or gtk? From what I understood, qt is KDE-only and gtk is Gnome-only. You can run KDE qt apps in Gnome and gtk apps in KDE, I know but the problem there is that you'd have to download half the desktop environment in dependancies to do it (and Gnome fans might not want to do that). I would like to avoid large library dependencies if possible and have something more cross-platform.

kurotsugi
Posts: 2228
Joined: 09 Jan 2014 00:17

Re: What language to use to create Linux programs?

Postby kurotsugi » 27 Jan 2014 13:45

that's also not quite true. whatever GUI did you choose, both gtk based, or gtk based app usually didn't huge dependency. KDE apps indeed, will force you to install huge KDE specific library but not every qt based app depends on KDE library. you can even create an app with qt without using any KDE libs. this is a good example, stellarium which is a qt based app, if you want to instaled it, you'll get these package instaled as his dependency

Code: Select all

libaudio2{a} libqt4-network{a} libqt4-opengl{a} libqt4-script{a} 
  libqt4-xml{a} libqtcore4{a} libqtdbus4{a} libqtgui4{a} qtcore4-l10n{a} 
  stellarium stellarium-data{a} 
if you count all of them, stellarium dependency is only 8.432 kb.

Deleted User 2764

Re: What language to use to create Linux programs?

Postby Deleted User 2764 » 27 Jan 2014 13:58

Cool! And qt (going by your example) would look and run good in any desktop environment?

I will look into qt. Though I'm wanting to wait a little bit because I heard about a qt update that will make it even lighter (ie. not requiring a lot of KDE dependencies). I think that was planned for KDE 5?

Deleted User 2763

Re: What language to use to create Linux programs?

Postby Deleted User 2763 » 27 Jan 2014 14:12

^Yes, even on Windows.
-H

kurotsugi
Posts: 2228
Joined: 09 Jan 2014 00:17

Re: What language to use to create Linux programs?

Postby kurotsugi » 27 Jan 2014 14:20

KDE is indeed a wellknown qt based app but it never implies that any qt based app will be use KDE component. the lightness of qt is not because the app will not depends on KDE component but it is because qt is developed towards smartphones and tablets. AFAIK both GTK and qt can run in any DE. your main concern will be which on is easier to understand for you, the portability, and which target of your app. most desktop app are designed with GTK since it's easier to use. qt is a lil bit hard to use but people said that it more beautifull and more suitable for for devices like smartphones.

User avatar
Arjen Balfoort
Site Admin
Posts: 9282
Joined: 26 Jan 2013 19:36
Location: Netherlands
Contact:

Re: What language to use to create Linux programs?

Postby Arjen Balfoort » 27 Jan 2014 14:49

Moved to the Code section.

All SolydXK applications were made in Python/Gtk (using Glade for the GUI).
I knew I wouldn't have the time to build the same application in different languages, so I chose what would be easiest to maintain, with the shortest learning curve.


SolydXK needs you!
Development | Testing | Translations

Deleted User 2764

Re: What language to use to create Linux programs?

Postby Deleted User 2764 » 28 Jan 2014 03:42

@Schoelje: Thanks. I wasn't sure about the code section because it was about contributing code and I'm not really ready to contribute yet. It was more an exploratory thing of "what should I use". And what I create might not be for just SolydXK, but any system running Linux. Or I should say any Intel-based desktop or laptop running Linux.

@ kurotsugi: I remember qt was around long before mobile phones were around. So it's not surprising that qt also is adapting to the mobile world. That's a good thing really. I want to do some stuff for Android too but my choice there is Java.

Looks like I'll have to learn some more Python. My Python skills are pretty basic, if that. I'm very good with Perl most of the time. Can Gtk and Glade work with Perl by any chance?

My preference used be to not use a scripting language but instead compile in C++. But now with so many different systems and every Linux system has both Perl and Python already installed (and at least GTK?) I am seeing that Perl and/or Python is the best bet now. It's more portable than compiling for an archetecture. Way way back in the "old days" scripting languages were discouraged because of their slowness. Today's machines don't have that problem.

I'd like to be able to use Perl but I don't mind learning Python as well. In fact, I have the PyGame book (on Kindle in the Cloud since I don't own a Kindle) and also FilmsByKris.com has some decent Python 3 tutorials he's working on. So there's definitely some resources available.


Return to “Code”

Who is online

Users browsing this forum: No registered users and 2 guests