Package: zathura
Version: 0.1.2-4
Severity: wishlist

Dear Maintainer,
The current mailcap entry for zathura has two disturbing issues:

1. It does not fork zathura, so any calling program (like mutt, or
   midnight commander) is locked until zathura has finished. Forking
   should be the default behaviour here.

2. It causes confusing messages on stderr, which in turn can mess up
   the screen state of the calling program.

Here is the current system default mail cap entry:

application/pdf; /usr/bin/zathura '%s'; test=test -n "$DISPLAY"; 
description=Portable Document Format; nametemplate=%s.pdf
application/x-pdf; /usr/bin/zathura '%s'; test=test -n "$DISPLAY"; 
description=Portable Document Format; nametemplate=%s.pdf

I suggest the following entries as a solution to the aboved mentioned problems:

application/pdf; { TMP=`mktemp` \; cp '%s' $TMP \; (zathura --fork $TMP 
>/dev/null 2>&1 && sleep 5 && rm $TMP & ) } ; test=test -n "$DISPLAY"; 
description=Portable Document Format; nametemplate=%s.pdf; 
application/x-pdf; { TMP=`mktemp` \; cp '%s' $TMP \; (zathura --fork $TMP 
>/dev/null 2>&1 && sleep 5 && rm $TMP & ) } ; test=test -n "$DISPLAY"; 
description=Portable Document Format; nametemplate=%s.pdf; 

Explanation: 1. make a temporary file an safe way with mktemp. 2 make zathura 
fork and load this temporary file, without pushing back stuff on the console. 
3. Wait until zathura has started to open the file, give it 5 seconds. 4. 
remove the temporary file.

It would introduce a dependency on mktemp in coreutils, but coreutils
has priority: "required", so that is a non-issue. No one will complain
about having to install coreutils in order to have zathura on the
system.

Kind regards,

Hans Ekbrand

-- System Information:
Debian Release: 7.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to sv_SE.utf8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zathura depends on:
ii  libc6             2.13-38+deb7u1
ii  libcairo2         1.12.2-3
ii  libgirara-gtk2-0  0.1.2-3
ii  libglib2.0-0      2.33.12+really2.32.4-5
ii  libgtk2.0-0       2.24.10-2
ii  libpoppler-glib8  0.18.4-6
ii  libsqlite3-0      3.7.13-1+deb7u1

zathura recommends no packages.

Versions of packages zathura suggests:
ii  chromium [www-browser]   31.0.1650.63-1~deb7u1
ii  iceweasel [www-browser]  17.0.10esr-1~deb7u1
ii  poppler-data             0.4.5-10
ii  w3m [www-browser]        0.5.3-8
pn  zathura-djvu             <none>
pn  zathura-ps               <none>

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to