Exact steps::Using Scripted instead of Cloud9 IDE

Hello,

beeing curious about BoneScript, I've played a bit around. :wink:

As the Cloud9 IDE isn't fully open source and does some things I don't
like (e.g. using google analytics when opened, do they track which files
I'm editing?), I've searched a bit around and discovered Scripted. It
isn't as nice and polished as the Cloud9 IDE, but it is fully open
source and does the job as an browser-only remote editor for the BBB.
I've even seen that it has a vi mode. :wink:

The result are some few exact steps to install and use Scripted on the
BeagleBone Black, maybe some people like them. I've used an Angstrom
image which was from around July 2013, so something might have changed
since them. Feel free to update and/or add other exact steps and post
them wherever you like. :wink:

- Connect the BBB such that it has access to the Internet which is
necessary to install some things.

- Login as root

- Switch to user xuser, this is necessary because bower (a node.js
package installer) doesn't want run as root:
  su - xuser

- Clone the repository for Scripted:
  git clone git://github.com/scripted-editor/scripted.git scripted.git

- Switch to your very own branch of Scripted (and a commit number known
to work with my steps):
  cd scripted.git
  git checkout -b bbb bf924f98a210de49700366f22b89ab61c7d6203d

- Install necessary node.js modules:
  npm install

- Get some patches from me:
  wget http://ahsoftware.de/scripted-bone-patches.tar.bz2

(Nothing else needed from the Internet, you can disconnect the world.)

- Get root again:
  exit

- Move the repository:
  mv /home/xuser/scripted.git .

- Delete some leftovers:
  rm -rf /home/xuser/.npm /home/xuser/.bower /home/xuser/tmp

- Change permissions:
  chown -R root:root scripted.git

- Add my patches:
  cd scripted.git
  tar xjf scripted-bone-patches.tar.bz2
  rm scripted-bone-patches.tar.bz2
  git am 000*
  rm 000*

- Start the server:
  node server/start-bone.js

- Browse to your BBB at http://192.168.7.2:8123/editor
  (This is the IP if the BBB is connected using USB, it might different for you)

- Do a simple test for BoneScript:
  Click on BoneScript (on the left side)
  Click on test.js
  Click on the editor field (the source) and press SHIFT-ALT-x to run
  (a reload might be necessary to use shift-alt-x, don't ask me why)
  Click on .scripted to see how this is done

- Do a simple test for C++:
  Click on Cpp (on the left side)
  Click on test.cpp
  Click on the editor field (the source) and press SHIFT-ALT-x to run
  (a reload might be necessary to use shift-alt-x, don't ask me why)
  Click on .scripted to see how this is done

A warning is necessary: As I've configured Scripted to be able to
execute almost everthing by remote (and as root!), be sure you don't
connect it to a network reachable by world+dog. See server/start-bone.js
(at the end of the script) about how to disable the exec functionality
with the used version of Scripted. But even then, everyone will still be
able to save arbitrary files, filling up the available filesystem space.

Things you could do:

- Create a user for scripted to not let it run as root. Beeing root
isn't needed to run scripted and a very bad idea. I've just done it in
the steps above for simplicity.
- Add startup-script (similiar to the cloud9 startup-script)
- Add an button/icon for exec
- Modify the application server (the top right button in the editor) to
work remotely.
- Improve Scripted

Regards,

Alexander Holler

Thanks Alexander !

I have been looking into this myself, as I wanted to get started with something to familiarize myself with some of the newer web technologies( in the context of making a Linux appliance ).

Brackets http://brackets.io/ is another web IDE “framework” I have found with an open source MIT license, and I think originally started by adobe. It looks promising, but I have not yet dug in too deep. I will have to look both over closely when I get the chance.

Thanks again :slight_smile:

Would be great to have some feedback on how people like this. There is also the Adafruit IDE and Codebender. Suggestions/feedback from the community is encouraged!

Hello,

beeing curious about BoneScript, I've played a bit around. :wink:

As the Cloud9 IDE isn't fully open source

How is it not fully open source? There is a closed version, but we are
working with 100% open source for it.

and does some things I don't
like (e.g. using google analytics when opened, do they track which files
I'm editing?),

The version on the board shouldn't have any Google Analytics.

I've searched a bit around and discovered Scripted. It
isn't as nice and polished as the Cloud9 IDE,

Yikes. I'm concerned that Cloud9 IDE isn't nice and polished enough yet on
the version we are using.

but it is fully open
source and does the job as an browser-only remote editor for the BBB.
I've even seen that it has a vi mode. :wink:

Cloud9 IDE has a vi mode as well.

The result are some few exact steps to install and use Scripted on the
BeagleBone Black, maybe some people like them. I've used an Angstrom
image which was from around July 2013, so something might have changed
since them. Feel free to update and/or add other exact steps and post
them wherever you like. :wink:

Thanks!!!

If there is any interest in brackets I’ll do a write up on it for those of you who are interested. I’ll be testing several things this summer / autumn. This winter i get serious and buckle down.

My first project I wanted to write my own system editing tool via webUI to get used to nodejs and all applicable modules. For like viewing / modifying file such as /etc/network/interfaces. ETC

Hello,

beeing curious about BoneScript, I've played a bit around. :wink:

As the Cloud9 IDE isn't fully open source

How is it not fully open source? There is a closed version, but we are
working with 100% open source for it.

I'm not sure, but I assume it needs the cloud to be really usable. But I haven't had a deep look at it, because

The version on the board shouldn't have any Google Analytics.

it does make a call to Google Analytics and therefor I've thrown it away almost immediately. :wink:

I've searched a bit around and discovered Scripted. It
isn't as nice and polished as the Cloud9 IDE,

Yikes. I'm concerned that Cloud9 IDE isn't nice and polished enough yet on
the version we are using.

For me Cloud9 includes too much IDE stuff which just is confusing (imho) with too many buttons and things which aren't obvious with what they really do. It's the same problem as with all IDEs, they have to many features and pressing the wrong button might turn the world upside down. Besides that they always change their UI if you look away. I just want an editor and a button to make/compile/execute. :wink:

Btw., I have found another TODO for Scripted. I've tried it with my Android tablet (Chrome and std-browser) and neither the navigation bar, nor the editor pane did come up. I don't assume it's a big problem, but someone has to make a debug session to find out what fails. Using it with Firefox, Konqueror and Chrome on my Linux PC worked just fine.

Regards,

Alexander Holler

If there is any interest in brackets I'll do a write up on it for those of
you who are interested. I'll be testing several things this summer /
autumn. This winter i get serious and buckle down.

My first project I wanted to write my own system editing tool via webUI to
get used to nodejs and all applicable modules. For like viewing / modifying
file such as /etc/network/interfaces. ETC

Be sure to recognize the tools being used in Angstrom, such as Connman.