Is there a way to live edit files on the nano using another machine?

Im making a python program for the nano and like coding it using the vscode i have on my desktop computer. I know that you can install vscode on the nano but its really much easier if i do it on my desktop since i can open several other webpages for documentation without slowing the nano.

I have tried two ways:

  1. Connecting via vnc to the nano. I found the vnc server of the nano to be sluggish, there is also a problem that if no monitor is connected the default resolution is very small which makes coding hard. I tried fixing these problems but the solutions so far i have tried did not work, so i just gave up on this method

  2. The second method is what im currently doing. I have a copy of the code in my desktop machine, edit it there and when im ready to try the code i use ssh to transfer the files and run the files. The only thing i dont like with this method iis that i have to run 2 or 3 terminal commands. Those 2-3 terminal commands really do get annoying when you are making small but many edits on the code

So are there any better way of doing this? Ideally the perfect scenario is that there is a VScode plugin that i can install on my desktop machine that can just live edit code directly in the nano and at the same remotely run the program.

What are your thoughts

Use ssh and a text-mode editor. Most people on Windows use PuTTY to ssh to Linux. The response is quite efficient and “snappy”, but you won’t have a GUI.

Keep in mind that with what I’m about to say this is easy (trivial) to set up between two Linux computers, but with Windows there would be a learning curve…

You can set up ssh login keys. ssh can perform file copy with scp. If you set up keys, then your user can ssh without using a password (and it is in fact more secure to use key-based authentication). The scp command also runs without a password. You could then use scp or rsync over ssh without passwords as if the files all exist on the same machine. Naming someone@192.168.55.1 for example becomes equivalent to the Windows “C:\\”.

Is your other computer using Linux? Or Windows? The answers change depending on that. ssh can be used for X GUI forwarding, and this too benefits from keys over ssh, but you have to have a compatible X server.

I do not like this, i will loose code editing features. I would like to code in a proper code editing environment

This is actually what im already doing. The only upgrade from here would be an “auto-sync” feature. where if the files are changed it would immediately do an scp to the nano

This actually gives me an idea, I can write a script that does exactly this.

VScode has a build in feature thats supports this, i use it every day(beware, memory usage on the Jetson can be high). Just follow the instructions on this page 😉: Developing on Remote Machines using SSH and Visual Studio Code

Just finished the setup and im loving it ! This is exactly exactly what i need ! Thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.