If you have been following my series about installing Ubuntu on Beaglebone Black, you might have wondered about some of the stock tools like Cloud9 IDE (an installation guide coming soon) and GateOne that aren’t on the Ubuntu image. This post will help you to get GateOne installed.
Just a word of caution: This guide discusses the technical steps in getting the GateOne Terminal Emulator on your BBB. It does not go into details as to how to configure it, specifically security. If you attempt to do this, please be aware of the potential security risks involved.
After my last few posts, I was planning to start on the Adafruit.com IO Python Library but I began to think of the other tools that make BBB easy to use out of the box. The two things that I recall from my first impression experience was the Cloud9 IDE and GateOne Terminal Emulator. I wanted to at least have the option of these tools. GateOne has a ton of options that allows you to configure it for just about any need. Since it’s an OOTB offering with the default Angstrom distro, I figured I would be able to get it running on my Ubuntu install as well. It’s really easy to do:
You may find it helpful to review the Installation instructions prior to getting started. When all else fails, RTFM. Here’s the link: http://liftoff.github.io/GateOne/About/index.html#installation
We need to do some prep to get ready for the installation. You will need the following:
- Python Tornado
- Source Code for GateOne
Note: Since the BBB is not the never-ending well of space, you should be ever-mindful of how much stuff costs (size) before installing it. I will discuss some commands to help clean-up previous installs using apt-get later.
Time to get the Beagle Ready
We don’t need to configure git after installation to retrieve the source but if you use git, you should. Here’s a link for Configuring GIT but it’s optional for this guide. In your BBB terminal, type:
sudo apt-get install git
After this installs, you will be able to download source code from GIT repositories.
Next, we need to install PIP. PIP is a Python package management app, similar to ‘apt-get.’ We will need this to install Tornado. Tornado is essentially a Python web server. To get this installed, we need to install PIP:
sudo apt-get install python-pip
Yay! Now that we’re done with that, let’s get Tornado installed:
sudo pip install tornado
Download and Install GateOne
Now that we have our house in order, we can get busy. There’s a bunch of ways to get the source, but I found that this is the easiest: We can clone the code right to your home directory because the install process will put the final product in the /opt directory.
First change to your home directory then clone the code with this command:
git clone https://github.com/liftoff/GateOne.git
This will put a folder called ‘gateone’ in your home directory. Now let’s get inside this folder and install this puppy:
sudo python setup.py install
Now we will wait for a bit. There’s a lot happening. It seemed to take about 5 minutes but I was dodging baby bottles and Wii remotes at the time.
When this is done, you should be ready to give it a try. Change your directory to /opt/gateone then execute this command:
A bunch of feedback it going to dump to the terminal. If you don;t see red, you should be good. Give a close look for any error messages. If all looks good, then it’s time to try it for a spin. Quick note: You won’t be able to use it yet but we want to see if it works. Open up your favorite web browser on a computer on the same network and enter the address:
https://<your BBB IP or BBB hostname>
You should see the familiar charcoal screen. It’s going to start yelling at you about not having permissions and what not. We’re about to fix that. Go back to the terminal and stop the service (ctrl+c). The problem is that the app has not been given permission to allow your workstation access. To do this we will add a parameter “–origins=*” Also, you can add an extra layer of security by specifying a layer of authorization, you can use kerberos, google, or none. I gave Google a try and it sorta worked but we’ll skip that for now. First, here’s the command:
sudo ./gateone.py --origins=* --auth=none
Head back to your browser and go to the same address. You might get an error but just refresh the page and you should see the login prompt. I tooled around and it seems to work exactly the same as a regular ssh session. Let’s take look at the Google authorization. You are going to need a Google account for this.
Stop the app and change the auth parameter like this:
sudo ./gateone.py --origins=* --auth=google
When you go to the page this time, you will instantly be redirected to Google to log in and/or authorize the app. Do so and you should be redirected back to your GateOne interface. In my case, it didn’t happen. I just refreshed and since I authorized, it presented me with the GateOne Login interface.
So, my initial impression was it was really easy to install and give me yet another tool to leverage with the BBB. This was a quick and dirty install and I look forward to exploring the many options with tool. I’ll be sure to post my findings here when I find something cool or useful.
I mentioned that I would talk about drive space management using apt-get. Well, I’m running out of steam but I will say quickly that you can safely delete the source files from the git branch we downloaded to the home folder. I’ll put up something on apt-get shortly but in the meantime, you can do some reading here:
This guide applys to all versions of supported Ubuntu and this link starts you at maintenance. Keep scrolling down to the removal section. If you’re nutty or curious, read the whole bloody thing. 🙂
UPDATE: I found a simple way to start up the gateone.py script on boot. First, you will need to modify the /opt/gateone/settings/10server.conf file to add/modify the two parameters that we added when running the script manually. Here’s what they look like:
"auth":"google", "origins": "*",
Save that and test it with:
If everything is good, then run this command I found in the INSTALL.txt, found in the source files folder (remember me saying RTFM? It applies to me too):
update-rc.d gateone defaults
Here are a couple links for the install files and instructions: