-
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.
xserver-nodm: run via systemd user session
Signed-off-by: Daniel Díaz <[email protected]>
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
recipes-graphics/xserver-nodm-init/xserver-nodm-init/71-xserver-drm.rules
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
ACTION=="add", SUBSYSTEM=="drm", KERNEL=="card0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="[email protected]" |
31 changes: 31 additions & 0 deletions
31
recipes-graphics/xserver-nodm-init/xserver-nodm-init/[email protected]
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[Unit] | ||
Description=Xserver startup with a display manager (on tty7) | ||
RequiresMountsFor=/run | ||
Conflicts[email protected] plymouth-quit.service | ||
After=systemd-user-sessions.service [email protected] plymouth-quit-wait.service | ||
|
||
[Service] | ||
User=%i | ||
PermissionsStartOnly=true | ||
|
||
# Log us in via PAM so we get our XDG & co. environment and | ||
# are treated as logged in so we can use the tty: | ||
PAMName=login | ||
|
||
# Grab tty7 | ||
UtmpIdentifier=tty7 | ||
TTYPath=/dev/tty7 | ||
TTYReset=yes | ||
TTYVHangup=yes | ||
TTYVTDisallocate=yes | ||
|
||
# stderr to journal so our logging doesn't get thrown into /dev/null | ||
StandardOutput=tty | ||
StandardInput=tty | ||
StandardError=journal | ||
|
||
EnvironmentFile=-/etc/default/xserver-nodm | ||
ExecStart=/etc/X11/Xserver vt7 $OPTARGS | ||
|
||
#[Install] | ||
#Alias=display-manager.service |
1 change: 1 addition & 0 deletions
1
recipes-graphics/xserver-nodm-init/xserver-nodm-init/xserver-system
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
ARGS="-logfile ${XDG_RUNTIME_DIR}/Xorg.log" |
28 changes: 28 additions & 0 deletions
28
recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.%.bbappend
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
SRC_URI += "file://[email protected] \ | ||
file://71-xserver-drm.rules \ | ||
file://xserver-system \ | ||
" | ||
|
||
do_install_append() { | ||
install -D -p -m0644 ${WORKDIR}/xserver-system \ | ||
${D}${sysconfdir}/X11/xserver-system | ||
|
||
# Remove upstream xserver-nodm.service | ||
rm ${D}${systemd_unitdir}/system/xserver-nodm.service | ||
|
||
# Install Xserver systemd service and accompanying udev rule | ||
install -D -p -m0644 ${WORKDIR}/xserver-nodm@.service \ | ||
${D}${systemd_unitdir}/system/xserver-nodm@.service | ||
sed -i -e s:/etc:${sysconfdir}:g \ | ||
-e s:/usr/bin:${bindir}:g \ | ||
-e s:/var:${localstatedir}:g \ | ||
${D}${systemd_unitdir}/system/xserver-nodm@.service | ||
install -D -p -m0644 ${WORKDIR}/71-xserver-drm.rules \ | ||
${D}${sysconfdir}/udev/rules.d/71-xserver-drm.rules | ||
} | ||
|
||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
FILES_${PN} += "${systemd_unitdir}/system/[email protected]" | ||
|
||
SYSTEMD_SERVICE_${PN} = "xserver-nodm@%i.service" | ||
SYSTEMD_AUTO_ENABLE = "disable" |