Disable ~/Desktop folder creation

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderator: trava90

Post Reply
User avatar
lunario
Moongazer
Moongazer
Posts: 10
Joined: 2019-12-01, 20:25

Disable ~/Desktop folder creation

Post by lunario » 2020-06-24, 07:44

I do not use any standard folders like ~/Desktop, ~/Videos, ~/Downloads etc. on my linux system, so I don't want them in my home directory. I disabled all of them in the xdg default settings, but ~/Desktop keeps being created whenever i launch palemoon. Even when I disable all extensions it creates ~/Desktop upon launching the browser, so it is not related to any extensions as far as I can tell.
Is there some way to disable its creation? It must be related to the palemoon settings somehow. (obviously , i already set the download folder to ~/ so that's not what is causing the problem.).

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1164
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: Disable ~/Desktop folder creation

Post by Isengrim » 2020-06-24, 10:16

This was previously reported here: Issue #1220 (UXP)

Edit: Also found this bug, which may be applicable. What do you have XDG_DESKTOP_DIR set to, and what happens if you append a slash to the end of that value, e.g. XDG_DESKTOP_DIR="$HOME/" ?
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit), Windows 10 build 1803 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 27008
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Disable ~/Desktop folder creation

Post by Moonchild » 2020-06-24, 15:19

I looked into it a bit more and it seems it's a case of "you can't have the cake and eat it too". The Red Hat sourced by-specification xdg_user_dir_lookup specifically looks for $HOME/ to determine if a path is relative, and if so flags it as relative and strips $HOME/ from it. That works for all relative paths using $HOME as a prefix, except $HOME without a slash - which results in an absolute treatment, which fails, and then our surrounding code falls back to $HOME/Desktop (mostly for historical reasons).
If we'd remove the fallback, it would fail on older systems in a more severe way; if we'd change the behavior of xdg_user_dir_lookup then it would behave differently in all other situations which would be worse too.
"There will be times when the position you advocate, no matter how well framed and supported, will not be accepted by the public simply because you are who you are." -- Merrill Rose
Image

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 7326
Joined: 2012-10-09, 19:37
Location: Binary Outcast

Re: Disable ~/Desktop folder creation

Post by New Tobin Paradigm » 2020-06-24, 15:27

tl;dr The previous discussion and decision stands.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2229
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Disable ~/Desktop folder creation

Post by coffeebreak » 2020-06-24, 15:50

Perhaps this thread will help the OP: Palemoon creates a ~/Desktop directory when started.
(strategies offered to prevent /Desktop creation are in the bottom half, starting here)

Post Reply