Ubuntu 22.04 で Wayland を有効にする

概要

久しぶりに Native の Ubuntu 22.04 を起動したところ(普段は専らWSLから使っているため)、Emacs起動時に下記のメッセージが表示されました。

You are trying to run Emacs configured with the “pure-GTK” interface under the X Window System. That configuration is unsupported and will lead to sporadic crashes during transfer of large selection data. It will also lead to various problems with keyboard input.

これまでWayland下で使用していると思っていましたが、実際にはそうではなかったようです。

How to install emacs29 with X11 support?
After installing emacs 29 with yay emacs29-git now on startx I get:You are trying to run Emacs configured with the "pure-GTK" interface under the X Window Syste...

下記を参考に、Waylandを有効にしてみます。

Attention Required! | Cloudflare

行ったこと

/etc/gdm3/custom.conf を編集し、コメントアウトを外し、下記の設定を行いました。

WaylandEnable=true

下記を実行したところディスプレイに何も表示されなくなってしまいました。

$ sudo systemctl restart gdm3

Ubuntuを再起動し、ログイン時に Wayland を選んでログインしました。

Copied title and URL