Difference between revisions of "Bitlbee"

From ArchWiki
Jump to: navigation, search
(I'm sure I clicked on "Show preview" not on "Save page" :()
(deleted reference to google talk, which no longer supoorts xmpp)
(45 intermediate revisions by 27 users not shown)
Line 1: Line 1:
[[Category:Internet and Email (English)]]
+
[[Category:Internet Relay Chat]]
[[Category:HOWTOs (English)]]
+
[[de:Bitlbee]]
= About =
+
[[es:Bitlbee]]
 
+
[[tr:Bitlbee]]
Bitlbee is a "console-based IRC to IM chatting gateway, including ICQ/MSN/Jabber". Basically, it allows the user to interact with popular chat networks (ICQ, MSN, Jabber, AIM, YIM) within their IRC client.
+
[http://www.bitlbee.org/main.php/news.r.html Bitlbee] is a "console-based IRC to IM chatting gateway, including ICQ/MSN/Jabber". It allows the user to interact with popular chat networks XMPP/Jabber, MSN Messenger, Yahoo! Messenger, AIM and ICQ, the Twitter microblogging network (plus all other Twitter API compatible services like identi.ca and status.net), and social networking chat networks like Facebook and StudiVZ within their IRC client.
  
 
The users' buddies appear as normal IRC users in a channel and conversations use the private message facility of IRC.
 
The users' buddies appear as normal IRC users in a channel and conversations use the private message facility of IRC.
  
 +
== Installation ==
 +
[[pacman|Install]] {{Pkg|bitlbee}}, available in the [[Official Repositories]]. Alternatively, install the development version, {{AUR|bitlbee-bzr}}, available in the [[Arch User Repository]].
  
= Setup =
+
== Configuration ==
 +
Various settings can be set using the {{ic|/etc/bitlbee/bitlbee.conf}} configuration file.
  
First, download and install the package using pacman:
+
=== Daemon ===
 +
To run Bitlbee as a daemon uncomment the Runmode line and change it to the following.
 +
RunMode = ForkDaemon
  
  # pacman -S bitlbee
+
It is recommended to run the Bitlbee daemon without root permission. Uncomment the following line so Bitlbee can run as the "bitlbee" user, which was created when the package was installed.
 +
  User = bitlbee
  
 +
Ensure that the configuration directory is writeable with the user you configured:
 +
{{bc|# chown -R bitlbee:bitlbee /var/lib/bitlbee}}
  
Bitlbee currently does not run on a daemon of its own; rather, it uses xinetd. The installation created a file: <code>/etc/xinetd.d/bitlbee</code>
+
Then start the {{ic|bitlbee}} daemon.
 +
systemctl start bitlbee
  
We need to edit this because at the moment xinetd doesn't know you want to use bitlbee. Open <code>/etc/xinetd.d/bitlbee</code> in your preferred text editor and tell it not disable bitlbee:
+
You can also enable the {{ic|bitlbee}} daemon to run on startup like so:
 +
systemctl enable bitlbee
  
disable = no
+
(Note: just starting the server does not log you into any of your chat accounts)
  
 +
== Connect to channel ==
 +
Once Bitlbee is running connect to {{ic|localhost}} using a IRC client. Then join the channel named {{ic|&bitlbee}}. After joining the channel type {{ic|Help}} and then {{ic|Enter}} for further information.
  
Finally, you need to allow the loopback interface in <code>/etc/hosts.allow</code>, add this line:
+
== Google Chat ==
 +
In the control channel, {{Ic|&bitlbee}}, issue the following command after replacing {{Ic|<username>}} and {{Ic|<password>}} with your information:
 +
<@user> account add jabber <username>@gmail.com <password> talk.google.com:5223:ssl
 +
Appending the command with {{Ic|talk.google.com:5223:ssl}} is not strictly necessary, but it is recommended to enable extra security.
  
bitlbee: 127.0.0.1
+
If you have enabled [http://code.google.com/p/google-authenticator/ Google Authenticator] make sure to create an application specific password (see: [http://www.google.com/support/accounts/bin/static.py?page=guide.cs&guide=1056283&topic=1056286 Google Accounts Help]).
 
+
= Start Up =
+
 
+
To get things up and running we must start xinetd. As root, run:
+
# /etc/rc.d/xinetd start
+
(replacing 'start' with 'restart' if xinetd was already running, you'd know if it was)
+
 
+
This will need to be started every time you boot your machine. You can either do this manually (by running the above command after each boot) or have it started automatically by adding 'xinetd' to the DAEMONS array in <code>/etc/rc.conf</code>:
+
DAEMONS=(syslog-ng network alsa esd '''xinetd''')
+
 
+
 
+
= Configuration =
+
Now that xinetd is running your computer is acting as a bitlbee server. You are now able to connect to this in an IRC client. To connect, just connect to your machine in an IRC client:
+
/connect 127.0.0.1
+
 
+
Hopefully this will connect and you should immediately join a channel called '&bitlbee'. When you join this channel it will tell to type 'Help' if you're new... type 'Help' ;)
+
 
+
I won't bother repeating what the help section of bitlbee says. There are some great guides online too:
+
 
+
http://quark.humbug.org.au/publications/internet/bitlbee.pdf
+
 
+
http://princessleia.com/bitlbee.php
+
 
+
 
+
= How to connect to Jabber using your Gmail account =
+
In your control channel do the following:
+
account add jabber username@gmail.com mypasswd talk.google.com:5223:ssl
+
 
+
After root responds with "Account successfully added" you can check your accounts with "account list".
+
  
 +
To verify that the account was added check the account list:
 
  <@user> account list  
 
  <@user> account list  
 
  <@root> 0. JABBER, username@gmail.com (connected)  
 
  <@root> 0. JABBER, username@gmail.com (connected)  
 
  <@root> End of account list
 
  <@root> End of account list
  
After you have added the account, type "account on 0" and it should log in:
+
You can change the server value of your gmail account with the following command:
 +
account 0 set server talk.google.com
  
  <@user> account on 0  
+
To log into your Google account issue the following:
 +
  <@user> account 0 on
 
  <@root> JABBER(username@gmail.com) - Logging in: Connecting  
 
  <@root> JABBER(username@gmail.com) - Logging in: Connecting  
 
  <@root> JABBER(username@gmail.com) - Logging in: Connected  
 
  <@root> JABBER(username@gmail.com) - Logging in: Connected  
Line 68: Line 57:
 
  <@root> JABBER(username@gmail.com) - Logged in
 
  <@root> JABBER(username@gmail.com) - Logged in
  
If you get errors like the following:
+
=== Troubleshooting ===
  
  <@user> account on 0  
+
If you get errors like the following:
 +
  <@user> account 0 on
 
  <@root> JABBER(username@gmail.com) - Logging in: Connecting
 
  <@root> JABBER(username@gmail.com) - Logging in: Connecting
 
  <@root> JABBER(username@gmail.com) - Logging in: Connected
 
  <@root> JABBER(username@gmail.com) - Logging in: Connected
Line 78: Line 68:
 
  <@root> JABBER(username@gmail.com) - Signing off...
 
  <@root> JABBER(username@gmail.com) - Signing off...
  
Switching the domain from "gmail.com" to "googlemail.com" may help.
+
Switching the domain from "gmail.com" to "googlemail.com" may help. This seems to be the case for some European countries, especially Germany where Google doesn't own the trademark for the name ''Gmail'' [http://www.theregister.co.uk/2007/01/31/google_looses_trademark_battle/].
This seems to be the case for some European countries, especially Germany where Google doesn't own the trademark for the name ''Gmail'' [http://www.theregister.co.uk/2007/01/31/google_looses_trademark_battle/].
+
  
 
The easiest way to change your account settings is to simply delete the account you created  and add it again.
 
The easiest way to change your account settings is to simply delete the account you created  and add it again.
  account del 0
+
  account 0 del
  account add jabber username@googlemail.com mypasswd talk.google.com:5223:ssl
+
  account add jabber username@googlemail.com mypasswd
 +
or just use the `set` switch for the `account` command
 +
account list  # find the id for your gtalk account, in this case I'll use '0'
 +
account 0 set  # list all the possible settings for this account
 +
account 0 set username foo@gmail.com       # change your username
 +
account 0 set password somethingverysecret  # change your passphrase
  
If you are still unable to connect, try switching the port to 5222. For some  reason some people must connect on 5223 while others have to connect on 5222. There appears to be no way to know which one to use other than trial and error. Change your port settings as described above (using "account del" and "account add").
+
== See Also ==
 +
* [[Screen Irssi Bitlbee]]
 +
* [http://wiki.bitlbee.org/ Bitlbee Wiki]
 +
* [http://quark.humbug.org.au/publications/internet/bitlbee.pdf Introduction to Bitlbee] by Bradley Marshall
 +
* [http://princessleia.com/bitlbee.php Quickstart Guide] by Elizabeth Krumbach
 +
* [http://thinkhole.org/wp/2006/09/20/howto-connect-to-google-talk-with-bitlbee/ HOWTO: Connect to Google Talk with Bitlbee] at Thinkhole Labs
 +
* [http://wiki.bitlbee.org/HowtoFacebook HOWTO: Connect to Facebook chat with Bitlee] on the Bitlbee Wiki

Revision as of 07:54, 2 September 2013

Bitlbee is a "console-based IRC to IM chatting gateway, including ICQ/MSN/Jabber". It allows the user to interact with popular chat networks XMPP/Jabber, MSN Messenger, Yahoo! Messenger, AIM and ICQ, the Twitter microblogging network (plus all other Twitter API compatible services like identi.ca and status.net), and social networking chat networks like Facebook and StudiVZ within their IRC client.

The users' buddies appear as normal IRC users in a channel and conversations use the private message facility of IRC.

Installation

Install bitlbee, available in the Official Repositories. Alternatively, install the development version, bitlbee-bzrAUR, available in the Arch User Repository.

Configuration

Various settings can be set using the /etc/bitlbee/bitlbee.conf configuration file.

Daemon

To run Bitlbee as a daemon uncomment the Runmode line and change it to the following.

RunMode = ForkDaemon

It is recommended to run the Bitlbee daemon without root permission. Uncomment the following line so Bitlbee can run as the "bitlbee" user, which was created when the package was installed.

User = bitlbee

Ensure that the configuration directory is writeable with the user you configured:

# chown -R bitlbee:bitlbee /var/lib/bitlbee

Then start the bitlbee daemon.

systemctl start bitlbee

You can also enable the bitlbee daemon to run on startup like so:

systemctl enable bitlbee

(Note: just starting the server does not log you into any of your chat accounts)

Connect to channel

Once Bitlbee is running connect to localhost using a IRC client. Then join the channel named &bitlbee. After joining the channel type Help and then Enter for further information.

Google Chat

In the control channel, &bitlbee, issue the following command after replacing <username> and <password> with your information:

<@user> account add jabber <username>@gmail.com <password> talk.google.com:5223:ssl

Appending the command with talk.google.com:5223:ssl is not strictly necessary, but it is recommended to enable extra security.

If you have enabled Google Authenticator make sure to create an application specific password (see: Google Accounts Help).

To verify that the account was added check the account list:

<@user> account list 
<@root> 0. JABBER, username@gmail.com (connected) 
<@root> End of account list

You can change the server value of your gmail account with the following command:

account 0 set server talk.google.com

To log into your Google account issue the following:

<@user> account 0 on
<@root> JABBER(username@gmail.com) - Logging in: Connecting 
<@root> JABBER(username@gmail.com) - Logging in: Connected 
<@root> JABBER(username@gmail.com) - Logging in: Requesting Authentication Method
<@root> JABBER(username@gmail.com) - Logging in: Authenticating 
<@root> JABBER(username@gmail.com) - Logged in

Troubleshooting

If you get errors like the following:

<@user> account 0 on 
<@root> JABBER(username@gmail.com) - Logging in: Connecting
<@root> JABBER(username@gmail.com) - Logging in: Connected
<@root> JABBER(username@gmail.com) - Logging in: Requesting Authentication Method
<@root> JABBER(username@gmail.com) - Logging in: Authenticating
<@root> JABBER(username@gmail.com) - Login error: Error 403: Unknown error
<@root> JABBER(username@gmail.com) - Signing off...

Switching the domain from "gmail.com" to "googlemail.com" may help. This seems to be the case for some European countries, especially Germany where Google doesn't own the trademark for the name Gmail [1].

The easiest way to change your account settings is to simply delete the account you created and add it again.

account 0 del
account add jabber username@googlemail.com mypasswd

or just use the `set` switch for the `account` command

account list   # find the id for your gtalk account, in this case I'll use '0'
account 0 set  # list all the possible settings for this account
account 0 set username foo@gmail.com        # change your username
account 0 set password somethingverysecret  # change your passphrase

See Also