In this article, I’m going to show you how to set up the Aptana Studio 3 IDE to remotely sync your code with the OLinuXino. This allows you to program on your desktop in a nice IDE, automatically transfer the files, and run the code on your OLinuXino all without effort. I’m going to show you how to set this up with the OLinuXino, but the same idea would work for any other single board computer (e.g. Raspberry Pi).
The reasons for doing this include:
- 1) IDE: This way you can use a powerful IDE on your desktop. I don’t know about you, but I’m much more productive with an IDE than just a text editor.
- 2) Dual Monitors: I have grown so accustomed to having my code on one monitor and a reference on the other that it is difficult to program without it.
- 3) Faster Execution: If your code is very computationally expensive, it will run much faster on your desktop than on the OLinuXino. Faster execution means faster debugging, which means that it takes you less time overall to create your program.
The first thing to do is to create a new PHP project to store the code in. For this example, I’m going to create a project to store my OLinuXino Sous Vide project code in. To do this, click on File -> New -> PHP Project…:
This will bring up a create project dialog, where you can fill in details about your project:
Note, this is where the project will be stored on your desktop. We’ll get to the synchronization with the OLinuXino in a second.
Once the project is created, in the project explorer, right click on the connections node under newly created project to add a new connection:
This will bring up a window to fill out some initial information about the connection.
Since we haven’t defined any remote connections yet, we want to click the new button and fill in the information about our connection:
Once that is filled out, hit OK and you will be back at the previous form:
Click OK here as well.
Now the connection between the desktop and the OLinuXino has been established. However, we have one more thing to do to set up automatic synchronization between the two. To do this, right click on the project node in the project explorer:
That will bring up a form that looks like this:
Since we created an SFTP connection earlier, we want to use that type of a deployment provider.
This will bring up a form that looks very similar to the one before, but with some more options at the bottom. Check the box to automatically synchronize the changes and click finish.
This will bring up a screen that looks like this:
Hitting synchronize will synchronize the files and change the window to look like this:
Now, when you go to save your files for the first time there will be a window that pops up saying that it is connecting to the remote computer and uploading the changes. I just checked the button to perform it in the background and not notify me.
Next a window came up telling me that the changes were successful. I would suggest hiding this one in the future as well.
Now that our code is remotely synchronized, we can go one step further. We can open up a terminal connection to the OLinuXino and run our code. To do this, open up the terminal tab at the bottom and create an ssh connection to the OLinuXino:
ssh -l olinuxino 192.168.0.105
Excellent, once you have done that you have a remote connection to the machine. From this you can run the code that was automatically transferred!