LinuxCommandLibrary

Xnest

TLDR

Start nested X server on display :1

$ Xnest :1
copy
Start with specific window size
$ Xnest :1 -geometry [800x600]
copy
Start with multiple screens
$ Xnest :1 -scrns [2]
copy
Connect to specific parent display
$ Xnest :1 -display [:0]
copy
Start fullscreen
$ Xnest :1 -fullscreen
copy

SYNOPSIS

Xnest [:display] [options]

DESCRIPTION

Xnest is a nested X server that runs as a window within another X server. It appears as a regular X client to the parent server while providing a complete X server environment to its own clients.
Applications connect to Xnest using its display number (e.g., :1) and receive a fully functional X environment. This enables testing window managers, running isolated X sessions, or displaying remote X applications in a contained window.
Xnest is resource-intensive since most requests pass through to the parent server. For better performance and modern extension support, Xephyr is recommended as a replacement.

PARAMETERS

-display name

Parent X server to connect to.
-geometry WxH+X+Y
Window geometry for nested server.
-scrns num
Number of screens to create.
-depth n
Default color depth.
-fullscreen
Run fullscreen on parent display.
-bw n
Border width in pixels.
-name string
Window name.

CAVEATS

Lacks modern X extensions (XRender, Composite, RandR). No hardware acceleration. Resource intensive. Xephyr is recommended for most use cases. Requires display number different from parent.

HISTORY

Xnest was developed as a debugging and testing tool for X11. It enabled developers to test applications and window managers without risking their primary desktop. While still functional, the more capable Xephyr server has largely superseded it for modern use.

SEE ALSO

Xephyr(1), Xvfb(1), Xorg(1), startx(1)

Copied to clipboard