Ubuntu runs on a cell phone!?

Just saw today a posting on ‘How to Geek’ that you can now run Ubuntu on your cell phone.
It is called Ubuntu Touch.

If you care to read the article, you can find it here.

https://www.howtogeek.com/i-tried-running-ubuntu-on-my-phone/

2 Likes

Thanks Howard,
I had a read. It requires wiping everything from your phone. I think I would experiment with an old spare phone first. I wonder about Ubuntu graphics on a small screen.

Termux provides quite a bit of Linux ability, and will run within Android, so you dont lose anything.

3 Likes

I tried it (Ubuntu Touch) on my Nexus 5 phone - it was truly AWFUL… And so much for it being “Linux” - you have to jump through a whole bunch of hoops if you want to even do something as basic as SSH to your Linux phone!

I ditched it and went back to Maru OS… MaruOS was Android (“Lineage OS”?) with a Debian 8 “Jessie” chroot with a full arm XFCE desktop (that could be accessed via a slimport > HDMI adaptor).

Anyway that was about 7 or so years ago… I doubt it’s (Ubuntu Touch) improved.

It’s a variation on the old Unity - geared for touch screens - it’s a bit different from normal Ubuntu GUI.

I left the Nexus 5 running MaruOS 24 x 7 on charge and eventually the battery puffed up and warped the whole phone chassis - that was about 3-4 years ago?

I agree with @nevj - TermUX is a much better solution…

There’s just so much that doesn’t work on choices other than iOS or Android… The Pinephone looks like bit of a kludge… There’s Sailfish OS (developed by the guys who worked on the Nokia Linux O/S) - but that only works on a few select Sony Android handsets…

I need Android (or iOS) 'cause I use my phone for work - and need to run specific Android apps (like multiple MFA tokens).

TermUX lets me run various shell scripts - and - I can run SSHD on it - and it works well in DeX mode… it’s actually “usable”… I use the sshd running on there rsync photos from it :
rsync -av homedung:"/storage/8FC6-9FA1/DCIM/Camera/20241105_*.jpg" /home/x/ResilioSync/bigshit/Photos/2024/Camera/
(homedung is the shortcut name I have in my ~/.ssh/config for my phone’s IP address - it always gets the same WiFi IP from my router DHCP).
Why “homedung”? Well I kinda detest some things about Samsung - so I usually replace the 2nd “s” with “d” and it becomes “Samdung”… I really kinda like DeX though - but a pox on them for dropping Linux on DeX!

4 Likes

So Samdung DeX lets you run an external monitor on a phone or tablet?
So could one use Termux with X and get graphics on an external monitor. ?

3 Likes

I suppose - I’ve NEVER tried to run graphical apps via TermUX - I only use it from terminal window as a CLI only O/S / environment…

But yeah - with DeX you hook up your Android to an external monitor (e.g. USB C > HDMI) and it switches into Desktop Mode (DeX) - with a “window manager”, task bar, etc, and many of the apps that are “DeX” aware display like in a windowing system, TermUX is one of them…

Samsung are not the only one - but they’re the main one…

I believe Google are going to have a desktop mode feature in Android 15…

My Galaxy is stuck on Android 10 (thanks Samsung - only 3 years of updates for their flagship handset? Apple are much better than Samsung)…

I’d probably use DeX more often if it supported SynergyKVM - I don’t want to any any more keyboards to my desk! I have a NextDock and DeX works quite well and I can use my Android phone like it’s a laptop…

3 Likes

Just the other day I hooked my Samsung Galaxy S23 to my docking station via USB-C and used my normal keyboard, mouse, and monitors. Plural on the monitors. However, it mirrored display one to display two. I didn’t see a way around that.

It is not simply mirroring your phone display either. It’s a bit different interface. Probably similar to ChromeOS.

1 Like

that’s DeX - I’m a big fan of DeX and it’s why my next phone will also probably be a Samsung S series… Currently S9+ - but thinking about a 2nd hand S23 Ultra - still got nearly 3 more years of updates and can run Android 15 and probably get Android 16… My S9+ is stuck on Android 10…

I’ve actually used DeX and a NextDock to do work in data centres… It’s very handy having my remote access computer in my pocket…

Note : I used to have a Nexus 5 and I was running MaruOS on it - that was Android 8 I think, with a Debian Jessie chroot environment with full XFCE desktop - hook up the USB connector with a SlimPort adaptor to a HDMI monitor - and got myself a Linux desktop… I did actually try out Ubuntu Touch on it at one time - but it was horrible - and the hoops you have to jump through just to enable SSHD seemed cumbersome and not worth the effort…

Several Android apps work quite well in DeX, including Citrix and TermUX - and the Samsung browser worked better than others - I mostly use Brave on my phone, but I mostly don’t do “internet” stuff on the handset screen…

Yeah - my experience - can only use a single external monitor (or will be mirrored if multiple)…


Update : post script
Just ordered a 2nd hand refurbished Galaxy S23 Ultra…

3 Likes

So the DeX feature is the thing that allowed @pdecker to connext an external monitor and keyboard to the phone.?
I dont see any mention of DeX on our phone. Which android version added it?
It would probably work on an android tablet too ?

2 Likes

No “DeX” is a Samsung only that initially only worked on their flagship models like the S series and Note series… But I think they relented and enabled it on other devices - don’t ask me which ones… I believe “some” of their tablets support DeX - no idea which ones…

One of the killer features of DeX (which unsurprisingly - Samsung “killed” was Linux on DeX)…

There is some hidden (developer mode) feature in later Android releases (maybe 15?) called “Desktop Mode” or something - but from what I’ve read on Reddit posts - nowhere near as functional as DeX…

I’m 100% ready for convergence - your main computer is your handset - you dock it to a monitor (or a dumb “tablet”) and it switches to desktop mode… Microsoft were hoping to do this with Windows 8.1 on ARM and x86 - much as I hate Windows, I did have two Windows based smartphones - they were great… A PDA and a phone?

So - what I can’t do on the piddly smartphone screen - I can then break out an external monitor or something like the NextDock…

Motorola had an interesting feature on some of their earlier (10+ years ago) - Android phones - you could purchase a “lapdock” which, when you docked your Motorola to it - you got a Linux desktop… Never caught on… I actually have two Motorola Lapdocks (but never had a Motorola Android handset) - I was using them with Single Board computers with HDMI… it actually worked - I had a NextThing CHIP board, with a HDMI “DIP” (same as a hat in RPi land) and I could use the CHIP with the LapDock to run the ARMHF Citrix client to remote into customers…

2 Likes

I had one and liked it. The camera was one of the best I have ever had to this day. It also did some pretty neat stuff. The most impressive thing to me was you could point the camera at a sign in Spanish and it would translate it and superimpose it in English on the screen. It was really cool.

1 Like

I just updated my Google Pixel 9 XL Pro today to Android 16 and went through the features. it now offers connecting via USB C to external monitor. Not that I ever need that, I use KDE Connect or GS Connect to send files both directions between my phone & computers, as well as text in their respective SMS apps instead of using the phone. You can even use your phone as a “touch” input for your screen like a remote control for media players, etc.

While Google isn’t introducing a desktop-like DeX interface, you can now mirror the contents of a Pixel phone to an external monitor or TV over USB-C DisplayPort Alt Mode.

Sheila

4 Likes

Arrived yesterday - took 2 attempts to transfer everything (nearly) from my old phone (S9+)… First time - I discovered, when new phone decided to update itself - it stopped the WiFi data migration - and the ONLY way to resume is to NOT resume it… i.e. Factory Reset the new device and kick it off again - this time around I used a USB-C to USB-C cable and it took about an hour (old phone was 64 GB onboard, and 512 GB SD-Card - new phone - no SD-Card and 512 GB onboard storage).

Happy so far… Slowly getting TermUX setup how I like it - with ZSH and “oh-my-zsh” and ability ssh to it (that was actually less painful than I thought it would be).

Some stuff in TermUX didn’t migrate over the USB cable.

So - I ran (in TermUX on old handset)

termux-backup ~/samdungI.bk.tgz

MTP over USB seems VERY dodgy and unreliable on the new Android 15 (old one stuck on Android 10) - but managed to plonk that samdungI.tk.tgz file on there).

On new handset in TermUX :
termux-restore ./samdungI.bk.tgz and reboot (TermUX - not Android).

