I am accessing my server (Ubuntu based) from my local Ubuntu using terminal. I would like to open files on the server using my local application (for example, Sublime editor). Could anyone help me in this?

  • ...and what is the problem? – mikewhatever Mar 4 '17 at 9:46
  • I was hasty in answering, but in any case you will need to connect to the server via sublime text and work from there. See this link – George Udosen Mar 4 '17 at 9:53
  • I changed the title of the question. Your general question is how to access the server files as if they are local to your desktop Ubuntu. The way to do this, is to mount your Ubuntu server home directory through SSH. – user4124 Mar 4 '17 at 10:09
  • @mikewhatever, getting following error while trying to open server files using sublime: Unable to load gtk_window_unfullscreen from libgtk-x11-2.0.so Unable to load gtk_widget_modify_bg from libgtk-x11-2.0.so – Rajeev Jayaswal Mar 4 '17 at 10:15
  • 1
    Possible duplicate of Mount remote directory using SSH – David Foerster Mar 7 '17 at 12:57

You can mount your Ubuntu server files to your local Ubuntu installation, and then edit those files with Sublime as if they were local.

The following assumes that you can SSH access to the Ubuntu server.

sudo apt-get install sshfs

This will install the sshfs package.

mkdir ServerFiles/
sshfs myServerUsername@example.com:/home/myServerUsername/ ServerFiles/

Here you create an empty directory in your home folder and the sshfs command will connect it to your server's home directory.

You can now visit the ServerFiles/ directory with Sublime (or any other program) and you have direct access to your server files, locally!

To disconnect when you finish,

fusermount -u MYSERVERMOUNT/
| improve this answer | |
  • Is there no other way like export DISPLAY=:0 and open using local editor ? – Rajeev Jayaswal Mar 4 '17 at 10:14
  • With export DISPLAY... you would be running the GUI program on the server (you would need to install the ubuntu-desktop package on the server!). If your connection is not particularly fast, then it will not work very well. – user4124 Mar 4 '17 at 10:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.