Nnn: Opening .png not using the default application.

Created on 20 May 2020  路  5Comments  路  Source: jarun/nnn

If it looks like a local environment issue, please try to debug yourself. Debugging local setup issues is not our top priority.

Before opening an issue, please try to reproduce on latest master. The bug you noticed might have already been fixed.

Useful links:

If the issue can be reproduced on master, log it.

Please provide the environment details. If that's missing, the issue will be closed without any cited reason.

If we need more information and there is no communication from the bug reporter within 7 days from the date of request, we will close the issue. If you have relevant information, resume discussion any time.

FEATURE REQUESTS

Please consider contributing the feature back to nnn yourself. Feel free to discuss in the ToDo list thread. We are more than happy to help.

--- PLEASE DELETE THIS LINE AND EVERYTHING ABOVE ---

Environment details (Put x in the checkbox along with the information)

[x] Operating System: Archlinux
[x] Window Manager: i3-gaps
[x] Terminal Emulator: gnome-terminal, st
[x] Shell: zsh
[ ] Custom desktop opener (if applicable):
[x] Program options used: None
[x] Configuration options set: None
[x] Issue exists on nnn master

Exact steps to reproduce the issue

Pre-steps:

  • Have chromium installed;
  • Have nnn installed.
  • Have an image viewer like sxiv or feh installed.
  • Set sxiv or feh as the default application to open images.
  1. Open nnn version 3.1.1 (latests on archlinux repository);
  2. Navigate to a directory containing a .png;
  3. Press enter on the .png
  4. Chromium should open the png.
  5. Go to another file manager (like nemo, or nautilus);
  6. Double click the .png, it should open with sxiv or feh (previously set as default)

Issue I'm having is described in steps above. What I was trying to accomplish was to open images with sxiv in nnn, and it is already as the system default application.

not sure if this is a local bug, but maybe I would need to setup a custom application on nnn for this. Any additional debugging steps would be nice.

question

Most helpful comment

Yes. Use xdg-mime聽default聽application聽mimetype(s) to set default openers for mimetypes. In your case application would be sxiv.desktop.

All 5 comments

See xdg-open(1) and xdg-mime(1). I have a very similar system and the images are opened in sxiv as expected.

I did some digging, it seems that xdg-open is defaulting to chromium for opening image/png. Does this mean I have to configure it?

Yes. Use xdg-mime聽default聽application聽mimetype(s) to set default openers for mimetypes. In your case application would be sxiv.desktop.

That did the trick. Thanks for the explanation.

Also thanks jarun for closing it quickly. Sorry for mistaking this for a bug.

No problem!

Was this page helpful?
0 / 5 - 0 ratings