Use Gedit as Remote File Editor via FTP and SSH (Ubuntu)

Posted on April 2, 2010
Filed Under Linux | 20 Comments     

Migrating from Windows Vista to Ubuntu 8.04 and have been using it all the way to 9.10, I am now a complete Linux convert. As a web developer, I am frequently required to edit files on remote servers. Without some kind of mechanism to automate the upload process, it becomes laborious as number of files grows. On Windows system I use Notepad++ and its FTP plugin to edit remote files, which work pretty well.

Now I am using Ubuntu, I have to find a similar editor to accomplish this. After some investigation, I found that the bundled text editor gedit is capable of doing remote file editing -- but not without some tricks. In the rest of the article I am going to show you how to do this.

Step 1: Connect to a Remote Server

  • Go to Places->Connect to Server and connect to a remote server. Make sure that you check "Add bookmark" check box.
  • Enter a name for this connection as you will use this to refer to the remote server in gedit.
  • Click "Connect" to proceed.

If you are promoted to enter a password, enter it and choose a password option that fits your need. They are self-explanatory.

Step 2: Editing Remote File

  • Once you are successfully connected to a server, fire up gedit.
  • Go to view and check "Side Panel" or press F9.
  • At bottom of side panel, click "File Browser" tab.
  • On top of the side panel drop down menu, select "Bookmarks".
  • Expand the server you are connecting to.
  • You now can edit remote files as they are local files.

Gedit is a very powerful text editor. In my option it is as feature-rich as Notepad++. Syntax highlighting, bracket matching, automatic indentation are the features I find the most useful to me. I use the following preferences to make gedit the programmer's perfect text editor:

Another tip is that you can narrow the file list in the side panel by applying filter. For example at bottom of the side panel, if you enter "*.php" in the "Match Filename" text box, the side panel now will only show PHP files.

Once again thanks for reading.

If you find this post useful, consider donating a few bucks to help the server running cost.

Go to Top

Subscribe to keep track of your comment.
20 Comments so far
  1. if April 21, 2010 8:12 am
    but lots of file edit must in sudo.
    so this aticle won't fit most situation
  2. Cuong April 29, 2010 12:43 pm
    I use this mostly to edit websites which do not require super user privilege. If I need to edit system files remotely, I would just SSH and use vi for the job. So as a web developer, I use this method 99% of the time.
  3. Gadget Newz May 3, 2010 4:49 am
    [...] Use Gedit as Remote File Editor via FTP and SSH (Ubuntu) [...]
  4. maxzec May 18, 2010 6:30 am
    Thanks a lot. That's what I was looking for. And really Gedit can be trasformed in a complete IDE with its plugins.
    If you're interested, you can read this post (in italian):
  5. Enno November 27, 2010 4:10 am
    Straightforward and helpful. Thanks
  6. thedoctorzeus January 5, 2011 2:26 pm
    Thank you! I use Coda on my Mac and was trying to find something simple and similar for Ubuntu
  7. engin’in ubuntu rehberi - yazilan.org February 3, 2011 2:59 am
    [...] http://thecodecentral.com/2010/04/02/use-gedit-as-remote-file-editor-via-ftp-and-ssh-ubuntu [...]
  8. Dave February 3, 2011 3:56 pm
    How can I do this when using gedit on a Mac? I can use gedit and the file browser plugin just fine. But I don't see how to add add a bookmark when I connect to the server.
  9. Evgeni Petrov April 23, 2011 8:39 am

    I am working like that but if I do not have activity on the ftp server, Nautilus seems to drop the connection and gedit hangs when I try to save a file. Do you know how I can prevent this? (by automatically closing the file in gedit or by keeping the ftp session alive in Nautilus).
  10. claw April 25, 2011 12:20 am
    Thanks that helped me a lot
  11. Remesh June 2, 2011 2:14 am
    Nice post, very informative & to the mark.
    Thanks, keep up the good work!
  12. Hamdi June 23, 2011 2:10 pm
    Thanks a lot!! This is awesome! I was looking some ways to edit files remotely using my favorite editor and IDE with this method I can not just use gedit but any IDE or editor to edit files! Thanks a lot for sharing:)
  13. Jaime Orjuela July 1, 2011 5:27 am
    it was astonishing ... Thanks a lot!!!
  14. [...] based on Amazon Linux. I am so used to the "Ubuntu" way of remote editing, which I have described here. With EC2 instances, however, this method seems to be impossible -- as I need to supply the key [...]
  15. [...] This is just what researchers on the EU-funded POPEYE project have been doing. Read more . . . [caption id="" align="alignright" width="202" caption="Image via Wikipedia"][/caption] When people ...0-880.jpg" alt="Picture of the EO Communicator (source: the Un..." width="202" height="198" [...]
  16. [...] This is just what researchers on the EU-funded POPEYE project have been doing. Read more . . . [caption id="" align="alignright" width="202" caption="Image via Wikipedia"][/caption] When people ...0-880.jpg" alt="Picture of the EO Communicator (source: the Un..." width="202" height="198" [...]
  17. Lauren April 21, 2012 9:17 pm
    Thank you so much. I've been trying to do something like this for a long time. I didn't know it was so simple.
  18. Jenny Saberi July 3, 2012 2:11 pm
    I'm not sure exactly why but this weblog is loading incredibly slow for me. Is anyone else having this problem or is it a problem on my end? I'll check back later and see if the problem still exists.
  19. Can't see "places" menu in GEDIT January 11, 2013 1:01 pm
    [...] When I go to click Open I just get a list of files to share, this is the tutorial I'm trying to follow http://thecodecentral.com/2010/04/02...and-ssh-ubuntu [...]
  20. (flazz networks|vps murah|vps windows) December 23, 2013 7:21 pm
    I recently would not depart your site previous to suggesting we in fact enjoyed the common info a person offer for a visitors? Can be gonna be once more normally to see new articles

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)


If you want to post source code, please wrap it with <pre> </pre>, or it will break.
For quotations, please use <blockquote> </blockquote>

Subscribe to keep track of your comment.

To my beloved readers:
Please note that you may freely post comments here, but I will most likely not be able to reply to most them due to my current availability.

Code Central Special


  • Tell other about your screen resolution (pulled from web stats):

    View Results

    Loading ... Loading ...