Skip to content
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

[BUG] Reading configuration file from read-only filesystem fails. #650

Closed
RobertZenz opened this issue Oct 19, 2023 · 4 comments · Fixed by #652
Closed

[BUG] Reading configuration file from read-only filesystem fails. #650

RobertZenz opened this issue Oct 19, 2023 · 4 comments · Fixed by #652
Assignees
Labels
bug Something isn't working

Comments

@RobertZenz
Copy link

Describe the bug

When starting btop on a read-only filesystem (with a btop.conf present at the right location), btop complains that it can't find $HOME nor $XDG_CONFIG_HOME, the configuration file is not read and btop reverts to its defaults.

Remounting the filesystem as read-write allows btop to start with the correct configuration.

I guess this is related to #637.

To Reproduce

Have a read-only filesystem on which the configuration resides.

Expected behavior

btop should at least start with the configuration that is present, and then complain that it can't write changes to it.

@RobertZenz RobertZenz added the bug Something isn't working label Oct 19, 2023
@imwints
Copy link
Contributor

imwints commented Oct 23, 2023

Yeah, the current config check fails if $HOME or $XDG_CONFIG_HOME are not writable.

I have created a branch that should allow read only configuration files. I'd like you to test it before creating a PR.
It works on a read only tmpfs

@RobertZenz
Copy link
Author

Yes, that does work as expected, thank you.

However, there is now no message at all that the configuration could not be saved, which isn't ideal either.

@imwints
Copy link
Contributor

imwints commented Oct 24, 2023

I've updated the branch, it now also warns if the config dir resides on a read only filesystem

@RobertZenz
Copy link
Author

Neat! Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants