Configuring Spectrum¶
To configure spectrum, you have to configure a new Spectrum instance and configure your XMPP server to work with the new instance. The latter part is described in detail at Configuring the XMPP server.
- Configuring Spectrum
- Introduction
- Configuring Spectrum to connect to your XMPP Server
- Configuration variables
- Where to go from here
- Known problems with some transports
Introduction¶
With spectrum, each protocol implementation runs as its own instance. So if you have ICQ, MSN and QQ transport, Spectrum will run three times, each time with a different configuration file.
Configuration files are located by default in /etc/spectrum directory. You can find an example spectrum.cfg file there. The file itself is well documented, so you simply need to fill out the details. The init-script will only recognize configuration files if the suffix is .cfg.
The configuration file is divided into named sections. The section name appears on a line by itself, in square brackets. All parameters after the section declaration are associated with that section. There is no explicit “end of section” delimiter; sections end at the next section declaration, or the end of the file.
Configuring Spectrum to connect to your XMPP Server¶
To connect Spectrum to your XMPP server, you have to change only a few variables in the configuration file. Each Spectrum instance has to have its own configuration file (Read about configuration file syntax). At first you have to create copy of the default spectrum.cfg for the instance you’re configuring (ICQ is used as an example here):
cd /etc/spectrum cp spectrum.cfg icq.cfg chown root:spectrum icq.cfg chmod o-rwx icq.cfg
You can then edit icq.cfg and start configuring the new Spectrum instance. Spectrum is by default configured to use an SQLite database, and also all directories are preconfigured, so to successfully connect Spectrum to Jabber server, you have to change just these variables:
[service] # enable this spectrum instance. enable=1 # one of: aim, facebook, gg, icq, irc, msn, myspace, qq, simple, xmpp, yahoo. protocol=icq # IP address of Jabber server Spectrum should connect to. server=127.0.0.1 # Spectrum transport Jabber ID (has to be the same as configured in Jabber server config file). jid=$protocol.example.com # Password which will be used by Spectrum to connect Jabber server (Password is configured in Jabber server config file) password=secret # Jabber server port to which Spectrum should connect (port is configured in Jabber server config file) port=5347A few details to note:
- $protocol is a configuration variable. Read up on configuration variables for more information.
- The jid, password, port and server variables have to match what you tell your XMPP server.
Configuration variables¶
You can use configuration file variables in configuration files to make configuration easier and to avoid duplicities in config file. Each variable starts with ”$” character and is replaced by it’s value according to this table:
- $protocol - Value of "protocol" key in service section.
- $jid - Value of "jid" key in service section.
You can also access parts of the filename for configuration details, this is especially useful if you want to use one configuration file for multiple transports. Please see shared configuration files for more information.
Where to go from here¶
- Don't forget to configure your XMPP server.
- Since its complex to set up, we have a dedicated page on configuring file transfer support.
- We have some support for shared configuration files.
- You can manage spectrum instances at runtime using spectrumctl.
Known problems with some transports¶
The ICQ Protocoll has some errors with the german "ö, ä, ü" and the "ß". You can see this problem by receiving an ICQ Message with some special characters. You will see a message like "There were some errors while receiving this message. Maybe you or your opponent is using a buggy client"
ICQ Uses an special encoding for its messages, so you have to set this encoding in the config-file. Add the following line right after "enabled":
[service] # enable this spectrum instance enable=1 encoding=CP1252 # one of: aim, facebook, gg, icq, irc, msn, myspace, qq, simple, xmpp, yahoo protocol=icq [...]
You have to set this line BEFORE you import ICQ Accounts. Otherwise you have to delete your ICQ Accounts and import them again.