-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run Weston as user linaro within a systemd --user session. Signed-off-by: Daniel Díaz <[email protected]>
- Loading branch information
Showing
3 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
inherit systemd | ||
|
||
SRC_URI += "file://weston.ini \ | ||
file://weston.service \ | ||
file://weston@.service \ | ||
file://71-weston-drm.rules \ | ||
" | ||
|
||
do_install_append() { | ||
install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini | ||
|
||
# Remove upstream weston.service | ||
rm ${D}${systemd_unitdir}/system/weston.service | ||
|
||
# Install Weston systemd service and accompanying udev rule | ||
install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_unitdir}/system/weston.service | ||
install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_unitdir}/system/weston@.service | ||
sed -i -e s:/etc:${sysconfdir}:g \ | ||
-e s:/usr/bin:${bindir}:g \ | ||
-e s:/var:${localstatedir}:g \ | ||
${D}${systemd_unitdir}/system/weston.service | ||
${D}${systemd_unitdir}/system/weston@.service | ||
install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \ | ||
${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules | ||
} | ||
|
||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini" | ||
FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_unitdir}/system/[email protected]" | ||
|
||
CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini" | ||
|
||
SYSTEMD_SERVICE_${PN} = "weston.service" | ||
SYSTEMD_SERVICE_${PN} = "weston@%i.service" | ||
SYSTEMD_AUTO_ENABLE = "disable" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston.service" | ||
ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="weston@linaro.service" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ [email protected] plymouth-quit.service | |
After=systemd-user-sessions.service [email protected] plymouth-quit-wait.service | ||
|
||
[Service] | ||
User=root | ||
User=%i | ||
PermissionsStartOnly=true | ||
|
||
# Log us in via PAM so we get our XDG & co. environment and | ||
|
@@ -29,7 +29,7 @@ EnvironmentFile=-/etc/default/weston | |
# Weston does not successfully change VT, nor does systemd place us on | ||
# the VT it just activated for us. Switch manually: | ||
ExecStartPre=/usr/bin/chvt 7 | ||
ExecStart=/usr/bin/weston --log=/var/log/weston.log $OPTARGS | ||
ExecStart=/usr/bin/weston --log=${XDG_RUNTIME_DIR}/weston.log $OPTARGS | ||
|
||
IgnoreSIGPIPE=no | ||
|
||
|