exo-open ssh://<computer>

Jeff Sadowski jeff.sadowski at gmail.com
Wed Apr 5 19:22:31 CEST 2017


On Wed, Apr 5, 2017 at 10:59 AM, Jeff Sadowski <jeff.sadowski at gmail.com>
wrote:

>
>
> On Wed, Apr 5, 2017 at 10:48 AM, killermoehre <killermoehre at gmx.net>
> wrote:
>
>> Am 05.04.2017 um 18:25 schrieb Jeff Sadowski:
>> > for now I wrote a wrapper like so
>> >
>> > #!/bin/bash
>> > if [ "${1:0:6}" = "ssh://" ];then
>> > /usr/bin/gnome-open "$@"
>> > else
>> > /usr/bin/exo-open-moved "$@"
>> > fi
>> >
>> > I moved /usr/bin/exo-open to /usr/bin/exo-open-moved
>> > and linked to my wrapper from /usr/bin/exo-open
>> >
>> >
>> > On Tue, Apr 4, 2017 at 4:19 PM, Jeff Sadowski <jeff.sadowski at gmail.com
>> > <mailto:jeff.sadowski at gmail.com>> wrote:
>> >
>> >     After a while I get a message in a popup:
>> >
>> >     Failed to open "File System".
>> >     Connection failed.
>> >
>> >     On Tue, Apr 4, 2017 at 1:13 PM, Jeff Sadowski
>> >     <jeff.sadowski at gmail.com <mailto:jeff.sadowski at gmail.com>> wrote:
>> >
>> >         So most other protocols it looks like I can setup as I want why
>> >         can't I set ssh or sftp what would be preventing that?
>> >         I tried with ssi://<computer> and did what I did with ssh
>> >         replacing the ssi at the end and it launches my ssh with the
>> >         ssi://<computer> link
>> >
>> >         On Tue, Apr 4, 2017 at 1:09 PM, Jeff Sadowski
>> >         <jeff.sadowski at gmail.com <mailto:jeff.sadowski at gmail.com>>
>> wrote:
>> >
>> >             I realize you said sftp not scp which when I tried sftp it
>> >             did nothing like ssh did.
>> >             When I tried setting it with xdg-mime it still does nothing.
>> >             Interesting that scp did work.
>> >
>> >             On Tue, Apr 4, 2017 at 1:00 PM, Jeff Sadowski
>> >             <jeff.sadowski at gmail.com <mailto:jeff.sadowski at gmail.com>>
>> >             wrote:
>> >
>> >                 xdg-mime default scp.desktop x-scheme-handler/scp
>> >                 nano ~/.local/share/applications/scp.desktop
>> >
>> >                 <=============content
>> >                 [Desktop Entry]
>> >                 Version=1.0
>> >                 Type=Application
>> >                 Exec=bash -c '(URL="%U" HOST="${URL:6}";
>> >                 $HOME/test_scp.sh $HOST); bash'
>> >                 Icon=utilities-terminal
>> >                 StartupNotify=true
>> >                 Terminal=true
>> >                 MimeType=x-scheme-handler/ssh
>> >                 Name=SSH Launcher
>> >                 Comment=Launch SSH
>> >                 <===============end content
>> >
>> >                 did work.
>> >
>> >                 On Tue, Apr 4, 2017 at 12:31 PM, Jeff Sadowski
>> >                 <jeff.sadowski at gmail.com
>> >                 <mailto:jeff.sadowski at gmail.com>> wrote:
>> >
>> >                     I never added scp with xdg-mime. I did add ssh which
>> >                     seems to work for gnome-open but not for exo-open.
>> >
>> >                     On Tue, Apr 4, 2017 at 12:28 PM, Jeff Sadowski
>> >                     <jeff.sadowski at gmail.com
>> >                     <mailto:jeff.sadowski at gmail.com>> wrote:
>> >
>> >                         Failed to open URI
>> >                         "scp://jeff-server/home/jeff/testfile".
>> >                         The specified location is not supported
>> >
>> >                         On Tue, Apr 4, 2017 at 12:18 PM, killermoehre
>> >                         <killermoehre at gmx.net
>> >                         <mailto:killermoehre at gmx.net>> wrote:
>> >
>> >
>> >
>> >                             Am 4. April 2017 19:57:32 MESZ schrieb Jeff
>> >                             Sadowski <jeff.sadowski at gmail.com
>> >                             <mailto:jeff.sadowski at gmail.com>>:
>> >                             >I would like to set exo-open to run a
>> >                             script of mine in the default
>> >                             >terminal program.
>> >                             >
>> >                             >I have "gnome-open ssh://<computer>" acting
>> >                             as I like by using:
>> >                             >
>> >                             >xdg-mime default ssh.desktop
>> >                             x-scheme-handler/ssh
>> >                             >
>> >                             >and used a text editor to make
>> >                             ~/.local/share/applications/ssh.desktop
>> >                             >
>> >                             >But xdg-open uses exo-open for XFCE4 so I
>> >                             would like to know how to
>> >                             >setup
>> >                             >exo-open to recognize a new protocol like
>> >                             ssh://<computer>?
>> >                             >
>> >                             >Is this possible?
>> >                             >
>> >                             >The purpose is to use this in
>> >                             google-chrome. Google-chrome doesn't give
>> >                             >an
>> >                             >option to send more arguments that I can
>> see.
>> >                             >
>> >                             >I see people talking about adding options
>> >                             to the command line but as I
>> >                             >said
>> >                             >that will not work as other programs will
>> >                             not send those to xdg-open.
>> >
>> >                             Hi Jeff,
>> >
>> >                             does it work if you just use »exo-open
>> >                             sftp://host/path/to/file«?
>>
>> Hi,
>>
>> »xdg-open ssh://host/path/to/file« is working very well for me on my
>> Arch Linux without any need for wrappers. But if you want to be a little
>> bit more purist, use first »gvfs-mount ssh://host/path/to/file« and than
>> »gvfs-open ssh://host/path/to/file«, because exo-open (called by
>> xdg-open if this script detects Xfce) is basically falling back to gvfs
>> (first mounting, than opening) if available.
>>
>
> Are you able to change the behavior for ssh:// and sftp:// as I tried with
> xdg-mime?
> I'm using Ubuntu 16.04 with the xfce4 desktop
> I think something is set somewhere preventing me from changing the
> defaults for exo-open which I don't know what they are set to do.
> When I messed up and set scp I was able to get that working as I wanted
> but I can not change the behavior of ssh:// or sftp://
>
Re-reading what you said I'd definitely want to change the default behavior
of ssh://
as I expect it to be ssh://[username[:password]@]host[:port] format as
described elsewhere on the net. Not at all like a file path.
I don't want gvfs touching it.
That is likely what it is doing is trying to give it to gvfs it would make
sense of the error messages but not at all what I want ssh:// doing.


>
>>
>> _______________________________________________
>> Xfce mailing list
>> Xfce at xfce.org
>> https://mail.xfce.org/mailman/listinfo/xfce
>> http://www.xfce.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.xfce.org/pipermail/xfce/attachments/20170405/c8980481/attachment-0001.html>


More information about the Xfce mailing list