Funny action on "opening" a pdf document
- From: Theodore Kilgore <kilgota banach math auburn edu>
- To: mc gnome org
- Subject: Funny action on "opening" a pdf document
- Date: Wed, 16 Jan 2013 08:55:55 -0600 (CST)
I just did an update of my Slackware64-current system a few days ago.
Today when I open a pdf file it starts to use xpdf (right, reasonable, and
in accord with my previous practice). But for some weird reason it opens
Firefox at the same time. I looked under Edit extension file and I found
# 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
So then I looked at the doc.sh file and I found
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}" &)
;;
...(more entries)...
esac
}
All looks innocent enough ...
But then at the bottom of the same file one sees
case "${action}" in
view)
do_view_action "${filetype}"
;;
open)
xdg-open "${MC_EXT_FILENAME}" 2>/dev/null || \
do_open_action "${filetype}"
;;
*)
;;
esac
Then I do "man xdg-open" and I see this:
XDG-OPEN(1) xdg-open Manual
XDG-OPEN(1)
NAME
xdg-open - opens a file or URL in the user's preferred application
SYNOPSIS
xdg-open {file | URL}
xdg-open {--help | --manual | --version}
DESCRIPTION
xdg-open opens a file or URL in the user's preferred application.
If a
URL is provided the URL will be opened in the user's preferred web
browser. If a file is provided the file will be opened in the
preferred
application for files of that type. xdg-open supports file, ftp,
http
and https URLs.
xdg-open is for use inside a desktop session only. It is not
recommended to use xdg-open as root.
etc. etc.
----------------------------------------------------------------
So what seems to be happening is that the (purely local!) command to open
a file which is on the hard drive of the local machine with an application
which is on the local machine becomes an occasion for performing
the purely extraneous act of opening a web browser in addition.
Weird. Also slightly irritating. I am using a desktop
system at the moment, so it is only irritatint. But it is really not a
very nice thing to do on a low-power machine like the Raspberry Pi which I
am putting through its paces at home. On that or a similar hardware setup,
this would not be funny, at all.
Does anyone know how to fix this?
----------------------------------------------------------------
kilgota banach:~$ mc -V
GNU Midnight Commander 4.8.4
Built with GLib 2.32.4
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
kilgota banach:~$
Theodore Kilgore
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]