-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sftp/scp support [gvfs,sshfs backends: separate projects; internal backend: see #247] #86
Comments
and thank you all guys for the work you are doing! |
We've had a discussion in the #14 about netbox. It's questionable, whether it's needed in linux. I think the better solution is to use fuse, how it's done in linux file manager, because linux can mount almost everything and far only need to utilize this capabilities. |
What about implementing native far plugin as a helper for establishing ssh connection and mounting remote fs via fuse, while entering and storing ssh credentials inside Far as it is done on windows? Commonly used linux FMs also behave like this. upd: ssh credentials may be stored inside system wallet if possible. upd 2: linux can mount ftp via fuse also, but I see ftp plugin ported ;) |
Yep, in my opinion it's how this should work. Kinda sophisticated mount point manager. BTW use key based authentication for ssh |
Agree, it would be great. btw, mount point manager inside far itself - sounds like a miracle :)
not worth time for temporary experimental VMs :) |
quoting discussion with one of far manager windows fans:
|
It's not difficult, but it needs to be implemented, so everybody who has time are welcome to try. |
Not sure if I have enough skills to do it. My last c/cpp expirience was years ago. May try to look into the code next week if I have some luck :) |
It's not that I'm somehow suggesting, that you should do it. I was addressing everybody, who read this issues. I think, good contribution would be for example to investigate which c++ libraries could be utilized for this task and how it's done by nautilus,pcmanfm, dolphin and other file managers. |
There're some limitations of mount:
|
Fuse does not require root priveleges. And it's not a problem to use gksu, or similar mechanism. |
@volth exactly. This also good point why it makes no sense porting old far plugins and then supporting them. |
caja does that somehow without asking for root password. it's almost comfortably usable with far then, but that I want is establishing connections from far itself :) |
looks like caja uses this API for mounting: see https://github.com/mate-desktop/caja/blob/master/src/caja-connect-server-operation.c for details upd: as caja also allows to connect to webdav and windows shares, using this api may solve that issues too. upd2: possible limitation: not sure if that API supports key based auth. |
another issue is the possibility to execute commands remotely (that would be ideal). |
That about implementing GMountOperation shim as a separate plugin as temporary scaffold while proper implementation is discussed? There are still many cases then you even can not choose key based auth but still need sftp access (accessing shared hosting via public wifi, for example). This may be a fastest way to implement windows shares access also. |
I wonder whether there is DE agnostic lib for this. |
Had a brief look into the Dolphin's code. It uses KDE's KIO: btw, GMountOperation neither depends on GNOME nor MATE. AFAIK, the only required dependency is GLib. There is a third-party tool for managing remote fs mounts, called Gigolo, and it also uses gvfs: |
As of XFCE, the most popular answer on "how to do it" also references gvfs: The second answer suggests to use gigolo tool mentioned above (which uses gvfs also). Looks like it is the most popular/portable choise. |
Hm, well. Then next thing is to make some kind of proof of concept with gvfs. :) |
upd: gvfs is ok for key-based auth. see this thread: |
gvfs also provides command-line mount tool. Maybe it can be used for proof-of-concept implementation: Remaining task is to store connection info and user credentials, but farftp already implements it (using system wallet may be left to be a future improvement). |
btw, is it hard to port something like this:
? if there were any scripting language adapter for far, I could try to implement this by myself :) |
The difficult thing is to know FAR plugin API and how to use it, since I've never developed plugins for FAR :) This looks pretty straight forward (actually another plugin, which should be easy to implement in linux with modern c++):
Adds panel to disk menu. And (I suppose) relevane callbacks for panel:
|
Not sure if remote fs should be placed inside drive menu. The way I see it is a farftp-like plugin which displays on a panel a list of saved connections, and a) if connected - changes panel's path to mount point b) if not connected - executes gvfs-mount and goto a) This may be implemented via modifying farftp by removing all ftp protocol releated stuff and adding very little bit of new code. 2-3 extra keystrokes to reach target place are not a problem for proof-of-concept implementation :) |
It's MUCH easier to implement this from scratch, then to dig through old poorly written code ;) |
This concept is still easier to implement as there is no need to touch drive menu except for adding one entry for plugin itself :) |
Implementing this as a simpliest plugin example can be good starting point for newbie linux plugin authors. |
Nothing is so eternal as temporary things :) Better solution: far provides function to add plugin controlled entries to disk menu. I.e. map: plugin id -> vector of entries. When on such entry is selected, plugin gets notification. When plugin is removed, all entries associated with plugin are removed. |
Text file in profile is easily configurable manually, that's why sooner or later I will commit such a feature. Another question if it fair or not to use such user-editable thing from plugin as API. |
File has problems, because it's not synchronised with plugin. If plugin isn't loaded, you read disk menu entries from file try to open it, it will fail. Plugin won't be able also to handle mount for this entries. About interface: no. I didn't mean sub menu. I've meant more simply grouping. File is good for favourites, but once again, if we have API interface for modifying the disk menu, it could be managed by plugin. |
Currently there is same problem: you may type ftp://foo in far's command line while ftp plugin not active - it will not work, and nobody cares about that :) |
Plugin registers "ftp" prefix during initialization (there is corresponding structure member for it). Plugin can also have access to cmd line input and do actions. If plugin is not registered of course "ftp" is not registred and far can't do anything about commands starting with "ftp" and it's perfectly fine. If fa would put entries in disk menu on it's own without having the plugin, it's a problem. So I think only plugin should be responsible for its entries and when it's not loaded, there won't be any entries and no problems. Anyway central file introduces redundance and redundance causes inconsistence and so should be avoided if there is no explicit need in it. |
Plugin also really needs callback, when entry it has responsible for, is selected in disk menu, because it needs to mount eventually (I.e after restart) |
JFYI: Implementation will take a little longer because of unforeseen problems with GMainLoop and signals. Somehow gmainloop creates another thread and receives signals there. I've found the way to call main thread (for opening authentication dialog), but this solution (with the GDispatcher and GMainContext) i don't really like. I'll look into this issue next week, so don't worry, I'm not forgetting about this plugin :) (Disclaimer: I've never developed for glib, gio and gtk+ so I'll need to read documentation about this things when I have time) |
any news on this? |
Yes. The news are: I was lazy :) I need to conquer my laziness and write user interaction (maybe on weekend), to allow login, password and domain name input. |
Can I do something to give you some pleasent mood & motivation to do it? |
For some reason far is locking up, when I try to open InputBox. I'm running out of ideas. At the beginning I was thinking, it's due to calls from another threads (where gio callback got called). I've changed the plugin, so that all calls to Far API would happen on the single thread... this didn't help. Far is stuck in message processing loop not accepting any input. I hope I can find something... |
https://github.com/cycleg/far-gvfs may be closed now? |
Closing. |
@unxed , on MacOS+far2l I am currently using sshfs to mount Ubuntu 16.04 system under normal user who can 'sudo' in ssh. I can browse Ubuntu files in the mount and edit user files. But if I edit files requiring sudo i get window asking 'operation requires privileges elevation', 'enter sudo password:'. I do this and then nothing happens. The question keeps popping up. What is the good way to handle occasional edit that requires sudo? |
@asimonov guess you should open the separate issue for this. |
Can I voice my concern for this issue? As mentioned here, on Mac gvfs solution is dissatisfactory because:
I believe, this issue is still the appropriate place for discussion? |
yes, have been using sshfs for few months now and the description is spot on!
would be really great to have proper sftp client packaged with far2l
… On 29 Oct 2018, at 17:39, Victor Sergienko ***@***.***> wrote:
Can I voice my concern for this issue? As mentioned here <#247 (comment)>, on Mac gvfs solution is dissatisfactory because:
fuse doesn't come with the OS;
it requires installing a kernel module, which very few Mac users will do;
connecting to multiple new hosts with sshfs each day is inconvenient.
asimonov's issue is a consequence of the imperfect integration too.
I believe, this issue is still the appropriate place for discussion?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#86 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAOr9vqPNcLr5y2Ej_2j_In3cEevDS_qks5upz1BgaJpZM4KAAXN>.
|
Having thought of it, we could do the same thing as NetBox did with WinScp: frankenstein some existing scp/sftp parts from OpenSSH/Pytty/FileZilla into the old Far's FTP client. |
Fix released :)
NetBox was unable to do the trick also. Btw, it looks like it's still possible to partially solve this using
Got no mac, just wondering. Is it actually so hard to get sshfs/fuse running there? o_O Anyway, supplying a script for easy sshfs/fuse installation depending on running OS is much less work than developing sftp implementation from scratch and keeping it up to date with actual SSH protocol, ciphers, hashes, etc. Btw, let's continue discussing SFTP-releated stuff here: #247 |
Wow, thank you very much!
Hm, that sounds somewhat condescending. It's not TOO HARD, it's quite INCONVENIENT and UNCONVENTIONAL. Unlike Linux, it's not normal to install new kernel modules on Mac. Installation itself doesn't run so smoothly as on Linux. On Mac, fuse and sshfs are two different software packages, and last time I tried they required some dances to get them to work together. Most of the tutorials get outdated with a new OS release, as the names of the kernel modules change. On a more attentive look, they are not too easy, as they address 2 different ways to install FUSE on Mac. It's a sign that none of these is perfect, both have their quirks. Another quirk is that the first Google hit, https://github.com/osxfuse/osxfuse/wiki/SSHFS, refers to SSHFS package dated in 2014. It's 3 OS releases old. I can bet it won't work and will require searching for/building another package. I can bet it takes some effort to find a compatible pair of FUSE and SSHFS packages. I honestly tried to run sshfs once, and ran into several unexpected issues. I'm not ready to try it again right now, but I eventually will. I will do my best to gather a list of problems that occured :) This all totals to "too much effort to get just another file manager running", while it, frankly speaking, could just work out of box. |
Summary:
|
@unxed thanks a lot! trying gvfs and fuse plugins now Just checked my records and I use FUSE + SSHFS. Then browse/edit files on mounted file systems in far2l. This is what my records show: |
native sftp/scp support (without using sshfs or something like it) would be nice
https://github.com/michaellukashov/Far-NetBox/
The text was updated successfully, but these errors were encountered: