Samsung has a feature that came out with the Note 9 called Linux on Dex. The basic idea is to let users run a desktop environment after buying one of their $99 accessories. We can do better than that.
I’m going to show you how you can use this feature on any device (iPad, other tablets, Macs and PCs). For free.
First, download and install the Linux on Dex app onto your Samsung phone.
Go to the app and run the terminal on your phone, and install vnc4server by running `sudo apt-get install vnc4server`. You will need to enter the password which is ‘secret’ by default. After you’ve installed vnc4server, you can run `vnc4server :0 -geometry 1280×720` to serve it on the local wifi network.
Now go to your phone’s wifi settings, and look at the IP address your phone is on.
Finally, go to your iPad (or laptop/other) and download VNC Viewer. I’d recommend setting up an account so you don’t have to set up a new connection every time. When you go to the VNC Viewer app, you’ll have to set up your connection, so enter the IP address from the phone from before and name your connection. Next, you will be asked to enter the password, which is ‘secret’ by default.
You should see your linux environment running at 1280×720 resolution.
A couple things to note:
- You need to have the terminal up at all times, otherwise the system freezes (but saves state)
- VNC isn’t the most secure protocol so beware using this on public networks. You just might find someone trying to connect to your system by guessing your ‘secret’ password.
- You can set your resolution to fit the screen you’re working on. For example the old iPads had a resolution of 1024×768 so the command you’d want to run in your terminal after installing vnc4server is `vncserver :0 -geometry 1024×768`. For other devices, you can use the following commands:
Retina iPad 9.7: `vncserver :0 -geometry 2048×1536`
iPad Pro 10.5: `vncserver :0 -geometry 2224×1668`
iPad Pro 12.9: `vncserver :0 -geometry 2732×2048`
Macbook Pro 13: `vncserver :0 -geometry 2560×1600`
The best part of this is that you can use any device as a screen while keeping your data locally on your phone. With mobile phones getting more powerful, you’ll be able to use full desktop apps on Linux (like IntelliJ IDEA Ultimate).
I was at the library a few days ago, and my laptop ran out of power. I had a charger on me but decided to see how well I could transition from using Linux on Dex on my Mac to a Surface Book (at full 3000×2000 resolution). It worked perfectly.
As you’d expect, the phone will probably heat up quite a bit. While you could spend $99 for that fancy accessory with a built-in fan, because this is a post about hacking together a solution, here’s a cheaper solution:
With the phones we carry with us getting more powerful each year, this could be what the future of computing looks like. I’m particularly excited about the possibility that people in developing nations may be able to access a desktop environment for the first time by using their phones and any old tablet.
Anyways, let me know what you think, if there are any bugs you ran into, or any suggestions.
Turning your Samsung phone into a Linux desktop, the free way. was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.