NotePublic/Ecology/LubanCat2/关于_Weston_的一些配置.md

73 lines
1.8 KiB
Markdown
Raw Normal View History

# 关于 Weston 的一些配置
Error running systemd as user - Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined
先:
```bash
echo $UID
```
在 /etc/default/locale 或 /etc/environment 中设置:
```bash
XDG_RUNTIME_DIR="/run/user/${UID}"
DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
RUNLEVEL=3
```
其中的 ${UID} 和 ${XDG_RUNTIME_DIR} 要用实际值替代。
```bash
apt install weston
vim /etc/xdg/weston/weston.ini
```
```bash
[core]
xwayland=true
backend=drm-backend.so
[keyboard]
keymap_layout=gb
[output]
name=DSI-1
mode=1024x600
[launcher]
icon=/usr/share/icons/locolor/32x32/apps/gvim.png
path=/usr/bin/weston-terminal
[autolaunch]
path=/usr/bin/weston-terminal
```
```weston.ini
backend=headless-backend.so
overrides defaults backend. Available backend modules in the /usr/lib/x86_64-linux-
gnu/weston directory are:
drm-backend.so
fbdev-backend.so
headless-backend.so
rdp-backend.so
rpi-backend.so
wayland-backend.so
x11-backend.so
```
output name 对应 /sys/class/drm 下的视频输出节点。
```bash
sudo -E XDG_RUNTIME_DIR="/run/user/1000" weston-launch --tty=/dev/tty2 --user=cat
usermod -aG video user123
usermod -a -G weston-launch user-name
gst-play-1.0 Big_Buck_Bunny_720_10s_30MB.mp4 --videosink=waylandsink0
apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
```
<https://wayland.pages.freedesktop.org/weston/toc/running-weston.html#running-weston-on-a-different-seat-on-a-stand-alone-back-end>