Results 1 to 7 of 7

Thread: Shell/terminal -> shortcut for opening a directory path?

  1. #1
    Join Date
    Feb 2012
    Beans
    28

    Shell/terminal -> shortcut for opening a directory path?

    Hey!

    I've been looking for a shortcut that would let me open a directory I specify in the terminal in the default file-browser, perferably cross-plattform, linux-general-wise. Now, there's pcmanfm /usr/share, or nautilus /usr/share, but that's longer to type than going there by mouse.

    The best option so far is: gnome-open, when being in a gnome desktop environment, which would open either the default file browser or the default web browser if I typed in an URL.

    But isn't there anything shorter than this I'm baffled that linux people obviously really don't like the combination of a file browser and the terminal if such a short command has never been invented! (comparison on a mac: "open")

    Anyway, maybe an aditional keybind to the gnome-terminal might help (?) but I've never really tried looking for it not soo sure if that's possible at all. +that's also not very direct.

    Cheers! Gonna invent that command now and get rich (karma-wise.)

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,743
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Shell/terminal -> shortcut for opening a directory path?

    Please ignore my post. Completely different concern.

    Hi janisgeiger.

    There's a nautilus extension that allows you to right click on it and open a terminal on the current path.

    To install it:
    Code:
    sudo apt-get install nautilus-open-terminal
    Check more nautilus extensions here.

    Hope it helps.
    Regards.
    Last edited by papibe; March 22nd, 2012 at 07:17 AM. Reason: my mistake

  3. #3
    Join Date
    Feb 2012
    Beans
    28

    Re: Shell/terminal -> shortcut for opening a directory path?

    ah, ps. thought about it. maybe just starting a default "browse" terminal would help, so that gnome-open would be accessible via up cursor.


    So, to improve this thread, here's another thing I'm still uncertain of:
    If I extract a tar.gz and compile / install the software/the package via ./configure make and (sudo) make install,

    can the folder be deleted afterwards? and what exactly does "make clean" do?
    if the folder may not be deleted, I assume it's best to extract archives always in a good structured default directory like usr/src or usr/share, right?
    what's the most common one established in linux?

    cheers.

  4. #4
    Join Date
    Feb 2012
    Beans
    28

    Re: Shell/terminal -> shortcut for opening a directory path?

    thanks very unsure if that's what I was looking for though.
    it's an extension, not a terminal command, also works only with nautilus + it doesnt open a file browser via the terminal, but a terminal via the file browser (if I understood correctly) nevermind! not thaaat important. cheers.

  5. #5
    Join Date
    Jun 2006
    Location
    Brisbane Australia
    Beans
    713

    Re: Shell/terminal -> shortcut for opening a directory path?

    I've always used "xdg-open" for what you are talking about. E.g. I am sitting in a directory within a terminal window and I decide I want to open Nautilus (GUI) on that directory. Then I just type
    Code:
    xdg-open .
    This works in kde, gnome, and others.

    To your other question about installing software from configure source (you should have created a new thread btw!), yes you can just delete the entire directory. The make install copies everything to the installation dir (usually /usr/local). Note however that you can usually do a "make uninstall" from that source dir which will remove everything it installed in /usr/local. So if you delete your source dir then you lose the ability to (easily) remove the new software.

  6. #6
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    809
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Shell/terminal -> shortcut for opening a directory path?

    If you want a shorter command (e.g. 'go'), there is nothing preventing you from either making an alias in your .bashrc
    Code:
    alias go="xdg-open"
    Or making a symlink (my favorite, not limited to bash shells)
    Code:
    sudo ln -s /usr/bin/xdg-open /usr/bin/go
    Then just call 'go' for anything and everything
    Code:
    go .
    go myfile.pdf
    go http://website.com
    Cheers!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  7. #7
    Join Date
    Jul 2007
    Location
    Burlington, NC
    Beans
    1,995
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Shell/terminal -> shortcut for opening a directory path?

    Quote Originally Posted by janisgeiger View Post
    can the folder be deleted afterwards?
    Yes, but someday you may need it to `sudo make uninstall`

    Quote Originally Posted by janisgeiger View Post
    and what exactly does "make clean" do?
    I think it deletes everything that previous `make`s did. So it returns the source tree to a clean `./configure`ed state.

    Quote Originally Posted by janisgeiger View Post
    I assume it's best to extract archives always in a good structured default directory like usr/src or usr/share, right?
    Extracting, configuring, and compiling source doesn't require root privilege and it's always best to keep root to a minimum. Out of ancient habit, I always use "$HOME/src"
    But if I were concerned with cosmetics or if setting up a machine for a friend, I would probably use "$HOME/.local/src"
    Give me Free Software or Give me Death!

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
  •