Skip to content

Fix .xinitrc path and improve UI visibility in installation#12

Merged
ericbsd merged 1 commit intomasterfrom
fix/xinitrc-path-and-ui
Dec 10, 2025
Merged

Fix .xinitrc path and improve UI visibility in installation#12
ericbsd merged 1 commit intomasterfrom
fix/xinitrc-path-and-ui

Conversation

@ericbsd
Copy link
Member

@ericbsd ericbsd commented Dec 10, 2025

  • Change .xinitrc path from /usr/home/ghostbsd/ to /home/ghostbsd/ for correct FreeBSD home directory handling
  • Fix indentation of .xinitrc writelines() calls to be inside the file context manager (prevents potential file write errors)
  • Add explicit label2.show() call in InstallWindow to ensure progress label visibility during installation

These changes ensure proper file handling in "Try Live" mode and improve installation UI feedback reliability.

Summary by Sourcery

Update installation behavior to use the correct GhostBSD home directory for .xinitrc creation and ensure the installation progress label is always visible.

Bug Fixes:

  • Correct the .xinitrc path to use /home/ghostbsd and ensure all write operations occur within the file context manager.

Enhancements:

  • Explicitly show the secondary installation label to improve progress visibility during installation.

- Change .xinitrc path from `/usr/home/ghostbsd/` to `/home/ghostbsd/` for
  correct FreeBSD home directory handling
- Fix indentation of .xinitrc writelines() calls to be inside the file context
  manager (prevents potential file write errors)
- Add explicit label2.show() call in InstallWindow to ensure progress label
  visibility during installation

These changes ensure proper file handling in "Try Live" mode and improve
installation UI feedback reliability.
@ericbsd ericbsd requested review from a team as code owners December 10, 2025 21:36
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 10, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the .xinitrc location and writing context to match FreeBSD home directory semantics and ensure all lines are written safely, and makes the installation progress label explicitly visible in the UI.

Sequence diagram for handling Try Live .xinitrc creation and exit

sequenceDiagram
    actor User
    participant GtkButton as GtkButton
    participant InterfaceController as InterfaceController
    participant FileSystem as FileSystem
    participant GtkMain as GtkMain

    User ->> GtkButton: click Try_Live
    GtkButton ->> InterfaceController: next_page(button)
    InterfaceController ->> InterfaceController: detect_Try_Live_page
    InterfaceController ->> FileSystem: open /home/ghostbsd/.xinitrc mode_w
    activate FileSystem
    FileSystem -->> InterfaceController: file_handle
    InterfaceController ->> FileSystem: writelines housekeeping_command
    InterfaceController ->> FileSystem: writelines screensaver_command
    InterfaceController ->> FileSystem: writelines mate_session_command
    FileSystem -->> InterfaceController: flush_and_close
    deactivate FileSystem
    InterfaceController ->> GtkMain: main_quit()
    GtkMain -->> User: exit_installer_start_session
Loading

File-Level Changes

Change Details Files
Correct .xinitrc creation path and ensure all configuration lines are written within the file context manager.
  • Update .xinitrc target path from /usr/home/ghostbsd/.xinitrc to /home/ghostbsd/.xinitrc to align with FreeBSD home directory handling.
  • Indent subsequent writelines() calls so they execute inside the with-open context, ensuring the file handle is valid for all writes and avoiding partial or failed writes.
install_station/interface_controller.py
Improve installation progress label visibility during the install process.
  • Explicitly call show() on the secondary status/progress label so it is rendered during installation, avoiding cases where it remains hidden depending on container behavior.
install_station/install.py

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

@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 there - I've reviewed your changes - here's some feedback:

  • Consider avoiding the hard-coded /home/ghostbsd/.xinitrc path by using something like os.path.expanduser('~ghostbsd/.xinitrc') or a shared config constant so it stays correct if the home directory layout changes again.
  • The new .xinitrc write block would benefit from basic error handling (e.g., catching OSError) to avoid crashing the flow if the file cannot be created or written.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider avoiding the hard-coded `/home/ghostbsd/.xinitrc` path by using something like `os.path.expanduser('~ghostbsd/.xinitrc')` or a shared config constant so it stays correct if the home directory layout changes again.
- The new `.xinitrc` write block would benefit from basic error handling (e.g., catching `OSError`) to avoid crashing the flow if the file cannot be created or written.

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.

@ericbsd ericbsd merged commit 9178230 into master Dec 10, 2025
2 checks passed
@ericbsd ericbsd deleted the fix/xinitrc-path-and-ui branch December 10, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant