is it possible to edit files directly on FTP?

Rolando Pereira finalyugi at sapo.pt
Sat Oct 6 09:40:46 UTC 2007


John Carlyle-Clarke wrote:
> 
> Carl Friis-Hansen wrote:
>> On Tue, 2007-10-02 at 18:47 +0100, Gabriel Dragffy wrote:
>>   
>>> For example using Gnome I can create a folder on the Desktop that  
>>> shows me the files in my webserver. I double-click a file and it  
>>> opens in Gedit, which is great, but it won't let me save that file  
>>> back to the FTP folder after making changes. Is there anyway to  
>>> achieve this, it would be so convenient!
>>>
>>> Gabe
>>>
>>>     
>> I use gFTP and have assigned gedit as my editor in the preferences for
>> gFTP. I use gnome and it works nicely. When you save the file and leave
>> gedit, the a window pops up asking you if you want to upload the
>> changes.
>>   
> 
> A command line alternative is to use ncftp (which I always seem to go 
> back to - it's truly wonderful) and make sure that the environment 
> variable EDITOR is set to your preferred editor (e.g. /usr/bin/vim).
> 
> With this setup, the same occurs - you type "edit somefile", the file is 
> downloaded and the editor started.  When you save and quit the editor, 
> you are asked whether you want to upload the changes.
> 
> 
> 

I was going to suggest ncftp but you beat me to it :(

Anyway, if you want to use ncftp and gedit, you have to type the following:
EDITOR="/usr/bin/gedit" ; export EDITOR

Then, if you want to edit a file, login into the server, use "edit
filename" and it open gedit. Then close gedit and you receive an option
to upload the changes.

If you don't want to be typing the editor line every time you login,
just add it to the end of the ~/.bashrc file.

(or copy paste this into the terminal:
echo 'EDITOR="/usr/bin/gedit" ; export EDITOR' >> ~/.bashrc
)

-- 
                       _
ASCII ribbon campaign ( )
 - against HTML email  X
             & vCards / \




More information about the ubuntu-users mailing list