使用echo $XDG_SESSION_TYPE
即可得知是x11
還是wayland
。
GNOME 42後已預設使用Wayland,登入畫面GDM右下角齒輪會有GNOME
與GNOME on Xorg
的選項。
KDE Plasma 6後已預設使用Wayland,登入畫面SDDM左下角有Plasama (Wayland)
與Plasma (X11)
的選項。
如果覺得Wayland問題過多,嘗試切換回X11工作階段。
Wayland工作階段,Firefox(v121以上)預設會自動使用Wayland,不用再設定MOZ_ENABLE_WAYLAND=1
了。開啟about:config
頁面可得知是否正在使用Wayland。
Google Chrome(v131)預設仍是使用XWayland。使用google-chrome-stable --ozone-platform-hint=auto
引數啟動Google Chrome,進入Wayland模式。
使用以下指令可得知是否正在使用Wayland:
strings `which google-chrome-stable` | grep WAYLAND_DISPLAY
- 嘗試在
/etc/environment
加入環境變數,重開機。
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=ibus
- 編輯
~/.local/share/applications/google-chrome.desktop
的Exec=
,在Google Chrome的啟動引數加上--ozone-platform-hint=auto --gtk-version=4 --enable-wayland-ime
。才能於Google Chrome瀏覽器的Wayland工作階段喚醒Fcitx5輸入法。
-
確認有無安裝Pipewire套件,以及
xdg-desktop-portal-gnome
或xdg-desktop-portal-kde
套件,讓瀏覽器能透過XDG Portal存取螢幕。 -
Firefox與Chrome都跑在Wayland協定下的話,應該能順利分享螢幕。
-
跑在XWayland模式下的Google Chrome,開啟
chrome://flags
,將WebRTC PipeWire support設為Enabled,重啟。才能在GNOME共享螢幕。至於KDE Plasma 5.27以後有提供XWayland Video Bridge,應該能直接分享螢幕。
目前你這篇是網路上唯一最完整且有用的。
我為了要打開fractional scaling 的時候字不會糊掉, 所以chrome本來就有指定 ozone platform.
但仍然無法打開fcitx 後來才發現要指定gtk version=4