Old device :

New device :

Because everything’s stored on the internal storage - I can access most of it without jumping through hoops - except - MTP over USB is VERY unreliable (was pretty rock solid with my old phone). However - ResilioSync works PERFECTLY - as it saves to /download/sync/ on internal storage - on my old handset I only have 64 GB - no dramas now I’ve got 512 GB…

And my mobile music collection is much smaller in size than it was 4 months ago - I realised when playing over bluetooth - I couldn’t hear any difference in the fidelity of FLAC vs MP3 files - so when a whole bunch of it was FLAC - it was using over 200 GB (on SD card) - now it’s ALL mp3 - only using 60 GB (on internal storage on new phone).

So - anyway - if MTP over USB is unreliable - I can either :

  • scp / rsync
  • Use ResilioSync

Note : the issue with MTP is : I connect S23 phone via USB-C cable to my Pop!_OS desktop machine (same cable I’ve been using for several years with my S9+). When I plug it in - I get a prompt to allow access (every single time!) - sometimes I can see the storage - but - 7/10 times - Nautilus just shows “Empty Folder” - however my work around is to use ResilioSync… or I can push/pull over SSH with rsync…

Anyway - I detest the idea of landfill - so - once I’ve fully switched over (bunch of MFA apps I need to re-sync with my work and customers) and moved my SIM card - I’ll mount the old handset by the front door to monitor my front IP camera…

2 Likes

I have never used MTP. I will give it a trial.
Last time I wanted photos I resorted to accessing google Photos from linux.
That is messy… they zip images up and send in chunks.

1 Like

I hardly ever use it myself…

I was using rsync via TermUX sshd to grab photos to my computer… I created a shell script to show me the appropriate rsync cli - but not actually do the rsync… Just tested with a new version of that script for the new phone - and got it working…

Note - to “abstract” access to your storage - you run “termux-setup-storage” in TermUX… After doing that on my S23 - I can use rsync over SSH to reference ~/storage/dcim/camera

I was using adb and adb-sync to synchronise music between desktop machine and my S9+… I just used adb this morning to “sideload” a couple of Android apps via APK (SolitaireCG and F-Droid - for some reason - TermUX mostly arrived “intact” from the data transfer wizard - but not F-Droid).

Anyway - I’m going to try and rely on just ResilioSync to synchronise my music collection across machines and phone… It seems to run HEAPS better on Android 15 and using on-board storage (vs SD-Card - which by default in Samsung is VFat so doesn’t support symlinks or UNIX permissions or odd characters / symbols).

I was able to use TermUX to symlink (e.g. ~/bin) to my shell scripts ResilioSync share (e.g. /Downloads/sync/scripts), and set all the bash scripts to execute permission (ResilioSync is pretty shit at UNIX permission - i.e. they don’t sync across devices even if ALL your devices are NIX machines - i.e. Linux and MacOS and Android).

1 Like

Yeah? Naahhh…

While it doesn’t sook or complain when I try to e.g. “chmod +x script.bash” on a ResilioSync share - it doesn’t actually do it…

And the Google API in Android 15 is heaps more restrictive than it was on Android 10… I can’t even run the relatively harmless “ip” command (but I can run ifconfig).

1 Like

I needed to know that

2 Likes

With the vast amount of information we’re bombarded with hourly - it’s easy to miss important stuff…
– edit –

Note : my old TermUX setup on my Galaxy S9+ w/ Android 10 would allow :

rsync -av --ignore-existing homedung:/data/data/com.termux/files/home/storage/dcim/Camera /home/x/ResilioSync/bigshit/Photos/2025/Camera/

But I get nothing on TermUX on Galaxy S23 Ultra w/ Android 15 :

╭─x@titan ~  
╰─➤  rsync -av --ignore-existing cameldung:/data/data/com.termux/files/home/storage/dcim/Camera /home/x/ResilioSync/bigshit/Photos/2025/Camera/        1 ↵

receiving incremental file list

sent 25 bytes  received 1,105 bytes  2,260.00 bytes/sec
total size is 268,186,084  speedup is 237,332.82

However - if I plonk “dots” (i.e. ‘.’) at the end of the path for each side - SUCCESS! :

