Bug 465744 - xdg user dirs (Downloads, Music, Pictures, etc.) not created
Summary: xdg user dirs (Downloads, Music, Pictures, etc.) not created
Status: CONFIRMED
Alias: None
Product: neon
Classification: KDE Neon
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: HI normal
Target Milestone: ---
Assignee: Neon Bugs
URL: https://github.com/systemd/systemd/is...
Keywords:
: 465947 466114 474518 480645 481692 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-02-15 06:08 UTC by logicalwillow
Modified: 2024-02-23 02:33 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description logicalwillow 2023-02-15 06:08:36 UTC
On new installations of Neon, the Downloads, Music, Pictures, Videos, etc. folders aren't created, and don't show up in the Places sidebar in Dolphin. This also happens when creating a new user.
Comment 1 Patrick Silva 2023-02-17 16:48:54 UTC
*** Bug 465947 has been marked as a duplicate of this bug. ***
Comment 2 Patrick Silva 2023-02-20 01:28:36 UTC
*** Bug 466114 has been marked as a duplicate of this bug. ***
Comment 3 Crusty Curmudgeon 2023-02-26 11:46:07 UTC
Also in VM installation using both neon-user-20230214-1145.iso and 20230214-0250/neon-testing-20230214-0250.iso.

No user directories added at installation or when adding users after install.
Comment 5 Patrick Silva 2023-09-14 11:12:29 UTC
*** Bug 474518 has been marked as a duplicate of this bug. ***
Comment 6 guimarcalsilva 2023-09-16 18:56:23 UTC
I'm not a programmer, but I found a file https://invent.kde.org/neon/neon/settings/-/blob/Neon/unstable/debian/neon-settings-2.postinst which is the postinstall script for neon-settings-2, which I'm guessing is responsible for setting-up Neon. I'm not sure, but would the fix for this bug be as simple as adding xdg-user-dirs-update somewhere in that file, or is that the wrong place for that?
Comment 7 Malte S. Stretz 2023-09-18 11:16:02 UTC
Thanks for digging up the tool which is supposed to fix the issue :-) The postinst script is the wrong place though since that would create the folders for root (only). According to the man page it

> is normally run automatically at the start of a user session to update the XDG user dirs according to the users locale

So for X there should probably be a snippet in /etc/X11/Xsession.d to do so. Since I'll switch to Wayland anyway, I'll try to dig up the proper place to have it called there...
Comment 8 Malte S. Stretz 2023-09-18 11:21:50 UTC
Actually, the file /etc/xdg/autostart/xdg-user-dirs.desktop exists on my machine and should execute that command. It obviously isn't (neither for X nor for Wayland) or maybe "X-KDE-autostart-phase=1" (whatever that means) is the wrong phase?
Comment 9 Malte S. Stretz 2023-09-18 11:42:53 UTC
Looks like recent Neon uses systemd's xdg-autostart-generator (https://systemd.io/DESKTOP_ENVIRONMENTS/#xdg-autostart-integration) and somehow that unit/desktop file is not picked up:

> systemctl --user list-units --all '*@autostart.service'
>   UNIT                                            LOAD   ACTIVE   SUB     DESCRIPTION         
>   app-geoclue\x2ddemo\x2dagent@autostart.service  loaded active   running Geoclue Demo agent
>   app-kaccess@autostart.service                   loaded active   running Accessibility
>   app-klipper@autostart.service                   loaded inactive dead    Klipper
>   app-kup\x2ddaemon@autostart.service             loaded inactive dead    Kup
>   app-lts_eol@autostart.service                   loaded inactive dead    Neon LTS End of Life
>   app-org.kde.discover.notifier@autostart.service loaded inactive dead    Discover
>   app-org.kde.kdeconnect.daemon@autostart.service loaded active   running KDE Connect
>   app-org.kde.plasma\x2dwelcome@autostart.service loaded inactive dead    Welcome Center
> 
> LOAD   = Reflects whether the unit definition was properly loaded.
> ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
> SUB    = The low-level unit activation state, values depend on unit type.
> 8 loaded units listed.
> To show all installed unit files use 'systemctl list-unit-files'.
Comment 10 Malte S. Stretz 2023-09-18 11:53:38 UTC
This was reported to systemd by Rex Dieter in early 2021 and is supposedly fixed since February this year. Sounds to me like KDE Neon either
(a) needs to update/backport systemd (yuck)
(b) remove the offending line from the desktop file
(c) add an explicit systemd user unit like Arch does according to that bug report
Comment 11 Patrick Silva 2024-02-01 15:25:03 UTC
*** Bug 480645 has been marked as a duplicate of this bug. ***
Comment 12 Patrick Silva 2024-02-23 01:47:27 UTC
*** Bug 481692 has been marked as a duplicate of this bug. ***