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.

As I already wrote, open-in-erminal package does not work for remote hosts for me Nautilus "open in remote teminal" fails after login.

So I decided to try to write my own script to do same thing. I will run it when I'm on location like "sftp://[email protected]"

I added script like this in /home/[user]/.gnome2/nautilus-scripts to get started:

#!/bin/sh
gnome-terminal --execute '/usr/bin/ssh [email protected]'

But, it fails with:

There was an error creating the child process for this terminal.
Failed to execute child process "/usr/bin/ssh [email protected]" (No such file or directory)

Any idea why this happens.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I think that the quotes are unneeded. Try:

#!/bin/sh
gnome-terminal --execute /usr/bin/ssh [email protected]
share|improve this answer
    
Haha, bingo, thanks! First version was gnome-terminal --execute ssh [email protected], but that failes, so I added absolute path and wrapped with quotes, which was wrong :) Any idea why open-in-terminal package does not work for sftp locations? Хвала још једном земљаче :) –  umpirsky May 30 '11 at 8:42
    
I don't use that script so I can't really help you. Sorry :/ Nema na čemu :) –  miloshadzic May 30 '11 at 8:45
    
OK, you solved most of it. Now I only need to parse $NAUTILUS_SCRIPT_CURRENT_URI and ssh to current server. –  umpirsky May 30 '11 at 8:47
    
What I'm trying to do now is gnome-terminal --execute /bin/echo $NAUTILUS_SCRIPT_CURRENT_URI, but terminal fails to open, even if I replace variable with hardcoded string :o –  umpirsky May 30 '11 at 8:53
    
You'll probably have more luck by making that into a new question. I've never scripted Nautilus –  miloshadzic May 30 '11 at 9:08

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.