Sway/de

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Sway and the translation is 62% complete.
Outdated translations are marked like this.
Other languages:

Sway (abgeleitet von SirCmpwns Wayland Compositor) ist ein quelloffener Wayland Compositor, der für die Kompatibilität mit dem Fenstermanager i3 konzipiert ist.

Installation

USE-Flags

USE flags for gui-wm/sway i3-compatible Wayland window manager

X Enable support for X11 applications (XWayland)
filecaps Use Linux file capabilities to control privilege rather than set*id (this is orthogonal to USE=caps which uses capabilities at runtime e.g. libcap)
man Build and install man pages
swaybar Install 'swaybar': sway's status bar component
swaynag Install 'swaynag': shows a message with buttons
tray Enable support for StatusNotifierItem tray specification
wallpapers Install sway's default wallpaper image

Emerge

root #emerge --ask gui-wm/sway

Konfiguration

Um alle verfügbaren Konfigurationsoptionen anzuzeigen:

user $man 5 sway

Dateien

Jeder Benutzer, der Sway ausführt, kann die Standardkonfigurationsdatei bearbeiten, um eine angepasste Sway-Sitzung zu starten. Gentoo speichert die Datei an ihrem Standardpfad /etc/sway/config:

user $mkdir -p ~/.config/sway/
user $cp /etc/sway/config ~/.config/sway/

Terminal-Emulator

Standardmäßig verwendet die Sway-Konfigurationsdatei den foot Terminal-Emulator (zu finden im Paket gui-apps/foot). Es ist eine gute Idee, diesen Terminal-Emulator zu emergen, damit ein Terminal verfügbar ist, sobald Sway läuft:

root #emerge --ask gui-apps/foot

Andere beliebte Optionen sind x11-terms/alacritty oder x11-terms/kitty, die nativ mit Wayland funktionieren. Wenn Sie Kitty verwenden, müssen Sie, die KITTY_ENABLE_WAYLAND Umgebungsvariable auf 1 setzen.

Eine weitere leichtgewichtige Alternative ist st, aber sie ist nicht Wayland-nativ.

Anzeigekonfiguration

Die Anzeigeoptionen können wie folgt abgefragt werden:

user $swaymsg -t get_outputs
Output DP-1 'HP Inc. HP X34 6CM2261GK2' (focused)
  Current mode: 3440x1440 @ 165.000 Hz
  Position: 0,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 1
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    3440x1440 @ 165.000 Hz
 
...
 
Output DP-2 'LG Electronics LG HDR QHD 110NTTQ0U193'
  Current mode: 2560x1440 @ 59.951 Hz
  Position: 3440,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 2
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    2560x1440 @ 59.951 Hz
    2560x1440 @ 74.971 Hz
 
...
 
Output DP-3 'Ancor Communications Inc VE247 E3LMQS103610'
  Current mode: 1920x1080 @ 60.000 Hz
  Position: 6000,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 3
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    1920x1080 @ 60.000 Hz

Die Ergebnisse wurden so gekürzt, dass sie nur gewünschte Auflösung enthalten. Die Standardpositionen sind nicht richtig konfiguriert und können durch Ändern von ~/.config/sway/config angepasst werden. Sobald die Datei gespeichert ist, kann die Konfiguration mit $mod+Shift+c neu geladen werden.

DATEI ~/.config/sway/configKonfigurieren des linken Bildschirms, der physisch etwas größer ist als der primäre Bildschirm
output DP-1 resolution 3440x1440@165hz pos 2560 350
DATEI ~/.config/sway/configKonfigurieren des primären Bildschirms, der zentriert ist
output DP-2 resolution 2560x1440@74.971hz pos 0 250
DATEI ~/.config/sway/configKonfigurieren eines alternativen vertikalen Bildschirms
output DP-3 resolution 1920x1080@60hz pos 6000 0 transform 270
DATEI ~/.config/sway/configKonfiguriere primäres Display, welches zentriert ist
output DP-2 resolution 2560x1440@74.971hz pos 0 250
DATEI ~/.config/sway/configKonfiguriere alternatives Display, welches vertikal ist
output DP-3 resolution 1920x1080@60hz pos 6000 0 transform 270

