LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   midnight commander problem with slackware 14 (https://www.linuxquestions.org/questions/slackware-14/midnight-commander-problem-with-slackware-14-a-4175444164/)

porphyry5 01-04-2013 11:17 AM

midnight commander problem with slackware 14
 
Using mc with previous versions of slackware, if I pressed Enter on a selected .pdf, then xpdf would be used to view it, or on a .mp3 then xmms would play it. But not in 14; now when I press Enter for such selected file types, always firefox tries to open them.

I checked mc's configuration files, and everything seems normal. So, for .pdf files ~/.config/mc/mc.ext contains
Code:

# PDF
type/^PDF
        Open=/usr/libexec/mc/ext.d/doc.sh open pdf
        View=%view{ascii} /usr/libexec/mc/ext.d/doc.sh view pdf

and /usr/libexec/mc/ext.d/doc.sh contains
Code:

do_open_action() {
    filetype=$1

    case "${filetype}" in
    ps)
        (gv "${MC_EXT_FILENAME}" &)
        ;;
    pdf)
        (xpdf "${MC_EXT_FILENAME}" &)
        #(acroread "${MC_EXT_FILENAME}" &)
        #(ghostview "${MC_EXT_FILENAME}" &)
        ;;

So presumably one would expect xpdf to display pdf files in mc.

Does anyone have any suggestions as to how firefox might have highjacked this process?

camorri 01-04-2013 01:55 PM

Have you looked at mime-types? I'm running Slack-14, 32 bit and with XFCE desktop. I changed the apps that open from mc by changing the mine-type with the mime-type editor in the settings manager.

Hope this helps.

porphyry5 01-04-2013 02:46 PM

Quote:

Originally Posted by camorri (Post 4863076)
Have you looked at mime-types? I'm running Slack-14, 32 bit and with XFCE desktop. I changed the apps that open from mc by changing the mine-type with the mime-type editor in the settings manager.

Hope this helps.

Thanks anyway, but I would prefer to find out how and why firefox interferes with the existing method, rather than resort to a work-around if its not absolutely necessary.

guanx 01-04-2013 08:38 PM

Quote:

Originally Posted by porphyry5 (Post 4863107)
Thanks anyway, but I would prefer to find out how and why firefox interferes with the existing method, rather than resort to a work-around if its not absolutely necessary.

That is not a workaround. According to "/usr/libexec/mc/ext.d/doc.sh" etc. mc first tries xdg-open.

See ChangeLog of mc 4.8.4 or https://www.midnight-commander.org/ticket/2118

porphyry5 01-05-2013 11:37 AM

Quote:

Originally Posted by guanx (Post 4863243)
That is not a workaround. According to "/usr/libexec/mc/ext.d/doc.sh" etc. mc first tries xdg-open.

See ChangeLog of mc 4.8.4 or https://www.midnight-commander.org/ticket/2118

My apologies to you both, camorri and quanx, for misunderstanding your information. All is well, and thank you for your help.


All times are GMT -5. The time now is 06:38 PM.