MC Midnight Commander: error opening PDF files refers to Dolphin

poma pomidorabelisima at gmail.com
Fri Jan 16 18:44:31 UTC 2015


On 16.01.2015 16:57, A.J. Bonnema wrote:
> On 16-01-15 13:32, poma wrote:
>>> I wonder where mc gets the instruction to load
>>> /usr/bin/dolphin when I enter on a pdf file?
>>
>>
>> See if you can find something interesting:
>> $ find ~/.local -name mime*
>>
>>
> Well, that got me a file called 
> .local/share/xfce4/helpers/custom-FileManager.desktop that contained the 
> instruction to load /usr/bin/dolphin.
> So I changed dolphin to nautilus and voila: I got nautilus.
> 
> When I removed the xfce4 directory from .local/share, the most weird 
> thing happened. Restarting MC I entered on the pdf again, and this time 
> got an XFCE request to choose a default filemanager. Remark that I am 
> working from gnome!
> 
> Ok, so apparantly MC has a connection to XFCE4 even if it is not 
> running. What does MC want with XFCE configuration? Why does it want to 
> open a filemanager in stead of a pdf reader?
> 
> I attached the 2 dialogs in screenprint I got from mc.
> 
> Regards, Guus.
> 
> 
> 

This works for me.

$ cp /etc/mc/mc.ext ~/.config/mc/

$ sed -i 's/\/usr\/libexec\/mc\/ext.d\/doc.sh open pdf/\
xpdf ${MC_EXT_FILENAME} >\/dev\/null 2>\&1 \&/g' ~/.config/mc/mc.ext

$ grep xpdf ~/.config/mc/mc.ext
xpdf ${MC_EXT_FILENAME} >/dev/null 2>&1 &

If this doesn't work for you, start over with a clean user environment.





More information about the users mailing list