maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2007 / Maemo 3 / Bora (https://talk.maemo.org/forumdisplay.php?f=23)
-   -   Invokinger PDF viewer from commandline (https://talk.maemo.org/showthread.php?t=6913)

stevem 2007-06-20 20:58

Invokinger PDF viewer from commandline
 
Hi. I would like to be able to invoke the PDF viewer from a shell, in order to open email attachments. I have poked around but so far haven't been able to work it out. Any hints gratefully received.

Thanks,
Steve

Bernard 2007-06-20 21:37

Re: Invokinger PDF viewer from commandline
 
You probably need to use the D-bus. I must say that I don't really understand it yet, but it probably be somewhat the same as using the webbrowser from xterm.
http://www.internettablettalk.com/fo...ead.php?t=5713

for example starting the web browser:
Quote:

dbus-send --print-reply --dest=com.nokia.osso_browser /com/nokia/osso_browser com.nokia.osso_browser.load_url string:http://www.internettablettalk.com/
it probably is somewhat the same for the pdf viewer, Please let us know when you figure it out

stevem 2007-06-21 07:21

Re: Invokinger PDF viewer from commandline
 
Hi Bernard. Thanks for the tip, and I shall do some poking around and see what I can do. I shall let you know if I succeed !

Regards
Steve.

jethro.itt 2007-06-22 10:45

Re: Invokinger PDF viewer from commandline
 
In Python it goes like this:

Code:

import osso
context = osso.Context("openmime", "0.0.1", False)
mime = osso.Mime(context)
mime.open_file_with_mime_type("/home/user/test.pdf", "application/pdf")

I guess it goes similarly in C, if you want to make a simple launcher program instead of using Python.


All times are GMT. The time now is 00:42.

vBulletin® Version 3.8.8