Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
Jasmin edited this page Oct 31, 2025 · 11 revisions

Setup Wayland Desktop Environment

The examples use dnf command to install each desktop environment in Fedora. You would use the different ways in other distro.

Weston desktop environment

I don’t remember the detail but I think Weston supports the Wayland input-method protocol version 1 and the weston.ini file can allow the one command in “input-method” section and IBus has provided ibus-wayland in a libexec directory.

% cat ~/.config/weston.ini
[input-method]
path=/var/tmp/ibus-weston

% cat /var/tmp/ibus-weston
#!/bin/sh
ibus-daemon --xim &
sleep 3
/usr/libexec/ibus-wayland

% chmod 755 /var/tmp/ibus-weston

GNOME Wayland desktop environment

GNOME-Shell can connect ibus-daemon with D-Bus methods without using the Wayland input-method protocols. GNOME-Shell also performs the panel feature instead of the IBus panel component. It executes ibus-daemon with “–panel disable” option via systemd.

% grep -i ibus /usr/lib/systemd/user/org.freedesktop.IBus.session.GNOME.service
Description=IBus Daemon for GNOME
ExecStart=sh -c 'exec /usr/bin/ibus-daemon --panel disable $([ "$XDG_SESSION_TYPE" = "x11" ] && echo "--xim")'
BusName=org.freedesktop.IBus

1. Run `gnome-control-center keyboard` command to launch the desktop setting application
2. Click "Compose Key" button in the "Special Character Entry" section
3. Enable "Compose Key" check button and choose a compose key button in the "Compose Key" section

Plasma Wayland desktop environment (KDE)

Plasma Wayland supports the Wayland input-method protocol version 1 and IBus has supported it since version 1.5.29. IBus provides /usr/share/applications/org.freedesktop.IBus.Panel.Wayland.Gtk3.desktop file which can be loaded by the Plasma configurations. You can follow the setup below. Alternatively, run ibus start --type kde-wayland command manually. (You also would like to add --verbose option for ibus start command.)

% sudo dnf group install kde-desktop

1. Run systemsettings command to launch the desktop setting application
2. Select “Keyboard” -> “Virtual Keyboard” section
3. Select “IBus Wayland” icon and click “Apply” button

1. Run systemsettings command to launch the desktop setting application
2. Select “Keyboard” -> “Keyboard” section
3. Enable “Configure keyboard options” check button
4. Open “Position of Compose key” pull down menu and enable some check buttons
5. Click “Apply” button

Sway desktop environment

Sway supports the Wayland input-method protocol version 2 and IBus will support it in 1.5.32. You can follow the setup below or run ibus start --type wayland command by manual. I use waybar since swaybar does not support StatusNotifier yet to show the IBus panel icon.

Users can enable IBus without the desktop configurations with the input-method protocol version 2 against version 1 (I.e. the --type kde-wayland works for the KDE specific operations and the --type wayland option runs for input-method version 2.). The version 2 also supports the different serial timing, customizing key repeating rate, multiple seats but it dropped to support the customizing preedit colors which was supported in the text-input protocol version 1 and input -method protocol version 1.

% sudo dnf group list --hidden
% sudo dnf group install swaywm

% cat ~/.config/sway/config
include "/etc/sway/config"

# IBus uses Super-space to show the IME switcher popup.
unbindsym $mod+Shift+space
bindsym $mod+Shift+backslash floating toggle

unbindsym $mod+space
bindsym $mod+backslash focus mode_toggle


input * {
  xkb_layout "us"
  xkb_variant ","
  xkb_options "ctrl:swapcaps,compose:rctrl"
}


bar {
  swaybar_command waybar
}

exec_always ibus start --type wayland

% cat ~/.config/foot/foot.ini
[main]
font=monospace:size=12

Hyprland desktop environment

Hyprland supports the Wayland input-method protocol version 2 and IBus will support it in 1.5.32. You can follow the setup below or run ibus start --type wayland command by manual. Since Hyprland locks the ~/.config/hypr/hyprland.conf file, seems users cannot override the configuration file. To unlock the file, you might need to comment out the line of “autogenerated=1” in the hyprland.conf file until you complete to modify the file for the IBus configuration.

% sudo dnf group list --hidden
% sudo dnf install hyprland

< Log into the Hyprland desktop session to generate the default hyprland.conf file >

% ls ~/.config/hypr/hyprland.conf
~/.config/hypr/hyprland.conf
% vi ~/.config/hypr/hyprland.conf
# autogenerated=1

exec-once = waybar
exec-once = ibus start --type wayland

