Live data from Hacker News

Termux: terminal emulator and Debian-style userland as an Android app

termux.com

91–100 of 148 posts

Re: Termux: terminal emulator and Debian-style userland as an Android app

#91

Earlier quoted context omitted.

I suspect servers are blocked by my mobile ISP (makes sense!), but I never got to the bottom of it. Many mobile ISPs run NAT, you don't even get a public IP of your own during the session, just an internal one.

Thanks! Is there a way to do it? It must support bi-dir streams, they just need to be initiated from the phone.

You can use a tunnel like https://pagekite.net/ it seems they support Android.

Alternatively, you can DIY by connecting to some other machine using SSH and establishing a reverse tunnel.

Re: Termux: terminal emulator and Debian-style userland as an Android app

#93
post #48
post #21

Earlier quoted context omitted.

I use it as a replacement for Android apps in several cases. - Need to jot a note: vim is far better than most native apps - Need to access a remote system: use ssh or mosh - Need a calculator: Python is there, with a lot of useful libraries It even emulates a mouse, so elinks is quite usable on text heavy websites. For some mobile hostile websites it is more usable since the text is large enough to be legible. A sim…

Do you do vim with Gboard/SwiftKey or do you have a hardware keyboard?

An on screen keyboard is fine for vim, at least for things light duty tasks. I use the one provided by my phone's vendor (it provides the number row) and Termux offers a row of common keys that usually gets the job done.

I also find that vim is easier to use for editing than Android editors. It is easier to use insertion, movement, and deletion commands instead of trying to tap on the right position or dragging to select.

Re: Termux: terminal emulator and Debian-style userland as an Android app

#94

Termux is a great project, may it be for cli lovers, hackers, road warriors ... However, I have little trust in mobile devices nowadays and I don't feel safe copying private ssh/gpg/vpn/credentials data on them anymore. Planned obsolescence, theft risk, vendor/hardware/firmware issues, general feel of lack of control, ... As a consequence, I tend to use my smartphone as anonymously as possible, mostly as a camera, an…

Make a separate ssh key for your phone with restricted sftp-only access to a phone-specific backup directory on your server.

Re: Termux: terminal emulator and Debian-style userland as an Android app

#95

Termux is a great project, may it be for cli lovers, hackers, road warriors ... However, I have little trust in mobile devices nowadays and I don't feel safe copying private ssh/gpg/vpn/credentials data on them anymore. Planned obsolescence, theft risk, vendor/hardware/firmware issues, general feel of lack of control, ... As a consequence, I tend to use my smartphone as anonymously as possible, mostly as a camera, an…

I have a complete opposite feelings: mobile apps are actually sandboxed, modern phones have secure elements in hardware and the attack surface itself is pretty limited.

On the other hand, there's virtually no sandboxing on your laptop. As software developers, we pull random code from the internet all the time and it's generally trivial to steal every secret that your user has access to (https://xkcd.com/1200/)

Personally I'm not worried about baseband processor (or Intel ME) owning my device. I'm more worried about some random malware installing a keylogger and/or stealing my whole LastPass database. This would be virtually impossible on mobile, but is relatively trivial on laptop.

Re: Termux: terminal emulator and Debian-style userland as an Android app

#96
post #14

Earlier quoted context omitted.

What exactly would you use it for? Not trying to be negative, I'm just not sure what would be worth typing out on a phone keyboard on the go, instead of waiting until I have access to an actual keyboard. I guess if you have a keyboard for your phone that's also different. (so for android tablets etc this is great)

Chromebook I'm still waiting for Amazon to restock after I saw this post go up: https://blog.lessonslearned.org/building-a-more-secure-devel...

On my chromebook I use crouton[1], which is arguably more "native". You get an Ubuntu install in a chroot and can even run X11 apps in a chrome window. I was even able to compile neovim, you just need to set it up to use the system's lua and luarocks.

[1] https://github.com/dnschneid/crouton

Re: Termux: terminal emulator and Debian-style userland as an Android app

#97

Termux is a great project, may it be for cli lovers, hackers, road warriors ... However, I have little trust in mobile devices nowadays and I don't feel safe copying private ssh/gpg/vpn/credentials data on them anymore. Planned obsolescence, theft risk, vendor/hardware/firmware issues, general feel of lack of control, ... As a consequence, I tend to use my smartphone as anonymously as possible, mostly as a camera, an…

I have a complete opposite feelings: mobile apps are actually sandboxed, modern phones have secure elements in hardware and the attack surface itself is pretty limited. On the other hand, there's virtually no sandboxing on your laptop. As software developers, we pull random code from the internet all the time and it's generally trivial to steal every secret that your user has access to ( https://xkcd.com/1200/ ) Pers…

You sir, have very misplaced priorities.

Re: Termux: terminal emulator and Debian-style userland as an Android app

#98

Termux is a great project, may it be for cli lovers, hackers, road warriors ... However, I have little trust in mobile devices nowadays and I don't feel safe copying private ssh/gpg/vpn/credentials data on them anymore. Planned obsolescence, theft risk, vendor/hardware/firmware issues, general feel of lack of control, ... As a consequence, I tend to use my smartphone as anonymously as possible, mostly as a camera, an…

I have a complete opposite feelings: mobile apps are actually sandboxed, modern phones have secure elements in hardware and the attack surface itself is pretty limited. On the other hand, there's virtually no sandboxing on your laptop. As software developers, we pull random code from the internet all the time and it's generally trivial to steal every secret that your user has access to ( https://xkcd.com/1200/ ) Pers…

True there's no sandboxing by default on a typical linux desktop but I think the key difference between the linux distributions and Android security models is that your linux distribution is supposed to run trusted free software whereas your Android device is probably going to run some proprieatary untrusted apps.

That's why sandboxing is very necessary on Android and not so much on your linux box.

Now I agree you should sanbox everytime you can especially when linux is well capable of it, that's why I use firejail on my desktops so I get all the awesomeness of my favorite distributions AND strong sandboxing with real ease of use. https://firejail.wordpress.com/

One cool trick is to hook "sudo firecfg" in your package manager post operations so whenever you install new software it get sanboxed if a firejail profile is available (which is generally true). There may be a smarter way to do just that though?

That xkcd post makes a very good point indeed (that's why everybody should lock whenever afk, encrypt and use strong passwords of course) But I also think you should also worry about those backdoor issues: https://www.replicant.us/freedom-privacy-security-issues.php https://libreboot.org/faq.html#intel

Re: Termux: terminal emulator and Debian-style userland as an Android app

#99
post #6

I tried this out a little while ago and I was really impressed. It's worth mentioning that this isn't just a Debian chroot/container, the software is actually compiled to run natively on the Android NDK. It seems like they work around any limitations of Bionic compared to glibc by patching NDK headers and using support libraries. Check out their "ports tree" to see what packages are available: https://github.com/term…

What exactly would you use it for? Not trying to be negative, I'm just not sure what would be worth typing out on a phone keyboard on the go, instead of waiting until I have access to an actual keyboard. I guess if you have a keyboard for your phone that's also different. (so for android tablets etc this is great)

> What exactly would you use it for?

Give me an Android tablet, Bluetooth keyboard, this and Emacs...

And you’ll be surprised at what I can accomplish.

(You'll find patches to pretty big projects around the world which I've delivered this way :) )

Re: Termux: terminal emulator and Debian-style userland as an Android app

#100
post #58

Earlier quoted context omitted.

python3 -m http.server http://localhost:8000/ # on phone However, I haven't been able to access a server running on termux on my phone from anywhere else. I suspect servers are blocked by my mobile ISP (makes sense!), but I never got to the bottom of it. Should work over wifi though.

I tend to run: python -m http.server 0.0.0.0:8000 That should allow you to access it externally.

Just tested it and wont work.

Edit:

Works if you just run:

    python3 -m http.server
Thanks for the help

Edit[1]:

Works great with python's built in web server but wont work with flask's built in development web server.

Post reply on HN