Eingabegeräte

Eingabegeräte können wie folgt abgefragt werden:

user $swaymsg -t get_inputs
Input device: Logitech G502 HERO Gaming Mouse Keyboard
  Type: Mouse
  Identifier: 1133:49291:Logitech_G502_HERO_Gaming_Mouse_Keyboard
  Product ID: 49291
  Vendor ID: 1133
  Libinput Send Events: enabled
 
Input device: Logitech G502 HERO Gaming Mouse Keyboard
  Type: Keyboard
  Identifier: 1133:49291:Logitech_G502_HERO_Gaming_Mouse_Keyboard
  Product ID: 49291
  Vendor ID: 1133
  Active Keyboard Layout: English (US)
  Libinput Send Events: enabled
 
Input device: Logitech G502 HERO Gaming Mouse
  Type: Mouse
  Identifier: 1133:49291:Logitech_G502_HERO_Gaming_Mouse
  Product ID: 49291
  Vendor ID: 1133
  Libinput Send Events: enabled
DATEI ~/.config/sway/configMausbeschleunigung deaktivieren, Zeigergeschwindigkeit verringern
input "1133:49291:Logitech_G502_HERO_Gaming_Mouse" {
    accel_profile "flat"
    pointer_accel -0.1
}

Anwendungsstarter

Sway nutzt laut den Standardeinstellungen demnu, welches X nutzt. dev-libs/bemenu ist eine gute Alternative, die Wayland unterstützt.

root #emerge --ask dev-libs/bemenu
DATEI ~/.config/sway/configKonfiguriere Sway um bemenu zu nutzen
set $menu bemenu-run | xargs swaymsg exec --
DATEI ~/.config/sway/configKonfiguriere Sway um bemenu ohne Eingabe zu nutzen
set $menu bemenu-run -p "" | xargs swaymsg exec --

Statusleiste

Zusätzlich zu Sways eigener Statusleiste kann gui-apps/waybar als hochgradig anpassbare Statusleiste für Sway verwendet werden:

root #emerge --ask gui-apps/waybar

Diese kann so angewandt werden:

DATEI ~/.config/sway/configNutze Waybar und deaktiviere swaybar
bar {
    status_command waybar
    mode invisible
}

or:

DATEI ~/.config/sway/configEnable Waybar
exec waybar

Helligkeit

Warnung
The github page for dev-libs/light currently (2023-09) states: "This project is considered orphaned since the 8th of March, 2023. Use is heavily discouraged until such a time that it is adopted by another developer.". The package currently remains in the Gentoo ebuild repository, but users may want to take the message from the dev into consideration.

Mit dev-libs/light lassen sich Hintergrundbeleuchtung und Helligkeit einstellen. Hier ist eine Beispielkonfiguration:

DATEI ~/.config/sway/configFestlegen der Tastaturkürzel für die Unterstützung der Bildschirmhelligkeit
bindsym XF86MonBrightnessDown exec light -U 2
bindsym XF86MonBrightnessUp exec light -A 4

Alternativ kann sys-power/acpilight die gleichen Helligkeitsänderungen auch über einen xbacklight kompatiblen Befehl erreichen:

DATEI ~/.config/sway/configFestlegen der Tastaturkürzel für die Unterstützung der Bildschirmhelligkeit
bindsym XF86MonBrightnessDown exec xbacklight -dec 2
bindsym XF86MonBrightnessUp exec xbacklight -inc 4

Lautstärke

Wenn pulseaudio verwendet wird, kann die folgende Konfiguration zur Änderung der Lautstärke verwendet werden:

