fixes: improve login environment handling#114
Merged
Merged
Conversation
* 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
Owner
Author
|
looks good, good to review, idk what could have possible broken the musl build in the last commit, and thats it |
Owner
Author
|
oh and this should fix at least partially #83 |
Collaborator
didn't I do this the last time? 9ce7cd6 |
Owner
Author
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
approved these changes
Feb 7, 2026
grialion
left a comment
Collaborator
There was a problem hiding this comment.
Other than this workflow everything seems to be working fine.
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.
Copy of the commit descriptions so far:
Basically now we can have
src/*/*.candinclude/*/*.h. Avoid mental overhead will many files and big files. Notablyutilbecame 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.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/profileand moreexecvpeand now lidm should search for PATH everywhere it needs tosearch_pathnow also checks if the found binary is properly executableconfstrfor a decent PATH default if none is foundDrafting this because I haven't really polished things already but it should look fine.