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

lightdm is writing config files to / #187963

Closed
kurumushi opened this issue Aug 23, 2022 · 7 comments · Fixed by #199881
Closed

lightdm is writing config files to / #187963

kurumushi opened this issue Aug 23, 2022 · 7 comments · Fixed by #199881

Comments

@kurumushi
Copy link

Describe the bug

On a fresh install, lightdm is writing several files to /
These should probably be either in /root or in some other runtime directory.config .cache and .gtkrc-2.0

[kris@kris:~]$ ls -la /
total 4
drwxr-xr-x   1 root root  144 Aug 23 14:59 .
drwxr-xr-x   1 root root  144 Aug 23 14:59 ..
drwxr-xr-x   1 root root    4 Aug 23 14:58 bin
drwxr-xr-x   1 root root   78 Aug 23 14:51 boot
drwxr-xr-x   1 root root   80 Aug 23 14:59 .cache
drwxr-xr-x   1 root root   44 Aug 23 14:59 .config
drwxr-xr-x  20 root root 4100 Aug 23 14:58 dev
drwxr-xr-x   1 root root 1162 Aug 23 14:58 etc
-rw-r--r--   1 root root  438 Aug 23 14:59 .gtkrc-2.0
drwxr-xr-x   1 root root    8 Aug 23 14:51 home
drwxr-xr-x   1 root root   94 Aug 19 13:41 mnt
drwxr-xr-x   1 root root   16 Aug 23 14:37 nix
dr-xr-xr-x 359 root root    0 Aug 23 14:58 proc
drwx------   1 root root  106 Aug 23 15:00 root
drwxr-xr-x  23 root root  640 Aug 23 15:03 run
drwxr-xr-x   1 root root    0 Aug 23 14:51 srv
dr-xr-xr-x  13 root root    0 Aug 23 14:58 sys
drwxrwxrwt   1 root root 1414 Aug 23 15:01 tmp
drwxr-xr-x   1 root root    6 Aug 23 14:51 usr
drwxr-xr-x   1 root root   82 Aug 23 14:58 var

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install NixOS with X enabled, using the default lightdm display manager.
  2. As soon as the display manager starts, files are written to /

Expected behavior

That my / will stay clean.

Additional context

If I stop display-manager.service, delete the files, then restart it, the files return.

Looking in my /etc/passwd, shows that lightdm does have a home directory set at /var/lib/lightdm. But for some reason these files are not being written there as they should be.

Notify maintainers

@davidak
@bobby285271

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[kris@kris:~]$ nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.06 MiB download, 0.30 MiB unpacked):
  /nix/store/qz0niwvp5q62zf8mrqg277ajmc66haa2-bash-interactive-5.1-p8-dev
copying path '/nix/store/qz0niwvp5q62zf8mrqg277ajmc66haa2-bash-interactive-5.1-p8-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.110, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.16`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@kurumushi
Copy link
Author

I just realized after I posted this that I used an old iso from 21.11 to install. So I reinstalled with 22.05, and this still happens

 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.60, NixOS, 22.05 (Quokka), 22.05.2609.52527082ea2`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - channels(root): `"nixos-22.05.2609.52527082ea2"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

@bobby285271
Copy link
Member

Are you using KDE Plasma? Can you reproduce the issue with SDDM?

@kurumushi
Copy link
Author

I am using KDE. The issue also happens with SDDM. I went ahead and tested GDM as well (while still using plasma,) and it does not happen.

@bobby285271
Copy link
Member

bobby285271 commented Aug 23, 2022

I can reproduce. For my case, in /.cache I saw one single file with ksycoca5_ prefix, after some search it is likely cache for kbuildsycoca5 (libsForQt5.kservice). I have no idea what that package does so far though.

@kurumushi
Copy link
Author

All the files in my / are exactly the files being generated in desktop-managers/plasma5.nix

@azahi
Copy link
Member

azahi commented Aug 23, 2022

I can reproduce this with Plasma 5/SDDM on nixpkgs-unstable.

@Yarny0
Copy link
Contributor

Yarny0 commented Nov 6, 2022

I also observed these files, tracked down the problem and prepared a pull-request that -- hopefully -- fixes the issue: #199881 . I came to the conclusion that it is best to entirely remove the code that creates those file. However, I feel a bit unconfident about my solution, so it would be good to have it tested by more users. If you can spare the time, please have a look at my draft pull request, maybe try my solution, and feel free to report back or even drop a review. Thanks a lot!

inclyc added a commit to inclyc/flakes that referenced this issue Jan 12, 2023
These commands create horrible directories & files: /.gtkrc and /.cache
during system boot. The patch is a workaround of NixOS/nixpkgs#199881,
NixOS/nixpkgs#187963.

Link: NixOS/nixpkgs#187963
Link: NixOS/nixpkgs#199881 (review)
inclyc added a commit to inclyc/flakes that referenced this issue Feb 25, 2023
These commands create horrible directories & files: /.gtkrc and /.cache

during system boot. The patch is a workaround of NixOS/nixpkgs#199881,

NixOS/nixpkgs#187963.



Link: NixOS/nixpkgs#187963

Link: NixOS/nixpkgs#199881 (review)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants