Reply
Thread Tools
cmdowns's Avatar
Posts: 100 | Thanked: 13 times | Joined on Mar 2008
#1
Does anyone know if / how I can rig my Personal Menu to open a specific PDF file? I'm reading a copy of Peter Watts Blindsight (which is awesome, btw) in PDF format, and I'd like to be able to open it directly through Personal Menu, without having to open the PDF Reader first, then select the specific file.

Thanks in advance for your consideration.
 

The Following User Says Thank You to cmdowns For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
Name: <Dunno >
Command to execute: run-standalone.sh dbus-send --print-reply --dest=com.nokia.osso_pdfviewer /com/nokia/osso_pdfviewer com.nokia.osso_pdfviewer.mime_open string:'file://<path to pdf>'
DBUS Service Name: <Blank>
Run in teminal: <Unchecked>
Run as root: <Unchecked>
 

The Following 9 Users Say Thank You to qwerty12 For This Useful Post:
cmdowns's Avatar
Posts: 100 | Thanked: 13 times | Joined on Mar 2008
#3
Thanks for the reply. I've tried the command you suggested, but I can't seem to get it to work. I'm guessing the problem is my syntax. I've entered

Code:
run-standalone.sh dbus-send --print-reply -dest=com.nokia.osso_pdfviewer /com/nokia/osso_pdfviewer com.nokia.osso_pdfviewer.mime_open string:'file://</media/mmc2/tmp/'Peter Watts - Blindsight.pdf'>'
I've mucked up the <path to file>, haven't I? Can you please tell me what my mistake is and how to fix it?

Thanks again.

Last edited by cmdowns; 2009-05-21 at 19:50.
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#4
run-standalone.sh dbus-send --print-reply --dest=com.nokia.osso_pdfviewer /com/nokia/osso_pdfviewer com.nokia.osso_pdfviewer.mime_open string:'file:///media/mmc2/tmp/Peter Watts - Blindsight.pdf'
^ should work

It's --dest - not -dest
The '<'s and the '>'s were placeholders - sorry for not making that clear
The path requires the '/' as a *nix path usually has, the '//'s are part of the 'file:' (like http etc)

Last edited by qwerty12; 2009-05-21 at 20:13.
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
cmdowns's Avatar
Posts: 100 | Thanked: 13 times | Joined on Mar 2008
#5
Perfect! Thanks again!
 
Posts: 134 | Thanked: 91 times | Joined on Nov 2009 @ Imperial College London
#6
For the N900 I couldn't find an easy way of opening a pdf stored on the ext3 partition. This solution worked brilliantly!

In case it's useful for anyone I've wrapped it up in a very rudimentary shell script below. If there's an easier way of doing this then someone please shout! It's annoying that osso_pdfviewer [filename(s)...] doesn't work, but there we go.

Here's the script (I've saved as /usr/bin/openpdf and then use openpdf [filename(s)...] from the command line):

Code:
#!/bin/sh

if [ `expr match "$1" "/*"` -eq 1 ]
 then
  fullpath=$1
 else
  fullpath="$PWD/$1"
fi

openme="file://$fullpath"

if [ -r $fullpath ]
 then
  run-standalone.sh dbus-send --print-reply \
  --dest=com.nokia.osso_pdfviewer /com/nokia/osso_pdfviewer \
  com.nokia.osso_pdfviewer.mime_open string:$openme
 else
  echo "could not read file $fullpath"
fi
 

The Following 3 Users Say Thank You to Big Phat Jan For This Useful Post:
Posts: 115 | Thanked: 64 times | Joined on Dec 2009 @ Munich or Luxembourg
#7
Nice, but it doesn't work for me with Desctop Command Execution Widget.
 
Posts: 115 | Thanked: 64 times | Joined on Dec 2009 @ Munich or Luxembourg
#8
Ok, it works.now, just had a whitespace in the path
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:05.