Skip to content

Desktop Applications

kazah-png edited this page Jul 26, 2026 · 8 revisions

Desktop Applications

Every built-in application is a kernel window — one *_win.c file each — driven by the compositor through on_click, on_key and on_pressed callbacks. The one exception is DOOM, which is a real ring-3 ELF.

See also: GUI Subsystem, Selene Browser, Shell, Filesystem, Userspace

Desktop icons

Ten, drag-reorderable, each with its own drawn emblem:

Files · Terminal · Editor · Viewer · Settings · Paint · Sounds · Calc · Games · Selene

The Start menu adds Task Manager, Wallpaper, About and Shutdown.

Terminal (terminal_win.c)

An 80×24 grid with 2000 lines of scrollback, running the kernel shell.

Feature Detail
Scrollback PgUp/PgDn, mouse wheel, scrollbar
Completion Tab — builtins, *.elf programs, and paths
History Command recall
Working directory Per-window; starts in /home/<user>
Colour ANSI SGR (ESC[…m)
Screen mode Full CSI cursor addressing, so ring-3 TUIs render live

Full-screen ring-3 programs — top, edit, less — display inside the window while the compositor keeps recompositing at ~16 fps. See Shell.

File Manager (fileman_win.c)

Browses the VFS, including the persistent /mnt EXT2 filesystem.

  • Directory listing with a scrollbar, starting in /home/<user>
  • Copy and paste, drag-and-drop into folders
  • Right-click context menu: New Folder, New File, Refresh, Settings, Wallpaper
  • Search
  • Opening a file launches it in the Text Editor — cross-app integration

Text Editor (editor_win.c)

Open, edit and save files with cursor navigation, click-to-position and scrolling. Reached from the File Manager, from the desktop icon, or with open <file> from the shell.

Not to be confused with edit.elf, the ring-3 full-screen editor that runs inside the terminal. See Userspace.

Image Viewer (imageview_win.c)

Displays images with zoom, pan and a grid overlay.

Paint (paint_win.c)

Freehand drawing with the mouse.

Calculator (calc_win.c)

Basic arithmetic, mouse and keyboard.

Sound Test (soundtest_win.c)

PC speaker beeps, melodies and alarms, plus Sound Blaster 16 sine, square and sweep tones. See Drivers.

Task Manager (taskman_win.c)

A live process list from the same process table ps reads.

Wallpaper (wallpaper_win.c)

A colour picker for the desktop background. The default is the brand purple, "Morado" — see the theme section of GUI Subsystem.

Selene (selene_win.c)

The web browser. It has its own page: Selene Browser.

Games

The Games desktop icon opens a shelf holding all five.

DOOM

The original 1993 shareware DOOM, on the doomgeneric engine — and unlike everything else here, a genuine ring-3 ELF (~448 KB, zero undefined symbols), not a kernel window.

Aspect Detail
Graphics fbpresent() — the program owns the screen while it keeps calling it
Input getkeyevent() — raw press and release with Set-1 scancodes
Sound SB16
Data Requires /mnt/doom1.wad (attach ext2-test.img)
Launch The Games shelf, the doom command, or exec /doom.elf

It runs in a window, not fullscreen, so the desktop stays visible around it. Ctrl-C quits.

The desktop launcher goes through the shell's foreground-run path — spawn, pump the desktop, block until exit — because a bare spawn_user_path() leaves the child unscheduled, and its framebuffer takeover then never gets serviced.

Minesweeper (minesweeper_win.c)

Left-click to reveal, right-click to flag.

Pong (pong_win.c)

Mouse or arrow keys. The compositor's first animated window.

Snake (snake_win.c)

Arrow keys or WASD.

Tetris (tetris_win.c)

Arrows to move and rotate, Space to hard-drop.

Launching from the shell

selene          # browser
doom            # DOOM in a window
pong            # Pong
snake           # Snake
tetris          # Tetris
desktop         # start the compositor from the text shell
open <file>     # open a file in the GUI Text Editor

See also

External resources

Clone this wiki locally