Closed TuxVinyards closed 1 year ago
I was just unable to duplicate this when using a "test2.2.2.sh" file containing only the string "dmesg" but DID get it when I removed the .sh extension. Wonder if this is an issue in libmagic or in what caja is sending to libmagic?
@lukefromdc Glad to see you picking up on this. Sounds like you are managing to replicate it, I think, but I am bit confused about when you say that you created a file " containing only the string 'dmesg' "
I used a simple file with the Bash 'hash bang' & set it to executable (chmod +x or properties > permissions) as in:
#!/bin/bash
echo "hello world"
sleep 10
Cheers.
By that I mean a shell script containing the command "dmesg" as the only line I have no idea how to diagnose the underlying problem but I suspect this may relate to libmagic or how data is being sent to libmagic. This is a bit out of my core knowledge base and experience.
@lukefromdc I am sure that way more outside my knowledge base here :rofl:
I had another look through the src and noticed the gio.h include in the file https://github.com/mate-desktop/caja/blob/master/libcaja-private/caja-file-utilities.c which got me looking at 'gio'
This fault is showing up at the command line too ....
??
That means the problem isn't in caja. gio info is invoking gio, which ships with glib and that's where you will need to open a new issue. GNOME and cinnamon must be using a workaround. Maybe they using libmagic directly to determine filetype and not going through gio?
Note that this does not occur when the file has a .sh extension but only with the filename lacks an extension, as in fact is common for system shellscripts.
Closing for now, can reopen if someone finds out what GNOME and Cinnamon are doing to get around this when gio is screwing up the filetype detection. Thanks for finding the underlying issue here
I think this problem has more ramifications and it's a problem with Mate. This may be a lot bigger than this mime-type issue that I am getting.
This isn't happening with gio (gvfs) at the command line when I am testing on with KDE (ubuntu studio) or with Gnome3 (fedora 33) BUT with both Ubuntu Mate and Manjaro Mate it is.
My gut feeling is that something is going wrong in the Mate build stage, or with the Mate dependency list. It may or may not come out in the wash when the Wayland work gets finished. Or it might be pointer to something that could be behind lots of other issues.
As far as I am concerned, I am going to leave this with you. I am going to use a different point versioning system, not .sh extensions though, and not another desktop, at least not yet .....
:smile_cat:
I think this problem has more ramifications and it's a problem with Mate. This may be a lot bigger than this mime-type issue that I am getting.
This isn't happening with gio (gvfs) at the command line when I am testing on with KDE (ubuntu studio) or with Gnome3 (fedora 33) BUT with both Ubuntu Mate and Manjaro Mate it is.
My gut feeling is that something is going wrong in the Mate build stage, or with the Mate dependency list. It may or may not come out in the wash when the Wayland work gets finished. Or it might be pointer to something that could be behind lots of other issues.
As far as I am concerned, I am going to leave this with you. I am going to use a different point versioning system, not .sh extensions though, and not another desktop, at least not yet .....
:smile_cat:
I think this problem has more ramifications and it's a problem with Mate. This may be a lot bigger than this mime-type issue that I am getting.
This isn't happening with gio (gvfs) at the command line when I am testing on with KDE (ubuntu studio) or with Gnome3 (fedora 33) BUT with both Ubuntu Mate and Manjaro Mate it is.
My gut feeling is that something is going wrong in the Mate build stage, or with the Mate dependency list. It may or may not come out in the wash when the Wayland work gets finished. Or it might be pointer to something that could be behind lots of other issues.
As far as I am concerned, I am going to leave this with you. I am going to use a different point versioning system, not .sh extensions though, and not another desktop, at least not yet .....
:smile_cat:
Odd that a test from the command line would be affected in any way by what DE you are running.
Also this might be distro-specific not desktop environment specific. Ubuntu Mate and Manjaro Mate are different distros than Fedora, note that Ubuntu Studio uses a different kernel to control latency for audio work. Can you verify that the Ubuntu Studio and Ubuntu Mate installs you tested are using the same version of glib? If they are not, that narrows it down quite a bit
This could also be specific versions of shared-mime-info, or specific configurations of the database somewhere.
Okay, as I started this ball rolling, it was probably down to me to download some more ISO's and compare. But as VM's are handy for testing things & I like to have a few available ....
In short, it looks again like a glib problem.
I used a set of rolling Manjaro latest and got different results from all three.
They all seemed to have glib2 at around version 2.74.5 (which is also the same for Ubuntu Mate 22.10)
However, while Manjaro Mate had glib 1.2.10 both Budgie and KDE had glibc 2.37. Ubuntu had a whole naming system to itself that I couldn't even make head nor tail of ...
Dolphin saw the bash.2.2.2 file correctly but failed with gio on the command line. Budgie, using nautilus, failed on both tests, even though Fedora 33 and Gnome 3 had no problems at all.
So, looks like a closed issue but something to keep at the back of our minds if the our file manager is yielding weird results.
I note, looking at glib's versioning, they themselves seem to have moved from three points down to two. ie 1.2.10 now becomes 2.37, loosely speaking.
There are quite a few Bash scripts that I am going to have to move to two point but it probably won't take that long, may be only a couple hours, may be not even that.
Thanks to people for thoughts and time.
XDG 'file type' problem:
Caja will see bash scripts as a 'troff' files when point versioning eg "my.script.2.2.2" as in the first screen shot.
But it works okay if they end in a zero or an integer greater than 9 .
It's the same in both Ubuntu & Manjaro Mate. Ubuntu 22.10 with 1.26.0 & Caja 1.26.1 and Manjaro rolling latest.
I am concluding that it is Mate and not xdg-desktop at fault here, because it doesn't happen with Cinnamon, Gnome 3, or with KDE, tested using Mint, Fedora, Suse, MX & Kubuntu. See further screenshots.
What happens:
What should happen:
Works okay if they end in a zero or an integer greater than 9:
Doesn't happen with other desktops: