Xephyr

Xephyr is a nested X server that runs as an X application.

This may be useful to workaround a badly written application. For example, Supermicro servers may be controlled with java ipmi kvm viewer application. While server is rebooting, the application frequently recreates its window. It steals focus from your current window. This happens several times per minute, and actually makes your work impossible. At the same time, it is not obvious how to make a window rule that prevent such application's window to get focused when created, because you want it to get focus when you launch it first time. Using xephyr allows you to keep these window recreations to happen inside a separate window, which do not steals focus of your currently opened window.

Installation

Install xorg-server-xephyr.

Usage

If you wish to run a nested X window, you will need to specify a new display.

$ 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.

$ DISPLAY=:1 xterm

Launching window managers

If you want to launch a specific WM, spectrwm for example, you would type:

$ DISPLAY=:1 spectrwm

You can also launch Xephyr with your xinitrc using startx:

$ startx -- /usr/bin/Xephyr :1

Grabbing and un-grabbing user input

Pressing Ctrl+Shift should lock/unlock your mouse pointer and your keystrokes inside Xephyr window exclusively if possible.

Sending Alt+Tab

If using KDE, create a window rule to ignore global shortcuts. Then you can use Alt+Tab inside Xephyr.

Tips and tricks

Other examples for situations where Xephyr can be useful are:

  1. A testing environment for an X application, or feature, in which the tester would like to keep working in his usual X environment, yet defending the other applications from failures of the application under test.
  2. OpenSSH#Remote emphasize 3 settings in the sshd server configuration file for OpenSSH#X11 forwarding (over ssh). 2 of these, out of 3, are the default settings. When the ssh client can not influence the ssh server administrator to set the 3rd one, X11Forwarding, to yes, Forwarding X11 over ssh uses Xephyr as a work around to be installed in the ssh client machine.
gollark: Hmm, there's a "minutes to hide comment scores" box, at least.
gollark: I'll check, I haven't used subreddit settings in ages.
gollark: Why not just turn on the setting to show it to everyone anyway? I'm sure that's a thing.
gollark: Allowing *other people* to do the same thing you're planning to would arguably be better, since then there would be people able to pick what they like other than just the moderators.
gollark: That is... an odd way to abbreviate my name.
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.