-
-
Notifications
You must be signed in to change notification settings - Fork 37
KDE Plasma package has been added to the script. #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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" | ||||||||||||||
. "${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 | ||||||||||||||
" | ||||||||||||||
Comment on lines
+47
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (bug_risk): Appending .xinitrc exec line without idempotency check This can cause duplicate lines; check if the line exists before appending.
Suggested change
|
||||||||||||||
|
||||||||||||||
# 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" | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (bug_risk): Skeleton file named 'dot.xinitrc' instead of '.xinitrc' The file in the skel directory should be named '.xinitrc' (with a leading dot) to ensure it is correctly copied to new user home directories. 'dot.xinitrc' will not be recognized by default. |
||||||||||||||
} | ||||||||||||||
|
||||||||||||||
# Execute setup routines | ||||||||||||||
patch_etc_files | ||||||||||||||
community_setup_liveuser | ||||||||||||||
community_setup_autologin | ||||||||||||||
sddm_setup | ||||||||||||||
setup_xinit | ||||||||||||||
final_setup |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
plasma6-plasma | ||
sddm | ||
firefox | ||
dolphin | ||
kate | ||
ark | ||
kcalc | ||
kate | ||
gwenview | ||
okular |
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 |
There was a problem hiding this comment.
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.