You are not logged in.

#1 2015-04-15 04:38:18

adcdam
Member
From: Argentina
Registered: 2012-04-15
Posts: 44

problem with file association in midnight commander

i want to open jpg files with gpicview isntead of feh in midnight commander, i read that i have to edit the file: /etc/mc/mc.ext
in the part that say type/^JPEG

i wrote
#Include=image-options
Open=gpicview %f
i restart mc but nothing happen it still open the jpg files with feh, what im doing wrong?
cheers

Offline

#2 2015-04-15 05:05:59

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: problem with file association in midnight commander

try this

type/^JPEG
        Include=its

include/its
        Open=/usr/bin/gpicview %f                                                                                                                              
        View=/usr/bin/gpicview %f

make its anything you want

Offline

#3 2015-04-15 05:31:01

adcdam
Member
From: Argentina
Registered: 2012-04-15
Posts: 44

Re: problem with file association in midnight commander

i tried what you told me but it didnt work, i edited the  mimeapps file at HOME/.local/share/applications and it work i added: image/jpeg=gpicview.desktop in default applications, but i want to make it work editing the /etc/mc/mc.ext file.

Offline

#4 2015-10-21 09:39:13

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: problem with file association in midnight commander

dont know if it helps but in my mc.ext file I just have for JPEG

type/^JPEG
	View=/usr/bin/viewnior %f  
	Open=/usr/bin/viewnior %f 

maybe try it?


You can like linux without becoming a fanatic!

Offline

#5 2015-10-21 11:23:19

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,422
Website

Re: problem with file association in midnight commander

First, don't edit /etc/mc/mc.ext, but use F9 > Command > Edit extension file. This creates a local copy in ~/.config/mc

If you look at the ### Images ### section, most of it has Include=image. A bit further down, there's include/image which opens a script in /usr/lib/mc/ext.d. This script uses xdg-open, and IF this fails, it uses predefined actions for image formats.

As such, setting a working default in mimeapps.list gives the expected result. Modifying the action as in #4 should probably also work.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

Board footer

Powered by FluxBB