Get a little GNU in your Android

So I have seen a few post about running Linux on Android.

You can root the phone, set up a chroot and run a vnc...blah blah blah

This is much easier.

Go get Termux, it is a bash terminal with apt installed. Doesn't require root if you don't want to. It has packages to run like Fedora or Arch if Debian ain't your thing. Has a decent sized repo.

Even if you don't really need it still use it since you can use it for ssh, irc, etc... in one app

Also has support for Python, Ruby, Java.node with gcc. And has whatever text editor you like so this make a handy little dev app

Or if you are like me and don't care for Google:

https://f-droid.org/repository/browse/?fdfilter=termux&fdid=com.termux

It also has a plug in for Tasker so if you want to execute bash scripts based on GPS location as well as a widget.

So, now you have this handy IT Swiss Army Knife and you ping a device to make sure it is up. Oh shit! You don't have a control key to end the process. The volume down will act as control.

That's dumb, though, let's get a proper keyboard.

The Hacker's Keyboard with alt, control and tab for that dank auto completion:

https://f-droid.org/repository/browse/?fdfilter=hacker&fdid=org.pocketworkstation.pckeyboard\\

There is also dictionaries for whatever language you use. It doesn't have Emojis, I am sure you are heart broken.

But a decent messaging app like Signal or Silence do have those so you can still post Emoji poops to your loved ones.

@Dje4321 added some handy info to have the phone act as a ssh server.

You grow that neck beard son!

11 Likes

Great work!

Thanks for sharing, I am indeed growing my neck beard out!

Cool!

1 Like

DAT logo tho!
Looks like straight from RMS in his stoned days :D

There is also botbrew basil, which also uses apt, but is capable of downloading packages from official debian repositorys, which means bigger packet selection(Also, some Termux packages compiled in strange ways. e.g. Lua is build without support for os functions, but still is capable of io.popen, strange stuff like that)

https://f-droid.org/repository/browse/?fdfilter=botbrew&fdid=com.botbrew.basil

Last time I checked it was a bit finicky to get it up and running though.

I'm also a Termux user btw., and the Terminal Emulator they made is just epic! I don't like hackers keyboard(I have way less accuracy with it, even on my giant phone), but having volume up/down for special keys is awesome!

1 Like

For other keyboards with PC functionality I use the NextApp keyboard

All the PC stuff like alt and Ctrl are in another set of keys under the main board like normal punctuation layers on regular android keyboard. Plenty of customisation too like the long press duration and vibration feedback and stuff.

I have downloaded Termux but have been away for Linux for long enough to forget how to do all this.

1 Like

Basically I was going for the most dead simple way to get Linux functionality out of Android.

Thanks for the extra info.

Now that I have bash on windows Every device and OS installed had apt and bash which is glorious.

Thanks for this.
Setup a SSH server on the phone. Now to get a Xorg server running

a guide if others want a ssh server too
https://oliverse.ch/tech/2015/11/06/run-an-ssh-server-on-your-android-with-termux.html


If you have a rooted phone then you can use this for sudo. Maintains proper ENV veriables so programs still functions

1 Like

@Dje4321 do you mind if I add your post to mine?

1 Like

go ahead
ye has my permission

1 Like

Nice script! I was looking for something like this! tsu doesn't quite cut it.
Anyway, there are Android-Based X11 Servers, although they don't support fancy extensions such as xtest(for x2x) or AIGLX or DRI support or the like, so no Gnome > 2, and no smooth Video playback.

I guess if you really tried, you could get Wayland working using libhybris and get basic hardware acceleration that way.

The script is not mine. Found it after su would break termux changing the ENV varibles


as for X11 im not sure since it is not in the apt repo. Would have to download and compile it by hand