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

"XDG_TEMPLATES_DIR is set to invalid path" warning is too noisy #33

Closed
jleclanche opened this issue Oct 25, 2017 · 7 comments
Closed

"XDG_TEMPLATES_DIR is set to invalid path" warning is too noisy #33

jleclanche opened this issue Oct 25, 2017 · 7 comments

Comments

@jleclanche
Copy link
Member

From here:

g_warning("XDG_TEMPLATES_DIR is set to invalid path, ignoring it");

This seems to trigger every single time I open any libfm app, even if I properly set the variable.

Googling the warning, it's all over the place in every single pcmanfm startup log etc. Something seems wrong. I'm not sure it ever even worked? Either way, the warning should either be fixed, take a default or go away...

@yan12125
Copy link
Member

yan12125 commented Nov 8, 2017

As a workaround, I modify ~/.config/user-dirs.dirs

--- /home/yen/.config/user-dirs.dirs.orig       2017-11-08 22:19:34.022490006 +0800
+++ /home/yen/.config/user-dirs.dirs    2017-11-08 22:19:40.998958987 +0800
@@ -7,7 +7,7 @@
 # 
 XDG_DESKTOP_DIR="$HOME/Documents"
 XDG_DOWNLOAD_DIR="$HOME/Documents"
-XDG_TEMPLATES_DIR="$HOME/"
+XDG_TEMPLATES_DIR="$HOME/Documents"
 XDG_PUBLICSHARE_DIR="$HOME/"
 XDG_DOCUMENTS_DIR="$HOME/Documents"
 XDG_MUSIC_DIR="$HOME/"

Of course ~/Documents should be created beforehand.

@ib ib added the question label Oct 31, 2024
@ib
Copy link
Member

ib commented Oct 31, 2024

@jleclanche Is the problem still present? If so, what is XDG_TEMPLATES_DIR set to?

@arteze
Copy link

arteze commented Dec 3, 2024

I have this problem, but with /root

@ib ib removed the question label Dec 4, 2024
@ib
Copy link
Member

ib commented Dec 4, 2024

XDG_TEMPLATES_DIR must not be set to the user's home or the root directory.

@ib ib closed this as completed Dec 4, 2024
@arteze
Copy link

arteze commented Dec 4, 2024

@ib I don't know why the issue was closed, I want to clarify that I have that problem with root, unlike the problem that the person who started the issue had, which is without root.

And what is the solution to the problem?

I don't understand, does XDG_TEMPLATES_DIR have to have some value? How is it assigned?

If we can't assign the value to it, pcmanfm should not show the warning.

@ib
Copy link
Member

ib commented Dec 4, 2024

See yan12125's comment about setting XDG_TEMPLATES_DIR and my comment about invalid paths.

@arteze
Copy link

arteze commented Dec 4, 2024

The problem in my case, for some unknown reason, has already been solved.

I'm using pcmanfm on PuppyLinux, where the default is to be superuser.

If I run the following command to see if pcmanfm reads the file /root/.config/user-dirs.dirs, there is no response, it is as if it did not read it, which seems strange to me.

strace -f pcmanfm /root 2>&1 | grep -i user-dirs.dirs

If I run the command xdg-user-dirs-update that appears in the file, it changes it back, so I wouldn't have to run it.

xdg-user-dirs-update
/root/DOCUMENTS was removed, reassigning DOCUMENTS to homedir

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

No branches or pull requests

4 participants