diff --git a/README.md b/README.md index 851f488..e111dba 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The purpose of this tool is to quickly generate live images for GhostBSD. ## Features * Build GhostBSD from packages -* Mate and XFCE desktop environments +* Mate, XFCE, Kde Plasma 6 desktop environments * Hybrid DVD/USB image ## Graphics support @@ -54,6 +54,10 @@ or ``` ./build.sh -d xfce -b unstable ``` +#### (Option) To build GhostBSD with __KDE Plasma 6__ as default desktop +``` +./build.sh -d plasma -b unstable +``` ## Burn an image to cd: ``` diff --git a/desktop_config/plasma.sh b/desktop_config/plasma.sh new file mode 100644 index 0000000..b4429cf --- /dev/null +++ b/desktop_config/plasma.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +set -e -u + +# Source common configuration scripts +. "${cwd}/common_config/autologin.sh" +. "${cwd}/common_config/base-setting.sh" +. "${cwd}/common_config/finalize.sh" +. "${cwd}/common_config/setuser.sh" + +sddm_setup() { + # Path to SDDM config + sddm_conf="${release}/etc/sddm.conf" + + # Create or update SDDM configuration + if [ ! -f "${sddm_conf}" ]; then + cat < "${sddm_conf}" +[Autologin] +User=${live_user} +Session=plasma + +[Theme] +Current=breeze + +[General] +Numlock=on +EOF + else + # Ensure required sections exist and update keys + grep -q "^\[Autologin\]" "${sddm_conf}" || echo "[Autologin]" >> "${sddm_conf}" + sed -i '' "s@^User=.*@User=${live_user}@" "${sddm_conf}" || echo "User=${live_user}" >> "${sddm_conf}" + sed -i '' "s@^Session=.*@Session=plasma@" "${sddm_conf}" || echo "Session=plasma" >> "${sddm_conf}" + + grep -q "^\[Theme\]" "${sddm_conf}" || echo "[Theme]" >> "${sddm_conf}" + sed -i '' "s@^Current=.*@Current=breeze@" "${sddm_conf}" || echo "Current=breeze" >> "${sddm_conf}" + + grep -q "^\[General\]" "${sddm_conf}" || echo "[General]" >> "${sddm_conf}" + sed -i '' "s@^Numlock=.*@Numlock=on@" "${sddm_conf}" || echo "Numlock=on" >> "${sddm_conf}" + fi +} + +setup_xinit() { + # Disable screen locking in KDE Plasma for live_user + chroot "${release}" su "${live_user}" -c " + mkdir -p /home/${live_user}/.config + kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key Autolock false + kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key LockOnResume false + echo 'exec ck-launch-session startplasma-x11' >> /home/${live_user}/.xinitrc + " + + # Set the same .xinitrc for root and skel + echo "exec ck-launch-session startplasma-x11" > "${release}/root/.xinitrc" + echo "exec ck-launch-session startplasma-x11" > "${release}/usr/share/skel/dot.xinitrc" +} + +# Execute setup routines +patch_etc_files +community_setup_liveuser +community_setup_autologin +sddm_setup +setup_xinit +final_setup diff --git a/packages/plasma b/packages/plasma new file mode 100644 index 0000000..29a15dc --- /dev/null +++ b/packages/plasma @@ -0,0 +1,10 @@ +plasma6-plasma +sddm +firefox +dolphin +kate +ark +kcalc +kate +gwenview +okular diff --git a/packages/vital/plasma b/packages/vital/plasma new file mode 100644 index 0000000..affc801 --- /dev/null +++ b/packages/vital/plasma @@ -0,0 +1,10 @@ +plasma6-plasma +sddm +firefox +dolphin +kate +kcalc +kate +gwenview +okular +ark