Installing BitlBee on the BeagleBone

BitlBee is an IRC to-other-chat-networks gateway. This means that if you use an existing chat program, such as Google Talk, Jabber, Twitter, AIM, or Facebook, you can use BitlBee to chat over those protocols via IRC. The first question when a non-IRC user hears about BitlBee is, why would you want to do this? while IRC users respond with excitement. The major benefit is that by using IRC, you can effectively chat with buddies over Google Talk using the same client software as you use to chat on IRC. This reduces the number of programs you have to learn. While this may not seem impressive at first, consider that each program typically has its own keyboard shortcuts and distinct interface. Also, each vendor frequently changes the appearance of their application, requiring you to re-learn how to use the tool. On the other hand, IRC clients are fairly simple in their user interface and IRC interactions are fairly standardized.

The other reason BitlBee is useful is that it acts as a proxy server for your chat networks. Your chat network presence is persistent but you can attach and detach your client at will. When you re-attach, you can catch-up on missed instant messages. This will prevent receiving a message on one client, like your phone, but missing it because you then logged into the chat network with your computer. Additionally, BitlBee supports OTR so we can use BitlBee to manage our OTR protected conversations.

BitlBee and the OTR plugin are available through the Debian repositories, so installing is as easy as:

sudo apt-get install bitlbee bitlbee-plugin-otr

The installation procedure will automatically start the BitlBee daemon running on port 6667, which is the default IRC port. At this point, you can connect with your favorite IRC client to your BitlBee server. This is one of the advantages of running BitlBee on your local network from a BBB, it's always on and available from any other internal computer or smartphone. Since BitlBee is marshalling your accounts, it won't appear as if you are coming online and offline.

In this chapter, the IRC client we will use will be ERC, which is the Emacs IRC client. ERC is a client that runs inside an Emacs instance and has several advantages over traditional IRC clients. First and most important, if you are already using Emacs, you can be more efficient if you can use Emacs for other tasks. Not only do you save the cognitive friction from task switching, but the layout and keyboard commands are already known to you. Also, ERC, like Emacs, is extremely modular and flexible. It is, of course, a free software program, but there are also many existing modules from nick highlighting to autoaway that you can use. Lastly, it's naturally cross-platform; any platform that can run Emacs can run ERC.

Tip

For Emacs users, running an IRC client in Emacs makes sense. After all, dedicated Emacs users consider Emacs to be the most portable operating system. If you insist on not using Emacs, irssi is a well-respected IRC client alternative: http://www.irssi.org/.

To connect to your BBB BitlBee server with ERC, inside Emacs, type M-x erc. You'll be prompted for the IP address. Then hit enter for the default port number and enter again for the password. You should join the &bitlbee channel and there will be one other user in that channel with you, root. The following screenshot shows how root interacts with you in the &bitlbee channel but also illustrates the IRC client interface inside Emacs:

Installing BitlBee on the BeagleBone

Creating a BitlBee account

The first task is to create an account on your BitlBee server. This is a new account that will manage your BitlBee connections. Later, we can log back in with this account to load our configuration. Otherwise, we would have to repeat the following steps each time we connect. Since BitlBee is an IRC gateway, all the commands to BitlBee have an IRC feel to them. Registration is performed by typing the following command in the &bitlbee channel:

register <password>

Your password will be echoed back to you and the root user should reply with:

Account successfully created

With BitlBee, it's important to get into the habit of saving often. Otherwise, changes are not persistent. Saving is simply done by typing save into the &bitlbee channel. Go ahead and save now.

Adding a Google Talk account to BitlBee

A BitlBee account alone is not that useful. We need to add your other social media accounts to BitlBee in order to make it useful. The first account we will add is a Google Talk account. BitlBee supports other chat services such as Yahoo, AIM, XMPP, MSN, Facebook, and Twitter, so you don't have to use a Google account. For the full list, refer to http://wiki.bitlbee.org/FrontPage.

Unfortunately, in May 2013, Google announced its new communications product Hangouts, which does not support XMPP, which is an IETF standard, but instead uses a proprietary protocol. Specifically, Google Hangout does not support server-to-server federation support with XMPP. If you have an independent XMPP server, or have an account on Jabber.org or the Free Software Foundation's server, it will no longer be possible to communicate with Google Hangout users. You can still use Google Talk, which fully supports XMPP, but it is not clear when Google will retire Google Talk.

Note

If you don't have a Google account, because of valid privacy concerns, you should read Google has most of my e-mail because it has all of yours by Benjamin Mako Hill http://mako.cc/copyrighteous/google-has-most-of-my-email-because-it-has-all-of-yours. The author didn't use Gmail, but over 50 percent of his e-mails correspondence went to Google servers. Unless you are encrypting your e-mail, Google servers have your correspondence.

To add your Gmail account in BitlBee, type the following into the &bitlbee channel:

account add jabber [email protected]

The BitlBee root account will respond with:

<root> Account successfully added with tag gtalk
<root> You can now use the /OPER command to enter the password
<root> Alternatively, enable OAuth if the account supports it: account gtalk set oauth on

We'll go ahead and enable OAuth:

acc gtalk set oauth on

Note

OAuth is an authorization framework that allows third-party access to other web services without the need for the third-party application to know your credential, for example, password. Limited use access tokens are provided to the third-party application to restrict the access on the hosting service. More information is available on the OAuth website http://oauth.net.

As most people have Google+ accounts now, we have to set the format of the nicks to full names. Otherwise, we will see random strings as nicknames:

account gtalk set nick_format %full_name

Finally, enable the account with:

acc gtalk on

BitlBee will send a private message to a URL for your OAuth login:

<jabber_oauth> Open this URL in your browser to authenticate:
https://...
<jabber_oauth> Respond to this message with the returned authorization token.

Clicking on the link will prompt you to accept BitlBee's permissions, which should look like the following screenshot. After clicking on Accept, you'll receive a code, which you can then paste back into the private message window.

Adding a Google Talk account to BitlBee

Once complete, back in the &bitlbee window, you should see the following messages indicating you are logging in to GTalk:

<root> jabber - Logging in: Starting OAuth authentication
<root> jabber - Logging in: Requesting OAuth access token
<root> jabber - Logging in: Connecting
<root> jabber - Logging in: Connected to server, logging in
<root> jabber - Logging in: Converting stream to TLS
<root> jabber - Logging in: Connected to server, logging in
<root> jabber - Logging in: Authentication finished
<root> jabber - Logging in: Server changed session resource string to `BitlBee301D65C5'
<root> jabber - Logging in: Authenticated, requesting buddy list
<root> jabber - Logging in: Logged in

Don't forget to save!

Adding a Jabber account to BitlBee

If you have a Jabber (XMPP) account, you can go ahead and add that to Bitlbee. The syntax is similar to the prior example:

account add jabber [email protected] password

The root user should return with something like:

Account successfully added with tag jabber

Turn the account on with:

acc jabber on

You should now see two accounts when you type account list. Lastly, save your data!

Note

You can add your Twitter account as well and tweet from IRC. However, you'll need BitlBee version 3.2.1 or greater; otherwise, you will receive SSL errors when trying to connect to twitter.

One of the many benefits of joining the Free Software Foundation as a member is the use of the FSF's XMPP server. Through federation, users can reach you at your FSF username at the member.fsf.org server. Similarly, fellows of the Free Software Foundation Europe also have XMPP privileges. For more information, visit the respective FSF sites at https://www.fsf.org/associate/benefits and https://fsfe.org/fellowship/index.en.html, respectively.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.186.109