Emacs as an operating system

“Emacs as an operating system” is often presented as a joke. Like many good jokes, it contains a serious idea.

I have been using Emacs for more than ten years. Over time, more and more of my activities moved into it: writing, programming, project management, email, file management, terminals, and interactions with AI tools.

Eventually, I started wondering: if most of my work already happens inside Emacs, why should I run an entire desktop environment around it?

Why depend on software that I cannot easily adapt to the way I work? Why surround Emacs with tools that I cannot inspect, configure, or fully trust? Why start a computer only to pass through several layers before reaching the application in which I actually want to work?

I wanted to turn on my computer and go directly into Emacs. Everything else had gradually started to feel like a distraction.

For the past month, I have been experimenting with such a setup. This article describes how it works, what I gained, what I lost, and how the limitations changed my habits.

1. Replacing GNOME with Cage

My computer runs Debian 12 with Wayland and GNOME, so the simplified structure of my graphical environment looked like this:

Linux
  └── GNOME
        └── Mutter
	      └── Emacs

GNOME provides a complete desktop environment around Emacs. It includes a compositor and window manager, panels, launchers, notifications, application switching, clipboard integration, power management, and many other services.

I replaced this large desktop layer with Cage:

Linux
  └── Cage
        └── Emacs

Cage is a kiosk-oriented Wayland compositor. Instead of providing a traditional desktop, it gives a single application the graphical environment it needs to occupy the screen.

In my case, that application is Emacs.

This does not mean that I removed everything between Linux and Emacs. A Wayland application still needs a compositor. The important difference is that I replaced the extensive GNOME environment with a very thin layer whose main purpose is to display Emacs.

Emacs then takes responsibility for organizing my buffers, windows, projects, terminals, email, files, and most of my other work.

The result is a much simpler, highly configurable environment. At the same time, I initially lost many of the conveniences that a normal desktop provides.

Surprisingly, that became one of the greatest advantages of the experiment.

2. Starting Directly in Emacs

My goal was simple: starting the computer should take me directly into heaven Emacs.

The exact implementation depends on the operating system, display server, and desktop environment. In my setup, I created an additional GRUB entry that starts a dedicated systemd target and launches Emacs inside Cage.

I did not remove my conventional desktop setup completely. The regular GNOME entry is still available in GRUB, so I can return to it when necessary.

This makes the transition gradual rather than absolute. I can experiment with the Emacs-only environment without making the computer unusable when something goes wrong.

That is also how I would recommend approaching such a setup: create it as an additional option rather than immediately replacing your normal environment.

3. Friction as a Feature

The greatest benefit has been simplification.

Before this experiment, switching between Emacs, a terminal, and a browser was almost effortless. That sounds useful, but it also made context switching effortless.

I could start an AI task in a terminal and, while waiting for the result, open YouTube or check the news. A few minutes later, I might have several unrelated applications open and no longer remember what I had originally intended to do.

The new environment introduces friction into this process.

Normally, software is designed to remove friction. Here, I intentionally kept some of it. The limitations make distracting actions less automatic and give me an additional moment in which to reconsider them.

Some missing features are therefore not merely problems waiting to be fixed. They are an opportunity to begin again and consciously decide which habits and conveniences I actually want to restore.

4. Running External Applications

Cage does not prevent me from starting other graphical programs. I can still launch a browser, video player, or another application directly from Emacs.

However, Cage is designed as a kiosk compositor and does not provide a conventional application switcher such as "Alt+Tab".

When I launch a browser, its window appears above Emacs, occupies the entire screen, and receives keyboard and pointer input. Emacs continues running underneath it, but Cage does not provide a standard way to bring Emacs back to the foreground.

To return to Emacs, I have to close the browser.

For my current experiment, the inability to switch freely between graphical applications is not a missing feature. It is part of the design.

5. The Inconveniences I Decided to Keep

Some aspects of my current setup are clearly imperfect.

For example, the system clipboard does not currently work between graphical applications and Emacs. I cannot simply copy a fragment of text from a browser and paste it into Emacs.

From my initial research, this is probably something I could configure. For now, I have deliberately left it unresolved.

I do not want external applications to become too convenient. My goal is not to rebuild GNOME piece by piece inside Cage. The goal is to change my habits and move more activities into Emacs.

I noticed another inconvenience after restarting the computer: in my current configuration, I have to sign in to websites again, particularly to my Google account in Chrome.

This is probably fixable as well, and it is not necessarily an inherent property of Cage. Nevertheless, I have decided not to fix it yet. Having to log in again creates additional friction before I can start casually browsing.

For once, an inconvenience is producing exactly the behaviour I want.

6. Rebuilding Basic Desktop Functions

Some functionality was too important to leave missing.

One of the first things I added was the ability to suspend and restart the computer directly from Emacs:

(keymap-global-set "M-L" (lambda () (interactive)
                           (shell-command "systemctl suspend")))

(defun restart-system () "Restart the computer."  (interactive)
       (shell-command "systemctl reboot"))

This gives me the essential power-management operations without requiring a desktop menu.

I have not yet restored automatic suspension after a period of inactivity. That remains one of the conveniences I lost when leaving GNOME.

The process forces me to evaluate desktop features individually. Instead of receiving hundreds of functions by default, I add back only the ones I understand and genuinely need.

7. What Changed in My Daily Work

The experiment did more than change how my computer starts. It also changed several parts of my workflow.

7.1. Moving the Terminal into Emacs

For more than ten years, I had been attached to a Gauke, Quake-style drop-down terminal bound to 'F12'. It was always available, regardless of what application I was using.

The Cage environment finally pushed me to use terminals inside Emacs instead.

Initially, I was worried about command-line AI tools such as Codex or Claude. I assumed that using them inside Emacs would be less convenient than running them in a separate terminal.

Instead, I found an Emacs package for working with Codex. The integration turned out to be better than my previous workflow: generated code is displayed with syntax highlighting directly inside an Emacs buffer.

What looked like a forced compromise became a clear improvement.

7.2. Integrating Email with AI

I have used Notmuch for email for the past three years.

Previously, when I wanted help from an AI model, I sometimes copied an email into a browser or external terminal, added a prompt, and then copied the response back.

Because Cage makes moving between applications inconvenient, I first moved this process into an Emacs terminal. Eventually, however, I configured Notmuch together with gptel.

Now, while reading an email, I can press a key and send its contents to the model together with my additional instructions.

There is no browser, no manual copying, and no context switch. The message and the AI interaction remain within the same environment.

This is one of the changes I am happiest with. The limitation did not merely make the old workflow harder. It encouraged me to create a better one.

8. A Different Kind of Control

After a month, I am not claiming that everyone should replace their desktop environment with Cage.

This setup removes many useful features. It requires additional configuration, and some tasks become objectively less convenient. There are also situations in which I still start my regular GNOME environment.

But the experiment has changed my relationship with the computer.

Previously, the desktop encouraged me to open more applications, switch contexts, and react to whatever appeared next. Now, Emacs is the default environment and everything else is an explicit departure from it.

The important result is not that my computer runs fewer programs. The important result is that I make more conscious decisions about how I use them.

Some of the limitations pushed me to improve my Emacs configuration. Others reduced distractions simply by making undesirable habits slightly less convenient.

I have gained better focus and a stronger sense of control over my working environment.

The phrase “Emacs as an operating system” is still an exaggeration. Linux remains underneath it, and Cage still provides the Wayland environment. External programs have not disappeared.

But from the user’s perspective, Emacs has become the place where the computer begins and the place where almost everything happens.

Date: 2026-07-26 Sun 00:00

Author: Slawomir Grochowski

Email: slawomir.grochowski@gmail.com

Created: 2026-07-26 Sun 14:00