03-21-2010
I know Gnome has a utility program, gnome-open, which will take the file you pass to it and open that with the default application, whatever that is - presumably there's something similar for KDE and other popular desktop environments?
If you want it to be fairly portable, you could:
1) Check for the presence of, e.g. gnome-open with system("gnome-open --version"), and so on for other programs until you find one,
2) If that doesn't work, go down a similar list of raw pdf viewers (system("evince --version"), etc), and
3) If you still can't find one, prompt the user for the name of a program.
Apart from that, I don't think there's a lot else you can do.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi i am an fresh engineer working in a Embedding company and i am new to linux so any one help me to teach or tell how to open a WinZip file in linux as i use gunzip but hte file suffix is not gz so can any one healp me...
urs
... (2 Replies)
Discussion started by: wagmare
2 Replies
2. AIX
which package is to be installed to view pdf files in AIX machine? i already have xpdf version 1...but, some pdf files are not opening in it.help me out. (1 Reply)
Discussion started by: me.kamph
1 Replies
3. Shell Programming and Scripting
how to open a .pdf file from terminal not using gpdf
I work on fedora 12 and default application assigned for viewing the pdf files is document-viewer (3 Replies)
Discussion started by: rrd1986
3 Replies
4. Solaris
I'm attempting to replace gnome pdf with Acrobat Reader on a server and make Acrobat Reader the default program used to open .pdf files. I've been able to make the changes to individual users but don't want to have to edit each individuals profile. Is there a way, within Solaris 10, to make a... (2 Replies)
Discussion started by: goose25
2 Replies
5. Programming
OKay so my question is that how does this jar file convert something in there and show pdf when open it? I don't get how it works. Can someone explain to me. I have a link below, in there will be a file call Tools, and please open the file called "PQ10-sample" it will automaticly open up a pdf as... (11 Replies)
Discussion started by: tonyduong15
11 Replies
6. Red Hat
Hi,
I am in need of help. My requirements are :
1) To convert the existing files (irrespective of their format) in a directory to PDF format
2) To make the converted files password protected.
I did the attempt to do the same. Though the existing files (irrespective of their format) are... (1 Reply)
Discussion started by: MKR
1 Replies
7. Shell Programming and Scripting
I want to search a keyword in a list of pdf files and when i find a match i want to write the title and author of that pdf file to another file. How will I do this using linux shell script? (7 Replies)
Discussion started by: SK33
7 Replies
8. Post Here to Contact Site Administrators and Moderators
Kindly advice with shell script to monitor open file in linux, if the open file count is greater then 5000 then send me an email..
command : lsof | wc -l (0 Replies)
Discussion started by: adminhelp
0 Replies
9. Shell Programming and Scripting
Hello.
The task :
Using multiple commands like :
gdisk -l $SOME_DISK >> $SOME_FILEI generate some text file.
For readiness I must insert page break.
When the program is finished I want to convert the final text file to a pdf file.
When finished, I got two files : One text file and One pdf... (1 Reply)
Discussion started by: jcdole
1 Replies
EVINCE(1) General Commands Manual EVINCE(1)
NAME
evince - GNOME document viewer
The Evince Document Viewer application for GNOME desktop environment
SYNTAX
evince [--help] [--usage] [--page-label=<label>] [--quit] [filename(s)...]
DESCRIPTION
evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript. For more general
information about Evince please visit our website at http://www.gnome.org/projects/evince/
OPTIONS
--help Prints the command line options.
--page-label=label
You can pass a page label or page number here, this page will be selected in the document if it exists.
filename(s)...
Specifies the file to open when Evince starts. If this is not specified, Evince will open a blank window. Multiple files can be
loaded if they are separated by spaces. Evince also supports handling of remote files. For example, you can pass the location on
the web or load a file from a FTP server, like "ftp://adobe.com/sample.pdf".
BUGS
If you find a bug, please report it at http://bugzilla.gnome.org/enter_bug.cgi?product=evince.
30 Jan 2007 EVINCE(1)