When I browse my directories in Thunar, it (Thunar) automatically creates a subdirectory named “python” upon opening some directories. In some others it doesn’t, but in the directories where it has “decided” to create this “python” subdirectory, it always creates it: if I manually delete it (the “python” subdirectory), exit the parent directory, and then enter it again, the “python” subdirectory is created again. Also it happens if I press F5 while in such a directory.
It is observed only in Thunar. For comparison I have browsed my system somewhat in “xfe” file manager and did not observe this. This is not the same issue as here Thunar is displaying a non-existent directory SOLVED / General discussion / Xfce Forums — in my case the “python” directory is not a bookmark, but an actual directory that is created with its content (see below), I checked it in the terminal with ls and tree.
It does not seem to be the result of something malicious, since there are no files within the “python” directory, it is always created just with some empty subdirectories (always the same ones). The output of the tree command on such “python” directory:
As far as I could see, all the files and directories, in your example at least, are part of the python package
(python-3.13.2-1 in my Xfce4 system, Manjaro stable branch)
There are two more directories, presumably from previous python versions:
ls -d /usr/lib/python3.1*
/usr/lib/python3.11 /usr/lib/python3.12 /usr/lib/python3.13
They are pretty much empty and nothing gets created just by visiting them with Thunar.
So, from my observations:
… no, it doesn’t do that
That would be very very unusual - something changing in /usr just by navigating there.
I would not consider removing anything from /usr without going through pacman a good idea.
No, it doesn’t do anything to /usr/.... What I listed is the contents of the “pyhton” dir that gets created. For example (just for example: like I said, this behavior is observed in many other directories too) I navigate in Thunar to /mnt/Data/Distribs/Drivers/, where I keep different drivers for my Windows machines. Upon opening it, Thunar creates in addition to the many directories that are already there an extra directory named “python”. And that directory contains the content that I have given in the first post:
Looks like you installed something like icoextract
It seems to be a thumbnailer, which is started in some folders. It has nothing to do which Thunar. However, Thunar triggers tumbler which choses this thumbnailer plugin to generate thumbnails. The icoextract thumbnailer then will create this python folder structure.
Do you have icoextract installed, enabled it as a tumbler plugin and a matching file in a folder you have write access to? Otherwise you can’t replicate it.
Yes, I had icoextract installed, but only as a dependency for Bottles, and have not fiddled with icoextract specifically. Just in case I removed it and restarted the machine, and it partially resolved the issue: the python dir has stopped being created while browsing directories.
Only now I have noticed that in my home directory “python” dir gets created not only when I open it in Thunar, but when I launch many of the apps written in Python. But that’s another issue.
Okay, the issue with the “python” dir being created in the home dir was due to my own eff-up of accidentally setting wrong python-related environment variables for systemd, which I could not see when I was checking it with printenv, since systemd runs in a different context. This was also responsible for the icoextract creating python dirs when browsing directories with exe files in them: after I addressed the issue with the systemd variables, I reinstalled icoextract and now it does not create any unneeded directories.