I'm comfortable using Linux and want to run Ubuntu Minimal without installing a complete desktop environment. Is there a lightweight way to launch graphical applications—such as Firefox or Pygame—from a terminal and still get application windows, a mouse cursor, and basic window management?
3 Answers
Yes. You can use a minimal Wayland compositor such as Cage, which is designed to run an application without a full desktop. After installing it, you could launch Firefox with a command like `cage -sd -- firefox`. This is especially useful for kiosk-style setups, although Cage generally focuses on one application at a time.
There are many lightweight window managers available, including both X11 and Wayland options. A window manager supplies the basic ability to arrange and interact with application windows, while a desktop environment adds extras such as panels, settings tools, menus, and bundled applications. So you can install only a window manager and launch programs from a terminal, but graphical applications still need a display server or compositor to create their windows.
Another option is to install a standalone window manager instead of a desktop environment. Sway is a good modern starting point if you’re comfortable with Wayland; it provides windows, keyboard and mouse support, and configuration without bringing along a full collection of desktop utilities. You’ll also need the appropriate graphics, display-server, and application dependencies installed.

I’ve used this kind of setup for a home-control kiosk, and it works nicely when you only need a focused graphical application rather than a complete desktop.