Open PDF from Konsole command line

hi,
i am running opensuse 12.1. how do i view (and close) a pdf file from the konsole command line? also, how can i open/close an image from the command line? (i normally used okular to view pdfs, and gwenview for images…)
any help would be appreciated!
thank you,
db

> how do i view (and close) a pdf file from the konsole command line?
> how can i open/close an image from the command line?

you have two questions and i answer both:
from the command line you would have to launch a PDF viewer/image viewer
of some kind (and be running a desktop of some kind, and then go to it
to look at the pdf/image)

like:

okular [/full/path/to/some.pdf]
and
gwenview -s [/full/path/to/some/directory]

or, did you actually want to ask how to do it without X or a DE running?

if so, then see:
https://www.google.com/search?q=linux+image+viewer+without+X

please be specific with questions…otherwise we have to guess…

by the way, i have friends with blackbird time, are you one?


dd

On 2012-06-26 19:06, blackbird sr71 wrote:
>
> hi,
> i am running opensuse 12.1. how do i view (and close) a pdf file from
> the konsole command line? also, how can i open/close an image from the
> command line? (i normally used okular to view pdfs, and gwenview for
> images…)

Well, you can start those programs from the command line (program_name
file_to_display), but once started you have to use those programs to close
them. For graphics, install “display”.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)


okular mypdffile.pdf & #run pdf viewer as background process
export pid=$! #get the process id of the last started background process
kill $pid #when you are done kill it

similar for gwenview


PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10

On 2012-06-26 21:55, Martin Helm wrote:
>


> okular mypdffile.pdf & #run pdf viewer as background process
> export pid=$! #get the process id of the last started background process
> kill $pid #when you are done kill it
> 

okular mypdffile.pdf
ctrl-C


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

You may not need to install anything; ‘display’ is one of the commands of ImageMagick which is often installed by default or as a dependency of another program. It doesn’t need a DE as it runs eniirely in a terminal.