Live data from Hacker News

Termux

github.com

71–80 of 186 posts

Re: Termux

#71
post #43

My usecase for Termux: most pictures get backed up properly into the home NAS, but the sync process sometimes skips a few [1] (which is exasperating, but here we are still not migrated to Immich). So I have a python script in the NAS that calculates the MD5 checksum of every photo and video, and generates a shell script that, when executed on the phone, will calculate the MD5 on the local device, and delete if it is…

With Termux I have rsync at hand, which can compute checksums, delete files after the transfer, etc. That's why I do my complete backup with Termux. And I sort the images on the phone into dated subfolders before syncing them.

And having tools like exiftool, ffmpeg, and ImageMagick among others available in Termux is wonderful.

Re: Termux

#72

Honest question, as a heavy desktop TUI user who has had Termux installed for years. A terminal (emulator) is a keyboard-based environment. How on earth are all you fans making it work with a tiny touchscreen?

This is why I'm looking forward to the new Android devices with keyboards. I can't do anything productive on a touchscreen.

[deleted]

Re: Termux

#73
post #43

My usecase for Termux: most pictures get backed up properly into the home NAS, but the sync process sometimes skips a few [1] (which is exasperating, but here we are still not migrated to Immich). So I have a python script in the NAS that calculates the MD5 checksum of every photo and video, and generates a shell script that, when executed on the phone, will calculate the MD5 on the local device, and delete if it is…

That nextcloud issue is quite weird and people seem to have had better luck with the sync app downloaded from places other than the Play store. I personally would lose any confidence in the app and use a completely separate thing to do the syncing if that happened to me. I actually did use the nextcloud client on pc a while ago and it was kind of fickle in other ways too anyway so I stopped using it.

Re: Termux

#74
post #25

I use Termux to run SSH on demand, it's quite nice for rsync'ing files between my phone and desktop. The on demand nature of it is a major selling point to me. When I open Termux and run SSH it's up, if I shut down Termux, SSH goes away with it. That and I can use rsync which is a tool I've been using for syncing files for a long time. There's no need to run always-on tools like LocalSend or SyncThing, at least not f…

Fwiw I use syncthing, but I don't leave it always on.

Re: Termux

#75
post #50

Termux is the first app I install on every Android device I get my hands on. It's astonishingly capable. I have a Bluetooth keyboard case for my Android tablet. All the time, I use Termux to ssh into my Linux machine over my home network and code on it in Neovim from my couch. I don't bother with the default notes app on my phone. Termux + Neovim running vimwiki and syncing to a private GitHub repo is way better. Mos…

I beleive Android 16 now comes with termux-like Linux environment that can be enabled via developer settings menu.

(it's unreliable, see second edit)

Does it? I've looked at it only briefly (like enabled it, waited a while for it to download something big, then got a basic shell) but it seemed much less capable than Termux. Can you get cell tower info or copy to clipboard for example, or use other Android APIs?

Edit: looked into it a bit more, /etc/issue says it's a Debian 13 (latest stable), apt works with sudo (this is a locked-down device where I don't have root permission on, why does it need a fake sudo to use apt?) but of course programs like wavemon are useless because Android doesn't let you access the WiFi interface. There's no settings besides port forwarding and resetting the "partition". I don't see any documentation or info on how/whether you can interface with the rest of the system in any way. Looking on the web for Android terminal or "Linux developer environment" (as the system settings calls it) is predictably useless and only results in Google's unrelated Android SDK or other terminal emulator apps

Edit 2: okay, beware of it: I was curious if the same "you can't make the OS not kill your script" problem also happened in this OS terminal and.. it's worse. So I ran `while true; do date >> latest.txt; sleep 10; done` to see how long it'd stay alive and then did some other tasks like turning the screen off and on, opening a navigation app and zooming into a dense city, and loading a few websites. Locked the screen once more for good measure and then unlocked and opened the terminal. Guess what? It's broken. Not just crashed: I simply cannot start it anymore. The only "error handling" (Fehlerbehebung it says) step it offers is to delete all data and start with a clean system. The stack trace says there's a nullpointer in TerminalWebViewClient, with the next line being in Trichrome. It's a web browser apparently

Re: Termux

#76

Honest question, as a heavy desktop TUI user who has had Termux installed for years. A terminal (emulator) is a keyboard-based environment. How on earth are all you fans making it work with a tiny touchscreen?

There are better software keyboards than the default that you can install. I use Unexpected Keyboard, which supports ctrl, alt, tab, and other keys needed for Unix work.

Re: Termux

#77
post #7

Is Termux still needed, now that new Android phones have a full Linux available? I keep reading on https://www.reddit.com/r/androidterminal/ about user experiences with it and it seems pretty great.

Termux is just a terminal emulator. When you run programs in Termux they run natively on your Android system inside the normal Android sandbox of the Termux app. That has some limitations, for example software has to be compiled to use the paths of the Termux environment. Termux can't just install software into /bin and you can't write into /etc. So everything depending on anything more than the base Android system like dependencies installed by Termux has to be compiled specifically for the paths of the Termux environment. But it also advantages especially when you want a Terminal that is actually part of your Android system. You can just natively access the shared storage for everything Termux has permission to. You can also use the Android API out of Termux – for some things you need to install the Termux:API Addon app – and get stuff like GPS, SMS and contacts.

The Android Terminal app is just a view to a full VM. If you want a more traditional Linux system on your phone alongside Android instead of a Terminal in Android, essentially having a second system just conveniently running on the hardware of your phone, then that's for you. However it does also use more storage.

Re: Termux

#79

Honest question, as a heavy desktop TUI user who has had Termux installed for years. A terminal (emulator) is a keyboard-based environment. How on earth are all you fans making it work with a tiny touchscreen?

First of all, typing shell commands isn't that annoying on the tiny touchscreen. Caveat: heavy terminal users here ;-)

Then you can attach a Bluetooth keyboard. And you can import scripts (Perl, Python, Shell, ...) via ssh from other devices. Last but not least, you can start an ssh server on the device and use Termux from your desktop or laptop. And you can start a web server, to access your device's media files, etc.

Re: Termux

#80
post #50

Termux is the first app I install on every Android device I get my hands on. It's astonishingly capable. I have a Bluetooth keyboard case for my Android tablet. All the time, I use Termux to ssh into my Linux machine over my home network and code on it in Neovim from my couch. I don't bother with the default notes app on my phone. Termux + Neovim running vimwiki and syncing to a private GitHub repo is way better. Mos…

I beleive Android 16 now comes with termux-like Linux environment that can be enabled via developer settings menu.

It's extremely flaky and unreliable, however:

https://social-cdn.vivaldi.net/system/media_attachments/file...

Post reply on HN