Comment by rahen

Comment by rahen 13 hours ago

3 replies

Those are very relevant for a Linux laptop, but much less so for a Linux smartphone. An AOSP-based distro like LineageOS, GrapheneOS, or /e/OS paired with Termux provides almost a all of this, with the added benefit of ART - quite possibly the most polished runtime in the Linux ecosystem.

You can even plug a bluetooth keyboard and run Emacs on your Android / AOSP phone nowadays.

418tpot 11 hours ago

I currently run LineageOS and am constantly frustrated with its limitations every day.

On desktop linux I can quickly write up a program to do most anything I want in pretty much any language, and in my text editor of choice. I don't know anything about android development and I don't really want to invest time in learning Google's proprietary GUI toolkit when QT/GTK, or even raw OpenGL is more portable. I once looked into it and gave up when it seemed like it was going to be very painful to write an app outside of android studio (why is there not just a CLI tool to compile these things?). On vanilla linux I can whip up most things in under an hour in C, Rust, or even Bash.

  • rahen 10 hours ago

    You absolutely can write something in C, Rust, Go, or whatever on Lineage. Just install Termux and the relevant packages (e.g., pkg install rust, etc.).

    AOSP is still vanilla Linux under the hood, just with a touch interface on top. Plus, ART is open-source and works great for GUI apps.

    • 418tpot 6 hours ago

      Right, but that is still severely limited in my experience.

      Like I can't bind these programs to run on keyboard shortcut (or I guess the mobile equivalent would be a button on the home/lock screen?)

      I can't do basic UI-- even if I don't write a QT/GTK app sometimes I want to pipe to imv, mpv, present a list of options via dmenu/rofi, send a notification to dunst/mako via notify-send, copy strings to the system clipboard, write a script that calls wtype to emulate keystrokes, etc.

      I don't have access to the whole filesystem too, right? Last time I tried writing a script in termux I couldn't access the photos my phone took.

      One concrete example: I use music player daemon to play music throughout my home. On the phone the answer is to download an app that implements the protocol, but the app isn't great. Instead, I wish I could bind dmenu to open up when I press volume up for example that just shells out to mpc. These are the types of things that I like to set up on my desktop to get a really ergonomic experience tailored to my workflow, but on mobile I'm at the mercy of what apks are available.

      I also haven't found any great solution for setting up a phone declaratively. On desktop I can use NixOS to codify my configuration, on mobile, flashing a new OS means pecking around settings/fdroid like a point and click adventure game for an hour to get everything to a somewhat usable state.

      Perhaps this is all just user error and everyone else has figured out how to do these things, or they just suck it up and build their own android apps. But for me, this is really what I'm asking for when I say I want Linux on mobile.

      > Plus, ART is open-source and works great for GUI apps.

      This requires writing the app in java and building it in android studio, right? Is there an easy way to just compile an apk from a non-android project?

      Also if I invest a lot of time in learning ART and building apps for android, I will have a much worse experience running these apps on desktop linux (for example under waydroid) which is where I spend a vast majority of my time.