My daily driver is Android + Samsung DeX, and I've tried doing this a couple different ways. In the end, the only thing that didn't make me pull me hair out in the long run was proper VSCode (arm64 build) inside termux/Ubuntu (installed via Andronix). Crucially, the only VNC client that works well with this (and I've tried all the paid ones too) is AVNC from FDroid.
I had too many issues with code-server and vscodium and such when it came to proprietary extensions unfortunately, and my actual dev machine is in the cloud so I rely on the Remote Dev extension. Has to be real VSCode.
I like that you can create a PWA from a standard code-server deployment too, and that works quite nice on DeX (proper immersive-mode full screen), but for me that has been too limiting because I cannot remap my brain away from my vim keybindings, and some stuff just doesn't work in a browser context. The browser will take over certain things (like ESC for getting out of full screen or alt+tab for navigating across browser tabs rather than VSCode tabs, etc).
As a rule of thumb now, any software that's complicated enough to require tabs, I try to run native arm64 builds for (VSCode, Obsidian, browser) and everything else I can get away with kiosk-mode browser windows masquerading as apps (email, calendar, feed reader, chat).
Can you elaborate on how you use DeX specifically? I recently bought my first Samsung - and was a bit curious about it, surprised to hear that it is a powerful tool.
I use one of these https://www.amazon.co.uk/dp/B07YF95RNR, some bluetooth peripherals, and a little phone tripod. I have it set so that when a monitor is plugged in, DeX starts automatically, so when I'm at my desk and plug my phone in, in 2 seconds I'm ready to roll. I also use DeX with my AR glasses (Nreal Air) when traveling, which basically behaves like a full-HD monitor on your face.
My termux session runs permanently in the background out of laziness (though this does noticeably shorten your battery life, but it's been mostly manageable) so all I need to do is start AVNC.
There are a lot of little configurations and quality of life things that I tweaked over the past year or so of doing this; happy to write all those up somewhere if you're interested.
I spent some time last week trying to set this up.
You can use Andronix to install Linux and a window manager onto you phone. You then use a VNC app to connect to that (local) Linux container and you'll have a fully working Linux phone. Works pretty well, though I had to jump to a few hoops as not all distro's worked on my Fold 3.
DEX starts automatically when you plug HDMI into your (Samsung) phone. You then start the Andronix Linux container thing from DEX and you have a fully working Linux distro, right from your pocket. Pretty magical.
What I do, is use remote VSCode to connect to my dev server, so I don't need to run anything locally, because speed wasn't great for me. But if you set it up as I did, you can work from anywhere and you don't need a laptop.
Just a heads up, newer versions of Android will kill processes that spawn a certain amount of subprocesses. You'll want to look into disabling the phantom process killer using adb (works for unrooted phones but you need to repeat those steps after each reboot.)
Great! I have been wondering why something like this did not already exist, given that you can already run a full Ubuntu from termux (and indeed people have run a coder-server from such an environment). Someone must be able to create a more user-friendly version of vscode on Android. Will try this out on my Samsung tablet.
My only concern is the memory management -- vscode (and its extensions) is not super friendly in its memory usage, and on a phone/tablet the RAM could easily run out, even if swap is enabled.
Agreed! Termux profoundly changed my life. I do all of my programming inside Termux now. I find it to be pretty comfortable too.
Only thing I'm still missing is a way to build Android applications from inside Termux. We can write software for normal computers from inside themselves. Conversely, phones have always been these consumer machines, only running software produced for them and with no ability to program themselves. Feels like it's the only remaining barrier in the way of Android phones becoming truly general purpose computers.
I opened an issue on their repository about packaging the Android development tools:
Android allows you to swap the virtual keyboard. I use unexpected keyboard which is also free software. It's excellent for programming. Before that I used Hacker's Keyboard which has actual arrow keys.
Termux also has a configurable bar at the bottom where you can map any keys you want. I use it for function and arrow keys plus a bunch of common symbols.
Not sure what you mean by modal keyboard, but there is fully customizable row of keys in termux.
I disabled it, because I use special android keyboard app[0] with a custom layout made from scratch[1]: all common symbols, arrows, esc, ctrl, alt, forward delete, paste and enter gestures etc. etc.
[0] - https://jbak2.ucoz.net/ (yes it's horrible website, but it's free and easy to maintain for the handicapped developer)
Well, the modal command system is sort of hacked onto the qwerty keyboard. Surely it'd be more natural to just "insert" directly rather than hitting "i".
So I found this app which seems like it's supposed to create more swap but the review seem mixed. I wonder if it depends on which version of Android. Seems Samsung has this feature built in to their OS at some point.
This is made by the makers of UserLAnd - Run Linux on Android. Looking for early feedback. If you want a promo code (first 500) please email support@userland.tech.
Is there a planned feature for it to be incorporated into UserLAnd? Possibly through an In-App Purchase? It would be neat to be able to manage this along side other UserLAnd instances
It's basically self-hosted VS Code in a browser. I can switch from my desktop to my laptop, even to my phone, and pick up right where I left off with uncommitted changes, long running processes, etc. Additionally, I get the full resources of my server and don't have to worry about it running down my battery or causing the fans to spin up on my laptop.
> I can switch from my desktop to my laptop, even to my phone, and pick up right where I left off with uncommitted changes, long running processes, etc.
Valid only while you have a (good) internet connection.
From the screenshots this seems to use an X/VNC server or something, it might be good to also explore using https://github.com/coder/code-server with a native Android browser to get things like graphics acceleration (though with disadvantages like not being about to develop graphical applications)
How far away do you expect a Wayland-powered display to be? You're currently using VNC, but I'd imagine that <https://gitlab.freedesktop.org/mstoeckl/waypipe/> would also work while being smoother.
code-server can't use Microsoft's extension marketplace, but this can. Supposedly this runs the original Microsoft binary which is why things work exactly like a Linux desktop version. I know, this sucks.
Just installed, c sharp extension installed fine, looks very promising.
The only issue I've run into so far is signing into my Microsoft Azure and GitHub account since it doesn't seem to be able to load a web browser by default from this VS code instance?
If you could include instructions for any browser that will work with with-in this app on the mobile architecture or even better like you said include it in the app install setup process.
Let me know when either are done and I'll un-install and re-install to test.
My biggest gripe with vscode on Android (code-server pwa on DeX) is lack of mouse hover and text selection. With so much intellisense hidden behind mouse popovers not having access to that is a bit of a show stopper.
I installed devStudio and hover seems to work fine, probably due to the vnc layer. What doesn't work well is the mouse pointer, there is a weird offset between the native cursor and the vnc cursor.
The web version you linked does not support the remote SSH extension, which is critical for many folks workflows. I can’t do any work without that extension.
I’m curious if the android version supports this extension?
It's certainly not as ergonomic as using the SSH extension directly, but you can SSH manually to your dev box, open a vscode tunnel, then connect to that from vscode.dev in a pinch.
I didn't read thoroughly enough. I have not tried that one yet. It should work as many people use SSH from the UserLAnd app, which this is similar to. If you try it out before we do, remember that android blocks apps from using the first 1k ports, so you have to run ssh on port 2022 or something like that, instead of the normal port 22.
I will make a point of getting that working if it doesn't.
Ironic that you call it a walled garden when the online version is not self hostable as actual VSCode is and is offered online at Microsoft's sole discretion.
Microsoft's version does not work on mobile. I have tried many times to make it work on Chrome on Android, but it just isn't designed to work on a small screen and is unusable. It's sad.
When I got out of jail all I had was smartphones I would borrow from friends and the only way I could end up developing sanely was to open a terminal to a Linux box and just use nano instead, which meant no IDE with auto-complete, syntax lookups, formatting and most importantly, debugging.
it's probably not as obvious when you are just out of jail(which is a shame, being locked up should be exactly the time when you can educate yourself, but not in real life probably)
But using linux terminal as devbox doesnt mean you dont have access to modern auto-complete syntax lookups formating etc, there are vim/neovim/emacs with any kind of configurations for all of it, and it can be preconfigured by others with projects like https://github.com/AstroNvim/AstroNvim or https://github.com/syl20bnr/spacemacs
So if you know anyone in the same kind of situation, you can advise them to use that.
Is there an open source / self hosted version of that (preferably with support for remote ssh, since it should be easy to support in a self-hosted environment)
I don't have a decent enough Android device to play with this, but how would one / could one run tsc alongside it on Android? Invoked through termux or something?
Because getting a high resolution, oled, good aspect ratio, fast refresh rate display is much easier and more affordable on a tablet? Sure, even with a kickstand it is not quite as "lapable", but the screens are nice.
On a related note, when is pkvm supposed to be available outside pixel devices? Getting a proper linux or windows VM on one of the bigger samsung tablets + keyboard just might replace my laptop (yeah, remote stuff works, but offline on device would be much more convenient, e.g. on trains).
Code App is a similar app available on iOS. I've used it a bit, and it's pretty polished. It's a paid app in the app store but the testflight build is available for free.
I think they only look similar but are completely different. OP's app runs a full-featured vscode (not creating a new editor) and supposedly has access to all vscode's marketplace extensions.
You can actually edit remote files via SSH in the TestFlight build, and get a remote terminal to boot. Quite handy, although I can’t seem to be able to display two files side by side inside the app.
I had too many issues with code-server and vscodium and such when it came to proprietary extensions unfortunately, and my actual dev machine is in the cloud so I rely on the Remote Dev extension. Has to be real VSCode.
I like that you can create a PWA from a standard code-server deployment too, and that works quite nice on DeX (proper immersive-mode full screen), but for me that has been too limiting because I cannot remap my brain away from my vim keybindings, and some stuff just doesn't work in a browser context. The browser will take over certain things (like ESC for getting out of full screen or alt+tab for navigating across browser tabs rather than VSCode tabs, etc).
As a rule of thumb now, any software that's complicated enough to require tabs, I try to run native arm64 builds for (VSCode, Obsidian, browser) and everything else I can get away with kiosk-mode browser windows masquerading as apps (email, calendar, feed reader, chat).