From 0d15a3d715a23051a7522e3546160c43906b916d Mon Sep 17 00:00:00 2001 From: Dmitry Fedotov Date: Sat, 31 Aug 2024 18:07:57 +0300 Subject: [PATCH] Add xephyr page. --- docs/unix-linux/utils/xephyr.md | 65 +++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 docs/unix-linux/utils/xephyr.md diff --git a/docs/unix-linux/utils/xephyr.md b/docs/unix-linux/utils/xephyr.md new file mode 100644 index 0000000..3f8b1d9 --- /dev/null +++ b/docs/unix-linux/utils/xephyr.md @@ -0,0 +1,65 @@ +--- +tags: + - linux + - unix + - utils + - xephyr +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# Xephyr + +Xephyr is a nested X server that runs as an X application. + +## Instalation + + + + ```bash + $ sudo pacman -S xorg-server-xephyr + ``` + + + +## Usage + +To run a nested X window, you will need to specify a new display: +```bash +$ Xephyr -br -ac -noreset -screen 800x600 :1 +``` +This will launch a new Xephyr window with a DISPLAY of ":1". In order to launch an application in that window, you would need to specify that display: +```bash +$ DISPLAY=:1 xterm +``` + +### Launching window managers + +If you want to launch a specific WM, [awesomewm](https://awesomewm.org) for example, you would type: +```bash +$ DISPLAY=:1 awesome +``` + +### Grabbing and un-grabbing user input + +Pressing `Ctrl+Shift` should lock/unlock your mouse pointer and your keystrokes inside Xephyr window exclusively if possible. + +## Other examples for situations where Xephyr can be useful + +- A testing environment for an X application, or feature, in which the tester would like to keep working in their usual X environment, + yet defending the other applications from failures of the application under test. Example script for running tested app(for examples + window manager) inside Xephyr: + ```bash title="xephyr.sh" + #!/bin/bash + + Xephyr -br -ac -reset -screen 1920x1080 :5 & + sleep 1s + export DISPLAY=:5 + $1 & + ``` + To run [awesomewm](https://awesomewm.org) inside Xephyr you can run: + ```bash + $ ./xephyr.sh awesome + ``` + -- 2.39.5