Skip to content

fixes: improve login environment handling#114

Merged
javalsai merged 10 commits into
masterfrom
shell-login
Feb 7, 2026
Merged

fixes: improve login environment handling#114
javalsai merged 10 commits into
masterfrom
shell-login

Conversation

@javalsai

@javalsai javalsai commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Copy of the commit descriptions so far:

  • chore(organization): allow nested header and c files
    Basically now we can have src/*/*.c and include/*/*.h. Avoid mental overhead will many files and big files. Notably util became 4 separate files, very clear and separate logic, IMO it feels much better, I gotta group more things (e.g. auth with pam, ui and ui_state, and desktop and desktop_exec) but now its possible.
  • lidm now calls bash (or other shells, depends on PACKAGE cfg) in login mode as a session wrapper to source most env (can be disabled). this fixes a lot of env problems with all /etc/profile and more
  • implemented a musl compatible version of execvpe and now lidm should search for PATH everywhere it needs to
  • search_path now also checks if the found binary is properly executable
  • lidm now uses confstr for a decent PATH default if none is found
  • logs are unbuffered for cases where debug logs appear empty (exit without handlers moment)

Drafting this because I haven't really polished things already but it should look fine.

@javalsai javalsai marked this pull request as draft February 6, 2026 22:05
* lidm now calls `bash` (or other shells, depends on PACKAGE cfg) in
  login mode as a session wrapper to source most env (can be disabled)
* this fixes a lot of env problems with all `/etc/profile` and more

Extra:
* implemented a musl compatible version of `execvpe` and now lidm should
  search for PATH everywhere it needs to
* `search_path` now also checks if the found binary is properly
  executable
* lidm now uses `confstr` for a decent PATH default if none is found
* logs are unbuffered for cases where debug logs appear empty (exit
  without handlers moment)
* clean includes
* merge keys.h files
* simplify some (exec) logic
* nullability type specifiers
@javalsai javalsai marked this pull request as ready for review February 7, 2026 00:37
@javalsai

javalsai commented Feb 7, 2026

Copy link
Copy Markdown
Owner Author

looks good, good to review, idk what could have possible broken the musl build in the last commit, and thats it

@javalsai javalsai requested a review from grialion February 7, 2026 00:47
@javalsai

javalsai commented Feb 7, 2026

Copy link
Copy Markdown
Owner Author

oh and this should fix at least partially #83

@javalsai javalsai linked an issue Feb 7, 2026 that may be closed by this pull request
@grialion

grialion commented Feb 7, 2026

Copy link
Copy Markdown
Collaborator

implemented a musl compatible version of execvpe and now lidm should search for PATH everywhere it needs to

didn't I do this the last time? 9ce7cd6

@javalsai

javalsai commented Feb 7, 2026

Copy link
Copy Markdown
Owner Author

implemented a musl compatible version of execvpe and now lidm should search for PATH everywhere it needs to

didn't I do this the last time?

Yes but now it's built into an execvpe function that's the same as the gnu one but implemented so that it should work on musl too.

@grialion grialion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Other than this workflow everything seems to be working fine.

@javalsai javalsai merged commit 0b2d0bd into master Feb 7, 2026
10 checks passed
@javalsai javalsai deleted the shell-login branch February 7, 2026 16:12
@javalsai javalsai mentioned this pull request Feb 7, 2026
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.

Bash shell in login shell mode

2 participants