Writing software using a phone!

Developing without a laptop: Living the dream.

“Shit!! I left my laptop at home, what should I do?!”

It was too late to turn back, but I had an idea: the last few days I had been testing websites on Samsung DeX. This is a small dock which turns your S8 smartphone into a desktop computer.

Developing on DeX!

Two weeks later

I left my laptop at home. On purpose this time. I didn’t need it!

Setting it up for yourself

Want a development machine you can fit in your purse? This is an incredibly cool way to work!

Termux, slack and web code on Samsung DeX

Get a Terminal

Install Termux from the App Store, and open in DeX,

termux-setup-storage

Install useful Packages

apt updateapt install \
wget \
less \
coreutils \
nano \
git \
vim \
tar \
openssh \
clang \
python \
python2 \
make \
libc++

Changing the Shell to zsh, with oh-my-zsh

If you prefer the Termux default shell (bash) to zsh you may skip this step.

apt install zsh
chsh -s zsh
wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.shchmod +x install.sh
nano install.sh
Remove the highlighted lines
./install.sh

Installing Node

If you are a web developer like me you probably want node, for the stable version of node use:

apt install nodejs
apt install node-current

Installing ngrok

Ngrok is a really useful tool for exposing local nework services via a proxy, so you can test from inside locked down networks.

wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip
unzip /path/to/ngrok.zip
./ngrok help

Termux Quirks

Only files within Termux’s private space can be made executable. So any executable files such as shell scripts need to be kept inside the app.

npm install -g http-server
termux-fix-shebang `which http-server`

Getting a text editor

Because only files inside the app’s private storage can be executable, you will probably need to develop inside Termux’s private storage.

npm install -g web-code
web-code ./
Adding Web Code as a Web App with an Icon

Other DeX ready Apps for Work

  • Slack
  • Gmail
  • Excel
  • Google Docs works great in Samsung Internet for DeX
  • This article was written on medium.com from the Samsung DeX

Now you are all ready to start building.

Without a laptop!

--

--

Writings from the Samsung Internet Developer Relations Team. For more info see our disclaimer: https://hub.samsunginter.net/about-blog

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ada Rose Cannon

Co-chair of the W3C Immersive Web Working Group, Developer Advocate for Samsung.