Under the hood
The moving parts — the VM, the service, the display server, the per-app processes — in plain words.
On this page 6 sections
You never need to know any of this to use MSL. But when something behaves in a way that seems odd, the reason is usually here.
A real virtual machine#
Each running instance is a lightweight virtual machine made with Apple's Virtualization framework — the same technology behind most Mac virtualisation apps. Your Mac's processor runs Linux directly; nothing is translated or emulated. That's why a shell opens in about a second, and why Linux programs run at close to full speed.
The virtual machine has no window of its own. Everything you see — the terminal, the app windows, the files — reaches your Mac through MSL, not through a screen.
The background service#
mslhd runs every virtual machine. It's installed as a login item, so it starts when you log in and keeps going when the MSL window is closed. The app, the msl command, and the Linux apps in your Dock all ask it to do things — start this, suspend that, open a shell — over a private connection on your Mac.
Its log is at ~/Library/Logs/MSL/mslhd.log. See The background service.
Talking to Linux#
The Mac and each guest talk over vsock, a direct channel between a virtual machine and its host that doesn't go through the network at all. Shells, file access, app launching and window traffic all use it.
This is why cutting the network in the Sandbox doesn't stop msl shells from working: detaching the network card doesn't touch vsock.
Your files, both ways#
- Mac → Linux: your home folder is shared into every running instance at
/mnt/mac. - Linux → Mac: each running instance's filesystem is served back to your Mac as a network volume. Finder can see it, but it's named after a loopback address rather than the instance, which is why MSL Files exists: it shows each instance by name, beside your Mac's folders.
Windows for Linux apps#
Linux GUI apps draw through a protocol called X11. On most Macs the X11 answer is XQuartz, which works well — but under it, every Linux app is a window belonging to XQuartz: one Dock tile, one menu bar, one app.
MSL tried the other thing. mslgd is an X11 server written from scratch in Swift, drawing straight into AppKit and Core Graphics, so each Linux window becomes a real Mac window. And because macOS gives exactly one Dock tile per process, each Linux app runs in its own small helper process on your Mac — that's how it gets its own tile, icon, name and place in Mission Control.
Apps as Mac apps#
When you add a Linux app to your Applications folder, MSL writes a real, tiny .app into ~/Applications/MSL/<instance>/. Opening it asks the background service to start the instance if it needs to, then runs the Linux program. That's why Spotlight and the Dock can launch Linux apps with the MSL window closed.