Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
```
Expand Down
62 changes: 62 additions & 0 deletions desktop_config/plasma.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/sh

set -e -u

# Source common configuration scripts
. "${cwd}/common_config/autologin.sh"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Undefined variable 'cwd' used for sourcing

Please define 'cwd' before using it, such as with cwd=$(dirname "$0"), or use an explicit path.

. "${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 <<EOF > "${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
10 changes: 10 additions & 0 deletions packages/plasma
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plasma6-plasma
sddm
firefox
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicated, like @pkgdemon mentioned.

dolphin
kate
ark
kcalc
kate
gwenview
okular
10 changes: 10 additions & 0 deletions packages/vital/plasma
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
plasma6-plasma
sddm
firefox
dolphin
kate
kcalc
kate
gwenview
okular
ark