Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftp functionality #744

Open
gity-up opened this issue Jul 18, 2017 · 7 comments
Open

ftp functionality #744

gity-up opened this issue Jul 18, 2017 · 7 comments

Comments

@gity-up
Copy link

gity-up commented Jul 18, 2017

currently micro cannot read, create, or edit files on an ftp server. i recently tried editing a .htaccess file for a website and... oh no! i had to install gedit to geditdone 馃槅 . argh!

any plans to add this feature? vim has a plugin that allows for a capability like this. however, a more seamless implementation would be sweeter.

btw: thanks for the wacky watermelon colorscheme, very refreshing from time to time.

@mikhailnov
Copy link

this feature is not a UNIX way, you can mount FTP locally

@gity-up
Copy link
Author

gity-up commented Jul 24, 2017

what i'm trying to say is: once i've connected to my ftp site using my file manager, i would like to be able to click on text files to edit them with micro.

micro is my default text editor and cannot read, edit, or create files even after i've locally mounted an ftp root directory. if i open a text file from this ftp root directory with gedit, it works. i want to be able to use micro instead of gedit. gedit? 馃槅

@mikhailnov
Copy link

mikhailnov commented Jul 25, 2017

If you open ftp://username@host:port/folder in Nautilus, Thunar, pcmanfm etc., it uses gvfs (GNOME virtual filesystem) to open files, for programs each opened file is a local file, gvfs automatically syncs the changes in it with the server.
You may try to add micro to a menu with KDE menu editor, menulibre or other programs.
Or you may create ~/.local/share/applications/micro.desktop just like https://askubuntu.com/questions/97683/how-can-i-change-the-default-text-editor-from-gedit-to-vim

[Desktop Entry]
Categories=;
Comment=Open in Micro
Comment[ru]=袨褌泻褉褘褌褜 胁 Micro
Exec=vim %f
GenericName=Micro Text Editor
Hidden=false
Icon=vim
Name=Micro
Terminal=true
Type=Application
Version=1.0

Then just right click on a text file and choose opening it in micro.

@mikhailnov
Copy link

Personally I prefer to mount SFTP(SSH) via sshfs

@gity-up
Copy link
Author

gity-up commented Jul 25, 2017

thanks @mikhailnov, i connect through pcmanfm's built in sftp feature. as i've mentioned, micro is already my system's default text editor. micro is just not capable of reading, editing, or creating files on an ftp server. maybe someone should tag this as a feature request.

i'm curious, since you have gone through such great lengths to explain so much, have you tested your suggestions? is micro working for you via sftp?

if so, delineate your method, i would like to reproduce it on my system.

@mikhailnov
Copy link

no, I did not :) just suggested a possible method, sorry)) but some GUI apps do not interact corretly with GVFS, I didn't try to figure out why, it should be solvable, because GVFS creates a simple local file.
You use SFTP, not FTP, these are completely different things.

For myself I use sshfs
$ dpkg -l | grep sshfs
ii sshfs 2.8-1 amd64 filesystem client based on SSH File Transfer Protocol
I created directories ~/sshfs, ~/sshfs/host.tld
A script ~/sshfs/dum
sshfs username@host.tld:/home/user/folder host.tld -p port
And the same for each host with which I work frequently.
As I'm not using SSH keys for authorization, I open a terminal which is built in the Dolphin file manager and execute
./dum
and enter the password. If I used SSH keys, I would just double click the script and have the remote server filesystem mounted into ~/sshfs/host.tld

Maybe one day I will have time and will to debug issues with GVFS working with not all applications. What I've seen, its behaviour slightly changes from one Ubuntu version to another, probably GNOMErs are removing 'not needed' features from their libraries. For example, in some situations Geany (GTK2) did work with GVFS (sftp opened in Nautilus), in others it did not, I've already forgotten where it did and where did not. Now I just use sshfs and can even execute terminal comands with the remote filesystem as if it was a local one.

@ibrokemypie
Copy link
Contributor

perhaps make an ftp browser/editor plugin?
Seems like adding it as a feature would be adding bloat for many people, but as a plugin would be perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants