mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
265 stars 143 forks source link

The Caja Open With... environment menu does not show the Geany text editor (sh and desktop files) #1772

Open kimariterikishi opened 3 months ago

kimariterikishi commented 3 months ago

If it is set in ~/.config/ in the mimeapps.list file (shortcut),

[Default Applications] application/x-desktop=libreoffice-writer.desktop application/x-shellscript=libreoffice-writer.desktop

[Added Associations] application/x-shellscript=geany.desktop;libreoffice-writer.desktop; text/x-shellscript=geany.desktop; text/x-desktop=geany.desktop; application/x-desktop=libreoffice-writer.desktop;geany.desktop;

what happens is that in the Open With... menu, I see, Open With: Geany appears, but if I double-click on the file, LibreOffice Writer opens it. This is when I select LibreOffice as the default association! When I select Geany as the default application, LibreOffice appears as the menu to open with, and when I double-click Geany, the file opens. This is some kind of reverse operation. Now, let's ignore the desktop settings in the example, because on that, if I double-click, I'm launching the application...

1) I edited the geany.desktop file in /usr/share/applications/ and added four new settings at the end of MimeTypes=:

text/x-shellscript;text/x-desktop;application/x-shellscript;application/x-desktop;

2) a) I have checked the contents of the mimeinfo.cache file (/usr/share/applications/), and I see that it contains the correct settings:

application/x-shellscript=geany.desktop;vim.desktop; application/x-desktop=geany.desktop; text/x-shellscript=geany.desktop

b) I put this in,

text/x-desktop=geany.desktop;

then I ran it.

sudo update-desktop-database

The contents of the file have been updated.

And I ran it.

sudo update-mime-database /usr/share/mime

3) And I copied the geany.desktop file from /usr/share/applications/ to ~/.local/share/applications/.

None of the solutions helped...

inxi -Szxxx System: Kernel: 6.7.10-3-liquorix-amd64 arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 Desktop: MATE v: 1.26.0 info: mate-panel wm: marco v: 1.26.1 vt: 7 dm: LightDM v: 1.26.0 Distro: Debian GNU/Linux 12 (bookworm)

file -b --mime-type install.sh text/x-shellscript

xdg-mime query filetype install.sh application/x-shellscript

file -b --mime-type geany.desktop text/plain

xdg-mime query filetype geany.desktop application/x-desktop

which geany /usr/bin/geany

file /usr/bin/geany /usr/bin/geany: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=30eed5a4b099db1e2e8e0382edabca21dc748da0, for GNU/Linux 3.2.0, stripped



The bug was sent to Debian Bug Tracking (reportbug) a few minutes ago. If I get a confirmation, I will link it immediately.
What's interesting is that my Ubuntu-using friends have also mentioned the problem, i.e., something "general" might be the cause.

I get the URL now:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067673