Tiffany B. Brown

19 January 2019

Migrating from macOS to Ubuntu

My primary laptop is a MacBook Pro from 2015 — the last of the great keyboard era. But it's also closing in on four years old, which is about the time when things start to go wrong.

I'm a freelancer. My laptop is literally how I earn a living. If it dies, not only do I have to come up with the money replace it, but I also can't earn additional money until I have a new laptop in place. Given this reality, I figured it was good to have a capable second laptop on hand.

Rethinking macOS

Between the time I bought my last MacBook Pro and now, Apple released new versions of the MacBook and MacBook Pro. For the latter, they also introduced the Touch Bar, a context-sensitive replacement for the row of function keys at the top of most computer keyboards.

I tried the new Touch Bar keyboard at my local Apple Store. I decided then that I'd delay my next Apple purchase until they offered a 13" MacBook Pro without it.

During this time, news also broke that the new MacBooks and MacBook Pros have some keyboard problems. Again, I delayed my Apple purchase.

Apple reportedly rolled out a fix for their keyboard problems. But that fix doesn't actually seem to be a fix. Who wants to risk several hundred dollars — and with a MacBook Pro, it's closer to a couple thousand — on something that has a good chance of failing in such a basic way?

Of course, every year of delaying a purchase means another year of wear and tear to my current MacBook Pro. Components fizzle. Liquids get knocked over in close proximity. Keyboard springs break. My options became: hold out for a few more years and see whether Apple changes its hardware in a way that satisfies me or leave the Apple ecosystem.

I chose the latter, and settled on a 13-inch Dell XPS Developer Edition — a nicely-powered laptop that ships with Ubuntu 18.04 installed.

How easy was the switch?

It's not entirely a switch — at least not yet. My MacBook Pro still works well. I switch back and forth between them day-to-day. That's allowed me to take my time setting up the XPS. My biggest hurdles thus far?

  • Setting up a LAMP development environment.
  • Getting my universal second factor keys to work in general, and with Firefox in particular
  • Setting up calendar notifications
  • Guessing at the right keyboard combination to get out of a TTY window and back to a GUI.
  • Sharing USB drives between my macOS laptop and my Ubuntu one.

Setting up a LAMP development environment

I cleared the first hurdle by using Vagrant. Sure you can set up a LAMP stack on Ubuntu, but I wanted contained environments. As a sometimes WordPress developer, I was familiar with Vagrant and the Varying Vagrant Vagrants project. I went with what I knew.

I actually have two Vagrant boxes set up: a Varying Vagrant Vagrants box for WordPress development, and a second for more general Linux, Apache, MySQL/MariaDB, and PHP development.

Universal second factor keys

This issue was a little bit trickier. What did I do to fix it?

  1. Installed the version of Firefox available via sudo apt -y install1 instead of using a snap from the Ubuntu Software center; and
  2. Followed Yubico's instructions for adding a configuration file.

I'm not 100% sure that Step 1 is necessary. However, some basic Google searching suggested that may play a part.

The last step was to enable support for the keys. To do this, use Firefox' about:config menu to change security.webauth.u2f and security.webauth.webauthn_enable_usbtoken to true.

Pop-up calendar notifications

Ubuntu's calendar notifications appear in the message tray, but do not pop up to grab your attention. You can set audio reminders. I tend to keep my computers' volume muted, however. Audio reminders won't do.

Pop-up notifications require Evolution. I installed it using sudo apt -y install evolution. You don't have to use Evolution as your calendar, but it needs to be installed.

exFAT support

macOS and Linux do not use the same file system out of the box. That makes it impossible to share drives between both operating systems. They do, however, both have the ability to use exFAT.

Alas, using exFAT on Linux requires some additional software: exfat-fuse and exfat-utils. Install both using apt.

sudo apt -y install exfat-fuse exfat-utils

I don't share drives often, but when I want to, I like being able to.

Getting back to the GUI from TTY

If you hit Ctrl + Alt + F4, in Ubuntu, you'll end up at a TTY window.2 I forget how I stumbled across this keystroke combination, but I did and immediately assumed that I broke something. My screen went completely black, save for some tiny white text prompting me for a login.

Several increasingly-refined web searches later, I found the solution. Press Super + F11 to return to the graphical interface.

Now: which key is the Super key depends on the keyboard. If you're using a Windows keyboard, it's the Windows key. For macOS keyboards, it's the (Command) key.

Caution: full disk encryption

If you're considering a switch, I want you to be aware of one limitation of Ubuntu. Ubuntu does not offer full-disk encryption after installation. macOS lets users enable encryption after the fact. If you're a macOS user, I definitely encourage you to do so if you haven't already, both for your computer and for its Time Machine backups.

For Ubuntu, however, you'll either need to reinstall the operating system (assuming that your computer supports UEFI), or use /home directory encryption. If you choose to use full-disk encryption, re-install Ubuntu as soon as you get your computer. Otherwise, you'll have to re-do the work of setting up your system later.

Conclusion

I quite enjoy using Ubuntu. I especially appreciate the breadth of hardware options that using Linux provides. I am not quite ready to make the leap to using all Ubuntu all the time. But I do like knowing that a dead laptop won't stop the show.


  1. What's the -y for? It's a flag that tells apt to skip the "Are you sure?"-style confirmation prompt. 

  2. This may vary depending on how your OEM configured Ubuntu.