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

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

Open
kimariterikishi opened this issue Mar 25, 2024 · 0 comments

Comments

@kimariterikishi
Copy link

kimariterikishi commented Mar 25, 2024

  • The Open With... menu only thinks it is hidden for sh and desktop files.
  • The expectation is that if I select Geany in the file properties, then
    a) appear in the Open With.. menu (I can select it)
    b) two mouse clicks on the file will also cause Geany to open the file: at least, the sh scripts.
  • Another weird thing is that if I set two applications for files (sh or desktop) in the file properties -and this is the default anyway- it works "foolproof".

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...

  • The Open With... menu only thinks it is hidden for sh and desktop files. However, it is definitely expected to work here.

  • The things I have done:

  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;

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

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

None of the solutions helped...

  • MATE and System

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

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

1 participant