Skip to content

tmpfiles.d/login.conf: Fix /var/lib/lightdm ownership - #911

Merged
leolost2605 merged 2 commits into
mainfrom
leolost/drop-lightdm-tmpfile
Oct 9, 2026
Merged

leolost2605 merged 2 commits into
mainfrom
leolost/drop-lightdm-tmpfile

Conversation

@leolost2605

@leolost2605 leolost2605 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

/var/lib/lightdm has to be owned by lightdm
and not by root otherwise we get a bunch of
problems when running (the directory is used
for conf and cache etc. by apps running in
the greeter)
The manual creation of /var/lib/lightdm/data is
unnecessary so replace it by a fix that makes
sure /var/lib/lightdm is actually owned by lightdm.

@jumpyvi

jumpyvi commented Oct 9, 2026

Copy link
Copy Markdown
Member

Did you try it out?

Without it, lightdm just didn't start a all for me

@leolost2605

Copy link
Copy Markdown
Member Author

Yep. I built the daily image locally, installed it with the .iso and sudo elementary-install on a vm, booted into it and it works like on main both on first boot with no user and on subsequent boots with users. Just to be extra sure and make sure I didn't mix something up I looked into /usr/lib/tmpfiles.d and there was in fact no login.conf in there.
Did I miss something?

@jumpyvi
jumpyvi self-requested a review October 9, 2026 14:57
@jumpyvi
jumpyvi marked this pull request as ready for review October 9, 2026 14:57
@jumpyvi
jumpyvi marked this pull request as draft October 9, 2026 14:58
@leolost2605
leolost2605 marked this pull request as ready for review October 9, 2026 15:07
@leolost2605

Copy link
Copy Markdown
Member Author

@jumpyvi ig we can merge this but like I said in #912 it unfortunately doesn't fix the issue. Any idea what else could create that folder with root ownership?

@jumpyvi

jumpyvi commented Oct 9, 2026

Copy link
Copy Markdown
Member

@jumpyvi ig we can merge this but like I said in #912 it unfortunately doesn't fix the issue. Any idea what else could create that folder with root ownership?

Maybe just change the tmpfile so it creates it with the lightdm group?

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Installer builds for 4a4d2cc

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20261009150841.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20261009150845.iso sha256

/var/lib/lightdm has to be owned by lightdm
and not by root otherwise we get a bunch of
problems when running (the directory is used
for conf and cache etc. by apps running in
the greeter)
The manual creation of /var/lib/lightdm/data is
unnecessary so replace it by a fix that makes
sure /var/lib/lightdm is actually owned by lightdm.
@leolost2605
leolost2605 force-pushed the leolost/drop-lightdm-tmpfile branch from 4a4d2cc to 921f56d Compare October 9, 2026 21:31
@leolost2605 leolost2605 changed the title Drop lightm tmp file tmpfiles.d/login.conf: Fix /var/lib/lightdm ownership Oct 9, 2026
@leolost2605

Copy link
Copy Markdown
Member Author

I removed the special handling of /var/lib/lightdm/data but because /var/lib/lightdm still gets created with root as the owner I added a special handling for /var/lib/lightdm. This now does fix the issue for me (apart from the icon theme, see elementary/greeter#902)

However that very much feels like a workaround (I mean why does it work on the normal system??) so I would much rather find who actually creates that directory with root as the owner. Though I also have to say I don't have much experience in configuring a system like this, especially with image based OS's, so maybe it's not a workaround after all and just a normal thing to do?

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Installer builds for 921f56d

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20261009213222.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20261009213220.iso sha256

@jumpyvi

jumpyvi commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

@leolost2605

I just checked, for some reason, /var/lib/lightdm is chowned to lightdm in the Ubuntu package postinst.

/var is not kept, it's supposed to be a runtime/machine-specific directory, I find it very weird that Ubuntu would do permissions changes to /var in a postinst script...

So we do have to keep your workaround.

Feel free to merge if you feel like it's good.

Ref:

https://launchpadlibrarian.net/847271145/lightdm_1.32.0-6ubuntu4.debian.tar.xz
https://paste.opensuse.org/pastes/1542e8166747

@leolost2605

leolost2605 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

@jumpyvi thanks for the investigation! Then ig this makes sense so I dropped the workaround comment :)

@leolost2605
leolost2605 enabled auto-merge (squash) October 9, 2026 22:51
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Installer builds for 8b07209

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20261009224857.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20261009224855.iso sha256

@leolost2605
leolost2605 merged commit 5215b29 into main Oct 9, 2026
3 of 6 checks passed
@leolost2605
leolost2605 deleted the leolost/drop-lightdm-tmpfile branch October 9, 2026 23:16
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.

2 participants