I want to open link like "ssh://username@hostname" with ssh.
I think xdg-open can help me(xdg-open ssh://username@hostname), but I don't know how.
How can i do it?


What I could gather, you have to register the protocol in the gconf:

gconftool-2 --set --type=bool /desktop/gnome/url-handlers/ssh/enabled true
gconftool-2 --set --type=string /desktop/gnome/url-handlers/ssh/command 'gnome-terminal -e "%s"'
gconftool-2 --set --type=bool /desktop/gnome/url-handlers/ssh/needs_terminal false


I can't get it to register ssh in chromium though. Haven't tried with firefox, but these instructions should help.

| improve this answer | |
  • 1
    Just a note: This does not work in Gnome 3. I tried. – Zan Lynx Nov 8 '12 at 19:44

You can open the ssh link on the command line by using ssh username@hostname (I think you know this already) if you want to access it via nautilus in gnome then you can minimise all windows and do [ctrl]+L which will open a dialog. Type in your url ssh://username@hostname and click open.

This should solve most of your problems. xdg-open can only open the url if the url has been mounted somewhere already. Otherwise it can't access the ssh files.

| improve this answer | |

if i understand your question correctly then i think you want to open such link in gui mode. To open such links in nautilus just replace ssh with sftp

open nautilus and type sftp://user@host in address bar and press enter

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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