... (WIP) ====== Wayland ====== This page is under development! Wayland is a protocol for a compositing window manager to talk to its clients, as well as a library implementing the protocol. It is supported on some desktop environments like [[en:system:userspace:application:desktop_environments:gnome|GNOME]] and [[en:system:userspace:application:desktop_environments:kde|KDE]]. There is also a compositor reference implementation called Weston. XWayland provides a compatibility layer to seamlessly run legacy X11 applications in Wayland. ===== Requirements ===== Most Wayland compositors only work on systems using Kernel mode setting. Wayland by itself does not provide a graphical environment; for this you also need a compositor such as #Weston or [[en:system:userspace:application:window_managers:sway|Sway]], or a [[en:system:userspace:application:desktop_environments|desktop environment]] that includes a compositor like [[en:system:userspace:application:desktop_environments:gnome|GNOME]] or [[en:system:userspace:application:desktop_environments:kde|KDE]]. ===== Weston ===== Weston is the reference implementation of a Wayland compositor. ==== Installation ==== Install the [[https://www.hyperbola.info/packages/?name=weston|weston]] package. # pacman -S weston ==== Usage ==== Super (windows key) can be changed, see [[en:system:display_servers:wayland#configuration|weston.ini]]. {| border="1" style="sortable; text-align: center; width: 100%; border-collapse:collapse; color:#262627; background-color:#f8f9fa;" ! colspan="2" style="background-color:#eaecf0" |Keyboard Shortcuts |- ! style="background-color:#eaecf0" |Cmd ! style="background-color:#eaecf0" |Action |- |Ctrl+Alt+Backspace |Quit Weston |- |Super+Scroll (or PageUp/PageDown) |Zoom in/out of desktop |- |Super+Tab |Switch windows |- |Super+LMB |Move Window |- |Super+MMB |Rotate Window |- |Super+RMB |Resize Window |- |Super+Alt+Scroll |Change window opacity |- |Super+k |Force Kill Active Window |- |Super+Up/Down |Switch Prev/Next Workspace |- |Super+Shift+Up/Down |Grab Current Window and Switch Workspace |- |Super+Fn |Switch to Workspace n (e.g. F2) |- |Super+s |Take a screenshot |- |Super+r |Record a screencast |} To launch Weston natively (from a TTY) or to run Weston inside a running X session: $ weston Then within Weston, you can run the demos. To launch a terminal emulator: $ weston-terminal To move flowers around the screen: $ weston-flower To display images: $ weston-image image1.jpg image2.jpg... ==== Configuration ==== Weston's outputs differ slightly from those of xorg.conf Monitors: $ ls /sys/class/drm card0 card0-VGA-1 card1 card1-DVI-I-1 card1-HDMI-A-1 card1-VGA-2 card0 is the unused built-in video adapter. The add-on adapter card1 is cabled to one HDMI and one DVI monitor, so the output names are HDMI-A-1 and DVI-I-1. Following is an example configuration file. See [[https://jlk.fjfi.cvut.cz/arch/manpages/man/weston.ini.5|weston.ini(5)]] for more. ~/.config/weston.ini [core] # xwayland support xwayland=true [libinput] enable-tap=true [shell] #background-image=/usr/share/backgrounds/gnome/Aqua.jpg background-type=scale-crop background-color=0xff000000 #background-color=0xff002244 #panel-color=0x90ff0000 panel-color=0x00ffffff panel-position=bottom #clock-format=none #animation=zoom #startup-animation=none close-animation=none focus-animation=dim-layer #binding-modifier=ctrl num-workspaces=6 locking=false cursor-theme=Adwaita cursor-size=24 # tablet options #lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png #lockscreen=/usr/share/backgrounds/gnome/Garden.jpg #homescreen=/usr/share/backgrounds/gnome/Blinds.jpg #animation=fade # for Laptop displays [output] name=LVDS1 mode=preferred #mode=1680x1050 #transform=90 #[output] #name=VGA1 # The following sets the mode with a modeline, you can get modelines for your preffered resolutions using the cvt utility #mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync #transform=flipped #[output] #name=X1 #mode=1024x768 #transform=flipped-270 # on screen keyboard input method #[input-method] #path=/usr/lib/weston/weston-keyboard [keyboard] keymap_rules=evdev #keymap_layout=us,de #keymap_variant=colemak, #keymap_options=grp:shifts_toggle #keymap_options=caps:ctrl_modifier,shift:both_capslock_cancel repeat-rate=30 repeat-delay=300 # keymap_options from /usr/share/X11/xkb/rules/base.lst #numlock-on=true [terminal] font=monospace font-size=18 [launcher] icon=/usr/share/weston/icon_flower.png path=/usr/bin/weston-flower [launcher] icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png path=/usr/bin/weston-terminal --shell=/bin/bash #[launcher] #icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png #path=/usr/bin/gnome-terminal [launcher] icon=/usr/share/icons/hicolor/32x32/apps/iceweasel-uxp.png path=MOZ_GTK_TITLEBAR_DECORATION=client /usr/bin/iceweasel-uxp #[launcher] #icon=/usr/share/icons/Adwaita/32x32/apps/multimedia-volume-control.png #path=/usr/bin/st alsamixer -c0 Minimal weston.ini: ~/.config/weston.ini [core] xwayland=true [keyboard] keymap_layout=gb [output] name=LVDS1 mode=1680x1050 transform=90 [launcher] icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png path=/usr/bin/weston-terminal [launcher] icon=/usr/share/icons/hicolor/24x24/apps/iceweasel-uxp.png path=/usr/bin/iceweasel-uxp === XWayland === Install the [[https://www.hyperbola.info/packages/?name=xenocara-server-xwayland|xenocara-server-xwayland]] package. pacman -S xenocara-server-xwayland When you want to run an X application from within Weston, it spins up Xwayland to service the request. The following configuration is shown above: ~/.config/weston.ini [core] xwayland=true ===== GUI libraries ===== ===== Acknowledgement ===== This wiki article is based on **ArchWiki**. We may have removed non-[[https://www.gnu.org/philosophy/free-system-distribution-guidelines.html|FSDG]] bits from it.