Change the Default Cloud9 Workspace on the BeagleBone Black

Reading Time: 2 minutes

The BeagleBone Black ships with a really great browser-based IDE called Cloud9, which is accessed by going to your BBB IP address at port 3000. While I don’t use Cloud9 for heavy development, it’s handy for debugging and quick changes to scripts. It also has a built-in terminal which means I can do everything in the browser.

By default Cloud9 launches a workspace at /usr/lib/cloud9, which has useful examples and scripts for all sorts of applications. I want it to point, instead, to my personal projects folder so I’ll change the default Cloud9 workspace on the BeagleBone Black to /home/debian/projects.

Override systemd Service

Cloud9 is launched by /lib/systemd/system/cloud.service which explicitly starts the server pointing to /var/ib/cloud9.

Cloud9 Service
Original Cloud9 Service

In order to change this, we simply need to override the service with one that points to our desired directory. Packages generally install services in /lib/systemd/system while our new override will reside in /etc/systemd/system.

Step 1:

systemctl edit cloud9

This creates our override in /etc/systemd/system/cloud9.service.d/override.conf and opens up the file for editing. Then we simply clear ExecStart (since it is additive) and provide the new directory in that file.

[Service]
ExecStart=
ExecStart=/usr/bin/nodejs server.js --packed -w /home/debian/projects

Step 2:

Perform a daemon reload and restart the cloud9 service

systemctl daemon-reload
systemctl restart cloud9

Step 3:

Restart the browser. The new folder should now be the default workspace!


View my tutorial on setting up internet over USB on the BeagleBone Black.

One thought on “Change the Default Cloud9 Workspace on the BeagleBone Black”

Leave a Reply

Your email address will not be published.