input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options = ctrl:swapcaps,compose:rctrl
    kb_rules =

    follow_mouse = 1

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.

    touchpad {
        natural_scroll = false
    }
}

% cat ~/.config/kitty/kitty.conf
font_family family="Source Code Pro"

COSMIC desktop enviroment

COSMIC supports the Wayland input-method protocol version 2 and IBus will support it in 1.5.32. You can follow the setup below or run ibus start --type wayland command by manual.

% sudo dnf group list --hidden
% sudo dnf group install cosmic-desktop

% cat ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config
(
    rules: "",
    model: "pc105",
    layout: "us",
    variant: "",
    options: Some(",ctrl:swapcaps,compose:rctrl"),
    repeat_delay: 600,
    repeat_rate: 25,
)

% cat ~/.config/autostart/org.freedesktop.IBus.Panel.Wayland.Gtk3.desktop 
[Desktop Entry]
# IBus Wayland is a branding name but not translatable.
Name=IBus Wayland
Exec=ibus start --type wayland
Type=Application
Icon=ibus
NoDisplay=true
X-Desktop-File-Install-Version=0.27
OnlyShowIn=COSMIC

Labwc desktop environment

Labwc supports the Wayland input-method protocol version 2 and IBus will support it in 1.5.32. You can follow the setup below or run ibus start --type wayland command by manual. Labwc does not provide the session configuration(/etc/xdg/labwc) by default and it's available in /usr/share/doc/labwc directory and labwc-config(5).

% sudo dnf install labwc-session waybar alacritty

% cat ~/.config/labwc/autostart 
waybar &
sleep 1
ibus start --type wayland

% cat ~/.config/labwc/environment 
XKB_DEFAULT_LAYOUT=us
XKB_DEFAULT_OPTIONS=ctrl:swapcaps,compose:rctrl

% cp /usr/share/doc/labwc/menu.xml ~/.config/labwc/.

% cat ~/.config/labwc/rc.xml
<?xml version="1.0"?>
<!-- Refer /usr/share/doc/labwc/rc.xml.all -->

<labwc_config>
  <desktops number="2" popupTime="500" prefix="ws" />

  <keyboard>
    <numlock>on</numlock>
    <layoutScope>global</layoutScope>
    <repeatRate>25</repeatRate>
    <repeatDelay>600</repeatDelay>
    <keybind key="A-Tab">
      <action name="NextWindow" />
    </keybind>
    <keybind key="W-Return">
      <action name="Execute" command="alacritty" />
    </keybind>
    <keybind key="A-F3">
      <action name="Execute" command="bemenu-run" />
    </keybind>
    <keybind key="A-F4">
      <action name="Close" />
    </keybind>
    <keybind key="A-Space">
      <action name="ShowMenu" menu="client-menu" atCursor="no" />
    </keybind>
    <!-- Disable for IBus IME Switcher
    <keybind key="W-Space">
      <action name="ShowMenu" menu="client-list-combined-menu" />
      <position>
        <x>center</x> 
        <y>center</y>
      </position>
    </keybind>
    -->
  </keyboard>

  <mouse>
    <context name="Frame">
      <mousebind button="Left" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Move" />
      </mousebind>
    </context>
    <context name="TitleBar">
      <mousebind button="Left" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Move" />
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ShowMenu" menu="client-menu" />
      </mousebind>
    </context>
    <context name="Root">
      <mousebind button="Left" action="Press">
        <action name="ShowMenu" menu="root-menu" />
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="ShowMenu" menu="root-menu" />
      </mousebind>
      <mousebind direction="Up" action="Scroll">
        <action name="GoToDesktop" to="left" wrap="yes" />
      </mousebind>
      <mousebind direction="Down" action="Scroll">
        <action name="GoToDesktop" to="right" wrap="yes" />
      </mousebind>
    </context>
  </mouse>

</labwc_config>

XFCE desktop environment

XFCE 4.20 supports the Wayland input-method protocol version 2 (based on Labwc in Fedora). You can follow the setup below or run ibus start --type wayland command by manual. XFCE does not use the default Labwc user configuration but the XFCE specific one:

% sudo dnf group list --hidden
% sudo dnf group install xfce-desktop
% sudo dnf install xfce4-session-wayland-session

% cat ~/.config/xfce4/labwc/autostart
ibus start --type wayland

% cat ~/.config/xfce4/labwc/environment
XKB_DEFAULT_LAYOUT=us
XKB_DEFAULT_OPTIONS=ctrl:swapcaps,compose:rctrl
XCURSOR_THEME=Adwaita

Clone this wiki locally