ITADN

nwg-displays silently fails if the monitors.conf file is read-only.

#115Closedhakan-demirli 创建于 2026-02-08
H
hakan-demirlicommented
nwg-displays silently fails if the monitors.conf file is read-only. I use nixos/home-manager, which use read-only links to `/nix/store`. It was fixed but, this PR has been reverted recently: https://github.com/nwg-piotr/nwg-displays/pull/97 <details><summary>Click to expand</summary> ```bash ❯ nwg-displays Error loading json: [Errno 2] No such file or directory: '/home/emre/.config/nwg-displays/active_profile.json' Running on Hyprland eDP-1 {'active': True, 'mirror': '', 'scale_filter': None, 'modes': [{'width': 1920, 'height': 1080, 'refresh': 144000.0}, {'width': 1920, 'height': 1080, 'refresh': 60020.0}, {'width': 1680, 'height': 1050, 'refresh': 144000.0}, {'width': 1280, 'height': 1024, 'refresh': 144000.0}, {'width': 1440, 'height': 900, 'refresh': 144000.0}, {'width': 1280, 'height': 800, 'refresh': 144000.0}, {'width': 1280, 'height': 720, 'refresh': 144000.0}, {'width': 1024, 'height': 768, 'refresh': 144000.0}, {'width': 800, 'height': 600, 'refresh': 144000.0}, {'width': 640, 'height': 480, 'refresh': 144000.0}], 'focused': True, 'adaptive_sync_status': 'disabled', 'description': 'Chimei Innolux Corporation 0x1521', 'x': 0, 'y': 1080, 'refresh': 144.0, 'logical-width': 1920.0, 'logical-height': 1080.0, 'physical-width': 1920, 'physical-height': 1080, 'transform': 'normal', 'scale': 1.0, 'dpms': True, 'ten_bit': False, 'model': '0x1521', 'monitor': <__gi__.GdkWaylandMonitor object at 0x7f4f77007cc0 (GdkWaylandMonitor at 0x5605ffb77ca0)>} Traceback (most recent call last): File "/nix/store/6wf0lz88jcyrp3xjy5p2d5i6pqswlfzk-nwg-displays-0.3.27/lib/python3.13/site-packages/nwg_displays/main.py", line 630, in on_apply_button SettingsApplier.apply_from_gui( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ display_buttons, ^^^^^^^^^^^^^^^^ ...<5 lines>... profile_name=profile_name, ^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/nix/store/6wf0lz88jcyrp3xjy5p2d5i6pqswlfzk-nwg-displays-0.3.27/lib/python3.13/site-packages/nwg_displays/settings_applier/settings_applier.py", line 164, in apply_from_gui SettingsApplier._apply_hyprland_gui( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ display_buttons, ^^^^^^^^^^^^^^^^ ...<5 lines>... profile_name, ^^^^^^^^^^^^^ ) ^ File "/nix/store/6wf0lz88jcyrp3xjy5p2d5i6pqswlfzk-nwg-displays-0.3.27/lib/python3.13/site-packages/nwg_displays/settings_applier/settings_applier.py", line 323, in _apply_hyprland_gui save_list_to_text_file(lines, outputs_path) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/nix/store/6wf0lz88jcyrp3xjy5p2d5i6pqswlfzk-nwg-displays-0.3.27/lib/python3.13/site-packages/nwg_displays/tools.py", line 332, in save_list_to_text_file text_file = open(file_path, "w") OSError: [Errno 30] Read-only file system: '/home/emre/.config/hypr/monitors.conf' ``` </details>
关闭于 2026-02-09 0 条评论