Results 1 to 3 of 3

Thread: 11.10 Ubuntu/unity: open file in terminal

  1. #1
    Join Date
    Jan 2012
    Beans
    2

    11.10 Ubuntu/unity: open file in terminal

    Hi
    I'm new to Ubuntu-linux and terminals, and I'm trying bit by bit to learn how to use the terminal. By now I've learned (re-)installing, updating, and such. But one thing irritates me: how do I open a file in 11.10 ?

    I searched a bit and found answers like
    gnome-open filename.xxx
    which doesn't help me much not having gnome

    then I found out the general solution of
    xdg-open xxfilename.xxfileappendix
    which suits me fine - it's just that I can't get it to work. Only if I type out the whole directory, but then it looses the point of opening a file in the terminal as it will be quicker to use the mouse..

    I know it's out there, and the answer is probably really simple - but: how ?

    cheers /steffen

  2. #2
    Join Date
    Sep 2005
    Beans
    463
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: 11.10 Ubuntu/unity: open file in terminal

    I could be wrong here, but aren't you always supposed to direct gnome-open or kde-open to the right directory?

    You can use 'autocompletion' of directories and files by using the TAB key in a terminal...

    e.g. if you want to open a file paper.pdf on the desktop I (using KDE) just type:
    kde-o TAB --> autocompletes to kde-open
    De TAB --> autocompletes to directory Desktop
    p TAB --> autocompletes the filename to paper.pdf

  3. #3
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 11.10 Ubuntu/unity: open file in terminal

    Quote Originally Posted by uglspil View Post
    Hi
    I'm new to Ubuntu-linux and terminals, and I'm trying bit by bit to learn how to use the terminal. By now I've learned (re-)installing, updating, and such. But one thing irritates me: how do I open a file in 11.10 ?

    I searched a bit and found answers like
    gnome-open filename.xxx
    which doesn't help me much not having gnome

    then I found out the general solution of
    xdg-open xxfilename.xxfileappendix
    which suits me fine - it's just that I can't get it to work. Only if I type out the whole directory, but then it looses the point of opening a file in the terminal as it will be quicker to use the mouse..

    I know it's out there, and the answer is probably really simple - but: how ?

    cheers /steffen
    You of course either have to be in the directory where the fiel is, or type in the full apth to that directory. How else could the shell otherwise figure out which file to open and where?

    Other than that, opening files in terminal is as simple as it can be. You simply tell the shell which program you want to use to open the file, and then of course the file itself.

    File in curretn directory:
    Code:
    programname filename
    ...and file in any directory:
    Code:
    programname /path/to/filename

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
  •