this post was submitted on 06 Apr 2024
115 points (96.7% liked)

Linux

48224 readers
111 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Electron is a widely hated framework on Linux, but what about the alternatives like Neutralinojs?

In their own words: In Electron and NWjs, you have to install Node.js and hundreds of dependency libraries. Embedded Chromium and Node.js make simple apps bloaty — in most scenarios, framework weights more than your app source. Neutralinojs offers a lightweight and portable SDK which is an alternative for Electron and NW.js. Neutralinojs doesn't bundle Chromium and uses the existing web browser library in the operating system (Eg: gtk-webkit2 on Linux). Neutralinojs implements a secure WebSocket connection for native operations and embeds a static web server to serve the web content. Also, it offers a built-in JavaScript client library for developers.

Do you experience alternatives like Njs to blend more in the desktop layout, install less junk, use less memory, are more compatible with Wayland,...?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 92 points 7 months ago (5 children)

https://tauri.app/ is very popular and does not need electron. It uses the OS native we view.

[–] [email protected] 27 points 7 months ago* (last edited 7 months ago) (3 children)

And 2.0 will support Android and iOS

[–] [email protected] 5 points 7 months ago (1 children)

I wanna use Rust to build mobile apps so bad. I don't really know what I want to build, but I want to use Rust to do it

[–] [email protected] 3 points 7 months ago

Reinvent Winamp for Android and iPhones.

load more comments (2 replies)
[–] [email protected] 24 points 7 months ago

Tau'ri, you say?

[–] [email protected] 7 points 7 months ago

I have been using Tauri for a personal project of mine and I absolutely love it

[–] [email protected] 3 points 7 months ago* (last edited 7 months ago)

what apps use Tauri? I only know about Dorion which doesn't really work well from my experience

edit: ok so Dorion works well in an Ubuntu VM but it doesn't have a build for any other distro :/ also i found this https://github.com/tauri-apps/awesome-tauri

[–] [email protected] 3 points 7 months ago

Came here to say Tauri.

[–] [email protected] 47 points 7 months ago (1 children)

No matter how much I like an alternative to Electron. It cannot save me from bad Electron apps.

[–] [email protected] 13 points 7 months ago (19 children)

Are there any good electron apps? Like genuinely

[–] [email protected] 41 points 7 months ago* (last edited 7 months ago) (2 children)

VSCode and Obsidian work great.

[–] [email protected] 5 points 7 months ago

Until you want to integrate with the system and use gtk window controls.

[–] [email protected] 4 points 7 months ago (2 children)

I hear great things about obsidian but I haven't used it since it's not open source

[–] [email protected] 11 points 7 months ago

Im willing to give them a pass on that since they don't vender lock the notes I'm taking.

[–] [email protected] 6 points 7 months ago

Sure, but all it does it give you a nice UI for local markdown files. There's no lock-in.

load more comments (18 replies)
[–] [email protected] 20 points 7 months ago

I haven't use any alternatives, and haven't developed with electron, but I know that there are another alternative -- Tauri. It also uses web-view. It's built in Rust and allows apps to be developed in JS (providing JS api) and in Rust.

What I can say -- JS support won't be cross-platform, like we have with NodeJS in electron. Special debug per platform might be required.

[–] [email protected] 14 points 7 months ago* (last edited 7 months ago) (1 children)

Have you tried Flutter? https://flutter.dev/

React Native is good, and isn't just a web view. It uses native UI widgets so the apps feel truly native. Many Android and iOS apps use it, and Microsoft ported it to Windows and MacOS and use it in some of their apps (notably, the Xbox app, parts of Office, and parts of Windows like the old Mail app in Windows 10, use it). Unfortunately there's no stable port for Linux :/

In theory, someone could port React Native to use Gtk, Qt, or WxWidgets, but I haven't seen any such efforts recently - there's a few old projects but they've all been abandoned.

[–] [email protected] 1 points 7 months ago

Have you tried Flutter?

I didn't develop on it, but I've used recently one app written in it and it was hot pile of garbage.

