Results 1 to 5 of 5

Thread: Couldn't get a file descriptor referring to the console

  1. #1
    Join Date
    Feb 2012
    Beans
    475

    Couldn't get a file descriptor referring to the console

    I want to open a file from within the console. I want the console to figure out my preferred program for opening the file. When I tell it "open file.pdf" I get the error "Couldn't get a file descriptor referring to the console".

    Is there a way around this? I'd like the system to recognise my preferred programs for each type of file.

  2. #2
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Couldn't get a file descriptor referring to the console

    The command you want is called see on Debian-based systems. open aka openvt does something completely different: starts a program on another virtual terminal.
    Last edited by schragge; March 9th, 2013 at 11:19 PM.

  3. #3
    Join Date
    Feb 2012
    Beans
    475

    Re: Couldn't get a file descriptor referring to the console

    Thanks. But I think I need to tweak my system further. I got this error:
    Error: no "view" mailcap rules found for type "application/pdf"

  4. #4
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Couldn't get a file descriptor referring to the console

    You can used the command xdg-open to open a file with its associated application, for example...
    Code:
    xdg-open file.pdf
    will open file.pdf with Evince (or whatever application you have associated with pdfs).
    Cheesemill

  5. #5
    Join Date
    Feb 2012
    Beans
    475

    Re: Couldn't get a file descriptor referring to the console

    Cool! Thanks! It worked!

Bookmarks

Posting Permissions

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