Fix .xinitrc path and improve UI visibility in installation#12
Merged
Fix .xinitrc path and improve UI visibility in installation#12
Conversation
- 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.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts 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 exitsequenceDiagram
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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Consider avoiding the hard-coded
/home/ghostbsd/.xinitrcpath by using something likeos.path.expanduser('~ghostbsd/.xinitrc')or a shared config constant so it stays correct if the home directory layout changes again. - The new
.xinitrcwrite block would benefit from basic error handling (e.g., catchingOSError) 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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/usr/home/ghostbsd/to/home/ghostbsd/for correct FreeBSD home directory handlingThese 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:
Enhancements: