Skip to content

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SunilSherkhane
Copy link

@SunilSherkhane SunilSherkhane commented Jun 15, 2025

KDE Plasma package has been added to the script. Tried and tested and it works normally. need to modify common packages and move it to DE Specific

Summary by Sourcery

Add KDE Plasma 6 as a supported desktop environment in the build script with its own configuration and packaging directories.

New Features:

  • Introduce a new plasma.sh script to configure SDDM autologin and X init for KDE Plasma.
  • Add "-d plasma" build option in README and command-line interface to select KDE Plasma as the default desktop.
  • Create skeleton directories for Plasma packages under packages/plasma and packages/vital/plasma.

Documentation:

  • Update README with instructions for building GhostBSD with KDE Plasma 6.

Adding plasma packages
Adding plasma packages to vital
update the KDE plasma 6 build step
@SunilSherkhane SunilSherkhane requested review from a team as code owners June 15, 2025 07:59
Copy link
Contributor

sourcery-ai bot commented Jun 15, 2025

Reviewer's Guide

This PR adds support for building GhostBSD with KDE Plasma 6 by extending the documentation with a new build option, introducing a dedicated plasma.sh configuration script for SDDM and xinit, and creating placeholder directories for Plasma packages.

Sequence Diagram for Plasma Desktop Configuration via plasma.sh

sequenceDiagram
    actor User
    participant B as "build.sh"
    participant P as "desktop_config/plasma.sh"
    participant SF as "System Files & Configs"

    User->>B: Execute ./build.sh -d plasma
    B->>P: Invoke for Plasma setup
    P->>P: Source common_config/*sh
    P->>SF: Apply generic patches (patch_etc_files)
    P->>SF: Setup live user (community_setup_liveuser)
    P->>SF: Setup autologin (community_setup_autologin)
    P->>P: Perform SDDM setup (sddm_setup)
    activate P
    P->>SF: Configure /etc/sddm.conf (Autologin, Theme, Session)
    deactivate P
    P->>P: Perform Xinit setup (setup_xinit)
    activate P
    P->>SF: Configure kscreenlockerrc for live_user (disable autolock)
    P->>SF: Configure .xinitrc for live_user, root, skel (startplasma-x11)
    deactivate P
    P->>SF: Apply final setup (final_setup)
    P-->>B: Plasma configuration complete
    B-->>User: GhostBSD image with KDE Plasma built
Loading

File-Level Changes

Change Details Files
Add Plasma build option to documentation
  • Introduced '-d plasma' flag description
  • Updated README with KDE Plasma 6 build command
README.md
Introduce KDE Plasma configuration script
  • Source common configuration scripts
  • Implement SDDM autologin, theme, and session settings
  • Configure xinitrc to disable screen locking and start Plasma
  • Execute setup routines (patch, user, autologin, SDDM, xinit, finalize)
desktop_config/plasma.sh
Add placeholder directories for Plasma packages
  • Create 'packages/plasma' directory
  • Create 'packages/vital/plasma' directory
packages/plasma
packages/vital/plasma

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @SunilSherkhane - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `desktop_config/plasma.sh:6` </location>
<code_context>
+set -e -u
+
+# Source common configuration scripts
+. "${cwd}/common_config/autologin.sh"
+. "${cwd}/common_config/base-setting.sh"
+. "${cwd}/common_config/finalize.sh"
</code_context>

<issue_to_address>
Undefined variable 'cwd' used for sourcing

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

### Comment 2
<location> `desktop_config/plasma.sh:48` </location>
<code_context>
+    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
+  "
+
</code_context>

<issue_to_address>
Appending .xinitrc exec line without idempotency check

This can cause duplicate lines; check if the line exists before appending.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
    kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key LockOnResume false
    echo 'exec ck-launch-session startplasma-x11' >> /home/${live_user}/.xinitrc
  "
=======
    kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key LockOnResume false
    grep -qxF 'exec ck-launch-session startplasma-x11' /home/${live_user}/.xinitrc || echo 'exec ck-launch-session startplasma-x11' >> /home/${live_user}/.xinitrc
  "
>>>>>>> REPLACE

</suggested_fix>

### Comment 3
<location> `desktop_config/plasma.sh:53` </location>
<code_context>
+
+  # 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"
+}
+
</code_context>

<issue_to_address>
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.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

Comment on lines +47 to +49
kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key LockOnResume false
echo 'exec ck-launch-session startplasma-x11' >> /home/${live_user}/.xinitrc
"
Copy link
Contributor

Choose a reason for hiding this comment

The 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
kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key LockOnResume false
echo 'exec ck-launch-session startplasma-x11' >> /home/${live_user}/.xinitrc
"
kwriteconfig5 --file /home/${live_user}/.config/kscreenlockerrc --group Daemon --key LockOnResume false
grep -qxF 'exec ck-launch-session startplasma-x11' /home/${live_user}/.xinitrc || 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"
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): 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.

@xcrsz
Copy link

xcrsz commented Jun 15, 2025

Sunil, are you volunteering to take responsibility for addressing all future KDE Plasma-related questions and issues? If we are to include KDE Plasma as an option, we need a dedicated technical lead to manage and support it. We want to avoid placing the burden on Eric to troubleshoot and maintain every desktop environment offered.

@ericbsd
Copy link
Member

ericbsd commented Jun 18, 2025

@SunilSherkhane I am waiting only to answer @xcrsz question.

@SunilSherkhane
Copy link
Author

@SunilSherkhane I am waiting only to answer @xcrsz question.

Sure, I will answer the questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants