2.0 KiB
2.0 KiB
关于 Weston 的一些配置
Error running systemd as user - Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined
The quick solution
Assuming someuser uses bash as their login shell, add the following exports to ~someuser/.profile [1]:
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
Then, a user with root/sudo privileges can interact with someuser's systemd by wrapping the command with runuser:
sudo runuser someuser -l -c "systemctl --user enable ipfs"
sudo runuser someuser -l -c "systemctl --user start ipfs"
runuser someuser -l -c "printenv" can help to troubleshoot these and other exported environment variables.
apt install weston
/etc/xdg/weston/weston.ini
[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
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
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