2024-06-03 08:43:27 +08:00
|
|
|
# 关于 Weston 的一些配置
|
|
|
|
|
|
|
|
Error running systemd as user - Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined
|
|
|
|
|
2024-06-28 10:22:07 +08:00
|
|
|
先:
|
2024-06-03 08:43:27 +08:00
|
|
|
|
2024-06-28 10:22:07 +08:00
|
|
|
```bash
|
|
|
|
echo $UID
|
|
|
|
```
|
2024-06-03 08:43:27 +08:00
|
|
|
|
2024-06-28 10:22:07 +08:00
|
|
|
在 /etc/default/locale 或 /etc/environment 中设置:
|
2024-06-03 08:43:27 +08:00
|
|
|
|
2024-06-28 10:22:07 +08:00
|
|
|
```bash
|
|
|
|
XDG_RUNTIME_DIR="/run/user/${UID}"
|
|
|
|
DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
|
|
|
|
RUNLEVEL=3
|
2024-06-03 08:43:27 +08:00
|
|
|
```
|
|
|
|
|
2024-06-28 10:22:07 +08:00
|
|
|
其中的 ${UID} 和 ${XDG_RUNTIME_DIR} 要用实际值替代。
|
|
|
|
|
2024-06-03 08:43:27 +08:00
|
|
|
```bash
|
|
|
|
apt install weston
|
2024-07-03 10:12:35 +08:00
|
|
|
vim /etc/xdg/weston/weston.ini
|
2024-06-03 08:43:27 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
```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
|
2024-06-14 16:57:47 +08:00
|
|
|
|
|
|
|
[autolaunch]
|
|
|
|
path=/usr/bin/weston-terminal
|
2024-06-03 08:43:27 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
```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
|
|
|
|
```
|
|
|
|
|
2024-06-13 14:29:39 +08:00
|
|
|
output name 对应 /sys/class/drm 下的视频输出节点。
|
|
|
|
|
2024-06-03 08:43:27 +08:00
|
|
|
```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
|
|
|
|
```
|
|
|
|
|
2024-06-03 15:53:06 +08:00
|
|
|
<https://wayland.pages.freedesktop.org/weston/toc/running-weston.html#running-weston-on-a-different-seat-on-a-stand-alone-back-end>
|