Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Currently, if I click a launcher/shortcut icon etc i will get a new nautilus window. If there is already a nautilus window open, I would rather it open up in a new tab in the existing window (as if I had gone ctrl+T and browsed to the new location). How can I make this happen?

share|improve this question
    
Some applications have a command-line option for this sort of thing, but I don't find anything like that for Nautilus. I agree that would be useful though. –  DLH Aug 3 '11 at 19:43
    
Are you still experiencing this issue? –  jrg Jan 2 '12 at 19:26
    
yes............ –  wim Jan 2 '12 at 23:00
add comment

4 Answers

I believe it is not possible as
1) It is a suggested idea at Ubuntu Brainstorm that wasn't implemented yet,
2) And supposedly after analyzing the source code Shiki didn't find a way to pass this call to nautilus.

share|improve this answer
    
Thanks a lot :) –  int_ua Apr 21 '12 at 0:36
    
Thank you. Although the others answers are also interesting ;-) –  desgua Apr 21 '12 at 1:32
    
Yes, they are all good in some way :) And zuba will get another bounty if his hack will fix the initial issue :) –  int_ua Apr 21 '12 at 3:16
add comment

Whatever desgua said is somewhat right.
one option you have is to press ctrl+T to open a new tab in the same window
or
pressF3 in nautilus for split view

share|improve this answer
    
Thanks for your attention, but it's not about opening new tabs from within Nautilus :) –  int_ua Apr 21 '12 at 0:26
add comment

I wrote a bash script and a launcher for that. Put the script in ~/bin/nautilus-ctrl-t.sh and chmod u+x ~/bin/nautilus-ctrl-t.sh

pid=`pidof nautilus`
if [ -z $pid ]; then
    nautilus  $1 &
else  
    # save old clipboard value
    oldclip="$(xclip -o -sel clip)"

    echo -n $1 | xclip -i -sel clip
    #wmctrl -xF -R nautilus.Nautilus && xdotool key "ctrl+t" "ctrl+l" && xdotool type "${1}" && xdotool key Return
    wmctrl -xF -R nautilus.Nautilus && xdotool key ctrl+t && xdotool key ctrl+l ctrl+v && xdotool key Return

    # Restore old clipboard value
    echo -n "$oldclip" | xclip -i -sel clip
fi

and the launcher to ~/.local/share/applications/Nautilus-Ctrl-t.desktop

[Desktop Entry]
Type=Application
Name=Nautilus-Ctrl-t
Comment=Launches Nautilus if not yet, otherwise opens a new tab in it
Categories=FileManager;GNOME;
Icon=/usr/share/pixmaps/nautilus.xpm
Exec=/bin/bash -c ~/bin/nautilus-ctrl-t.sh
Terminal=false

Try that. Hope it helps.

UPDATE

Added a location as a script parameter

UPDATE 2

Replaced xdotool type with xclip

share|improve this answer
1  
You'll need to install xdotool and wmctrl for that script to work, as they're not installed by default. –  Jeremy Bicha Apr 20 '12 at 23:04
    
Well, it's a dirty hack, but I hope it'll work in most cases :) Can you please add passing location as the argument? It looks like possible with "Ctrl+L", insert passed address, "Enter"... –  int_ua Apr 21 '12 at 0:34
    
I'm awarding desgua right now, but I promise you another bounty if you will add custom location opening to your script :) –  int_ua Apr 21 '12 at 0:39
    
Added a location as a script parameter. –  zuba Apr 21 '12 at 6:28
    
Ok, I've started a bounty for you, but AFAIU I can't award two bounties in one day :) There's a space missing after $pid and it doesn't work for inode/directory MIME type for me. Can you please add instructions on how to make it work for desktop shortcuts? Another suggestion is to use xclip for pasting location to avoid triggering some actions if Ctrl+L fails :) –  int_ua Apr 21 '12 at 9:54
show 9 more comments

This is fixable very easily in CentOS 6.2 by going into the Nautilus preferences , on the "Behavior" tab and clicking the box called "Always open in browser windows".

You will know it worked because from that point on, in your folder browsing window, you will see a left hand nav on the window which is the method that nautilus uses to "re-use" the explorer window.

So, basically, all you need to figure out is "how to enable the left-hand navigation menu in a nautilus browser window".

share|improve this answer
    
That's an interesting info, thanks :) What is the version of Nautilus in CentOS 6.2? –  int_ua Apr 21 '12 at 0:24
    
That would be 2.28.4 which is for Gnome-2 (GTK+2). –  desgua Apr 21 '12 at 13:10
    
That being the case, it sounds like there is no solution for Gnome-3 ? –  djangofan May 9 '12 at 20:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.