You are not logged in.

#1 2022-06-30 05:43

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 453

Is there actually a way to get xdg user-dirs to stop?

So, what I've done on my new install:

updated ~/.config/user-dirs.dirs and commented out all the directories I don't want auto-created.  It contineues to create them.
updated ~/.configtde/user-dirs.dirs and commented out all the directories I don't want created.  It continues.
updated ~/.config/user-dirs.dirs and added enabled=False.  Directories continue to be created.
udpated ~/.configtde/user-dirs.dirs and added enabled=False.  More of the same still being created.
updated /etc/xdg/user-dirs.conf and changed enabled=True to enabled=False.  After doing that, ran xdg-user-dirs-update.  Directories still being created.
updated /etc/xdg/user-dirs.defaults and commented out all the directories I didn't want created.  After doing that, ran xdg-user-dirs-update.  Directories still being created.
Did a chmod -x on /usr/bin/xdg-user-dirs-update to try to prevent it from running.  Accomplished nothing, the directories are still created on each reboot.

Is there a way to keep these directories from being created anymore, or is xdg user-dirs just broken that it ignores it's config files and just keeps creating them regardless?

Last edited by tlmiller76 (2022-06-30 05:58)


Q4OS Trinity machine - Lenovo K14 Gen1 AMD.  AMD Ryzen R5-5650U, 32GB DDR4, 1TB SSD, Vega 7, Realtek 8852 Wifi 6E + BT 5.2.

Offline

#2 2022-06-30 06:03

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,295

Re: Is there actually a way to get xdg user-dirs to stop?

Have a look in /etc/xdg/autostart

There are 2 *user-dirs*.desktop files in there that I think you'll find are behind this. Pretty much every linux on the planet runs something like this to ensure standard directories are created.

Try just moving those out of autostart and see what happens. There *may* be something lurking in your /home/nnnnn that still tries to do it.

Offline

#3 2022-07-01 02:28

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 453

Re: Is there actually a way to get xdg user-dirs to stop?

This MAY have worked.  there's only 1 file in htere, but commenting out EVERY line in it, shut down, and when I started back up, I didn't have those irritating directories.  Hopefully this gets rid of that once and for all.  I hate xdg-user-dirs on q4 so much, every other distro I've ever used creates them, but if you delete them, they don't come back.  This one they just keep coming back, like bad sushi...

Last edited by tlmiller76 (2022-07-01 02:29)


Q4OS Trinity machine - Lenovo K14 Gen1 AMD.  AMD Ryzen R5-5650U, 32GB DDR4, 1TB SSD, Vega 7, Realtek 8852 Wifi 6E + BT 5.2.

Offline

#4 2022-07-01 10:32

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: Is there actually a way to get xdg user-dirs to stop?

We will take a look why the XDG directories are forcefully created at login time. That shouldn't do that.

Offline

#5 2022-07-06 08:27

medianjoe
Member
Registered: 2021-10-24
Posts: 28

Re: Is there actually a way to get xdg user-dirs to stop?

tlmiller76 wrote:

This MAY have worked.  there's only 1 file in htere, but commenting out EVERY line in it, shut down, and when I started back up, I didn't have those irritating directories.  Hopefully this gets rid of that once and for all.  I hate xdg-user-dirs on q4 so much, every other distro I've ever used creates them, but if you delete them, they don't come back.  This one they just keep coming back, like bad sushi...

Like you say, I only found one file. I commented out all lines but it didn't work for me. The folders immediately come back when I try to delete them.

Offline

#6 2022-07-06 12:18

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,295

Re: Is there actually a way to get xdg user-dirs to stop?

Interesting - in other Debian Plasma dists you get:-

/etc/xdg/autostart/xdg-user-dirs.desktop > /bin/xdg-user-dirs-update

and

/etc/xdg/autostart/user-dirs-update-gtk.desktop > /bin/xdg-user-dirs-gtk-update

Presumably you have gone into the .config and .kdeconfig folders in your /home/ and commented out the folders you do not want in user-dirs.dirs?

Then there's /etc/apparmor.d/tunables/xdg-user-dirs - which I think is worth a look!

Offline

#7 2022-07-06 23:48

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 453

Re: Is there actually a way to get xdg user-dirs to stop?

.config and .tdeconfig (there is no .kdeconfig since I don't have KDE) yes, as mentioned in first post.  That did all of absolutely nothing.

As to there being the 2 files, I'm currently on my straight up standard Debian 11 laptop, and I still only have /etc/xdg/autostart/xdg-user-dirs.desktop in the /etc/xdg/autostart folder, and it's a local file, not a link to a binary.  Although on this machine it created those folders correctly the first time I logged in, then never recreated them after I deleted them.

I did nothing with the /etc/apparmor.d/tunables file, but so far after commenting out the entire contents of the /etc/xdg/autostart/xdg-user-dirs.desktop and shutting down, the directories have stayed away for the last 3 or 4 boots, so it appears that may have finally resolved it.  Although it does leave the question as to why Debian proper correctly creates the directories on first login, then if you delete them it correctly ignore said folders no longer existing, while q4os quite vehemently refuses to keep creating them again, and again, and again....

Last edited by tlmiller76 (2022-07-06 23:50)


Q4OS Trinity machine - Lenovo K14 Gen1 AMD.  AMD Ryzen R5-5650U, 32GB DDR4, 1TB SSD, Vega 7, Realtek 8852 Wifi 6E + BT 5.2.

Offline

#8 2022-07-07 05:44

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,295

Re: Is there actually a way to get xdg user-dirs to stop?

Correct - they are just local files - but they are .desktops and I was just illustrating the exec line in them.

It does seem that Q4OS is different in this respect as the *gtk desktop and bin file are not there.

How that could have an influence i do not know.

Glad to hear that you have achieved your goal even though it was a bit of a slash and burn way of getting there.

Offline

#9 2022-07-07 13:49

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: Is there actually a way to get xdg user-dirs to stop?

We have made some investigation and concluded Q4OS deals with the XDG directories consistently with a plain Debian 11 with Trinity desktop installation. The default Debian installation behaves exactly the same way as Q4OS. Debian-11 re-creates user's XDG directories on each user login, if they were removed. So we don't consider that as a Q4OS bug.

tlmiller76 wrote:

... /etc/xdg/autostart/xdg-user-dirs.desktop ... commenting out EVERY line in it ...

This is not a clean way to achieve the goal. On an update the file will revert back. We assume the clean way would be to edit the ".configtde/user-dirs.dirs" and ".config/user-dirs.dirs" files and redirect unwanted XDG directories to a hidden folder, for example:

XDG_MUSIC_DIR="$HOME/.hidden_music"

or even to the /tmp/:

XDG_MUSIC_DIR="/tmp/music_tmp"

and finally remove the unwanted folder from $HOME.
-

tlmiller76 wrote:

I'm currently on my straight up standard Debian 11 laptop ... Although on this machine it created those folders correctly the first time I logged in, then never recreated them after I deleted them.

We were not able to reproduce such behavior. Testing Debian 11 installation with Trinity desktop always re-creates XDG folders the same way as Q4OS. Maybe you are using another DE ?

Offline

#10 2022-07-09 04:45

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 453

Re: Is there actually a way to get xdg user-dirs to stop?

q4osteam wrote:

We have made some investigation and concluded Q4OS deals with the XDG directories consistently with a plain Debian 11 with Trinity desktop installation. The default Debian installation behaves exactly the same way as Q4OS. Debian-11 re-creates user's XDG directories on each user login, if they were removed. So we don't consider that as a Q4OS bug.

tlmiller76 wrote:

... /etc/xdg/autostart/xdg-user-dirs.desktop ... commenting out EVERY line in it ...

This is not a clean way to achieve the goal. On an update the file will revert back. We assume the clean way would be to edit the ".configtde/user-dirs.dirs" and ".config/user-dirs.dirs" files and redirect unwanted XDG directories to a hidden folder, for example:

XDG_MUSIC_DIR="$HOME/.hidden_music"

or even to the /tmp/:

XDG_MUSIC_DIR="/tmp/music_tmp"

and finally remove the unwanted folder from $HOME.
-

As I mentioned in the FIRST post, this is the FIRST thing I tried is editing this file.  It does NOTHING.  It straight up IGNORES any changes to this file and still recreates the default folders.  Redirecting them to a different folder it ignores as well, as I tried redirecting them to XDG_MUSIC_DIR="$HOME/.local/share/Trash" and it still created the $HOME/Music folder.

tlmiller76 wrote:

I'm currently on my straight up standard Debian 11 laptop ... Although on this machine it created those folders correctly the first time I logged in, then never recreated them after I deleted them.

We were not able to reproduce such behavior. Testing Debian 11 installation with Trinity desktop always re-creates XDG folders the same way as Q4OS. Maybe you are using another DE ?

Yes, I only use Trinity on q4os, on Debian proper (and every other OS I use, for that matter) I use Plasma.  But the Q4OS plasma build has too much added to it (even on a minimal installation) for me to consider installing that version.

I don't use Trinity on plain Debian because I have no idea how to get the TDE Menu to do the classic + categories view instead of the horribly convoluted mutli-submenu that it defaults to in classic mode without the q4os menu switcher.  Which seems like a minor reason to avoid running it, but I'm REALLY anal retentive about menu's, and how they work.  One of the reasons I have never been able to tolerate XFCE, there isn't a usable menu for it IMO.

Last edited by tlmiller76 (2022-07-09 04:50)


Q4OS Trinity machine - Lenovo K14 Gen1 AMD.  AMD Ryzen R5-5650U, 32GB DDR4, 1TB SSD, Vega 7, Realtek 8852 Wifi 6E + BT 5.2.

Offline

#11 2022-07-09 11:23

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: Is there actually a way to get xdg user-dirs to stop?

tlmiller76 wrote:

As I mentioned in the FIRST post, this is the FIRST thing I tried is editing this file.  It does NOTHING.  It straight up IGNORES any changes to this file and still recreates the default folders.  Redirecting them to a different folder it ignores as well, as I tried redirecting them to XDG_MUSIC_DIR="$HOME/.local/share/Trash" and it still created the $HOME/Music folder.

We are not able to reproduce such bearing. Redirecting, as we have mentioned in our previous post, worked fine on our testing machines, Q4OS Gemini TDE, Basic profile. Would you have a suggestion how to reproduce the misbehavior you have stated ? Or as exact as possible steps to reproduce that for us to be able to investigate.

We can only confirm, if some of XDG entries are missing from the ".config(tde)/user-dirs.dirs" they are re-created on user login. However it's consistent with our testing on a plain Debian installation.

Offline

#12 2022-07-17 06:51

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,295

Re: Is there actually a way to get xdg user-dirs to stop?

tlmiller76 wrote:

I don't use Trinity on plain Debian because I have no idea how to get the TDE Menu to do the classic + categories view instead of the horribly convoluted mutli-submenu that it defaults to in classic mode without the q4os menu switcher.  Which seems like a minor reason to avoid running it, but I'm REALLY anal retentive about menu's, and how they work.  One of the reasons I have never been able to tolerate XFCE, there isn't a usable menu for it IMO.

Not sure if this is what you mean, but it sounds like you want to get the standard TDE menu.

You can get there my removing the @tde-applications-menu symlink in ~/.configtde/menus

https://imgur.com/FqwbFOR

Offline

#13 2022-07-18 23:45

tlmiller76
Member
From: AZ, USA
Registered: 2016-11-29
Posts: 453

Re: Is there actually a way to get xdg user-dirs to stop?

bin wrote:
tlmiller76 wrote:

I don't use Trinity on plain Debian because I have no idea how to get the TDE Menu to do the classic + categories view instead of the horribly convoluted mutli-submenu that it defaults to in classic mode without the q4os menu switcher.  Which seems like a minor reason to avoid running it, but I'm REALLY anal retentive about menu's, and how they work.  One of the reasons I have never been able to tolerate XFCE, there isn't a usable menu for it IMO.

Not sure if this is what you mean, but it sounds like you want to get the standard TDE menu.

You can get there my removing the @tde-applications-menu symlink in ~/.configtde/menus

https://imgur.com/FqwbFOR

At some point I need to test if it really is that easy.  big_smile  That would be awesome.


Q4OS Trinity machine - Lenovo K14 Gen1 AMD.  AMD Ryzen R5-5650U, 32GB DDR4, 1TB SSD, Vega 7, Realtek 8852 Wifi 6E + BT 5.2.

Offline

Board footer

Powered by FluxBB