Add weston.ini, run service as user aiy
- Add a weston.ini file, to allow better configuration of Weston
- Update the systemd service to run as aiy, in /home/aiy
- Move the log file to XDG_RUNTIME_DIR
Change-Id: Ibc644ebf90a9ae776293b0c88df4023426387a60
diff --git a/debian/etc/xdg/weston/weston.ini b/debian/etc/xdg/weston/weston.ini
new file mode 100644
index 0000000..61e7ecd
--- /dev/null
+++ b/debian/etc/xdg/weston/weston.ini
@@ -0,0 +1,11 @@
+[core]
+shell=desktop-shell.so
+xwayland=true
+
+[shell]
+background-image=/usr/share/weston/background.png
+background-type=scale
+allow-zap=false
+
+[keyboard]
+vt-switching=true
diff --git a/debian/lib/systemd/system/weston.service b/debian/lib/systemd/system/weston.service
index ba222e5..de8baae 100644
--- a/debian/lib/systemd/system/weston.service
+++ b/debian/lib/systemd/system/weston.service
@@ -5,7 +5,8 @@
After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service
[Service]
-User=root
+User=aiy
+WorkingDirectory=/home/aiy
PermissionsStartOnly=true
# Log us in via PAM so we get our XDG & co. environment and
@@ -29,7 +30,7 @@
# Weston does not successfully change VT, nor does systemd place us on
# the VT it just activated for us. Switch manually:
ExecStartPre=/bin/chvt 7
-ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log --xwayland $OPTARGS
+ExecStart=/usr/bin/weston-launch -- --log=${XDG_RUNTIME_DIR}/weston.log
IgnoreSIGPIPE=no
diff --git a/debian/weston-imx.install b/debian/weston-imx.install
index 96b3c85..b2d36bb 100644
--- a/debian/weston-imx.install
+++ b/debian/weston-imx.install
@@ -1 +1,2 @@
+debian/etc /
debian/lib /