Well, I spoke too fast. The problem (recalled below) still shows up, but here's the detailed circumstances: - When I click a link to a PDF file in a webpage, that triggers the Helper Apps "Action" chosen for content-type "application/pdf": if there I select my script, SM opens Acrobat instead. - When I click the entry of a PDF file in a (local) directory index, that triggers the "application/save" Action: if there I select my script, it works.

Some more info about the Helper Apps list:

- the drop-down for "application/pdf" lists: Always ask, Save file; Use evince-patched (default) [with a tiny window icon], use evince [paper sheet icon], use Adobe Reader 9.5 (in SeaMonkey) [Lego brick icon]. Application details shows one entry: evince.

- the drop-down for "application/save" lists: Always ask, Save file; Use (default) [a mere space after "Use"; a tiny window icon], use evince-patched [paper sheet icon], use evince [same icon], use acroread [same icon]. Application details shows one entry: evince-patched.

Thanks.

I like to use Evince to read PDF files. If I select it (/usr/bin/evince) as helper app, it works.

Now, the Evince window doesn't always open at an optimal size (*). So I wrote a script (/home/lucas/bin/evince-patched) to automatically launch then resize it. The script works like a charm when called from a terminal. But SM refuses to use it: if I set it as helper app, SM launches Acrobat !

Here's the script:
---
#!/bin/bash
/usr/bin/evince "$@" &
pid=$!
until wmctrl -lp |grep -q $pid
do sleep 1s
done
winid=$(wmctrl -lp | grep $pid | cut -d' ' -f1)
wmctrl -ir $winid -b add,maximized_vert
wmctrl -ir $winid -e 0,-1,-1,981,-1
---

The permissions look right:
ls -ld /home
drwxr-xr-x 4 root root 4096 août 14  2011 /home
ls -ld /home/lucas
drwxr-xr-x 93 lucas users 12288 sept.  7 10:54 /home/lucas
ls -ld /home/lucas/bin
drwxr-xr-x 2 lucas users 4096 sept.  7 09:48 /home/lucas/bin
ls -ld /home/lucas/bin/evince-patched
-rwxr-xr-x 1 lucas users 331 sept.  7 09:48 /home/lucas/bin/evince-patched

--
LL
_______________________________________________
support-seamonkey mailing list
support-seamonkey@lists.mozilla.org
https://lists.mozilla.org/listinfo/support-seamonkey

Reply via email to