DATEI ~/.config/sway/configLegen Sie die Tastaturkürzel zum Ändern der Lautstärke für pulseaudio fest
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%

Wenn PipeWire verwendet wird, kann die folgende Konfiguration zur Änderung der Lautstärke verwendet werden (mit Wireplumber):

DATEI ~/.config/sway/configFestlegen der Tastaturkürzel zum Ändern der Lautstärke für PipeWire
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-

Wenn ALSA verwendet wird, kann die folgende Konfiguration zur Änderung der Lautstärke verwendet werden:

DATEI ~/.config/sway/configFestlegen der Tastaturkürzel zum Ändern der Lautstärke für ALSA
bindsym XF86AudioRaiseVolume exec amixer -Mq set Speaker 5%+
bindsym XF86AudioLowerVolume exec amixer -Mq set Speaker 5%-

Wenn media-sound/sndio verwendet wird, kann die folgende Konfiguration zum Ändern der Lautstärke verwendet werden:

DATEI ~/.config/sway/configFestlegen der Tastaturkürzel zum Ändern der Lautstärke für sndio
bindsym XF86AudioRaiseVolume exec sndioctl -f snd/default output.level=+0.05
bindsym XF86AudioLowerVolume exec sndioctl -f snd/default output.level=-0.05

Bildschirmfotos machen

Simple approach: use slurpshot

(Slurpshot) is a script to simplify taking screenshots. It uses native wayland apps only and enables selecting specific windows only, as well as previewing and printing screenshots withous saving them. First install dependencies:

root #emerge --ask gui-apps/grim gui-apps/slurp app-misc/jq dev-libs/bemenu

Put the slurpshot script somewhere in your PATH, for example to ~/bin, make it executable and just set one keybind:

DATEI ~/.config/sway/configSet the keyboard shortcuts for slurpshot support
#
# Screen capture
#
bindsym Print exec slurpshot

Manual approach

Um Screenshot-Unterstützung hinzuzuf ügen, verwenden Sie das Dienstprogramm grim (zu finden im Paket gui-apps/grim). Die Abkürzung grim ist definiert als Grab Images. Dieses Dienstprogramm ist auf die Besonderheiten des Wayland-Protokolls zugeschnitten. Um grim zu installieren, verwenden Sie den folgenden Befehl:

root #emerge --ask gui-apps/grim

Das Dienstprogramm slurp aus dem Paket gui-apps/slurp unterstützt die Bestimmung der Grenzen des ausgewählten Bildschirmbereichs und wird in Kombination mit dem Dienstprogramm grim verwendet. Um slurp zu installieren, verwenden Sie den Befehl:

root #emerge --ask gui-apps/slurp

Als Nächstes bearbeiten Sie die Konfigurationsdatei, um die Unterstützung für Tastenkombinationen zur Durchführung eines Screenshot-Vorgangs hinzufügen:

DATEI ~/.config/sway/configSet the keyboard shortcuts for screenshot support
#
# Screen capture
#
set $ps1 Print
set $ps2 Control+Print
set $ps3 Alt+Print
set $ps4 Alt+Control+Print
set $psf $(xdg-user-dir PICTURES)/ps_$(date +"%Y%m%d%H%M%S").png
 
bindsym $ps1 exec grim - | wl-copy
bindsym $ps2 exec grim -g "$(slurp)" - | wl-copy
bindsym $ps3 exec grim $psf
bindsym $ps4 exec grim -g "$(slurp)" $psf

Please note that the Print or Ctrl + Print keys combination creates a screenshot in the wl-copy buffer. This allows pasting the image directly from the clipboard, without having to save to a file on disk.

Für die Tasten Alt+Print oder Alt+Ctrl+Print wird die Methode der automatischen Speicherung der Bilddatei im Benutzerverzeichnis Pictures verwendet.

Snipping tool like behavior

The following captures an area of the screen to the clipboard when mod+shift+S is pressed:

DATEI ~/.config/sway/configSimilar function to the snipping tool
bindsym $mod+shift+s exec grimshot copy area

Ein zufälliges Hintergrundbild einstellen

Ein zufälliges Hintergrundbild kann aus einem Ordner gezogen und eingestellt werden: [1]

DATEI ~/.config/sway/configEin zufälliges Hintergrundbild aus einem Ordner festlegen
set $wallpapers_path $HOME/Pictures/Wallpapers
output * bg $(find $wallpapers_path -type f | shuf -n 1) fill

Swaylock

gui-apps/swaylock kann verwendet werden, um die aktuelle Sitzung zu sperren.

root #emerge --ask gui-apps/swaylock
DATEI ~/.config/sway/configLock the session when $mod+l is pressed
bindsym $mod+l exec swaylock --ignore-empty-password --show-failed-attempts --color 1e1e1e
DATEI ~/.config/sway/configWith colors man swaylock for more info
bindsym $mod+l exec swaylock --ignore-empty-password --show-failed-attempts \
    --color 1e1e1e --inside-color cccccc --ring-color ffffff \
    --inside-clear-color 11a8cd --ring-clear-color 29b8db \
    --inside-ver-color 2472c8 --ring-ver-color 3b8eea \
    --inside-wrong-color cd3131 --ring-wrong-color f14c4c
Warnung
Wenn das Konto gesperrt ist, zeigt swaylock dies nicht an und schlägt einfach fehl. Der Wechsel zu einem anderen TTY und der Versuch sich anzumelden, kann helfen, dies zu diagnostizieren

Swayidle

gui-apps/swayidle führt nach einer bestimmten Leerlaufzeit einen Befehl aus, typischerweise zum Sperren und/oder Ausschalten des Bildschirms.

root #emerge --ask gui-apps/swayidle
DATEI ~/.config/sway/configAusschalten aller Displays nach 15 Minuten Inaktivität
exec swayidle -w \
  timeout 900 'swaymsg "output * power off"' \
  resume 'swaymsg "output * power on"'

HiDPI

Um das Rendering von Sway führ HiDPI-Displays (4K und höher) anzupassen, muss der Name des Displays, das angepasst werden soll, ermittelt werden. Nachdem eine Sway-Sitzung läuft, geben Sie den folgenden Befehl ein:

user $swaymsg -t get_outputs
Hinweis
Das swaymsg USE-Flag muss aktiviert sein, damit der Befehl swaymsg auf dem System verfügbar ist.

Die output Anweisung in der Sway-Konfigurationsdatei akzeptiert einen scale Parameter zur Anpassung der Skalierung der hochauflösenden Anzeige.

Xresources

DATEI ~/.config/sway/config~/.Xresources beim Neuladen des Systems neu laden
exec_always test -f ~/.Xresources && xrdb -merge ~/.Xresources

GTK-Thema und -Schriftart

Dark Mode

GTK3

GTK3 dark mode can be enabled by setting:

DATEI ~/.config/gtk-3.0/config.iniEnable gtk3 dark mode
[Settings]
gtk-application-prefer-dark-theme = true
GTK2

GTK2 does not have a dark mode toggle, a dark theme must be selected:

DATEI ~/.gtkrc-2.0Enable gtk3 dark mode
gtk-theme-name = "Adwaita-dark"

GTK3 Themes and Fonts

