On 09/07/2012 02:02 AM, Lucas Levrel wrote:
> Hi,
> 
> 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

You need to change the permissions. This works for me (although the
window size is not ideal (for my monitor):

$ ls -al evince-patched
-rwxrwxr-- 1<snipped> 214 Sep  7 18:06 evince-patched

Test link:
<https://www.irs.gov/pub/irs-pdf/fw4.pdf>
Clicking on that link evokes the shell 'evince-patched' and presents the
pdf document in evince.

_______________________________________________
support-seamonkey mailing list
[email protected]
https://lists.mozilla.org/listinfo/support-seamonkey

Reply via email to