News for hackers. Stuff that matters.
Re:Termux is an Android terminal emulator and Linux environm... by orbisvicis on Saturday April 29, 2023 @11:20AM (#35753757)
Why would I want to install termux? You basically need a keyboard to use it; at which point you might as well grab a laptop.
Re:Termux is an Android terminal emulator and Linux environm... by Ugohcet on Saturday April 29, 2023 @11:33AM (#35753890)
You don't. I almost always use termux with virtual keyboard and it feels fine for doing something quick and on the go. Modal UIs (like vim) work better than modifier- and functional keys-heavy though.
Re:Termux is an Android terminal emulator and Linux environm... by qbasic_forever on Saturday April 29, 2023 @12:08PM (#35754232)
You really don't need a keyboard, I use it just fine with onscreen and even wrote some simple scripts in vim with it. Tab completion in the shell helps a lot too and termux's keyboard has a button for it right there.

But if you _do_ need a keyboard... it's android and it perfectly supports USB or Bluetooth input devices including mice, keyboards, etc. If you have a Samsung or some other devices you can even get a nice HDMI output to a monitor and desktop experience out of the box. It's really like a little laptop in your pocket at all times.

And if you need a GUI Termux runs X11, vnc, etc and GUI apps just fine. Just download a X11 server or vnc app from the play store (there are tons) and you're good to go.

Re:Termux is an Android terminal emulator and Linux environm... by colordrops on Saturday April 29, 2023 @12:20PM (#35754319)
It has additional keys above the standard keyboard for tabs, Ctrl, arrow keys etc. It also has good scroll support, even in vim. Definitely fine for quick jobs.
Re:Termux is an Android terminal emulator and Linux environm... by jchw on Saturday April 29, 2023 @12:48PM (#35754617)
You do not! You can use volume down as a Ctrl key, and volume up also unlocks other keys (volume up + wasd for example gives you arrows.) It also gives you an extra row above the touch keyboard with escape, tab, and some other keys, and a text input for pasting/IME/swiping/etc.

And even if that sounds uncomfortable there's still plenty of useful things you can do with minimal typing! For example... You could run Tailscale as a normal Android app, then use SSH forwarding in Termux to get a local port that goes to a web server on another computer in your tailnet, and browse to that locally on the phone using Fennec F-Droid (Firefox). All of that works just fine. If I leave one of my computers on and I'm in bed or away from home I can ssh in and run systemctl suspend. Wayland/X server locked up? You can use your magic sysrq keys of course, OR you can ssh in with termux and kill it, which doesn't depend on magic sysrq being enabled (or remembering how to get it on your keyboard.) You could also run yt-dlp to download some video or audio content from the internet; everyone hates the Reddit video player, so why not just get the MP4 out of it? Admittedly, there's a better solution here: you can get an app called Seal on F-Droid which is a pretty good yt-dlp frontend. But, the fact that you can easily do it in Termux using their package manager is testament to just how useful Termux is.

I honestly only want one thing; an SSH Agent implementation built into the app, so I can import SSH keys and not have to enter the passphrase constantly. Not a huge deal really, but having a built-in agent would be super convenient.

Re:Termux is an Android terminal emulator and Linux environm... by josh3736 on Saturday April 29, 2023 @08:43PM (#35758695)
Take a look at https://github.com/aeolwyr/tergent

tergent is a ssh agent for termux that uses the Android keystore, meaning your private keys are kept in your phone's secure enclave for a bit of nice extra security.

Re:Termux is an Android terminal emulator and Linux environm... by hungryforcodes on Saturday April 29, 2023 @12:50PM (#35754630)
There is quite a difference in size there! Find me a 7 inch laptop with phone battery life and pocket availabilty.
Re:Termux is an Android terminal emulator and Linux environm... by jchw on Saturday April 29, 2023 @01:04PM (#35754770)
The closest option is probably the GPD MicroPC. It's 6", but pretty damn close to the ideal of a truly tiny PC. I think they're making a successor to this finally, dunno what the status is.

https://www.gpd.hk/gpdmicropc

Re:Termux is an Android terminal emulator and Linux environm... by hungryforcodes on Saturday April 29, 2023 @02:49PM (#35755855)
Thanks for the link. It looks pretty cool. Form fact wise it looks to be competitive with an Android phone and a portable keyboard. So it's not clear immediately which is better.

I use termux daily, and you can stand up pretty much anything including a production grade PostgresDB. It's not a toy.

Re:Termux is an Android terminal emulator and Linux environm... by Chris660 on Saturday April 29, 2023 @03:37PM (#35756337)
As an ex Psion 5 user, I've often been tempted by the devices from Planet Computers: https://store.planetcom.co.uk/products/gemini-pda-1
Re:Termux is an Android terminal emulator and Linux environm... by pxc on Saturday April 29, 2023 @04:41PM (#35756947)
* * *
Re:Termux is an Android terminal emulator and Linux environm... by int_19h on Sunday April 30, 2023 @05:05PM (#35766619)
As an owner of Cosmo, I can confirm all of the above. The form factor is great and the keyboard is amazing, but the software story kills it all dead in the water. I wish someone could just do a dedicated Linux machine like that.
Re:Termux is an Android terminal emulator and Linux environm... by freedomben on Saturday April 29, 2023 @01:13PM (#35754863)
I mainly use termux for the script API (which is incredible btw). I usually write the scripts in bash or ruby on my computer and scp them over, but I also have a small keyboard that I can plug in to type directly on the phone.

Even if you don't use the CLI part of Termux often, it's still an incredibly neat piece of hackery goodness. I once needed to text about 50 people and have it be from my real phone number. Rather than hack around with Twilio or AWS, I spent 5 minutes writing a ruby script to send the texts from Termux. If you aren't familiar yet with the API, it will take a little longer than 5 mins the first time. Once I had that script, I kept finding neat usecases for it. I sometimes still just text from the CLI because it's easier than using the built-in messages app depending on what I'm doing.

You can definitely get an amazing experience on Android without Termux, but Termux is like if Android were a really nice bicycle, Termux is a small powered motor you can bolt on somewhere to automate parts of your life.

Aside: I find Termux easier to use than Tasker. I'm a CLI native old man though, so don't take this as a knock against Tasker.

Re:Termux is an Android terminal emulator and Linux environm... by heavyset_go on Saturday April 29, 2023 @09:32PM (#35758929)
I had no idea Termux had access to APIs that allowed you to do that, this changes a lot.
Re:Termux is an Android terminal emulator and Linux environm... by anthk on Saturday April 29, 2023 @01:43PM (#35755213)
You can SSH to your phone and rnu tmux and ffmpeg on it, which is more powerful than my netbook.
Re:Termux is an Android terminal emulator and Linux environm... by derekzhouzhen on Saturday April 29, 2023 @01:53PM (#35755318)
Because I don't want or can't use my shitty corporate issued laptop to access my personal projects from work.
Re:Termux is an Android terminal emulator and Linux environm... by knaik94 on Saturday April 29, 2023 @03:22PM (#35756193)
Termux allows the same kind of scripting ability you would expect from a desktop. Termux-api almost rivals tasker in what you can automate with it. I use the "share with termux" function and git pull/push shortcuts more than anything else, and they are both effectively 1 touch functions. The share with termux function allows you to script how termux will respond to shared urls, I have it set up to auto-start yt-dlp and fill in certain formats and details and starts downloading. It was a little bit inconvenient to set up, but I managed without a fullsized keyboard. There's an app called hacker keyboard that makes it easy.

The original script I wrote was initially set up with youtube-dl, the most recent change was to yt-dlp. For a lot of little things, like to SSH/reboot my rpi, wget a link I want to archive/send, small python programs (and yt-dlp), the keyboard is perfectly adequate. I've even converted a couple of audio files to send to a friend on iOS, from opus to mp3 on the phone. Bash alias are really useful, and because the phone isn't also general use, they can be very specific.

Termux also makes the phone into a very powerful network diagnostics and pen testing tool. But even something as basic as ifconfig makes my phone feel as powerful as a computer. https://github.com/may215/awesome-termux-hacking

Chromebooks have the ability to install and run android apps. The lightweight environment afforded by Termux is perfect for them. I do use VIM with my chromebook. I know I can use crostini, and in the past I was running crouton, but I realized I can handle 99% of those things in termux, and I can use VSCODE dev for the remaining 1%. I appreciate how much more flexibility termux gives me.

https://wiki.termux.com/wiki/Termux:API

https://github.com/klausw/hackerskeyboard

Re:Termux is an Android terminal emulator and Linux environm... by raffraffraff on Saturday April 29, 2023 @07:33PM (#35758337)
In a pinch I've used it to ssh onto a box to fix something. I also have a script that backs up a few folders from the phone to a NAS using rsync.
Re:Termux is an Android terminal emulator and Linux environm... by bitwize on Saturday April 29, 2023 @09:25PM (#35758891)
Install Hacker's Keyboard from Google Play or F-Droid.
Re:Termux is an Android terminal emulator and Linux environm... by z3t4 on Sunday April 30, 2023 @04:29AM (#35760671)
Some phone models supports docking. So you can attach screen, keyboard, etc