Derzeit sollte das Einstellen einer GTK-Schriftart und eines Themas durch Bearbeiten der Konfigurationsdatei von Sway erfolgen (siehe auch Sway's Wiki):

DATEI ~/.config/sway/configEinstellen der Schriftart und des Themas für GTK-Anwendungen
set $gnome-schema org.gnome.desktop.interface
exec_always {
    gsettings set $gnome-schema gtk-theme 'theme name'
    gsettings set $gnome-schema icon-theme 'icon theme name'
    gsettings set $gnome-schema cursor-theme 'cursor theme name'
    gsettings set $gnome-schema font-name 'Sans 10'
}

Wenn Sie bei bestimmten Anwendungen (einschließlich Sway) Probleme mit der Einstellung des Mauszeigers haben, kann dies helfen:

DATEI ~/.config/sway/configSetzen des Cursorthemas
seat seat0 xcursor_theme custom_cursor_theme custom_cursor_size

Ersetzen Sie custom_cursor_theme und custom_cursor_size. Adwaita und 24 sind so ziemlich bei allen Linux-Distributionen Standard.

Automatic floating windows

By default, Sway opens new windows in tiling mode. The following configuration snippet makes many common windows which should float, float:

DATEI ~/.config/sway/configMore reasonable floating windows[2]
for_window [window_role = "pop-up"] floating enable
for_window [window_role = "bubble"] floating enable
for_window [window_role = "dialog"] floating enable
for_window [window_type = "dialog"] floating enable
for_window [window_role = "task_dialog"] floating enable
for_window [window_type = "menu"] floating enable
for_window [app_id = "floating"] floating enable
for_window [app_id = "floating_update"] floating enable, resize set width 1000px height 600px
for_window [class = "(?i)pinentry"] floating enable
for_window [title = "Administrator privileges required"] floating enable

Firefox Tweaks

DATEI ~/.config/sway/configMake relevant Firefox windows float[3]
for_window [title = "About Mozilla Firefox"] floating enable
for_window [window_role = "About"] floating enable
for_window [app_id="firefox" title="Library"] floating enable, border pixel 1, sticky enable
DATEI ~/.config/sway/configRemove the sharing indicator window for Firefox[4]
for_window [title = "Firefox - Sharing Indicator"] kill
for_window [title = "Firefox — Sharing Indicator"] kill

Steam Tweaks

DATEI ~/.config/sway/configMake Steam dialog windows float[5]
for_window [class="^Steam$" title="^Friends$"] floating enable
for_window [class="^Steam$" title="Steam - News"] floating enable
for_window [class="^Steam$" title=".* - Chat"] floating enable
for_window [class="^Steam$" title="^Settings$"] floating enable
for_window [class="^Steam$" title=".* - event started"] floating enable
for_window [class="^Steam$" title=".* CD key"] floating enable
for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable
for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable
for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable
for_window [title="^Steam Keyboard$"] floating enable

Service

OpenRC

On OpenRC based systems, elogind must be added to the boot runlevel:

root #rc-update add elogind boot

Usage

Bedienung

Einige Displaymanager können funktionieren, werden aber von Sway nicht unterstützt.[6] Ohne einen Displaymanager kann Sway von einem TTY gestartet werden:

Wichtig
Starting Sway with dbus requires that XDG_RUNTIME_DIR is set. elogind or systemd will set this if used. Omitting the dbus-run-session may cause runtime errors.

Starten von Sway mit TTY-Anmeldung

Dies ist eine einfache Methode, um Sway zu starten. Sie kann der Shell rc-Datei eines Benutzers hinzugefügt werden, und sobald dieser angemeldet ist, wird die Sway-Sitzung ausgeführt.

DATEI ~/.bashrcStarten von Sway, nachdem Sie sich am ersten TTY angemeldet haben
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
    dbus-run-session sway
fi

Starting Sway manually

user $dbus-run-session sway

Starten von Sway aus einem Skript

Diese Methode verwendet ein Skript, um ein virtuelles Terminal zu übernehmen und Sway darin zu starten. Der typische Anwendungsfall ist, Sway automatisch beim Booten zu starten.

Hinweis
Sway sollte nicht auf diese Weise gestartet werden, das Skript muss möglicherweise angepasst werden, damit es funktioniert.

{{FileBox|title=Sway Launcher|filename=/usr/sbin/sway_launcher|lang=bash|1=

  1. !/bin/sh

Dieses Skript hat ein paar Einschränkungen:

  • XDG_RUNTIME_DIR is expected to be defined and valid, see the section above.
  • Without the --switch option for openvt, sway will freeze when trying to switch to a different VT (Ctrl+Alt+Fn), whether this is a bug or not is unknown.
  • The VT is not cleared when Sway exits, clear it by calling deallocvt.
  • Similarly the TTY's owner and mode are not changed back to their default values when Sway exits.

Dies Skript kann beim Booten mit dem Dienst {{|Link|/etc/local.d|local}} gestartet werden:

DATEI /etc/local.d/sway.startSway beim Booten starten
#!/bin/sh
sway_launcher larry 7

Starting Sway without elogind or systemd

Systeme, die weder mit systemd noch mit elogind konfiguriert sind, müssen ein Shell-Skript erstellen (oder eine andere Methode verwenden), um die Variable XDG_RUNTIME_DIR zu setzen.

The environment variable can be defined in the usual configuration files. For example, if Larry the cow (Larry) sets the XDG_RUNTIME_DIR variable in his shell's configuration file and he has chosen that the directory will be in /tmp:

DATEI /home/larry/.bash_profileSet the XDG_RUNTIME_DIR variable
#!/bin/sh
if test -z "${XDG_RUNTIME_DIR}"; then
  UID="$(id -u)"
  export XDG_RUNTIME_DIR=/tmp/"${UID}"-runtime-dir
    if ! test -d "${XDG_RUNTIME_DIR}"; then
        mkdir "${XDG_RUNTIME_DIR}"
        chmod 0700 "${XDG_RUNTIME_DIR}"
    fi
fi

Wenn die XDG_RUNTIME_DIR Variable definiert ist, kann Sway wie gewohnt gestartet werden:

user $dbus-run-session sway

Wenn Probleme auftreten, überprüfen Sie die Sway Issues auf GitHub, bevor Sie die Sway Community im IRC #sway (webchat) kontaktieren oder einen neuen Gentoo Bug öffnen.

Bewegung

Alle Tastenkombinationen werden in der Konfigurationsdatei ~/.config/sway/config definiert.

Die Taste Super ist standardmäßig als $mod definiert. Auf den meisten Tastaturen wird dies die Windows-Taste sein.

Sway hat eine Vi-ähnliche Oberfläche. h (links), j (runter), k (hoch) und l (rechts) können zur Bewegung verwendet werden.

Focus can be moved with mod+direction key, windows can be moved with mod+shift+direction key:

DATEI ~/.config/sway/configDefault movement definitions
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
 
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

Siehe man 5 sway-input für weitere Informationen.

Useful binds

DATEI ~/.config/sway/configCycle between workspaces with mod+control+left arrow and mod+control+right arrow
bindsym $mod+control+Right workspace next
bindsym $mod+control+Left workspace prev

Layouts

By default, Sway uses a tiling layout. Layout modes can be switched with the following default binds:

  • mod+b - Horizontal split
  • mod+v - Vertical split
  • mod+s - Stacking
  • mod+w - Tabbed
  • mod+e - Toggle split
  • mod+shift+space - Toggle floating
DATEI ~/.config/sway/configDefault layout definitions
bindsym $mod+b splith
bindsym $mod+v splitv
 
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
 
bindsym $mod+Shift+space floating toggle

Terminal

Die Standardtastenkombination zum Öffnen eines Terminal-Emulators ist $mod+Enter.

Foot Server

Foot is a minimal Wayland terminal emulator that can be configured to run as a server, reducing resource usage.

DATEI ~/.config/sway/configStart the Foot server with Sway
exec foot -s
DATEI ~/.config/sway/configSet the default terminal to be a foot client
set $term footclient
Hinweis
If starting the foot server with Sway, it may not start fast enough to also auto-start a service, exec swaymsg "workspace 2; exec $term {command}" may be slow enough to mitigate this

Adding features

Sway is designed to be extended, adding additional features is easy:

DATEI ~/.config/sway/configStart htop when control+shift+esc is pressed
bindsym control+shift+escape exec $term htop

If using foot, the app_id, which is set with -a, can be set to make it float automatically:

DATEI ~/.config/sway/configStart htop floating when control+shift+esc is pressed
bindsym control+shift+escape exec $term -a 'flying-foot' htop
for_window [app_id="flying-foot"] floating enable

Fehlersuche

Die Bildschirmfreigabe funktioniert nicht

Wichtig
Ensure sys-apps/xdg-desktop-portal is built with the screencast USE flag.

Stellen Sie sicher, dass das Paket gui-libs/xdg-desktop-portal-wlr installiert ist. Standardmäßig wird es von D-Bus automatisch gestartet, aber es läuft nicht, weil es Umgebungsvariablen benötigt, die von Sway exportiert werden, und die D-Bus-Sitzung wird vor Sway gestartet. Um dies zu beheben, aktualisieren Sie die D-Bus-Umgebung, indem Sie die folgenden Zeile an den Anfang der Sway-Konfiguration hinzufügen:

DATEI ~/.config/sway/config
exec --no-startup-id dbus-update-activation-environment --all

Siehe auch diesen Link um zu sehen, ob PipeWire richtig funktioniert. Beachten Sie, dass ab April 2022 Screenshotting/Screensharing noch nicht in wlroots/sway mit dem Vulkan-Renderer implementiert ist (siehe diesen Issue)

Failed to connect to user bus

[swaybar/tray/tray.c:42] Failed to connect to user bus: No such file or directory

Warning: no icon themes loaded

[swaybar/tray/icon.c:348] Warning: no icon themes loaded

Es wird nach x11-themes/hicolor-icon-theme gesucht

No backend was able to open a seat

[ERROR] [wlr] [libseat] [libseat/libseat.c:78] No backend was able to open a seat

Es sucht nach einem Seat-Management-Daemon wie sys-auth/seatd oder sys-auth/elogind. Prüfen Sie auch, ob das Setzen von XDG_RUNTIME_DIR erforderlich ist.

Wichtig
Wenn sys-auth/seatd verwendet wird, ist server erforderlich.

Anwendungen vergessen Logins

Einige Anwendungen (z.B. net-misc/nextcloud-client) verwenden einen Secret-Service-Agent, um Anmeldedaten für die Anmeldung zu speichern. Wenn Anwendungen bei jedem Start nach den Anmeldedaten fragen, könnte ein falsch konfigurierter Secret-Service-Agent der Grund dafür sein.

Emergen Sie zunächst gnome-base/gnome-keyring.

root #emerge --ask gnome-base/gnome-keyring

Dann aktivieren Sie das gnome-keyring USE-Flag.

DATEI /etc/portage/package.use
# Sway Secret-Service-Agent
*/* gnome-keyring

Aktualisieren Sie das System, um das neue USE-Flag anzuwenden.

root #emerge -avuDN @world

Um den Agentenspeicher beim Einloggen in eine Sway-Sitzung zu starten und freizugeben, bearbeiten Sie diese beiden Dateien.

DATEI ~/.config/sway/config
exec dbus-update-activation-environment --all
exec gnome-keyring-daemon --start --components=secrets
exec export $(gnome-keyring-daemon)
DATEI /etc/pam.d/login
auth      optional  pam_gnome_keyring.so
password  optional  pam_gnome_keyring.so
session   optional  pam_gnome_keyring.so auto_start

Siehe auch

  • I3 — a minimalist tiling window manager, completely written from scratch.
  • Wayland — a replacement for the X11 window system protocol and architecture with the aim to be easier to develop, extend, and maintain
  • Weston — a reference implementation of a Wayland compositor.

Referenzen