Skip to content

Commit

Permalink
kde fixes, remove lightdm
Browse files Browse the repository at this point in the history
switches to systemd launching plasma session
  • Loading branch information
Seshpenguin committed Oct 14, 2023
1 parent 635a174 commit cbc46b3
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 2 deletions.
9 changes: 9 additions & 0 deletions distro-files/layout/etc/pam.d/kde
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#%PAM-1.0

auth include system-login

account include system-login

password include system-login

session include system-login
55 changes: 55 additions & 0 deletions distro-files/layout/etc/systemd/system/plasma-desktop.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[Unit]
Description=Plasma Mobile shell

# Make sure we are started after logins are permitted.
After=systemd-user-sessions.service
# If Plymouth is used, we want to start when it is on its way out.
After=plymouth-quit-wait.service

# D-Bus is necessary for contacting logind. Logind is required.
Wants=dbus.socket
After=dbus.socket

# This scope is created by pam_systemd when logging in as the user.
# This directive is a workaround to a systemd bug, where the setup of the
# user session by PAM has some race condition, possibly leading to a failure.
# See README for more details.
After=session-c1.scope

# Since we are part of the graphical session, make sure we are started before
# it is complete.
Before=graphical.target

# Prevent starting on systems without virtual consoles
ConditionPathExists=/dev/tty0

# Restart a maximum of 5 times in 30 seconds
StartLimitBurst=5
StartLimitIntervalSec=30

[Service]
ExecStart=dbus-run-session /opt/kde/usr/lib/libexec/plasma-dbus-run-session-if-needed /opt/kde/usr/lib/libexec/startplasma-dev.sh -wayland
TimeoutStartSec=30
User=1000
PAMName=login
WorkingDirectory=~
Restart=on-failure
RestartSec=5s

# A virtual terminal is needed.
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

# Fail to start if not controlling the tty.
StandardInput=tty-fail
StandardOutput=journal
StandardError=journal

# Log this user with utmp, letting it show up with commands 'w' and 'who'.
UtmpIdentifier=tty7
UtmpMode=user

[Install]
WantedBy=graphical.target
55 changes: 55 additions & 0 deletions distro-files/layout/etc/systemd/system/plasma-mobile.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[Unit]
Description=Plasma Mobile shell

# Make sure we are started after logins are permitted.
After=systemd-user-sessions.service
# If Plymouth is used, we want to start when it is on its way out.
After=plymouth-quit-wait.service

# D-Bus is necessary for contacting logind. Logind is required.
Wants=dbus.socket
After=dbus.socket

# This scope is created by pam_systemd when logging in as the user.
# This directive is a workaround to a systemd bug, where the setup of the
# user session by PAM has some race condition, possibly leading to a failure.
# See README for more details.
After=session-c1.scope

# Since we are part of the graphical session, make sure we are started before
# it is complete.
Before=graphical.target

# Prevent starting on systems without virtual consoles
ConditionPathExists=/dev/tty0

# Restart a maximum of 5 times in 30 seconds
StartLimitBurst=5
StartLimitIntervalSec=30

[Service]
ExecStart=dbus-run-session /opt/kde/usr/lib/libexec/plasma-dbus-run-session-if-needed /opt/kde/usr/lib/libexec/startplasmamobile-dev.sh
TimeoutStartSec=30
User=1000
PAMName=login
WorkingDirectory=~
Restart=on-failure
RestartSec=5s

# A virtual terminal is needed.
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

# Fail to start if not controlling the tty.
StandardInput=tty-fail
StandardOutput=journal
StandardError=journal

# Log this user with utmp, letting it show up with commands 'w' and 'who'.
UtmpIdentifier=tty7
UtmpMode=user

[Install]
WantedBy=graphical.target
5 changes: 5 additions & 0 deletions distro-files/layout/etc/xdg/applications-blacklistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0

[Applications]
blacklist=cuttlefish,org.kde.plasma.themeexplorer,org.kde.klipper,ciborium,syncmonitorhelper,org.kde.okular,wordview,assistant,assistant-qt5,designer,designer-qt5,linguist,linguist-qt5,org.kde.perusecreator,UserFeedbackConsole,org.kde.kuserfeedback-console,avahi-discover,bssh,bvnc,ktelnetservice5,qv4l2,qvidcap
5 changes: 5 additions & 0 deletions distro-files/layout/etc/xdg/kdeglobals
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0

[General]
BrowserApplication[$e]=!angelfish
5 changes: 5 additions & 0 deletions distro-files/layout/etc/xdg/kscreenlockerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: None
# SPDX-License-Identifier: CC0-1.0

[Daemon]
LockOnStart=true
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ EOF`);
systemctl enable prolinux-setup
systemctl enable prolinuxd
systemctl enable getty@tty0
systemctl enable lightdm
#systemctl enable lightdm
mkdir -pv /opt/build-info
echo "${buildnum},${builduuid},prolinux,${PROLINUX_VARIANT},${PROLINUX_CHANNEL},$(date),prolinux-root-${PROLINUX_VARIANT}-${PROLINUX_CHANNEL}.squish,${arch}" >> /opt/build-info/prolinux-info.txt
Expand Down
3 changes: 3 additions & 0 deletions src/os-variants/embedded/embedded-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export async function buildEmbeddedDev() {
exec(`sudo arch-chroot ${ROOTFS_DIR} /bin/bash -x <<'EOF'
# base system packages
sudo pacman -S --noconfirm xorg
systemctl disable plasma-mobile
systemctl enable plasma-desktop
EOF`);
// todo setup desktop defaults
}
8 changes: 8 additions & 0 deletions src/os-variants/mobile/mobile-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ EOF`);
mkdir -pv /usr/share/xsessions/ /usr/share/wayland-sessions/ /etc/dbus-1/
/opt/kde/build/plasma-workspace/login-sessions/install-sessions.sh
/opt/kde/build/plasma-mobile/bin/install-sessions.sh
echo "auth optional pam_kwallet5.so" >> /etc/pam.d/lightdm
echo "session optional pam_kwallet5.so auto_start" >> /etc/pam.d/lightdm
echo "auth optional pam_kwallet5.so" >> /etc/pam.d/login
echo "session optional pam_kwallet5.so auto_start" >> /etc/pam.d/login
systemctl enable plasma-mobile
EOF`);

// unmount cache folder
Expand Down

0 comments on commit cbc46b3

Please sign in to comment.