Results 1 to 6 of 6

Thread: Open PDF from Konsole command line

  1. #1

    Default 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

  2. #2
    dd@home.dk NNTP User

    Default Re: Open PDF from Konsole command line

    > 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=linu...ewer+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


  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Open PDF from Konsole command line

    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)



  4. #4
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: Open PDF from Konsole command line

    Code:
    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



  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Open PDF from Konsole command line

    On 2012-06-26 21:55, Martin Helm wrote:
    >
    Code:
    > 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
    >


    Code:
    okular mypdffile.pdf
    ctrl-C
    --
    Cheers / Saludos,

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



  6. #6
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,448

    Default Re: Open PDF from Konsole command line

    Quote Originally Posted by robin_listas View Post
    For graphics, install "display".
    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •