Working with a remote server through FTP/SFTP in Atom? [[ SOLVED WITH NUCLIDE ]]


#1

I’ve been using Kate for a while since I switched my company over to open-source only software. I never really liked heavy IDEs like Eclipse or Netbeans. They seemed to packed with arbitrary and complicated “functionality.” They felt sluggish and poorly put together.

So, I’ve always been a text-editor guy. The problem is, more and more I’m using the command-line, an SFTP/FTP client, the text-editor, etc. It’s just too much to manage. So, today I set off looking for a compromise. I was here once before about 6 months ago, and I think I dropped Atom because I couldn’t edit my JSON with it. From what I’ve been reading, it seems like that might now be an issue anymore, and the application seems a whole lot smoother since I last had a hold of it.

I’m wondering if there is a solution to another problem I’m having. Atom has met my needs with the terminal through the “terminal-plus” package. However, I still have a little bit of an issue. I like to modularize my computer systems. I have my own cloud server, and I have a development server so that my laptop can perform one function while the servers serves another.

That server maintains a domain name 24/7 and I can connect through SFTP from anywhere with an internet connection. The problem is that either that the community lost interest in SFTP, or hasn’t been able to make a whole lot of progress. I’ve spent quite a bit of time going through 3-4 SFTP related Atom packages today, and none of them really did it for me.

Is there a way to get the tree-view of a remote server’s files? Furthermore, is there a way to do it with a GUI rather than having to add another file to every single project?

What I have been doing with Kate was opening the files in Nautilus through SFTP, opening them by hand in Kate, and then saving straight from my text editor. That was kind of annoying.

I prefer to use the CLI for Git. However, I would really like to be able to point Atom at an AFTP connection and a path and just have it open up the whole directory, and let me live edit files. Then when I was done I could use a “terminal-plus” tab to SSH into my development server and use Git from the SLI.

Thanks in advanced, and I appreciate the cool editor you guys have worked to produce!


#2

Nuclide has SFTP capabilities. It brings a lot of extra baggage with it, but it looks cool.

Another option is to use an SSHFS client to mount your working directory as a network drive, then Atom can interface with it as easily as it would a physical disk.


#3

Hmmm. Nuclide looks promising. Some of the projects I’m working on are Node projects anyways, and the server is on 24/7 so it shouldn’t be that big of a deal to get it going. I’ll look into that a little more, but I’m really looking for something that doesn’t require any console commands once it’s up and running, and isn’t more than an Atom package on the client. I have the creeping suspicion that this is going to end up being something that requires a setup for every project. I’ll take a look.

As for the mounting as a network drive, I’m running Ubuntu on the client. If I use Nautilus to mount the server and drag my project files into Node, it screams when I try and delete a file, I can’t save anything, etc.


#4

What issues are you having with the extant SFTP packages?


#5

Sorry, I’m not really sure what you’re talking about, my friend.


#6

Extant.

You said that you had tried 3-4 packages that offer SFTP capabilities and found them wanting. What were the issues with them?


#7

I tried the following packages listed in order of promise…

  1. https://atom.io/packages/remote-edit

  2. https://atom.io/packages/remote-sync

  3. https://atom.io/packages/remote-ftp

  4. https://atom.io/packages/sftp-deployment

The first one does what it says it should flawlessly. My problem with it is that it is no more effective than Kate, because I have to manually open files one by one which is just not going to work when I’m working in a Laravel project, or something similar.

The second requires that I add a configuration file for the package to every new project which is too much of a hassle, and not a solution I could be satisfied with. (Although I do like the idea.)

The last two are essentially minor tweaks on the same concept as the second idea. All requiring project configuration files.


#8

The per-project config file strategy has some advantages. Since one folder is saved on your local machine, you always have a current version and can continue working if something happens to your Internet connection. It wouldn’t be hard to automate that process, especially on Linux.


#9

I’m not sure if this will satisfy your requirements, but you can also take a look at atom-commander

It doesn’t have a configuration file per project. You can’t add a remote folder as a project in Atom, but you can browse folders like one does in a typically Total Commander clone. I don’t know if that’s a deal breaker for you, but when it comes to SFTP I’ve personally never had the need to have a remote project folder.

Instead of having a project folder you can add bookmarks to remote folders to quickly get back to them.


#10

Atom-commander will not work unfortunately. However, I did manage to get Atom working on network drrives. I’m fine with just mounting the server in Nautilus and editing from there. However, deleting files is a bit weird this way since when I use Atom’s “delete” button in the tree viewer it tries to send the file to the trash which obviously isn’t going to work. I installed “permanent-delete” and that works beautifully. The only problem I have now is an aesthetic one. How can I make Atom use “permanent-delete” by default and then remove the “permanent-delete” menu item from the tree viewer?


#11

I spoke to soon. Atom is being RIDICULOUSLY slow, or something is going wrong. When I load up a Node Express project, or something similar, it fails miserably to delete a file, or even load the contents of one for editing.


#12

@DamnedScholar You were right all along. Nuclide was the best option. The server setup only took me like 10 minutes, and now all I don’t have to do anything for each project, I just have to ask for the directory I want.

Awesome solution. It also fixed my “permanent-delete” problem. Thanks.


#13

Good deal. Glad you got things running satisfactorily.


#14

You can use WinSCP if you have all your projects in one directory and you are using just one remote host for all these projects.
With WinSCP you can synchronize all your files in both directions. So you can work on yor local files.
And then you can just hide that window to tray. It will work in background.

Of course you can use few instances of WinSCP to synchronize projects with 2+ hosts. But in this case Im not sure if this will be a good solution.


#15

Why would I use an external application…let alone one I have to mess with Wine to use?


#16

I suppose that you might not have Windows :upside_down:


#17

I said in the thread I was on Ubuntu, but thanks anyways. Maybe it will prove useful to some poor sap still running Windows. Haha.


#18

Hi to everyone, I’ve same issue with remote server / Atom and I feel that arriving here I’m very close to the solution. But after installing Nuclide package and compiling the form for remote connection I’ve this error

Unexpected error occurred: bash: nuclide-start-server: command not found .

What Am I wrong?

Thanks for your help!


#19

This might sound like a cop-out, but the first thing you should do is reboot your computer. I don’t know the mechanics of Nuclide’s shell integration, but when a command isn’t found even though the piece of software is installed, the usual cause is that the folder containing the target hasn’t been added to the PATH environment variable. Each program that you’re running has a copy of the environment variables that they were started with, and the fastest way to make sure that everything has the right variables is to reboot.

If the command isn’t found after you reboot, then it could be a permissions error, or the binary could have installed incorrectly. Can you look in ~/.atom/packages/nuclide/ and see where the program lives?


#20

Looks like you may have not installed the required service on the server, see: