LoginSignup
5
6

More than 5 years have passed since last update.

XephyrでXサーバーネストする

Posted at

Xephyrを使うと、今のXセッションに新たにネストしたXサーバーを立てることができます。Xephyrの目的の一つに、古くからあるXnestの置き換えがあり、Xephyrの方がモダンです。Window Managerの開発に役立ちそうです。

xephyr.png

インストール

多くのディストリビューションでは ******-xephyr という名前のパッケージ名で登録されています。

# Ubuntu
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install xserver-xephyr
# Archlinux
pacman -S xorg-server-xephyr

起動

Xephyr コマンドで起動します。起動時に、ディスプレイ番号を指定します。

Xephyr -ac -br -screen 640x480  :1 &
# -ac    disable access control restrictions
# -br    create root window with black background

この状態では、真っ黒なウィンドウが表示されるだけですが、すでにXサーバーは起動しています。DISPLAY 変数にXephyr起動時に指定したディスプレイをセットしてXのアプリケーションを起動すると、Xephyr内でXアプリケーションが表示されます。

DISPLAY=:1 xterm &
5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6