1
0
forked from brl/citadel

Simplify launching of default realm.

Also remove sway launcher
This commit is contained in:
Bruce Leidl 2024-05-21 12:57:11 -04:00
parent 147c5b3546
commit 9872870a92
6 changed files with 12 additions and 44 deletions

View File

@ -8,10 +8,8 @@ DEPENDS = ""
S = "${WORKDIR}" S = "${WORKDIR}"
DEFAULT_REALM_UNITS = "\ DEFAULT_REALM_UNITS = "\
file://systemd/launch-default-realm.path \ file://systemd/citadel-launch-default-realm.path \
file://systemd/launch-default-realm.service \ file://systemd/citadel-launch-default-realm.service \
file://systemd/watch-run-user.path \
file://systemd/watch-run-user.service \
" "
MODPROBE_CONFIG = "\ MODPROBE_CONFIG = "\
@ -48,7 +46,6 @@ SRC_URI = "\
file://citadel-installer.desktop \ file://citadel-installer.desktop \
file://citadel-installer-ui.desktop \ file://citadel-installer-ui.desktop \
file://systemd/zram-swap.service \ file://systemd/zram-swap.service \
file://systemd/sway-session-switcher.service \
file://systemd/x11-session-switcher.service \ file://systemd/x11-session-switcher.service \
file://systemd/citadel-installer-backend.service \ file://systemd/citadel-installer-backend.service \
file://systemd/installer-session-switcher.service \ file://systemd/installer-session-switcher.service \
@ -77,7 +74,7 @@ RDEPENDS:${PN} = "bash"
inherit allarch systemd useradd inherit allarch systemd useradd
SYSTEMD_SERVICE:${PN} = "zram-swap.service watch-run-user.path sway-session-switcher.service x11-session-switcher.service citadel-installer-backend.service installer-session-switcher.service citadel-setpassword.service" SYSTEMD_SERVICE:${PN} = "zram-swap.service citadel-launch-default-realm.path x11-session-switcher.service citadel-installer-backend.service installer-session-switcher.service citadel-setpassword.service"
do_install() { do_install() {
install -m 0755 -d ${D}/storage install -m 0755 -d ${D}/storage
@ -117,7 +114,6 @@ do_install() {
install -m 644 ${WORKDIR}/systemd/zram-swap.service ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/zram-swap.service ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/systemd/sway-session-switcher.service ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/systemd/x11-session-switcher.service ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/x11-session-switcher.service ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/systemd/citadel-installer-backend.service ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/citadel-installer-backend.service ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/systemd/installer-session-switcher.service ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/installer-session-switcher.service ${D}${systemd_system_unitdir}
@ -127,10 +123,8 @@ do_install() {
install -d ${D}${systemd_user_unitdir}/gnome-session@citadel-installer.target.d install -d ${D}${systemd_user_unitdir}/gnome-session@citadel-installer.target.d
install -m 644 ${WORKDIR}/systemd/user/gnome-session@citadel-installer.target.d/session.conf ${D}${systemd_user_unitdir}/gnome-session@citadel-installer.target.d install -m 644 ${WORKDIR}/systemd/user/gnome-session@citadel-installer.target.d/session.conf ${D}${systemd_user_unitdir}/gnome-session@citadel-installer.target.d
install -m 644 ${WORKDIR}/systemd/watch-run-user.path ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/citadel-launch-default-realm.path ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/systemd/watch-run-user.service ${D}${systemd_system_unitdir} install -m 644 ${WORKDIR}/systemd/citadel-launch-default-realm.service ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/systemd/launch-default-realm.path ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/systemd/launch-default-realm.service ${D}${systemd_system_unitdir}
# skel files for new realms # skel files for new realms
install -m 644 -T ${WORKDIR}/skel/profile ${D}${sysconfdir}/skel/.profile install -m 644 -T ${WORKDIR}/skel/profile ${D}${sysconfdir}/skel/.profile

View File

@ -1,6 +1,11 @@
[Unit] [Unit]
Description=Wait for creation of PA and Wayland sockets before launching first realm. Description=Wait for creation of PA and Wayland sockets before launching first realm.
Wants=run-user-1000.mount
After=run-user-1000.mount
[Path] [Path]
PathChanged=/run/user/1000/pulse/native PathChanged=/run/user/1000/pulse/native
PathChanged=/run/user/1000/wayland-0 PathChanged=/run/user/1000/wayland-0
[Install]
WantedBy=graphical.target

View File

@ -1,5 +1,6 @@
[Unit] [Unit]
Description=Launch default realm Description=Launch default realm
ConditionPathExists=!/run/realms ConditionPathExists=!/run/realms
ConditionPathExists=/realms/default.realm ConditionPathExists=/realms/default.realm
ConditionPathExists=/run/user/1000/pulse/native ConditionPathExists=/run/user/1000/pulse/native
@ -10,3 +11,4 @@ ConditionPathExists=/run/user/1000/wayland-0
ExecStart=/usr/libexec/citadel-boot start-realms ExecStart=/usr/libexec/citadel-boot start-realms
Type=oneshot Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes

View File

@ -1,16 +0,0 @@
[Unit]
Description=Sway Session Switcher
After=accounts-daemon.service
Before=gdm.service
ConditionKernelCommandLine=citadel.sway
[Service]
Type=oneshot
RemainAfterExit=no
ExecStartPre=-/usr/bin/plymouth message --text="Setting session to sway"
ExecStart=/usr/bin/busctl call org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User SetXSession s "sway"
[Install]
WantedBy=graphical.target

View File

@ -1,10 +0,0 @@
[Unit]
Description=Watch for creation of /run/user/1000
After=run-user-1000.mount
Requires=run-user-1000.mount
[Path]
PathChanged=/run/user/1000
[Install]
WantedBy=multi-user.target

View File

@ -1,7 +0,0 @@
[Unit]
Description=Watch run-user service
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl --no-block start launch-default-realm.path
RemainAfterExit=yes