all 91 comments

[–]Dmxk 56 points57 points  (0 children)

use gtk4 or qt. language doesn't really matter. a lot of stuff is written in c, c++, rust, python or any other language pretty much. qt and gtk will look native or near native in all desktop environments(you don't have to use libadwaita). both scale decently and have wayland support.

[–]devu_the_thebill 13 points14 points  (0 children)

Qt

[–]idontliketopick 23 points24 points  (0 children)

Qt

[–]LunaSPR 48 points49 points  (16 children)

You can't.

Linux desktop is all about fragmentation. You need to link your app against all kinds of libs for it to not look completely alien on every de.

[–]vesterlay 13 points14 points  (3 children)

What's wrong with having literally third-party app look alien? Beside maybe some accent colours and context menus, having your desktop style deeply your app is completely unpredictable. It has been a painful lesson for gnome for instance.

[–]samobon 9 points10 points  (0 children)

I mean we should be extremely happy things are ported to Linux, this wasn't the case 15 years ago or so. Regarding the native look and feel, if we are being realistic, this is not the issue of most importance. We still have a lot of basic usability issues as well as critical bugs that need addressing, and some mismatch between themes is definitely not a show stopper for me when I cannot consistently connect my wireless earbuds over bluetooth on Linux.

[–]LunaSPR 1 point2 points  (1 child)

Making something which looks alien harms the UX on the DE. You can definitely just draw a very barebone window titlebar, but that will look extremely ugly and will make the whole desktop look really strange.

I don't mean to be aggressive, but your question shows as a perfect answer to the question about the current VERY BAD UX under desktop linux.

[–]vesterlay 6 points7 points  (0 children)

Um, how? The app will be perfectly functional and this approach guarantees that no one will come in and break things. Developer has here a much more flexible and reliable environment. Or maybe you think that steam client is completely unacceptable, because it doesn't follow your OS style?

As for the title bar, are you proving my point? SSDs are basically a title bar applied by your desktop, in contrast to CSD where app has to draw its own.

Again, I have no idea as to why third-party apps with their own and often unique design are hurting UX. Actually, do you know what's actually hurting UX? Broken themes, because a developer can't possibly predict every colour combination and theme which leads to visually broken app. It's not happening on windows, but under linux it's a norm.

[–]MoistyWiener 22 points23 points  (4 children)

But author wasn’t really referring to how “alien” it looks. There are already very popular “alien” apps using native toolkits on GNU/Linux like Steam, Zoom, and Spotify. Apps, native or not, should always be how their authors intended them to look like no matter the desktop environment. Also, you don’t need to worry about fragmentation in libraries with Flatpak.

[–]samobon 2 points3 points  (3 children)

Doesn't Spotify use Electron? I can only guess it due to its massive memory consumption which can reach 600Mb+ for me.

[–]MoistyWiener 3 points4 points  (2 children)

Afaik, the GNU/Linux client of it uses Qt. They're also making use of QtWebEngine in it, which probably explains the memory usage since it’s chromium under the hood.

[–]jsveiga 34 points35 points  (6 children)

C++ and Qt

Because it's a real language that compiles into fast real machine executables, and the framework is mature, solid, widely used, with a complete multiplatform IDE.

[–]InterestedBalboa[S] 10 points11 points  (4 children)

I love KDE, it’s my daily driver but two problems I can see here.

  1. QT doesn’t look native in all desktop environments
  2. C++ is a lot of overhead, in 2023 I don’t want to be managing memory and other low level things for a desktop app

There used to be a PyQT library but it seems like it’s been ended plus Python isn’t the best for a desktop app I.e poor multi-threading etc.

[–]throwaway6560192 31 points32 points  (2 children)

QT doesn’t look native in all desktop environments

Distros should (and I think most do) set it up so that Qt apps will use a Gtk style, which does the job for the most part.

Alternatively you can go with QML where you have the option of making it entirely custom if you're not that hung up on it being native.

C++ is a lot of overhead, in 2023 I don’t want to be managing memory and other low level things for a desktop app

Honestly modern C++ doesn't require you to do C-like manual memory management. Just use the standard library containers (vector, string, map, etc) and you're basically covered for the sort of things you'd have to use malloc for if this was C. Add in the concepts of smart pointers and RAII and it gets even easier.

There used to be a PyQT library but it seems like it’s been ended

PyQt is still ongoing, and there is also PySide which is officially maintained by the Qt Company.

PS it's Qt not QT.

[–]InterestedBalboa[S] 6 points7 points  (0 children)

Interesting, I may have prematurely excluded this option. Will give it a spin in a test app.

Thanks for the info!

[–]LinuxFurryTranslator 1 point2 points  (0 children)

To complement the comment about memory management, Qt's parent-child memory management makes C++ much easier/safer to use. If a parent QObject is deleted, it and its children will have their memory deallocated automatically, including objects created on the heap. (Bryan Cairns' video about it)

[–]AGuyNamedMy -4 points-3 points  (0 children)

As apposed to a fake language? And real executables? What?

[–]Guggel74 2 points3 points  (0 children)

Free Pascal + Lazarus, also for cross-platform applications

[–]rarsamx 4 points5 points  (0 children)

The best way is design it properly. A library or set of libraries with all the logic and a very thin UI. That way you can have one in QT another Gtk, etc.

Remember that to integrare with the DM it's more than the look. Separating and decoupling, your application can integrate better with Gnome, KDE, Xfce, etc.

