~mil/sxmo-tickets#387: 
Can't open images from files menu

I have several png images in my home directory, but nothing happens when I select them in the files menu.

I figured at first that I just needed to add the MIME types to ~/.config/mimeapps.list, but it didn't make any difference. This is what I have in that file now:

[Default Applications]
image/bmp=feh.desktop
image/gif=feh.desktop
image/jpeg=feh.desktop
image/jpg=feh.desktop
image/pjpeg=feh.desktop
image/png=feh.desktop
image/tiff=feh.desktop
image/webp=feh.desktop
image/x-bmp=feh.desktop
image/x-pcx=feh.desktop
image/x-png=feh.desktop
image/x-portable-anymap=feh.desktop
image/x-portable-bitmap=feh.desktop
image/x-portable-graymap=feh.desktop
image/x-portable-pixmap=feh.desktop
image/x-tga=feh.desktop
image/x-xbitmap=feh.desktop

I also tried specifying the full path to feh's desktop entry (/usr/share/applications/feh.desktop) and adding the same list under "[Added Associations]" at the top of ~/.config/mimeapps.list.

  • feh-3.7-r0
  • libpng-1.6.37-r1
  • postmarketos-ui-sxmo-1.5.1-r1
  • shared-mime-info-2.1-r0
  • sxmo-dmenu-5.0.10-r0
  • sxmo-utils-1.5.2.1-r0
  • xorg-server-1.20.11-r0
  • xorg-server-common-1.20.11-r0
Status
RESOLVED FIXED
Submitter
~flimflam
Assigned to
No-one
Submitted
2 years ago
Updated
1 year, 11 months ago
Labels
No labels applied.

~proycon 2 years ago

What do you get if you run sxmo_open.sh yourpicture.png from the command line? Any error output?

~flimflam 2 years ago

The file is definitely there, despite the error:

$ sxmo_open.sh /usr/share/sxmo/background.jpg
/usr/bin/sxmo_open.sh: line 167: file: not found
We failed to find the mime_type for "/usr/share/sxmo/background.jpg"

$ ls /usr/share/sxmo/background.jpg
/usr/share/sxmo/background.jpg

Same thing with a png file:

$ sxmo_open.sh /usr/share/feh/images/feh.png
/usr/bin/sxmo_open.sh: line 167: file: not found
We failed to find the mime_type for "/usr/share/feh/images/feh.png"

$ ls /usr/share/feh/images/feh.png
/usr/share/feh/images/feh.png

~proycon 2 years ago

On 21-10-22 06:01, ~flimflam wrote:

The file is definitely there, despite the error:

$ sxmo_open.sh
/usr/share/sxmo/background.jpg
/usr/bin/sxmo_open.sh: line 167: file:
not found

Ha, I think this means the utility 'file' is not found (rather than the actual image file not being found) , that would explain the issues. Try: apk add file

We might need to add it explicitly as a dependency if it's missing.

--

Maarten van Gompel (proycon) https://proycon.anaproy.nl

~flimflam 2 years ago

Yep, that was it. I still see a couple errors in the terminal but the image does display:

$ sxmo_open.sh /usr/share/sxmo/background.jpg 
stat: cannot stat '/usr/local/share/applications//*.desktop': No such file or directory
grep: /usr/local/share/applications//*.desktop: No such file or directory
grep: /home/user/.local/share/applications//*.desktop: No such file or directory

~stacyharper 2 years ago

Yep, that was it. I still see a couple errors in the terminal but the image does display:

Ya I guess this is okay. sxmo_open.sh try to read some nonexistent folders

~phartman REPORTED FIXED 1 year, 11 months ago

Register here or Log in to comment, or comment via email.