diff --git a/Makefile b/Makefile index e58dc5f..b293a30 100644 --- a/Makefile +++ b/Makefile @@ -53,8 +53,16 @@ setup-services: sudo systemctl daemon-reload sudo systemctl enable getty@tty1.service seatd.service +.PHONY: setup-user-services +setup-user-services: + sudo ln -fs $(PWD)/system/weston.service /etc/systemd/user/weston.service + sudo ln -fs $(PWD)/system/weston.socket /etc/systemd/user/weston.socket + sudo systemctl --user daemon-reload + sudo systemctl --user enable weston + + .PHONY: install -install: remove-passwd setup-rasp-config apt-install setup-weston setup-rasp-config setup-services +install: remove-passwd setup-rasp-config apt-install setup-weston setup-rasp-config setup-services setup-user-services .PHONY: clean clean: diff --git a/system/weston.service b/system/weston.service new file mode 100644 index 0000000..30c58e7 --- /dev/null +++ b/system/weston.service @@ -0,0 +1,23 @@ +[Unit] +Description=Weston, a Wayland compositor, as a user service + +# Activate using a systemd socket +Requires=weston.socket +After=weston.socket + +# Since we are part of the graphical session, make sure we are started before +Before=graphical-session.target + +[Service] +Type=notify +TimeoutStartSec=60 +WatchdogSec=20 +# Defaults to journal +#StandardOutput=journal +StandardError=journal + +# add a ~/.config/weston.ini and weston will pick-it up +ExecStart=/usr/bin/weston --modules=systemd-notify.so --shell=kiosk-shell.so --xwayland -- kitty --hold make -C /opt/forge-invar run + +[Install] +WantedBy=graphical-session.target diff --git a/system/weston.socket b/system/weston.socket new file mode 100644 index 0000000..e69de29