╭─x@titan ~  
╰─➤  rsync -av --ignore-existing cameldung:/data/data/com.termux/files/home/storage/dcim/Camera/. /home/x/ResilioSync/bigshit/Photos/2025/Camera/.

receiving incremental file list
./
20250711_155043.jpg
-- snip snip --
20250711_171509.jpg

sent 825 bytes  received 239,596,662 bytes  1,850,173.64 bytes/sec
total size is 268,186,084  speedup is 1.12

(note “cameldung” is just my label/nickname for my SSH setting ~/.ssh/config for this phone - I gave it a static “fixed” lease on my wifi router)

2 Likes

@daniel.m.tripp that is what I did. Used the old phone as a monitor for my mom’s cameras throughout her home. I keep it in a desk clamp type holder so that as I work all day, it is in my field of view.

I can also switch apps to my front yard & back yard cameras at my own home.

Sheila

5 Likes

I keep MPV running showing both my IP cameras on a 32" QHD (flat) that sits above my main 32" QHD (curved) - it also runs big clock (ttyclock in a terminal) and a news TV station stream from my Pi3 running TVHeadend.

But - I turn that monitor off when I stop using my computers - so it’s handy to have a camera view “always on” of the front yard and front door area…

I don’t care if that old phone gets burn in - 'cause it’s already got BURN IN - i.e. mostly shortcut icons from my homescreen… I hope this new phone doesn’t get burn in…

I did have my previous android phone there - a Nokia 42 (really an HMD - nothing to do other than a branding of that famous Finnish company) - but the battery ended up swelling and warping the whole chassis - dangerous - so I removed it.

Shame my old iPad (3rd gen) doesn’t support the app - that would be a better choice…

2 Likes

I got around this limitation by :
create ~/bin

mkdir ~/bin
rsync -av ~/storage/downloads/sync/scripto/bin .
chmod +x ~/bin/bash

Newer version of Android also blocks running the IP command! WTF? Ridiculous!

And I can’t seem to be able to grep out / ignore a “warning”

╭─x@KimIlDungII ~  
╰─➤  ifconfig -a
Warning: cannot open /proc/net/dev (Permission denied). Limited output.
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet RE.DAC.TE.D  netmask 255.252.0.0  broadcast R.DAC.T.ED
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 3000  (UNSPEC)

I wrote a shell script - but it still barfs :

╭─x@KimIlDungII ~/sbin  
╰─➤  cat 55.bash 
#!/usr/bin/env bash
# show only ipv4 shythe... who's got time to parse f'ing ipv6???
# ip -4 a
OUTCARP=$(ifconfig wlan0 |grep inet|grep -v Warning|tail -1 > /dev/null)
echo $OUTCARP
╭─x@KimIlDungII ~/sbin  
╰─➤  ./55.bash 
Warning: cannot open /proc/net/dev (Permission denied). Limited output.

I want this in a simple shell script - because I DETEST using the tiny soft keyboard on smartphones! I don’t want to type “ifconfig -a” manually any time I want to know - because it takes forever and I’m constantly hitting the wrong character…

BTW - I fudged that $PS1 manually - i.e. edited my ZSH theme file and hardcoded that hostname and username - otherwise it would be just something like u0_340934@localhost. Interestingly GnomeTerminal still displays the real username @ hostname!

– edit : update –
OK - revised my 55.bash shell script :

#!/data/data/com.termux/files/usr/bin/sh
# show only ipv4 shythe... who's got time to parse F-ing ipv6???
# ip -4 a
TMPFIL=".tmp.data.txt"
ifconfig > $TMPFIL 2>&1
sed -i '/^Warning$/d' $TMPFIL
MYIP=$(grep inet $TMPFIL |tail -1|awk '{print $2}')
echo "IPV4 (wlan0):" "$MYIP"

And created a symlink to it “55” - so on my phone screen OSK in TermUX I can just type 55 to get or verify my IP address…

╭─x@KimIlDungII ~/bin  ‹main*› 
╰─➤  55               
IPV4 (wlan0): R.ED.ACT.ED

If I’m out and about - that value will change to whatever I get on 3/4/5G network (so won’t be “wlan0” - something else - but I don’t care)…

2 Likes