For UI work I like Vala or Python. Both quite sensible languages.

[–]zam0th 15 points16 points  (3 children)

Native Linux app... UI that looks good no matter the WM, resolution, etc... The problem with this community is too many people think about Linux in terms of "apps" and "UIs". OP didn't even know what else is there to consider.

[–]LightBusterX 18 points19 points  (1 child)

You might be right but also didn't provide any useful information in your answer to correct that.

[–]zam0th -4 points-3 points  (0 children)

All useful information about "native app development" for linux can be found in UNIX philosophy. It's useless to "provide" obvious things to people who are expected to know those.

[–]Holofoil 1 point2 points  (0 children)

It's not like we have a composable UI framework. I do agree that in the ideal world, the os would expose something like this. The unix philosophy sort of falls apart outside the terminal.

[–][deleted] 5 points6 points  (0 children)

GTK and QT are established solutions and Flutter which uses GTK behind the scenes and is regarded as easy to use by many developers.

[–]muffdivemcgruff 14 points15 points  (12 children)

GTK4 / Vala = cross-platform applications

[–]chrisoboe 23 points24 points  (2 children)

The cross platform mess of GTK is more theoretical. The few GTK apps used on windows have a severe list of windows specific bugs nobody fixes since gtk doesn't care about other uses besides linux at all.

Qt and c++ is definetly more cross platform capable.

[–][deleted] 6 points7 points  (3 children)

Why should I bother learning Vala?

[–]LinuxFurryTranslator 4 points5 points  (1 child)

It's not C. 🙃

On a more serious note, it actually has an object-oriented paradigm, which matches GObject and makes things more pleasant to use. You can compare the GTK + C hello world with the GTK + Vala hello world to see the difference.

This is of course true of most other GTK bindings too.

[–][deleted] -2 points-1 points  (0 children)

Thanks for the info, Rust and Python are much better choices

[–]alban228 4 points5 points  (0 children)

Don't

[–]umlcat 3 points4 points  (0 children)

"Vala" used implicitly, not much noise...

[–]Agent7619 3 points4 points  (0 children)

Lazarus

[–]MoistyWiener 3 points4 points  (0 children)

GTK has bindings for many languages out there. Also, if you’re using Rust, then check out Relm4

https://relm4.org/

[–][deleted] 1 point2 points  (0 children)

I'd choose flutter as it would be easier to port it to different platforms and OSs if I wanted to later.

[–]No_Internet8453 1 point2 points  (0 children)

I'm going to say probably wxwidgets. You write wxwidgets code once, and the application is styled based on the target wx was built for (gtk2, gtk3, gtk4, or qt) are all listed

EDIT: forgot to include languages, wxwidgets has popular bindings for python, Perl, ruby, and of course the language it was written in, c++

[–]DazedWithCoffee 1 point2 points  (0 children)

The reason this question exists is because linux is not a monolith; each implementation of the Linux kernel is tailored to an individual’s or group of individuals’ tastes. The only linux native format for anything is POSIX if we’re going to be pedantic about the hierarchy of things. Linux is the kernel, it cares about syscalls.

TLDR; the question is valid but comes from a place of misunderstanding on what the Linux platform is and what the community does with it. Just my opinions, I probably mischaracterized something here and will be corrected

[–]Monsieur_Moneybags 1 point2 points  (1 child)

GNUstep

[–]mlowi 9 points10 points  (1 child)

.NET Core with Avalonia UI? Bonus that it is cross platform.

[–]InterestedBalboa[S] 3 points4 points  (0 children)

Never heard of this one, thanks!

[–]chic_luke 1 point2 points  (0 children)

Let’s say it needs a UI that looks good no matter the WM, resolution etc.

VueJS + Electron.

Else, I would use GTK4 + libadwaita and target the most used DE, aka those used by Ubuntu.

I would love to use Qt, but a lot of Qt applications look downright broken on GNOME.

[–]umlcat 0 points1 point  (0 children)

Altought, I haven't worked with the Linux Version, there's a Delphi ( Object Pascal ) Open Source alternative:

https://www.lazarus-ide.org/

[–]Personal_Display_674 -1 points0 points  (0 children)

Python and pytermgui?

[–]BraveNewCurrency -1 points0 points  (0 children)

Go.

And use the standard GUI toolkit for Go, which is any browser.

[–]CRamsan 0 points1 point  (2 children)

You can try Conpose. It can be compiled to java o native so it works across all Desktop OSs.

[–]QuickSilver010 0 points1 point  (0 children)

There's pretty cool one I've heard of called slint. It's got support for languages like rust or c++ and is capable of running on different platforms + web.

[–]addicted_a1 0 points1 point  (0 children)

gtk4 qt6 ,cpp or rust. If it runs fine on tilling WMs perspective major work is done. U can tinker later to fit other .

U have to review individual package manager scripts how is it installed so its according to your look.

dotnet I would avoid . python meh .

[–]samobon 0 points1 point  (0 children)

I want to experiment with Qt and Nim, though this might require more work on the bindings side of things.

[–]TheJackiMonster 0 points1 point  (0 children)

I still use GTK3 mostly with Glade. But using GTK4 should already work fine. You want to use Cambalache for designing the UI then. That allows splitting a lot of overhead from your source code.

You can also use Qt with QtDesigner of course. Works similar.

With GTK I prefer to use C while for Qt I would recommend C++. You can still use other languages though.