Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to start a terminal window at the directory selected


    I would like to be able to launch a shell terminal window that starts in the directory I select in nautilus.

    In windows it's a real simple .inf file called "Command Prompt Here". It is installed with XP.
    I have tried adding a custom viewer directories that runs bash but it seems to run a bash window which goes away immedaitely.

    Anyone got a tip. This seems like a real intuitive feature that should be automatically installed with linux. More so than windows.

    It seems a glaring omission to be.

    Eric W

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    if you use KDE, when your next on the file brower, goto tools->Open Terminal, or right click and choose "Open Terminal Here.."

    Jason

  3. #3
    OK, Thanks. I am new and haven't really addressed the issue of which is better - gnome or KDE?
    Does anyone happen to have any idea how to do this in Gnome/Nautilus?

    I have been foling with file associations and I had another question.
    How do you remove actions for a mime type?
    I added a couple of actions to the folder type to try and get this going but they didn't work and found there was no way of removing them without deleting the mime type and recreating. There must be a better way.

    Eric W

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Apr 2003
    Location
    Pontypridd, Wales
    Posts
    104

    open terminal here

    Go here and download the script:

    http://www.themedepot.org/itemdetail.php4?id=298

    place the script in /home/your_user_name/.scripts (there should be instructions) and make sure it's exicutable.

    You should then have the 'open terminal here' option available to you on a right click, scripts.

    Ask if you have any problems.
    \"One World, One Web, One Program.\" -- Advertisement for Internet Explorer.
    \"Ein Volk, Ein Reich, Ein Fuehrer.\" -- Adolf Hitler.

  6. #5
    Linux Newbie
    Join Date
    Apr 2003
    Location
    Pontypridd, Wales
    Posts
    104
    actually I think the file you need is /home/your_user_name_/.gnome2/nautilus scripts

    There should be how to's on the theme depot or Gnome hacks http://jodrell.net/gnome-hacks/ websites.
    \"One World, One Web, One Program.\" -- Advertisement for Internet Explorer.
    \"Ein Volk, Ein Reich, Ein Fuehrer.\" -- Adolf Hitler.

  7. #6
    Thank you very much for your responses! I actually tracked down a coupke of fixes.

    One that is a bug in Gnome for nautilus in that there should be be a mime type association for gnome-terminal. discussed here:

    http://gnomesupport.org/forums/viewt...ight=hack+week

    (Could be edited for any terminal. It would be nice for xterm but it seems exceedingly difficult to get xterm to start at a particular directory. If you use -e cd dir xterm seems to do the cd then exit. You can verify this by trying xterm -e ls some large directory like usr/share. The ls output will spit by and then xterm will close.

    I found a shell script like the perl script from theme depot.

    Code:
    #!/bin/bash
    gnome-terminal --working-directory=`echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"`
    I didn't try the perl script but it looks like it might be buggy because it uses the nauitilus var NAUTILUS_SCRIPT_CURRENT_URI which is mentioned in the discussion of the shell script I found and the iteration that tried using NAUTILUS_SCRIPT_CURRENT_URI didn't work.

    Anyway thanks again the sites given were good resources to know about

    In trying to work this out I think I discovered a bug in gnome or nautilus. Recall the problem of getting xterm to start at a particular dir. I found a code snippet that I wanted to try.
    xterm -e /bin/sh -c "cd $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
    but when I entered this in the edit file type dialog (Open with...|Go There button) as a custom action then pressed ok the "xterm -e" is always dropped from the action.

    If anyone has a clue about that it would be nice to hear.

    Anyway thanks again
    Eric W

  8. #7
    Linux Newbie
    Join Date
    Apr 2003
    Location
    Pontypridd, Wales
    Posts
    104
    That's an old bug (2002).

    You should have no with the nautilus script, many people are using it sucessfully!
    \"One World, One Web, One Program.\" -- Advertisement for Internet Explorer.
    \"Ein Volk, Ein Reich, Ein Fuehrer.\" -- Adolf Hitler.

  9. #8
    Linux Newbie
    Join Date
    Apr 2003
    Location
    Pontypridd, Wales
    Posts
    104
    ...actually I've just downloaded the script from themedepot.org.

    I placed in in /home/my-user-name/.gnome2/nautilus-scripts and made it executable. Works like a dream.
    \"One World, One Web, One Program.\" -- Advertisement for Internet Explorer.
    \"Ein Volk, Ein Reich, Ein Fuehrer.\" -- Adolf Hitler.

Posting Permissions

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