Coornail’s thoughts

What keeps me up at night

Using an iPad as a Secondary Screen via Tmux

Ever since I have an iPad I wanted to use it as a secondary screen. I travel a lot, so a compact external monitor would be really cool to have. It really makes sense: it has a really beautiful high-resolution screen, it’s small, light, easy to carry.

But using it as a secondary display just doesn’t work.

Of course you can use Air Display, but you’ll soon find out that it’s either very slow or displays a terribly compressed image. If you decide to jailbreak, check out this blogpost, which explains how to communicate with your iPad using the usb cable.

But if you just want to display a terminal window, you can get away a lot more easily:

Tmux shared sessions to the rescue

All you need is:

  • SSH server enabled on your computer (or on a remote server, if you are into that)
  • Tmux installed
  • SSH Client on your iPad (I use iSSH)

Create a new sesion on your machine (local or remote):

$ tmux

Log in via ssh to your target machine, and attach the session:

$ tmux new-session -t 0

Now you can hide the virtual keyboard on the iPad.

For the first glance it looks identical, but as soon as you navigate to a different window, it is apparent that the two sessions can view different windows in the same session.

The cool stuff

Sharing the session this way only transfers text, so it’s a lot faster. It is perfect to keep an eye on a log or you can put an irc client there or your favorite command line program you typically don’t type too much.

The bad stuff

Sharing the session this way only transfers text, so no images, no nice pdf. You can very well navigate away from the ssh app on the ipad, and use all the cool applications on it to step over this obstacle.

If your terminal window is bigger than the display of the iPad, your session is limited to the size of the smallest display. Therefor I recommend to tune down the character size on the iPad until you find the nice balance between screen estate and readability.

Final words

Tmux session sharing really helped me using my iPad more on a workday. You are not limited for a computer and an iPad to use this awesome feature. You can use an Android tablet, multiple Android tablets, a phone, a raspberry pi with a TV.

If you are used to the screen program, you probably want to remap the tmux keys: my tmux conf.

Let me know how you use tmux!

Comments