It was slow as a slug, and eat lot of CPU. I've also checked web eversion and was astonished as it rendered everything into canvas. It's really poor design choice to render everything by app itself.

I guess it was just buggy app, but I didn't try other apps in flutter, so can't compare.

But web demo of flutter UI components with list box was also not so fast. But perhaps it's just web version. Didn't know any example of good flutter app.

[–] grue 9 points 7 months ago

Native applications are great!

[–] [email protected] 7 points 7 months ago

I'm using pywebview, a cross-platform python web view GUI framework. I like it so far, it's fairly straightforward. I just wanted a python API around my database, and I'm building most of the app in the front-end with vanilla JS and html.

I didn't want the (alleged) bloat of electron, and I didn't want to jam async/await onto everything in the backend, so I found this alternative.

The 3rd contender was Tauri, but I didn't want to bother learning Rust for a simple API. But it was very tempting, and Tauri is an option you should consider.

I haven't finished my current project so I can't completely vouch for pywebview yet. But so far it's great and I recommend it if you don't mind using python (I do long for a statically typed backend TBH).

[–] [email protected] 7 points 7 months ago (2 children)

The thing is, Linux Desktops dont have a unified WebView. I wonder how that would work on KDE and others

[–] [email protected] 5 points 7 months ago (1 children)

Tauri uses webkitgtk everywhere, including KDE.

[–] [email protected] 1 points 7 months ago (1 children)

Hm, I mean that is way better than using an entire Chrome browser, but KDE uses qtwebengine

[–] [email protected] 9 points 7 months ago* (last edited 7 months ago) (1 children)

True. If their goal is truly to use the "native" solution everywhere, they should use QtWebEngine on Qt desktops. For the most part, the advantage with Tauri isn't so much that it's using the "native" web engine, it's that not every Tauri application has to bundle a full (probably outdated) web engine. On Linux, this is achieved regardless of whether WebKitGTK or QtWebEngine is used. The first Tauri application you install pulls in WebKitGTK if you didn't already have it installed, then every subsequent application just uses the same one. I'm personally glad it's using WebKitGTK despite being a Plasma user. The less we rely on Blink and Blink-based web engines, the better. Having to spend 100MB of my 1TB hard drive on WebKitGTK to achieve this isn't making me lose a whole lot of sleep.

[–] [email protected] 1 points 7 months ago

I suppose that is okay, and targeting a specific engine is likely needed, to have non-trivial features.

[–] [email protected] 2 points 7 months ago

I believe it uses gtk-webview. So on KDE system you would use GTK as a base. But you anyway would have GTK libs in your system.

[–] merthyr1831 5 points 7 months ago* (last edited 7 months ago) (1 children)

If you need multi platform support in one codebase, Flutter is a good choice. Ubuntu uses it for their new OS installer and GUI package manager.

Quite easy to get set up on Linux (though the recommended route is using Snaps).

No waiting ages for a massive node_modules folder to fill up, nor the general pain of using javascript; dart is a really nice language to write in.

You wont get the smallest binaries with it, but it's powerful, reliable, and pretty damn performant for a "non native" framework.

[–] satansbartender 1 points 7 months ago

Second this. Been working with flutter and dart professionally for awhile now and it's great

[–] [email protected] 5 points 7 months ago (1 children)

Alternative for what? I never used electron apps and I don't see any reason for that. If you are a developer, try Qt.

load more comments (1 replies)
[–] Aux 4 points 7 months ago (1 children)
[–] just_another_person 4 points 7 months ago (7 children)

Flutter has been on the uptake quite a bit the last 2 years for Linux. Canonical and RedHat have built some end-user tools on it that work great, and it's pretty easy to develop for.

Only thing that keeps me away is Big Googz running the development show. Not only can we not trust them to do what's best for the dev base of a specific tool, it's obvious how out of step they'll go with said ecosystem to exploit consumers of tools built in that ecosystem. Look at Chrome.

load more comments (7 replies)
load more comments
view more: next ›