*

Welcome, Guest. Please login or register.
Did you miss your activation email?

Puppy Linux Lucid 5.1 (lupu510) for the XO-1 is here!
Pages: [1]
Print
Author Topic: Use internal PDF reader at command line? (or through MC ??)  (Read 7364 times)

Use internal PDF reader at command line? (or through MC ??)

ylsf
Contributor
*
Posts: 50


February 02, 2008, 10:04:15 PM

I am  using MC (master commander) as a front-end for Mplayer to open videos, mp3s,etc.

How do I set it up to open PDF files via the internal reader?  I was trying to look for what command is being run for the reader activity but I can't seem to find it.......

I don't really like Journal for browsing though a drive....especially a large one.

Also, how do I get MC to open right to my "media" folder (to see my mounted drives)...

Logged

#1 Re: Use internal PDF reader at command line? (or through MC ??)

ylsf
Contributor
*
Posts: 50


February 07, 2008, 08:25:22 PM

anyone??
Logged

#2 Re: Use internal PDF reader at command line? (or through MC ??)

Grampa
Senior Contributor
**
Posts: 170


February 07, 2008, 09:38:04 PM

XO uses the Read activity for pdf. The Read icon doesn't appear on the Sugar menu, although you can easily install it by modifying the .info file. Even if you put the icon on the menu, however, you still can't open files from within Read -- it lacks a file/open command. It is probably easier to open pdf files with the built-in browser, which calls Read. You can use the browser to browse and open files on your drive by typing "file:///" in the address field. The browser will let you browse directories and open pdf files. I know this isn't what you are asking, but you may find it easier than using the Journal.
Logged

#3 Re: Use internal PDF reader at command line? (or through MC ??)

ylsf
Contributor
*
Posts: 50


February 09, 2008, 09:29:28 PM

Thanks for that..

I imagine there has to be a way still to "execute" the read command through MC.......Anyone else have an idea?
Logged

#4 Re: Use internal PDF reader at command line? (or through MC ??)

rwhe
Contributor
*
Posts: 35



WWW
February 09, 2008, 11:01:24 PM

You can do 'yum install evince', which installs a more capable, but still free, version of the Read activity. You can then use it to open a file at the command line like this:

$ evince myfile.pdf

[edit]

Although the Read activity is based on the same code as evince, evince can do some things that Read can't, such as flip a page at a time, even in ebook mode; read DjVu files; read comic book files (cbr and cbz), and lots more. I hope this functionality is eventually addeb back to the Read activity.

HTH,

Ron Hale-Evans
« Last Edit: February 09, 2008, 11:08:25 PM by rwhe » Logged

#5 Re: Use internal PDF reader at command line? (or through MC ??)

Ben James Ben
Senior Contributor
**
Posts: 142



February 10, 2008, 08:35:39 AM

Code:
#!/bin/bash
#
# readit
#
# Runs the Read Activity from the command line.  A specified URI
# is used.  The Read Activity is run in the background.
#
# Usage:
# readit [URI]
#
# Example:
# readit "file:///usr/share/activities/worldfactbook-maps/asia.pdf"
#
# This script is basically a shortcut for the following command:
# SUGAR_BUNDLE_PATH=/usr/share/activities/Read.activity sugar-activity readactivity.ReadActivity -b org.laptop.sugar.ReadActivity -a fakeactivityid -u [uri] &

SUGAR_BUNDLE_PATH=/usr/share/activities/Read.activity
_ACTIVITY=readactivity.ReadActivity
_BUNDLE=org.laptop.sugar.ReadActivity
_ACTIVITY_ID=fakeactivityid

sugar-activity ${_ACTIVITY} -b ${_BUNDLE} -a ${_ACTIVITY_ID} -u $@ &

Example of running the script:

$ chmod 755 readit
$ ./readit "file:///usr/share/activities/worldfactbook-maps/asia.pdf"

I'm not sure what problems, if any, using a fake activity id might cause with Sugar. I suspect that using the same id more than once at the same time might cause problems.
« Last Edit: February 10, 2008, 08:42:07 AM by Ben James Ben » Logged
Pages: [1]
Print
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
September 09, 2010, 05:34:31 AM

Login with username, password and session length
Recent Topics
[Today at 12:48:19 AM]

by anna
[September 08, 2010, 07:31:31 PM]

[September 08, 2010, 01:39:38 AM]

[September 07, 2010, 08:19:25 PM]

[September 06, 2010, 09:19:36 PM]

[September 05, 2010, 09:25:21 PM]

[August 30, 2010, 11:26:07 PM]

[August 30, 2010, 11:23:56 PM]

[August 30, 2010, 10:40:34 AM]

[August 28, 2010, 10:00:01 PM]
Members
Total Members: 4559
Latest: nikh105
Stats
Total Posts: 31138
Total Topics: 3760
Online Today: 71
Online Ever: 220
(February 05, 2009, 11:29:32 AM)
Users Online
Users: 0
Guests: 34
Total: 34