Skip to content

Instantly share code, notes, and snippets.

@rkitover
Last active June 10, 2023 17:10
Show Gist options
  • Save rkitover/715c1ba5fb1dc3cbb1f1a3ff51a103f2 to your computer and use it in GitHub Desktop.
Save rkitover/715c1ba5fb1dc3cbb1f1a3ff51a103f2 to your computer and use it in GitHub Desktop.
weston.service for systemd
[Unit]
Description=Weston Wayland compositor startup
RequiresMountsFor=/run
[Service]
User=rkitover
EnvironmentFile=-/etc/default/weston
Environment="XDG_RUNTIME_DIR=/run/user/1000"
Environment="DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/dbus/user_bus_socket"
ExecStartPre=/usr/bin/sudo /bin/mkdir -p /run/user/1000/dbus
ExecStartPre=/usr/bin/sudo /bin/chown -R rkitover:rkitover /run/user/1000/dbus
ExecStartPre=/bin/chmod -R 0700 /run/user/1000
ExecStart=/usr/bin/sudo -E -- /usr/bin/openvt -v -w -s -- su rkitover -l -c "XDG_RUNTIME_DIR=/run/user/1000 /usr/bin/weston-launch -- $OPTARGS 2>~/.weston-errors"
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment