<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.saruman.biz/saruwiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Insomnia</id>
	<title>SaruWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.saruman.biz/saruwiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Insomnia"/>
	<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php/Special:Contributions/Insomnia"/>
	<updated>2026-05-02T09:33:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=IMP_-_the_Internet_Messaging_Program&amp;diff=2564</id>
		<title>IMP - the Internet Messaging Program</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=IMP_-_the_Internet_Messaging_Program&amp;diff=2564"/>
		<updated>2010-05-06T21:23:07Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== IMP ==&lt;br /&gt;
With Debian Lenny come standard, stable applications. The [http://www.horde.org/imp/ IMP webmail application] that is packaged for Debian is version 4.2. The quickest way to install IMP is&lt;br /&gt;
 apt-get install imp4&lt;br /&gt;
With both &#039;&#039;horde3&#039;&#039; and a mailserver (e.g. [[E-mail_server_section|Postfix]]) completely installed and configured, no extra packages will get installed.&lt;br /&gt;
&lt;br /&gt;
Before you configure IMP, you need to prepare file permissions for web configuration (this is a recurring theme for any horde3 application):&lt;br /&gt;
 touch /etc/horde/imp4/conf.bak.php&lt;br /&gt;
 chmod 777 /etc/horde/imp4/conf*.php&lt;br /&gt;
[[Image:Horde3-imp-setup-1.PNG|thumb|300px|Horde IPM4 configuration screen 1]]Now you can log in to horde3 web interface as a user with administrative rights. In the Horde3 tree view, choose Administration -&amp;gt; Setup -&amp;gt; &#039;&#039; Mail (imp)  H3 (4.2)&#039;&#039;&#039; (see picture). This results in a configuration generation screen with something like 8 tabs; you could safely go with the defaults, but for lots of interesting special features you&#039;ll have to actively make a selection. Funny enough you do NOT select your mailserver(s) in this menu; that&#039;s left to manually editing another file (see further down).&lt;br /&gt;
&lt;br /&gt;
Now generate your configuration. When you&#039;re done, you can change the permissions back for safety:&lt;br /&gt;
 chmod 644 /etc/horde/imp4/conf.php&lt;br /&gt;
 chmod 600 /etc/horde/imp4/conf.bak.php&lt;br /&gt;
Note that this also prevents you from changing the configuration with the web interface in the future. When you want to do that, you&#039;ll have to reset the permissions for the &#039;&#039;conf*.php&#039;&#039; files to 777, generate a new configuration, and then set the permissions back.&lt;br /&gt;
&lt;br /&gt;
Note that if you DO NOT change the permissions to 644/600, then your IMP client will still run flawlessly. However, you now run a serious risk of a malicious web client altering your web mail configuration.&lt;br /&gt;
&lt;br /&gt;
Time to specify your mail server(s) in &#039;&#039;/etc/horde/imp4/servers.php&#039;&#039; file. Depending on your mail server setup, your settings can be something like&lt;br /&gt;
 $servers[&#039;imap&#039;] = array(&lt;br /&gt;
    &#039;name&#039; =&amp;gt; &#039;IMAP Server&#039;,&lt;br /&gt;
    &#039;server&#039; =&amp;gt; &#039;localhost&#039;,&lt;br /&gt;
    &#039;hordeauth&#039; =&amp;gt; &#039;full&#039;,&lt;br /&gt;
    &#039;protocol&#039; =&amp;gt; &#039;imap/notls&#039;,&lt;br /&gt;
    &#039;port&#039; =&amp;gt; 143,&lt;br /&gt;
    &#039;maildomain&#039; =&amp;gt; &#039;saruman.biz&#039;,&lt;br /&gt;
    &#039;smtphost&#039; =&amp;gt; &#039;localhost&#039;,&lt;br /&gt;
    &#039;smtpport&#039; =&amp;gt; 25,&lt;br /&gt;
    &#039;realm&#039; =&amp;gt; &#039;sample.com&#039;,&lt;br /&gt;
    &#039;preferred&#039; =&amp;gt; &#039;&#039;,&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
When you are ready, enable IMP in the file &#039;&#039;/etc/horde/horde3/registry.php&#039;&#039; and verify if all is right. Yes, you read well, you MUST enable manually module in registry.php file after configuration! &lt;br /&gt;
&lt;br /&gt;
 $this-&amp;gt;applications[&#039;imp&#039;] = array(&lt;br /&gt;
    &#039;fileroot&#039; =&amp;gt; &#039;/usr/share/horde3/lib&#039; . &#039;/../imp&#039;,&lt;br /&gt;
    &#039;webroot&#039; =&amp;gt; $this-&amp;gt;applications[&#039;horde&#039;][&#039;webroot&#039;] . &#039;/imp&#039;,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; _(&amp;quot;Mail&amp;quot;),&lt;br /&gt;
    &#039;status&#039; =&amp;gt; &#039;active&#039;,&lt;br /&gt;
    &#039;provides&#039; =&amp;gt; array(&#039;mail&#039;, &#039;contacts/favouriteRecipients&#039;)&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
Change the status from inactive to active&lt;br /&gt;
== Ingo ==&lt;br /&gt;
&lt;br /&gt;
 #apt-get install ingo1&lt;br /&gt;
&lt;br /&gt;
Register the application by editing /etc/horde/horde3/registry.php &lt;br /&gt;
&lt;br /&gt;
Find the ingo stanza and change inactive to active&lt;br /&gt;
 $this-&amp;gt;applications[&#039;ingo&#039;] = array(&lt;br /&gt;
    &#039;fileroot&#039; =&amp;gt; &#039;/usr/share/horde3/lib&#039; . &#039;/../ingo&#039;,&lt;br /&gt;
    &#039;webroot&#039; =&amp;gt; $this-&amp;gt;applications[&#039;horde&#039;][&#039;webroot&#039;] . &#039;/ingo&#039;,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; _(&amp;quot;Filters&amp;quot;),&lt;br /&gt;
    &#039;status&#039; =&amp;gt; &#039;active&#039;,&lt;br /&gt;
&lt;br /&gt;
Creating the database table&lt;br /&gt;
&lt;br /&gt;
Login to the mysql database&lt;br /&gt;
 mysql&amp;gt; source /usr/share/doc/ingo1/examples/scripts/sql/ingo.sql&lt;br /&gt;
&lt;br /&gt;
change the group so apache can change the files&lt;br /&gt;
 #chmod 774 /etc/horde/ingo1&lt;br /&gt;
&lt;br /&gt;
Now login as a admin user in you&#039;re horde website. Goto administration - setup and klik on &amp;quot;Filters (ingo)&amp;quot;&lt;br /&gt;
Change the database to MYsql. Save the configuration and make you&#039;re rules&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2563</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2563"/>
		<updated>2010-04-30T19:58:44Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* VLC */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Lirc will initiate the hardware with the below config file. In this case a mce usb receiver with a ir blaster and also a volume knob (Antec fusion)&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;mceusb/lircd.conf.mceusb&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_imon&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen IR Transmitter&lt;br /&gt;
 TRANSMITTER=&amp;quot;Microsoft Windows Media Center V2 (usb) : Direct TV Receiver&amp;quot;&lt;br /&gt;
 TRANSMITTER_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 TRANSMITTER_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 TRANSMITTER_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Enable lircd&lt;br /&gt;
 START_LIRCD=&amp;quot;true&amp;quot;&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 #START_LIRCMD=&amp;quot;false&amp;quot;&lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=&amp;quot;true&amp;quot;&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 FORCE_NONINTERACTIVE_RECONFIGURATION=&amp;quot;false&amp;quot;&lt;br /&gt;
 START_LIRCMD=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Whit this config file lirc will listen on the devices and will translate the input. It will give a hardware name for the device and the button pressed.&lt;br /&gt;
irw wil give you a xample on the commandline&lt;br /&gt;
 #irw&lt;br /&gt;
Now press some buttons&lt;br /&gt;
&lt;br /&gt;
To feed the command to the appropiate program (if this program supports lirc) make a config in the home dir of the user.&lt;br /&gt;
&lt;br /&gt;
~/.lirc/mythtv&lt;br /&gt;
&lt;br /&gt;
 begin&lt;br /&gt;
    remote = ClickWheel&lt;br /&gt;
    prog = mythtv&lt;br /&gt;
    button = KEY_VOLUMEUP&lt;br /&gt;
    config = ]&lt;br /&gt;
    repeat = 0&lt;br /&gt;
    delay = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 begin&lt;br /&gt;
    remote = ClickWheel&lt;br /&gt;
    prog = mythtv&lt;br /&gt;
    button = KEY_VOLUMEDOWN&lt;br /&gt;
    config = [&lt;br /&gt;
    repeat = 0&lt;br /&gt;
    delay = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
And the final piece of the puzzle and this was the hardest to find but the most simple thing to do. It seems that Lirc has it all figured out for the newest version on how to run multiple devices without major manual configuration EXCEPT the Lirc init.d script.&lt;br /&gt;
&lt;br /&gt;
With my devices plugged in and issuing an ls -l /dev/lirc* I had all the devices I needed with manual configuration so&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
crw-rw---- 1 root root 61, 0 2010-02-21 11:44 /dev/lirc0&lt;br /&gt;
crw-rw---- 1 root root 61, 1 2010-02-21 11:44 /dev/lirc1&lt;br /&gt;
lrwxrwxrwx 1 root root    19 2010-02-21 11:44 /dev/lircd -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
lrwxrwxrwx 1 root root    20 2010-02-21 11:44 /dev/lircd1 -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
&lt;br /&gt;
SEE the problem - /dev/lircd1 was pointing to /var/run/lirc/lircd so when issuing an irsend command from a script or a command line I was getting the hardware cannot send error. The actual fix I finally found in another post - THANK YOU TO cyber_source - YOU ARE A LIFE SAVER.&lt;br /&gt;
&lt;br /&gt;
You need to edit your /etc/init.d/lirc startup script and change a couple lines&lt;br /&gt;
&lt;br /&gt;
First Line 83 Needs to be changed from&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;${TRANSMITTER_SOCKET}1&amp;quot; to this - &amp;quot;${TRANSMITTER_SOCKET}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and then line 131 Needs to be changed from&lt;br /&gt;
&lt;br /&gt;
 TRANSMITTER_SOCKET=&amp;quot;/var/run/lirc/lircd&amp;quot; to this TRANSMITTER_SOCKET=&amp;quot;/var/run/lirc/lircd1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
save and exit the file reboot your system and run another&lt;br /&gt;
ls -l /dev/lirc* and you should see&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
crw-rw---- 1 root root 61, 0 2010-02-21 11:44 /dev/lirc0&lt;br /&gt;
crw-rw---- 1 root root 61, 1 2010-02-21 11:44 /dev/lirc1&lt;br /&gt;
lrwxrwxrwx 1 root root    19 2010-02-21 11:44 /dev/lircd -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
lrwxrwxrwx 1 root root    20 2010-02-21 11:44 /dev/lircd1 -&amp;gt; /var/run/lirc/lircd1&lt;br /&gt;
&lt;br /&gt;
== IRblaster ==&lt;br /&gt;
&lt;br /&gt;
To get the right codes from youre remote you can record it with irrecord. This will provide a configuration file which you can use in lirc&lt;br /&gt;
 #irrecord /tmp/remote.conf&lt;br /&gt;
Now follow the instructions&lt;br /&gt;
To get the raw codes&lt;br /&gt;
 #irrecord -f /tmp/remoteraw.conf&lt;br /&gt;
&lt;br /&gt;
You wil get this file for a topfield tf6000cok remote&lt;br /&gt;
 # Please make this file available to others&lt;br /&gt;
 # by sending it to &amp;lt;lirc@bartelmus.de&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
 # this config file was automatically generated&lt;br /&gt;
 # using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010&lt;br /&gt;
 # &lt;br /&gt;
 # contributed by &lt;br /&gt;
 #&lt;br /&gt;
 # brand:Topfield&lt;br /&gt;
 # model no. of remote control: TP-014&lt;br /&gt;
 # devices being controlled by this remote: Topfield TF6000COK&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  topfield&lt;br /&gt;
  flags RAW_CODES|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  gap          107620&lt;br /&gt;
&lt;br /&gt;
      begin raw_codes&lt;br /&gt;
&lt;br /&gt;
          name KEY_1&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1600     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     600    1650&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     650     500     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650    1650&lt;br /&gt;
              550&lt;br /&gt;
&lt;br /&gt;
          name KEY_2&lt;br /&gt;
             9050    4400     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1650     600    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650    1600     600     550     600     500&lt;br /&gt;
              600     550     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_3&lt;br /&gt;
             9000    4450     600     500     650     500&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     600    1650     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_4&lt;br /&gt;
             9050    4450     600     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_5&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     550     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_6&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_7&lt;br /&gt;
             9000    4450     600     500     600     500&lt;br /&gt;
              650    1600     650     450     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_8&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              550    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650     500&lt;br /&gt;
              600     550     550     550     600    1650&lt;br /&gt;
              600    1650     550     550     600     500&lt;br /&gt;
              650     500     600    1600     650    1650&lt;br /&gt;
              550    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_9&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600     550     600     500     600    1650&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600     550     600    1600&lt;br /&gt;
              600    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_0&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     550&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     650     500     600    1600&lt;br /&gt;
              650     500     600     550     550    1650&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELDOWN&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600    1600     600     550     600    1650&lt;br /&gt;
              550     550     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEDOWN&lt;br /&gt;
             9050    4400     650     500     600     550&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     600    1650&lt;br /&gt;
              600    1650     600     500     650    1600&lt;br /&gt;
              600     550     600    1650     600    1600&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
      end raw_codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Now save this file in /etc/lirc and edit /etc/lirc/lircd.conf&lt;br /&gt;
 include &amp;quot;/etc/lirc/remote.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now we can test irblaster&lt;br /&gt;
 #irsend SEND_ONCE remote KEY_1&lt;br /&gt;
The channel on the topfield DVB must jump to channel 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EPG ==&lt;br /&gt;
&lt;br /&gt;
To use the epg we want to grad the data from a source. In this case we use tv_grab_nl_py. This script will grab all data from www.tvgids.nl&lt;br /&gt;
&lt;br /&gt;
XMLTV-configuratiebestand aanmaken&lt;br /&gt;
&lt;br /&gt;
* Start MythTV Setup&lt;br /&gt;
* Choose for Video Sources.&lt;br /&gt;
* Choose for existing or a new video source&lt;br /&gt;
* Listings grabber: The Netherlands (tv_grab_nl_py...)&lt;br /&gt;
* Klick Finish&lt;br /&gt;
&lt;br /&gt;
On the prompt&lt;br /&gt;
 # tv_grab_nl_py --configure&lt;br /&gt;
This will create a config file in /homedir/.xmltv/tv_grab_nl_py.conf&lt;br /&gt;
Edit this config file and clear out all channels you don want (or edit them out)&lt;br /&gt;
To see is something is happening&lt;br /&gt;
 #mythfilldatabase -v all --refresh-today&lt;br /&gt;
To see what&#039;s in the database&lt;br /&gt;
*mysql -u mythtv -p mythconverg -e &amp;quot;select chanid, callsign, name, xmltvid from channel;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VLC ==&lt;br /&gt;
&lt;br /&gt;
To make VLC player the default player. Goto Utilities/Setup -&amp;gt; SetUp -&amp;gt; Media Settings -&amp;gt; Video Settings -&amp;gt; Player Settings&lt;br /&gt;
 vlc file://%s vlc://quit&lt;br /&gt;
&lt;br /&gt;
nd change the extensions goto Utilities/Setup -&amp;gt; SetUp -&amp;gt; Media Settings -&amp;gt; Video Settings -&amp;gt; File Types&lt;br /&gt;
&lt;br /&gt;
== TV card ==&lt;br /&gt;
&lt;br /&gt;
* See if the card is working in a MS windows pc with technotrends own software&lt;br /&gt;
* Try installing w_scan to do a channel scan the use the configuration file created by importing it into mythtv.&lt;br /&gt;
* Recompile the drivers with new source files&lt;br /&gt;
* http://mythportal.be/TTBudgetS1500&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2562</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2562"/>
		<updated>2010-04-23T08:14:14Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Metadata */ vlc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Lirc will initiate the hardware with the below config file. In this case a mce usb receiver with a ir blaster and also a volume knob (Antec fusion)&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;mceusb/lircd.conf.mceusb&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_imon&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen IR Transmitter&lt;br /&gt;
 TRANSMITTER=&amp;quot;Microsoft Windows Media Center V2 (usb) : Direct TV Receiver&amp;quot;&lt;br /&gt;
 TRANSMITTER_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 TRANSMITTER_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 TRANSMITTER_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Enable lircd&lt;br /&gt;
 START_LIRCD=&amp;quot;true&amp;quot;&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 #START_LIRCMD=&amp;quot;false&amp;quot;&lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=&amp;quot;true&amp;quot;&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 FORCE_NONINTERACTIVE_RECONFIGURATION=&amp;quot;false&amp;quot;&lt;br /&gt;
 START_LIRCMD=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Whit this config file lirc will listen on the devices and will translate the input. It will give a hardware name for the device and the button pressed.&lt;br /&gt;
irw wil give you a xample on the commandline&lt;br /&gt;
 #irw&lt;br /&gt;
Now press some buttons&lt;br /&gt;
&lt;br /&gt;
To feed the command to the appropiate program (if this program supports lirc) make a config in the home dir of the user.&lt;br /&gt;
&lt;br /&gt;
~/.lirc/mythtv&lt;br /&gt;
&lt;br /&gt;
 begin&lt;br /&gt;
    remote = ClickWheel&lt;br /&gt;
    prog = mythtv&lt;br /&gt;
    button = KEY_VOLUMEUP&lt;br /&gt;
    config = ]&lt;br /&gt;
    repeat = 0&lt;br /&gt;
    delay = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 begin&lt;br /&gt;
    remote = ClickWheel&lt;br /&gt;
    prog = mythtv&lt;br /&gt;
    button = KEY_VOLUMEDOWN&lt;br /&gt;
    config = [&lt;br /&gt;
    repeat = 0&lt;br /&gt;
    delay = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
And the final piece of the puzzle and this was the hardest to find but the most simple thing to do. It seems that Lirc has it all figured out for the newest version on how to run multiple devices without major manual configuration EXCEPT the Lirc init.d script.&lt;br /&gt;
&lt;br /&gt;
With my devices plugged in and issuing an ls -l /dev/lirc* I had all the devices I needed with manual configuration so&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
crw-rw---- 1 root root 61, 0 2010-02-21 11:44 /dev/lirc0&lt;br /&gt;
crw-rw---- 1 root root 61, 1 2010-02-21 11:44 /dev/lirc1&lt;br /&gt;
lrwxrwxrwx 1 root root    19 2010-02-21 11:44 /dev/lircd -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
lrwxrwxrwx 1 root root    20 2010-02-21 11:44 /dev/lircd1 -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
&lt;br /&gt;
SEE the problem - /dev/lircd1 was pointing to /var/run/lirc/lircd so when issuing an irsend command from a script or a command line I was getting the hardware cannot send error. The actual fix I finally found in another post - THANK YOU TO cyber_source - YOU ARE A LIFE SAVER.&lt;br /&gt;
&lt;br /&gt;
You need to edit your /etc/init.d/lirc startup script and change a couple lines&lt;br /&gt;
&lt;br /&gt;
First Line 83 Needs to be changed from&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;${TRANSMITTER_SOCKET}1&amp;quot; to this - &amp;quot;${TRANSMITTER_SOCKET}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and then line 131 Needs to be changed from&lt;br /&gt;
&lt;br /&gt;
 TRANSMITTER_SOCKET=&amp;quot;/var/run/lirc/lircd&amp;quot; to this TRANSMITTER_SOCKET=&amp;quot;/var/run/lirc/lircd1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
save and exit the file reboot your system and run another&lt;br /&gt;
ls -l /dev/lirc* and you should see&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
crw-rw---- 1 root root 61, 0 2010-02-21 11:44 /dev/lirc0&lt;br /&gt;
crw-rw---- 1 root root 61, 1 2010-02-21 11:44 /dev/lirc1&lt;br /&gt;
lrwxrwxrwx 1 root root    19 2010-02-21 11:44 /dev/lircd -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
lrwxrwxrwx 1 root root    20 2010-02-21 11:44 /dev/lircd1 -&amp;gt; /var/run/lirc/lircd1&lt;br /&gt;
&lt;br /&gt;
== IRblaster ==&lt;br /&gt;
&lt;br /&gt;
To get the right codes from youre remote you can record it with irrecord. This will provide a configuration file which you can use in lirc&lt;br /&gt;
 #irrecord /tmp/remote.conf&lt;br /&gt;
Now follow the instructions&lt;br /&gt;
To get the raw codes&lt;br /&gt;
 #irrecord -f /tmp/remoteraw.conf&lt;br /&gt;
&lt;br /&gt;
You wil get this file for a topfield tf6000cok remote&lt;br /&gt;
 # Please make this file available to others&lt;br /&gt;
 # by sending it to &amp;lt;lirc@bartelmus.de&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
 # this config file was automatically generated&lt;br /&gt;
 # using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010&lt;br /&gt;
 # &lt;br /&gt;
 # contributed by &lt;br /&gt;
 #&lt;br /&gt;
 # brand:Topfield&lt;br /&gt;
 # model no. of remote control: TP-014&lt;br /&gt;
 # devices being controlled by this remote: Topfield TF6000COK&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  topfield&lt;br /&gt;
  flags RAW_CODES|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  gap          107620&lt;br /&gt;
&lt;br /&gt;
      begin raw_codes&lt;br /&gt;
&lt;br /&gt;
          name KEY_1&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1600     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     600    1650&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     650     500     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650    1650&lt;br /&gt;
              550&lt;br /&gt;
&lt;br /&gt;
          name KEY_2&lt;br /&gt;
             9050    4400     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1650     600    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650    1600     600     550     600     500&lt;br /&gt;
              600     550     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_3&lt;br /&gt;
             9000    4450     600     500     650     500&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     600    1650     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_4&lt;br /&gt;
             9050    4450     600     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_5&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     550     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_6&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_7&lt;br /&gt;
             9000    4450     600     500     600     500&lt;br /&gt;
              650    1600     650     450     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_8&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              550    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650     500&lt;br /&gt;
              600     550     550     550     600    1650&lt;br /&gt;
              600    1650     550     550     600     500&lt;br /&gt;
              650     500     600    1600     650    1650&lt;br /&gt;
              550    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_9&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600     550     600     500     600    1650&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600     550     600    1600&lt;br /&gt;
              600    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_0&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     550&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     650     500     600    1600&lt;br /&gt;
              650     500     600     550     550    1650&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELDOWN&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600    1600     600     550     600    1650&lt;br /&gt;
              550     550     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEDOWN&lt;br /&gt;
             9050    4400     650     500     600     550&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     600    1650&lt;br /&gt;
              600    1650     600     500     650    1600&lt;br /&gt;
              600     550     600    1650     600    1600&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
      end raw_codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Now save this file in /etc/lirc and edit /etc/lirc/lircd.conf&lt;br /&gt;
 include &amp;quot;/etc/lirc/remote.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now we can test irblaster&lt;br /&gt;
 #irsend SEND_ONCE remote KEY_1&lt;br /&gt;
The channel on the topfield DVB must jump to channel 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EPG ==&lt;br /&gt;
&lt;br /&gt;
To use the epg we want to grad the data from a source. In this case we use tv_grab_nl_py. This script will grab all data from www.tvgids.nl&lt;br /&gt;
&lt;br /&gt;
XMLTV-configuratiebestand aanmaken&lt;br /&gt;
&lt;br /&gt;
* Start MythTV Setup&lt;br /&gt;
* Choose for Video Sources.&lt;br /&gt;
* Choose for existing or a new video source&lt;br /&gt;
* Listings grabber: The Netherlands (tv_grab_nl_py...)&lt;br /&gt;
* Klick Finish&lt;br /&gt;
&lt;br /&gt;
On the prompt&lt;br /&gt;
 # tv_grab_nl_py --configure&lt;br /&gt;
This will create a config file in /homedir/.xmltv/tv_grab_nl_py.conf&lt;br /&gt;
Edit this config file and clear out all channels you don want (or edit them out)&lt;br /&gt;
To see is something is happening&lt;br /&gt;
 #mythfilldatabase -v all --refresh-today&lt;br /&gt;
To see what&#039;s in the database&lt;br /&gt;
*mysql -u mythtv -p mythconverg -e &amp;quot;select chanid, callsign, name, xmltvid from channel;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VLC ==&lt;br /&gt;
&lt;br /&gt;
To make VLC player the default player. Goto Utilities/Setup -&amp;gt; SetUp -&amp;gt; Media Settings -&amp;gt; Video Settings -&amp;gt; Player Settings&lt;br /&gt;
 vlc file://%s vlc://quit&lt;br /&gt;
&lt;br /&gt;
nd change the extensions goto Utilities/Setup -&amp;gt; SetUp -&amp;gt; Media Settings -&amp;gt; Video Settings -&amp;gt; File Types&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2533</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2533"/>
		<updated>2010-04-05T20:29:25Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* lirc */ lirc init&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Lirc will initiate the hardware with the below config file. In this case a mce usb receiver with a ir blaster and also a volume knob (Antec fusion)&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;mceusb/lircd.conf.mceusb&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_imon&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen IR Transmitter&lt;br /&gt;
 TRANSMITTER=&amp;quot;Microsoft Windows Media Center V2 (usb) : Direct TV Receiver&amp;quot;&lt;br /&gt;
 TRANSMITTER_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 TRANSMITTER_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 TRANSMITTER_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Enable lircd&lt;br /&gt;
 START_LIRCD=&amp;quot;true&amp;quot;&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 #START_LIRCMD=&amp;quot;false&amp;quot;&lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=&amp;quot;true&amp;quot;&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 FORCE_NONINTERACTIVE_RECONFIGURATION=&amp;quot;false&amp;quot;&lt;br /&gt;
 START_LIRCMD=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Whit this config file lirc will listen on the devices and will translate the input. It will give a hardware name for the device and the button pressed.&lt;br /&gt;
irw wil give you a xample on the commandline&lt;br /&gt;
 #irw&lt;br /&gt;
Now press some buttons&lt;br /&gt;
&lt;br /&gt;
To feed the command to the appropiate program (if this program supports lirc) make a config in the home dir of the user.&lt;br /&gt;
&lt;br /&gt;
~/.lirc/mythtv&lt;br /&gt;
&lt;br /&gt;
 begin&lt;br /&gt;
    remote = ClickWheel&lt;br /&gt;
    prog = mythtv&lt;br /&gt;
    button = KEY_VOLUMEUP&lt;br /&gt;
    config = ]&lt;br /&gt;
    repeat = 0&lt;br /&gt;
    delay = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 begin&lt;br /&gt;
    remote = ClickWheel&lt;br /&gt;
    prog = mythtv&lt;br /&gt;
    button = KEY_VOLUMEDOWN&lt;br /&gt;
    config = [&lt;br /&gt;
    repeat = 0&lt;br /&gt;
    delay = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
And the final piece of the puzzle and this was the hardest to find but the most simple thing to do. It seems that Lirc has it all figured out for the newest version on how to run multiple devices without major manual configuration EXCEPT the Lirc init.d script.&lt;br /&gt;
&lt;br /&gt;
With my devices plugged in and issuing an ls -l /dev/lirc* I had all the devices I needed with manual configuration so&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
crw-rw---- 1 root root 61, 0 2010-02-21 11:44 /dev/lirc0&lt;br /&gt;
crw-rw---- 1 root root 61, 1 2010-02-21 11:44 /dev/lirc1&lt;br /&gt;
lrwxrwxrwx 1 root root    19 2010-02-21 11:44 /dev/lircd -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
lrwxrwxrwx 1 root root    20 2010-02-21 11:44 /dev/lircd1 -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
&lt;br /&gt;
SEE the problem - /dev/lircd1 was pointing to /var/run/lirc/lircd so when issuing an irsend command from a script or a command line I was getting the hardware cannot send error. The actual fix I finally found in another post - THANK YOU TO cyber_source - YOU ARE A LIFE SAVER.&lt;br /&gt;
&lt;br /&gt;
You need to edit your /etc/init.d/lirc startup script and change a couple lines&lt;br /&gt;
&lt;br /&gt;
First Line 83 Needs to be changed from&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;${TRANSMITTER_SOCKET}1&amp;quot; to this - &amp;quot;${TRANSMITTER_SOCKET}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and then line 131 Needs to be changed from&lt;br /&gt;
&lt;br /&gt;
 TRANSMITTER_SOCKET=&amp;quot;/var/run/lirc/lircd&amp;quot; to this TRANSMITTER_SOCKET=&amp;quot;/var/run/lirc/lircd1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
save and exit the file reboot your system and run another&lt;br /&gt;
ls -l /dev/lirc* and you should see&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
crw-rw---- 1 root root 61, 0 2010-02-21 11:44 /dev/lirc0&lt;br /&gt;
crw-rw---- 1 root root 61, 1 2010-02-21 11:44 /dev/lirc1&lt;br /&gt;
lrwxrwxrwx 1 root root    19 2010-02-21 11:44 /dev/lircd -&amp;gt; /var/run/lirc/lircd&lt;br /&gt;
lrwxrwxrwx 1 root root    20 2010-02-21 11:44 /dev/lircd1 -&amp;gt; /var/run/lirc/lircd1&lt;br /&gt;
&lt;br /&gt;
== IRblaster ==&lt;br /&gt;
&lt;br /&gt;
To get the right codes from youre remote you can record it with irrecord. This will provide a configuration file which you can use in lirc&lt;br /&gt;
 #irrecord /tmp/remote.conf&lt;br /&gt;
Now follow the instructions&lt;br /&gt;
To get the raw codes&lt;br /&gt;
 #irrecord -f /tmp/remoteraw.conf&lt;br /&gt;
&lt;br /&gt;
You wil get this file for a topfield tf6000cok remote&lt;br /&gt;
 # Please make this file available to others&lt;br /&gt;
 # by sending it to &amp;lt;lirc@bartelmus.de&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
 # this config file was automatically generated&lt;br /&gt;
 # using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010&lt;br /&gt;
 # &lt;br /&gt;
 # contributed by &lt;br /&gt;
 #&lt;br /&gt;
 # brand:Topfield&lt;br /&gt;
 # model no. of remote control: TP-014&lt;br /&gt;
 # devices being controlled by this remote: Topfield TF6000COK&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  topfield&lt;br /&gt;
  flags RAW_CODES|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  gap          107620&lt;br /&gt;
&lt;br /&gt;
      begin raw_codes&lt;br /&gt;
&lt;br /&gt;
          name KEY_1&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1600     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     600    1650&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     650     500     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650    1650&lt;br /&gt;
              550&lt;br /&gt;
&lt;br /&gt;
          name KEY_2&lt;br /&gt;
             9050    4400     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1650     600    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650    1600     600     550     600     500&lt;br /&gt;
              600     550     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_3&lt;br /&gt;
             9000    4450     600     500     650     500&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     600    1650     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_4&lt;br /&gt;
             9050    4450     600     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_5&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     550     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_6&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_7&lt;br /&gt;
             9000    4450     600     500     600     500&lt;br /&gt;
              650    1600     650     450     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_8&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              550    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650     500&lt;br /&gt;
              600     550     550     550     600    1650&lt;br /&gt;
              600    1650     550     550     600     500&lt;br /&gt;
              650     500     600    1600     650    1650&lt;br /&gt;
              550    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_9&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600     550     600     500     600    1650&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600     550     600    1600&lt;br /&gt;
              600    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_0&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     550&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     650     500     600    1600&lt;br /&gt;
              650     500     600     550     550    1650&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELDOWN&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600    1600     600     550     600    1650&lt;br /&gt;
              550     550     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEDOWN&lt;br /&gt;
             9050    4400     650     500     600     550&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     600    1650&lt;br /&gt;
              600    1650     600     500     650    1600&lt;br /&gt;
              600     550     600    1650     600    1600&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
      end raw_codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Now save this file in /etc/lirc and edit /etc/lirc/lircd.conf&lt;br /&gt;
 include &amp;quot;/etc/lirc/remote.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now we can test irblaster&lt;br /&gt;
 #irsend SEND_ONCE remote KEY_1&lt;br /&gt;
The channel on the topfield DVB must jump to channel 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EPG ==&lt;br /&gt;
&lt;br /&gt;
To use the epg we want to grad the data from a source. In this case we use tv_grab_nl_py. This script will grab all data from www.tvgids.nl&lt;br /&gt;
&lt;br /&gt;
XMLTV-configuratiebestand aanmaken&lt;br /&gt;
&lt;br /&gt;
* Start MythTV Setup&lt;br /&gt;
* Choose for Video Sources.&lt;br /&gt;
* Choose for existing or a new video source&lt;br /&gt;
* Listings grabber: The Netherlands (tv_grab_nl_py...)&lt;br /&gt;
* Klick Finish&lt;br /&gt;
&lt;br /&gt;
On the prompt&lt;br /&gt;
 # tv_grab_nl_py --configure&lt;br /&gt;
This will create a config file in /homedir/.xmltv/tv_grab_nl_py.conf&lt;br /&gt;
Edit this config file and clear out all channels you don want (or edit them out)&lt;br /&gt;
To see is something is happening&lt;br /&gt;
 #mythfilldatabase -v all --refresh-today&lt;br /&gt;
To see what&#039;s in the database&lt;br /&gt;
*mysql -u mythtv -p mythconverg -e &amp;quot;select chanid, callsign, name, xmltvid from channel;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2532</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2532"/>
		<updated>2010-04-05T20:24:00Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* lirc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Lirc will initiate the hardware with the below config file. In this case a mce usb receiver with a ir blaster and also a volume knob (Antec fusion)&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;mceusb/lircd.conf.mceusb&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_imon&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen IR Transmitter&lt;br /&gt;
 TRANSMITTER=&amp;quot;Microsoft Windows Media Center V2 (usb) : Direct TV Receiver&amp;quot;&lt;br /&gt;
 TRANSMITTER_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 TRANSMITTER_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 TRANSMITTER_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Enable lircd&lt;br /&gt;
 START_LIRCD=&amp;quot;true&amp;quot;&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 #START_LIRCMD=&amp;quot;false&amp;quot;&lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=&amp;quot;true&amp;quot;&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 FORCE_NONINTERACTIVE_RECONFIGURATION=&amp;quot;false&amp;quot;&lt;br /&gt;
 START_LIRCMD=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Whit this config file lirc will listen on the devices and will translate the input. It will give a hardware name for the device and the button pressed.&lt;br /&gt;
irw wil give you a xample on the commandline&lt;br /&gt;
 #irw&lt;br /&gt;
Now press some buttons&lt;br /&gt;
&lt;br /&gt;
To feed the command to the appropiate program (if this program supports lirc) make a config in the home dir of the user.&lt;br /&gt;
&lt;br /&gt;
~/.lirc/mythtv&lt;br /&gt;
&lt;br /&gt;
 begin&lt;br /&gt;
    remote = ClickWheel&lt;br /&gt;
    prog = mythtv&lt;br /&gt;
    button = KEY_VOLUMEUP&lt;br /&gt;
    config = ]&lt;br /&gt;
    repeat = 0&lt;br /&gt;
    delay = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
 begin&lt;br /&gt;
    remote = ClickWheel&lt;br /&gt;
    prog = mythtv&lt;br /&gt;
    button = KEY_VOLUMEDOWN&lt;br /&gt;
    config = [&lt;br /&gt;
    repeat = 0&lt;br /&gt;
    delay = 0&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
== IRblaster ==&lt;br /&gt;
&lt;br /&gt;
To get the right codes from youre remote you can record it with irrecord. This will provide a configuration file which you can use in lirc&lt;br /&gt;
 #irrecord /tmp/remote.conf&lt;br /&gt;
Now follow the instructions&lt;br /&gt;
To get the raw codes&lt;br /&gt;
 #irrecord -f /tmp/remoteraw.conf&lt;br /&gt;
&lt;br /&gt;
You wil get this file for a topfield tf6000cok remote&lt;br /&gt;
 # Please make this file available to others&lt;br /&gt;
 # by sending it to &amp;lt;lirc@bartelmus.de&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
 # this config file was automatically generated&lt;br /&gt;
 # using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010&lt;br /&gt;
 # &lt;br /&gt;
 # contributed by &lt;br /&gt;
 #&lt;br /&gt;
 # brand:Topfield&lt;br /&gt;
 # model no. of remote control: TP-014&lt;br /&gt;
 # devices being controlled by this remote: Topfield TF6000COK&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  topfield&lt;br /&gt;
  flags RAW_CODES|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  gap          107620&lt;br /&gt;
&lt;br /&gt;
      begin raw_codes&lt;br /&gt;
&lt;br /&gt;
          name KEY_1&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1600     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     600    1650&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     650     500     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650    1650&lt;br /&gt;
              550&lt;br /&gt;
&lt;br /&gt;
          name KEY_2&lt;br /&gt;
             9050    4400     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1650     600    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650    1600     600     550     600     500&lt;br /&gt;
              600     550     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_3&lt;br /&gt;
             9000    4450     600     500     650     500&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     600    1650     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_4&lt;br /&gt;
             9050    4450     600     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_5&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     550     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_6&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_7&lt;br /&gt;
             9000    4450     600     500     600     500&lt;br /&gt;
              650    1600     650     450     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_8&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              550    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650     500&lt;br /&gt;
              600     550     550     550     600    1650&lt;br /&gt;
              600    1650     550     550     600     500&lt;br /&gt;
              650     500     600    1600     650    1650&lt;br /&gt;
              550    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_9&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600     550     600     500     600    1650&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600     550     600    1600&lt;br /&gt;
              600    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_0&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     550&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     650     500     600    1600&lt;br /&gt;
              650     500     600     550     550    1650&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELDOWN&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600    1600     600     550     600    1650&lt;br /&gt;
              550     550     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEDOWN&lt;br /&gt;
             9050    4400     650     500     600     550&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     600    1650&lt;br /&gt;
              600    1650     600     500     650    1600&lt;br /&gt;
              600     550     600    1650     600    1600&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
      end raw_codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Now save this file in /etc/lirc and edit /etc/lirc/lircd.conf&lt;br /&gt;
 include &amp;quot;/etc/lirc/remote.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now we can test irblaster&lt;br /&gt;
 #irsend SEND_ONCE remote KEY_1&lt;br /&gt;
The channel on the topfield DVB must jump to channel 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EPG ==&lt;br /&gt;
&lt;br /&gt;
To use the epg we want to grad the data from a source. In this case we use tv_grab_nl_py. This script will grab all data from www.tvgids.nl&lt;br /&gt;
&lt;br /&gt;
XMLTV-configuratiebestand aanmaken&lt;br /&gt;
&lt;br /&gt;
* Start MythTV Setup&lt;br /&gt;
* Choose for Video Sources.&lt;br /&gt;
* Choose for existing or a new video source&lt;br /&gt;
* Listings grabber: The Netherlands (tv_grab_nl_py...)&lt;br /&gt;
* Klick Finish&lt;br /&gt;
&lt;br /&gt;
On the prompt&lt;br /&gt;
 # tv_grab_nl_py --configure&lt;br /&gt;
This will create a config file in /homedir/.xmltv/tv_grab_nl_py.conf&lt;br /&gt;
Edit this config file and clear out all channels you don want (or edit them out)&lt;br /&gt;
To see is something is happening&lt;br /&gt;
 #mythfilldatabase -v all --refresh-today&lt;br /&gt;
To see what&#039;s in the database&lt;br /&gt;
*mysql -u mythtv -p mythconverg -e &amp;quot;select chanid, callsign, name, xmltvid from channel;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2531</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2531"/>
		<updated>2010-04-05T20:18:41Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* lirc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Lirc will initiate the hardware with the below config file. In this case a mce usb receiver with a ir blaster and also a volume knob (Antec fusion)&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;mceusb/lircd.conf.mceusb&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen Remote Control&lt;br /&gt;
 REMOTE=&amp;quot;Windows Media Center Transceivers/Remotes (all)&amp;quot;&lt;br /&gt;
 REMOTE_MODULES=&amp;quot;lirc_dev lirc_imon&amp;quot;&lt;br /&gt;
 REMOTE_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
 #Chosen IR Transmitter&lt;br /&gt;
 TRANSMITTER=&amp;quot;Microsoft Windows Media Center V2 (usb) : Direct TV Receiver&amp;quot;&lt;br /&gt;
 TRANSMITTER_MODULES=&amp;quot;lirc_dev lirc_mceusb2&amp;quot;&lt;br /&gt;
 TRANSMITTER_DRIVER=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_DEVICE=&amp;quot;/dev/lirc1&amp;quot;&lt;br /&gt;
 TRANSMITTER_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 TRANSMITTER_LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 #Enable lircd&lt;br /&gt;
 START_LIRCD=&amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 #START_LIRCMD=&amp;quot;false&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=&amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 FORCE_NONINTERACTIVE_RECONFIGURATION=&amp;quot;false&amp;quot;&lt;br /&gt;
 START_LIRCMD=&amp;quot;&amp;quot;&lt;br /&gt;
 REMOTE_SOCKET=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Whit this config file lirc will listen on the devices and will translate the input. It will give a hardware name for the device and the button pressed.&lt;br /&gt;
irw wil give you a xample on the commandline&lt;br /&gt;
 #irw&lt;br /&gt;
Now press some buttons&lt;br /&gt;
&lt;br /&gt;
To feed the command to the appropiate program (if this program supports lirc) make a config in the home dir of the user.&lt;br /&gt;
&lt;br /&gt;
~/.lircrc&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Two&lt;br /&gt;
    config = 2&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Three&lt;br /&gt;
    config = 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Four&lt;br /&gt;
    config = 4&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Five&lt;br /&gt;
    config = 5&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Six&lt;br /&gt;
    config = 6&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Seven&lt;br /&gt;
    config = 7&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Eight&lt;br /&gt;
    config = 8&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Nine&lt;br /&gt;
    config = 9&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
== IRblaster ==&lt;br /&gt;
&lt;br /&gt;
To get the right codes from youre remote you can record it with irrecord. This will provide a configuration file which you can use in lirc&lt;br /&gt;
 #irrecord /tmp/remote.conf&lt;br /&gt;
Now follow the instructions&lt;br /&gt;
To get the raw codes&lt;br /&gt;
 #irrecord -f /tmp/remoteraw.conf&lt;br /&gt;
&lt;br /&gt;
You wil get this file for a topfield tf6000cok remote&lt;br /&gt;
 # Please make this file available to others&lt;br /&gt;
 # by sending it to &amp;lt;lirc@bartelmus.de&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
 # this config file was automatically generated&lt;br /&gt;
 # using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010&lt;br /&gt;
 # &lt;br /&gt;
 # contributed by &lt;br /&gt;
 #&lt;br /&gt;
 # brand:Topfield&lt;br /&gt;
 # model no. of remote control: TP-014&lt;br /&gt;
 # devices being controlled by this remote: Topfield TF6000COK&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  topfield&lt;br /&gt;
  flags RAW_CODES|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  gap          107620&lt;br /&gt;
&lt;br /&gt;
      begin raw_codes&lt;br /&gt;
&lt;br /&gt;
          name KEY_1&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1600     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     600    1650&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     650     500     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650    1650&lt;br /&gt;
              550&lt;br /&gt;
&lt;br /&gt;
          name KEY_2&lt;br /&gt;
             9050    4400     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1650     600    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650    1600     600     550     600     500&lt;br /&gt;
              600     550     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_3&lt;br /&gt;
             9000    4450     600     500     650     500&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     600    1650     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_4&lt;br /&gt;
             9050    4450     600     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_5&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     550     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_6&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_7&lt;br /&gt;
             9000    4450     600     500     600     500&lt;br /&gt;
              650    1600     650     450     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_8&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              550    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650     500&lt;br /&gt;
              600     550     550     550     600    1650&lt;br /&gt;
              600    1650     550     550     600     500&lt;br /&gt;
              650     500     600    1600     650    1650&lt;br /&gt;
              550    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_9&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600     550     600     500     600    1650&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600     550     600    1600&lt;br /&gt;
              600    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_0&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     550&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     650     500     600    1600&lt;br /&gt;
              650     500     600     550     550    1650&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELDOWN&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600    1600     600     550     600    1650&lt;br /&gt;
              550     550     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEDOWN&lt;br /&gt;
             9050    4400     650     500     600     550&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     600    1650&lt;br /&gt;
              600    1650     600     500     650    1600&lt;br /&gt;
              600     550     600    1650     600    1600&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
      end raw_codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Now save this file in /etc/lirc and edit /etc/lirc/lircd.conf&lt;br /&gt;
 include &amp;quot;/etc/lirc/remote.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now we can test irblaster&lt;br /&gt;
 #irsend SEND_ONCE remote KEY_1&lt;br /&gt;
The channel on the topfield DVB must jump to channel 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EPG ==&lt;br /&gt;
&lt;br /&gt;
To use the epg we want to grad the data from a source. In this case we use tv_grab_nl_py. This script will grab all data from www.tvgids.nl&lt;br /&gt;
&lt;br /&gt;
XMLTV-configuratiebestand aanmaken&lt;br /&gt;
&lt;br /&gt;
* Start MythTV Setup&lt;br /&gt;
* Choose for Video Sources.&lt;br /&gt;
* Choose for existing or a new video source&lt;br /&gt;
* Listings grabber: The Netherlands (tv_grab_nl_py...)&lt;br /&gt;
* Klick Finish&lt;br /&gt;
&lt;br /&gt;
On the prompt&lt;br /&gt;
 # tv_grab_nl_py --configure&lt;br /&gt;
This will create a config file in /homedir/.xmltv/tv_grab_nl_py.conf&lt;br /&gt;
Edit this config file and clear out all channels you don want (or edit them out)&lt;br /&gt;
To see is something is happening&lt;br /&gt;
 #mythfilldatabase -v all --refresh-today&lt;br /&gt;
To see what&#039;s in the database&lt;br /&gt;
*mysql -u mythtv -p mythconverg -e &amp;quot;select chanid, callsign, name, xmltvid from channel;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2504</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2504"/>
		<updated>2010-03-24T20:27:04Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* IRblaster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/hardware.conf&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 # Arguments which will be used when launching lircd&lt;br /&gt;
 LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 START_LIRCMD=false&lt;br /&gt;
&lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=true&lt;br /&gt;
 &lt;br /&gt;
 # Run &amp;quot;lircd --driver=help&amp;quot; for a list of supported drivers.&lt;br /&gt;
 #DRIVER=&amp;quot;pinsys&amp;quot;&lt;br /&gt;
 # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be&lt;br /&gt;
 # automatically used instead&lt;br /&gt;
 DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 MODULES=&amp;quot;lirc_mceusb&amp;quot; &lt;br /&gt;
 TRANSMITTER_DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
~/.lircrc&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Two&lt;br /&gt;
    config = 2&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Three&lt;br /&gt;
    config = 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Four&lt;br /&gt;
    config = 4&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Five&lt;br /&gt;
    config = 5&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Six&lt;br /&gt;
    config = 6&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Seven&lt;br /&gt;
    config = 7&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Eight&lt;br /&gt;
    config = 8&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Nine&lt;br /&gt;
    config = 9&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
== IRblaster ==&lt;br /&gt;
&lt;br /&gt;
To get the right codes from youre remote you can record it with irrecord. This will provide a configuration file which you can use in lirc&lt;br /&gt;
 #irrecord /tmp/remote.conf&lt;br /&gt;
Now follow the instructions&lt;br /&gt;
To get the raw codes&lt;br /&gt;
 #irrecord -f /tmp/remoteraw.conf&lt;br /&gt;
&lt;br /&gt;
You wil get this file for a topfield tf6000cok remote&lt;br /&gt;
 # Please make this file available to others&lt;br /&gt;
 # by sending it to &amp;lt;lirc@bartelmus.de&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
 # this config file was automatically generated&lt;br /&gt;
 # using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010&lt;br /&gt;
 # &lt;br /&gt;
 # contributed by &lt;br /&gt;
 #&lt;br /&gt;
 # brand:Topfield&lt;br /&gt;
 # model no. of remote control: TP-014&lt;br /&gt;
 # devices being controlled by this remote: Topfield TF6000COK&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  topfield&lt;br /&gt;
  flags RAW_CODES|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  gap          107620&lt;br /&gt;
&lt;br /&gt;
      begin raw_codes&lt;br /&gt;
&lt;br /&gt;
          name KEY_1&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1600     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     600    1650&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     650     500     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650    1650&lt;br /&gt;
              550&lt;br /&gt;
&lt;br /&gt;
          name KEY_2&lt;br /&gt;
             9050    4400     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1650     600    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650    1600     600     550     600     500&lt;br /&gt;
              600     550     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_3&lt;br /&gt;
             9000    4450     600     500     650     500&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     600    1650     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_4&lt;br /&gt;
             9050    4450     600     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_5&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     550     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_6&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_7&lt;br /&gt;
             9000    4450     600     500     600     500&lt;br /&gt;
              650    1600     650     450     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_8&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              550    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650     500&lt;br /&gt;
              600     550     550     550     600    1650&lt;br /&gt;
              600    1650     550     550     600     500&lt;br /&gt;
              650     500     600    1600     650    1650&lt;br /&gt;
              550    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_9&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600     550     600     500     600    1650&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600     550     600    1600&lt;br /&gt;
              600    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_0&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     550&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     650     500     600    1600&lt;br /&gt;
              650     500     600     550     550    1650&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELDOWN&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600    1600     600     550     600    1650&lt;br /&gt;
              550     550     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEDOWN&lt;br /&gt;
             9050    4400     650     500     600     550&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     600    1650&lt;br /&gt;
              600    1650     600     500     650    1600&lt;br /&gt;
              600     550     600    1650     600    1600&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
      end raw_codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Now save this file in /etc/lirc and edit /etc/lirc/lircd.conf&lt;br /&gt;
 include &amp;quot;/etc/lirc/remote.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now we can test irblaster&lt;br /&gt;
 #irsend SEND_ONCE remote KEY_1&lt;br /&gt;
The channel on the topfield DVB must jump to channel 1&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2503</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2503"/>
		<updated>2010-03-24T20:26:09Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* IRblaster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/hardware.conf&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 # Arguments which will be used when launching lircd&lt;br /&gt;
 LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 START_LIRCMD=false&lt;br /&gt;
&lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=true&lt;br /&gt;
 &lt;br /&gt;
 # Run &amp;quot;lircd --driver=help&amp;quot; for a list of supported drivers.&lt;br /&gt;
 #DRIVER=&amp;quot;pinsys&amp;quot;&lt;br /&gt;
 # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be&lt;br /&gt;
 # automatically used instead&lt;br /&gt;
 DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 MODULES=&amp;quot;lirc_mceusb&amp;quot; &lt;br /&gt;
 TRANSMITTER_DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
~/.lircrc&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Two&lt;br /&gt;
    config = 2&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Three&lt;br /&gt;
    config = 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Four&lt;br /&gt;
    config = 4&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Five&lt;br /&gt;
    config = 5&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Six&lt;br /&gt;
    config = 6&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Seven&lt;br /&gt;
    config = 7&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Eight&lt;br /&gt;
    config = 8&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Nine&lt;br /&gt;
    config = 9&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
== IRblaster ==&lt;br /&gt;
&lt;br /&gt;
To get the right codes from youre remote you can record it with irrecord&lt;br /&gt;
 #irrecord /tmp/remote.conf&lt;br /&gt;
Now follow the instructions&lt;br /&gt;
To get the raw codes&lt;br /&gt;
 #irrecord -f /tmp/remoteraw.conf&lt;br /&gt;
&lt;br /&gt;
You wil get this file for a topfield tf6000cok remote&lt;br /&gt;
 # Please make this file available to others&lt;br /&gt;
 # by sending it to &amp;lt;lirc@bartelmus.de&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
 # this config file was automatically generated&lt;br /&gt;
 # using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010&lt;br /&gt;
 # &lt;br /&gt;
 # contributed by &lt;br /&gt;
 #&lt;br /&gt;
 # brand:Topfield&lt;br /&gt;
 # model no. of remote control: TP-014&lt;br /&gt;
 # devices being controlled by this remote: Topfield TF6000COK&lt;br /&gt;
 #&lt;br /&gt;
&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  topfield&lt;br /&gt;
  flags RAW_CODES|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  gap          107620&lt;br /&gt;
&lt;br /&gt;
      begin raw_codes&lt;br /&gt;
&lt;br /&gt;
          name KEY_1&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1600     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     600    1650&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     650     500     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650    1650&lt;br /&gt;
              550&lt;br /&gt;
&lt;br /&gt;
          name KEY_2&lt;br /&gt;
             9050    4400     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1650     600    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650    1600     600     550     600     500&lt;br /&gt;
              600     550     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_3&lt;br /&gt;
             9000    4450     600     500     650     500&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     600    1650     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_4&lt;br /&gt;
             9050    4450     600     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_5&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     550     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_6&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_7&lt;br /&gt;
             9000    4450     600     500     600     500&lt;br /&gt;
              650    1600     650     450     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_8&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              550    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650     500&lt;br /&gt;
              600     550     550     550     600    1650&lt;br /&gt;
              600    1650     550     550     600     500&lt;br /&gt;
              650     500     600    1600     650    1650&lt;br /&gt;
              550    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_9&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600     550     600     500     600    1650&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600     550     600    1600&lt;br /&gt;
              600    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_0&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     550&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     650     500     600    1600&lt;br /&gt;
              650     500     600     550     550    1650&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELDOWN&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600    1600     600     550     600    1650&lt;br /&gt;
              550     550     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEDOWN&lt;br /&gt;
             9050    4400     650     500     600     550&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     600    1650&lt;br /&gt;
              600    1650     600     500     650    1600&lt;br /&gt;
              600     550     600    1650     600    1600&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
      end raw_codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
Now save this file in /etc/lirc and edit /etc/lirc/lircd.conf&lt;br /&gt;
 include &amp;quot;/etc/lirc/remote.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now we can test irblaster&lt;br /&gt;
 #irsend SEND_ONCE remote KEY_1&lt;br /&gt;
The channel on the topfield DVB must jump to channel 1&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2502</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2502"/>
		<updated>2010-03-24T20:21:52Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Metadata */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/hardware.conf&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 # Arguments which will be used when launching lircd&lt;br /&gt;
 LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 START_LIRCMD=false&lt;br /&gt;
&lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=true&lt;br /&gt;
 &lt;br /&gt;
 # Run &amp;quot;lircd --driver=help&amp;quot; for a list of supported drivers.&lt;br /&gt;
 #DRIVER=&amp;quot;pinsys&amp;quot;&lt;br /&gt;
 # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be&lt;br /&gt;
 # automatically used instead&lt;br /&gt;
 DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 MODULES=&amp;quot;lirc_mceusb&amp;quot; &lt;br /&gt;
 TRANSMITTER_DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
~/.lircrc&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Two&lt;br /&gt;
    config = 2&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Three&lt;br /&gt;
    config = 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Four&lt;br /&gt;
    config = 4&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Five&lt;br /&gt;
    config = 5&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Six&lt;br /&gt;
    config = 6&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Seven&lt;br /&gt;
    config = 7&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Eight&lt;br /&gt;
    config = 8&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Nine&lt;br /&gt;
    config = 9&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
== IRblaster ==&lt;br /&gt;
&lt;br /&gt;
To get the right codes from youre remote you can record it with irrecord&lt;br /&gt;
 #irrecord /tmp/remote.conf&lt;br /&gt;
Now follow the instructions&lt;br /&gt;
To get the raw codes&lt;br /&gt;
 #irrecord -f /tmp/remoteraw.conf&lt;br /&gt;
&lt;br /&gt;
You wil get this file for a topfield tf6000cok remote&lt;br /&gt;
# Please make this file available to others&lt;br /&gt;
# by sending it to &amp;lt;lirc@bartelmus.de&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# this config file was automatically generated&lt;br /&gt;
# using lirc-0.8.6(default) on Wed Mar 24 20:58:54 2010&lt;br /&gt;
#&lt;br /&gt;
# contributed by &lt;br /&gt;
#&lt;br /&gt;
# brand:Topfield&lt;br /&gt;
# model no. of remote control: TP-014&lt;br /&gt;
# devices being controlled by this remote: Topfield TF6000COK&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
begin remote&lt;br /&gt;
&lt;br /&gt;
  name  topfield&lt;br /&gt;
  flags RAW_CODES|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  gap          107620&lt;br /&gt;
&lt;br /&gt;
      begin raw_codes&lt;br /&gt;
&lt;br /&gt;
          name KEY_1&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1600     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     600    1650&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     650     500     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650    1650&lt;br /&gt;
              550&lt;br /&gt;
&lt;br /&gt;
          name KEY_2&lt;br /&gt;
             9050    4400     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600     500     600     500&lt;br /&gt;
              650    1650     600    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650    1600     600     550     600     500&lt;br /&gt;
              600     550     600    1600     600     550&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_3&lt;br /&gt;
             9000    4450     600     500     650     500&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     600    1650     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              600     550     600     500     600     550&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_4&lt;br /&gt;
             9050    4450     600     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600     500&lt;br /&gt;
              650     500     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_5&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     550     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_6&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_7&lt;br /&gt;
             9000    4450     600     500     600     500&lt;br /&gt;
              650    1600     650     450     650     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650    1600&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     550    1650     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_8&lt;br /&gt;
             9050    4400     650     450     650     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1600     650    1650&lt;br /&gt;
              550    1650     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     650     500&lt;br /&gt;
              600     550     550     550     600    1650&lt;br /&gt;
              600    1650     550     550     600     500&lt;br /&gt;
              650     500     600    1600     650    1650&lt;br /&gt;
              550    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_9&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600     550     600     500     600    1650&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600     500     600     550     600    1600&lt;br /&gt;
              600    1650     600     550     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_0&lt;br /&gt;
             9000    4450     600     500     650     450&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     550&lt;br /&gt;
              600    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600     500     600     550&lt;br /&gt;
              600     500     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     550     550&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1600     600    1650&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600     500     600    1650     600     500&lt;br /&gt;
              600    1650     650     500     600    1600&lt;br /&gt;
              650     500     600     550     550    1650&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_CHANNELDOWN&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              650    1600     600     500     650     500&lt;br /&gt;
              600     550     600     500     600     500&lt;br /&gt;
              600    1650     600    1650     600    1650&lt;br /&gt;
              600    1600     650    1650     600    1600&lt;br /&gt;
              600    1650     600    1650     600     500&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600    1600     600     550     600    1650&lt;br /&gt;
              550     550     600    1650     600     500&lt;br /&gt;
              600     550     600    1650     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEUP&lt;br /&gt;
             9050    4400     650     500     600     500&lt;br /&gt;
              600    1650     600     500     650     500&lt;br /&gt;
              600     500     600     500     650     500&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              600    1650     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600     500     600     500     600     550&lt;br /&gt;
              600     500     650    1600     600     500&lt;br /&gt;
              650    1650     550     550     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
          name KEY_VOLUMEDOWN&lt;br /&gt;
             9050    4400     650     500     600     550&lt;br /&gt;
              600    1600     650     500     600     500&lt;br /&gt;
              600     500     650     500     600     500&lt;br /&gt;
              650    1600     600    1650     600    1650&lt;br /&gt;
              600    1650     600    1650     600    1600&lt;br /&gt;
              650    1600     600    1650     600     550&lt;br /&gt;
              600     500     600     500     600    1650&lt;br /&gt;
              600    1650     600     500     650    1600&lt;br /&gt;
              600     550     600    1650     600    1600&lt;br /&gt;
              600    1650     600     550     550     550&lt;br /&gt;
              600    1650     600     500     600    1650&lt;br /&gt;
              600&lt;br /&gt;
&lt;br /&gt;
      end raw_codes&lt;br /&gt;
&lt;br /&gt;
end remote&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2481</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2481"/>
		<updated>2010-01-06T21:30:54Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* lirc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/hardware.conf&lt;br /&gt;
&lt;br /&gt;
 # /etc/lirc/hardware.conf&lt;br /&gt;
 #&lt;br /&gt;
 # Arguments which will be used when launching lircd&lt;br /&gt;
 LIRCD_ARGS=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 #Don&#039;t start lircmd even if there seems to be a good config file&lt;br /&gt;
 START_LIRCMD=false&lt;br /&gt;
&lt;br /&gt;
 #Try to load appropriate kernel modules&lt;br /&gt;
 LOAD_MODULES=true&lt;br /&gt;
 &lt;br /&gt;
 # Run &amp;quot;lircd --driver=help&amp;quot; for a list of supported drivers.&lt;br /&gt;
 #DRIVER=&amp;quot;pinsys&amp;quot;&lt;br /&gt;
 # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be&lt;br /&gt;
 # automatically used instead&lt;br /&gt;
 DEVICE=&amp;quot;/dev/lirc0&amp;quot;&lt;br /&gt;
 MODULES=&amp;quot;lirc_mceusb&amp;quot; &lt;br /&gt;
&lt;br /&gt;
 # Default configuration files for your hardware if any&lt;br /&gt;
 LIRCD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
 LIRCMD_CONF=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
/etc/lirc/lircd.conf&lt;br /&gt;
&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 # lircd.conf file for the new Microsoft Media Center remote using a new&lt;br /&gt;
 # Microsoft Media Center receiver.&lt;br /&gt;
 ################################################################################&lt;br /&gt;
 begin remote&lt;br /&gt;
&lt;br /&gt;
  name  mceusb&lt;br /&gt;
  bits           16&lt;br /&gt;
  flags RC6|CONST_LENGTH&lt;br /&gt;
  eps            30&lt;br /&gt;
  aeps          100&lt;br /&gt;
&lt;br /&gt;
  header       2667   889&lt;br /&gt;
  one           444   444&lt;br /&gt;
  zero          444   444&lt;br /&gt;
  pre_data_bits 21&lt;br /&gt;
  pre_data      0x37FF0&lt;br /&gt;
  gap          105000&lt;br /&gt;
  toggle_bit     22&lt;br /&gt;
  rc6_mask     0x100000000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      begin codes&lt;br /&gt;
&lt;br /&gt;
 # starts at A1&lt;br /&gt;
        BLUE         0x00007BA1&lt;br /&gt;
        YELLOW       0x00007BA2&lt;br /&gt;
        GREEN        0x00007BA3&lt;br /&gt;
        RED          0x00007BA4&lt;br /&gt;
        TELETEXT     0x00007BA5&lt;br /&gt;
        RADIO        0x00007BAF&lt;br /&gt;
        PRINT        0x00007BB1&lt;br /&gt;
        VIDEO        0x00007BB5 # VIDEOS button&lt;br /&gt;
        IMAGE        0x00007BB6 # PICTURES button&lt;br /&gt;
        PVR          0x00007BB7 # RECORDED TV button&lt;br /&gt;
        AUDIO        0x00007BB8 # MUSIC button&lt;br /&gt;
        TV           0x00007BB9&lt;br /&gt;
 # no BA - D8&lt;br /&gt;
        Guide        0x00007BD9&lt;br /&gt;
        TV           0x00007BDA # LIVE TV button&lt;br /&gt;
        Dvd          0x00007BDB&lt;br /&gt;
        Back         0x00007BDC&lt;br /&gt;
        OK           0x00007BDD&lt;br /&gt;
        Right        0x00007BDE&lt;br /&gt;
        Left         0x00007BDF&lt;br /&gt;
        Down         0x00007BE0&lt;br /&gt;
        Up           0x00007BE1&lt;br /&gt;
        STAR         0x00007BE2&lt;br /&gt;
        Hash          0x00007BE3&lt;br /&gt;
        PREVIOUS     0x00007BE4 # REPLAY button&lt;br /&gt;
        Next         0x00007BE5 # SKIP button&lt;br /&gt;
        Stop         0x00007BE6&lt;br /&gt;
        Pause        0x00007BE7&lt;br /&gt;
        Record       0x00007BE8&lt;br /&gt;
        Play         0x00007BE9&lt;br /&gt;
        Rewind       0x00007BEA&lt;br /&gt;
        Forward      0x00007BEB&lt;br /&gt;
        CHANNELDOWN  0x00007BEC&lt;br /&gt;
        CHANNELUP    0x00007BED&lt;br /&gt;
        Volumedown   0x00007BEE&lt;br /&gt;
        Volumeup     0x00007BEF&lt;br /&gt;
        INFO         0x00007BF0 # MORE (i) button&lt;br /&gt;
        Mute         0x00007BF1&lt;br /&gt;
        MENU         0x00007BF2 # START (Windows) button&lt;br /&gt;
        POWER        0x00007BF3&lt;br /&gt;
        ENTER        0x00007BF4&lt;br /&gt;
        CLEAR        0x00007BF5&lt;br /&gt;
        9            0x00007BF6&lt;br /&gt;
        8            0x00007BF7&lt;br /&gt;
        7            0x00007BF8&lt;br /&gt;
        6            0x00007BF9&lt;br /&gt;
        5            0x00007BFA&lt;br /&gt;
        4            0x00007BFB&lt;br /&gt;
        3            0x00007BFC&lt;br /&gt;
        2            0x00007BFD&lt;br /&gt;
        1            0x00007BFE&lt;br /&gt;
        0            0x00007BFF&lt;br /&gt;
      end codes&lt;br /&gt;
&lt;br /&gt;
 end remote&lt;br /&gt;
&lt;br /&gt;
~/.lircrc&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Two&lt;br /&gt;
    config = 2&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Three&lt;br /&gt;
    config = 3&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Four&lt;br /&gt;
    config = 4&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Five&lt;br /&gt;
    config = 5&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Six&lt;br /&gt;
    config = 6&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Seven&lt;br /&gt;
    config = 7&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Eight&lt;br /&gt;
    config = 8&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    prog   = mythtv&lt;br /&gt;
    button = Nine&lt;br /&gt;
    config = 9&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;br /&gt;
&lt;br /&gt;
To configure the metadata yourself you can select the video and press I. Now configure the metadata.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2477</id>
		<title>Mythtv</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Mythtv&amp;diff=2477"/>
		<updated>2009-12-30T15:12:46Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== lirc ==&lt;br /&gt;
LIRC CVS is hosted at SourceForge. You can get a copy of the current CVS tree using anonymous CVS login. First log in to the cvs server (press &amp;lt;enter&amp;gt; for password):&lt;br /&gt;
 cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login&lt;br /&gt;
Get the sources:&lt;br /&gt;
 cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc&lt;br /&gt;
After initial checkout, you can change into this directory and execute cvs commands without the -d option. For example:&lt;br /&gt;
 cvs update&lt;br /&gt;
Compile:&lt;br /&gt;
 cd lirc&lt;br /&gt;
  ./autogen.sh&lt;br /&gt;
  ./setup.sh&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metadata ==&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the filepaths right. Go to Mythtv setup - 6. Storage Directories&lt;br /&gt;
Choose (create Fanart group) and choose the right directory&lt;br /&gt;
&lt;br /&gt;
Now go to the mythfrontend and choose to watch a video. Select the video and press W. Based on the filename [http://www.mythtv.org/wiki/MythVideo_File_Parsing] the right data will be searched.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=2463</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=2463"/>
		<updated>2009-10-05T11:17:37Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Citrix Ica client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;br /&gt;
&lt;br /&gt;
== Compiz ==&lt;br /&gt;
&lt;br /&gt;
To enable compiz install the Nvidia drivers and install CompizConfig Settings Manager&lt;br /&gt;
 sudo apt-get install simple-ccsm&lt;br /&gt;
Now navigate to system &amp;gt; preferences &amp;gt; Appereance And go to the Visual effects tab. Choose custum there&lt;br /&gt;
&lt;br /&gt;
On Kubuntu change the default windows manager&lt;br /&gt;
&lt;br /&gt;
 System Settings -&amp;gt; Default Applications -&amp;gt; Windows manager&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Desktop Effects&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Keyboard Shortcuts&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube Manually&lt;br /&gt;
|Ctrl + Alt + Left Mouse Button&lt;br /&gt;
|-&lt;br /&gt;
|Expo&lt;br /&gt;
|Super + E (toggle)&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube&lt;br /&gt;
|Mousewheel on Desktop&lt;br /&gt;
|-&lt;br /&gt;
|Film Effect&lt;br /&gt;
|Ctrl + Alt + Down Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Scale Windows&lt;br /&gt;
|Alt + Shift + Up Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Ring Switcher&lt;br /&gt;
|Super + Tab - overrides Shift Switcher&lt;br /&gt;
|}&lt;br /&gt;
Super key is the windows key :-)&lt;br /&gt;
&lt;br /&gt;
== Mount Network Share ==&lt;br /&gt;
&lt;br /&gt;
First install smbfs&lt;br /&gt;
 apt-get install smbfs&lt;br /&gt;
Then create a folder inside of the /media directory to mount the share on or choose you&#039;re own directory&lt;br /&gt;
 sudo mkdir /media/Storage&lt;br /&gt;
Create a credentials file in /root so that you can save your password and have it protected by the root account:&lt;br /&gt;
 sudo gedit /root/.cifscredentials&lt;br /&gt;
Add this to the file&lt;br /&gt;
 username=Guest&lt;br /&gt;
 password=&lt;br /&gt;
&lt;br /&gt;
sudo vi /etc/fstab&lt;br /&gt;
Add the following line&lt;br /&gt;
 //192.168.0.10/SHARENAME /media/Storage cifs auto,iocharset=utf8,uid=USER,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0&lt;br /&gt;
&lt;br /&gt;
To check if the file works&lt;br /&gt;
 sudo mount -a&lt;br /&gt;
And you should see you&#039;re drives on the desktop&lt;br /&gt;
&lt;br /&gt;
Ik you get  error when you shut down the pc &#039;&#039;CIFS VFS: server not responding&#039;&#039; then you have to unmount first. Do this with the following&lt;br /&gt;
&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh&lt;br /&gt;
&lt;br /&gt;
== Citrix Ica client ==&lt;br /&gt;
&lt;br /&gt;
Download the Linux citrix ica client from Citrix&lt;br /&gt;
 http://citrix.com/English/SS/downloads/details.asp?downloadID=3323&amp;amp;productID=-1 &lt;br /&gt;
&lt;br /&gt;
Install the 32bits libraries if youŕe working on a 64bits platform&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs&lt;br /&gt;
&lt;br /&gt;
Install the Open-motif libraries&lt;br /&gt;
&lt;br /&gt;
 apt-get install libmotif3&lt;br /&gt;
&lt;br /&gt;
citrix 11 requires openmotif 2.3.1 Download the rpm package for openmotif 2.3.1, I used:&lt;br /&gt;
&lt;br /&gt;
 ftp://ftp.ics.com/openmotif/2.3/2.3.1/openmotif-2.3.1-1.RHEL3.0.i386.rpm&lt;br /&gt;
&lt;br /&gt;
To convert a rpm package to a debian package. Use alien to convert the rpm to a deb package&lt;br /&gt;
&lt;br /&gt;
 alien -d openmotif-2.3.1-1.RHEL3.0.i386.rpm&lt;br /&gt;
&lt;br /&gt;
Then install the package in the usual way. Note, before installing the alien&#039;ed package it is best to uninstall the previous version of motif, as this will not update the existing motif package.&lt;br /&gt;
&lt;br /&gt;
 dpkg -i openmotif_2.3.1-2_i386.deb&lt;br /&gt;
&lt;br /&gt;
Unpack the package and execute the installation script&lt;br /&gt;
 ./setupwfc&lt;br /&gt;
Find the plugin directory of firefox. Probably is /usr/lib/firefox/plugins/ otherwise use&lt;br /&gt;
 find / -name plugins | grep -i &amp;quot;netscape\|firefox\|mozilla&amp;quot;&lt;br /&gt;
Create a symlink to the citrix ica library&lt;br /&gt;
 ln –s /usr/lib/ICAClient/npica.so npica.so&lt;br /&gt;
&lt;br /&gt;
If you open a connection to your citrix server. The browser will ask you if you want to open or save the session. Browse to the ica client&lt;br /&gt;
 /usr/lib/ICAClient/wfica&lt;br /&gt;
and tell it to use it for all applications.&lt;br /&gt;
&lt;br /&gt;
When you get a ssl error &amp;quot;you have not chosen to thrust.....&amp;quot; Then copy the certificate in this location.&lt;br /&gt;
 /usr/lib/ICAClient/keystore/cacerts/&lt;br /&gt;
&lt;br /&gt;
For 64Bits OS&lt;br /&gt;
&lt;br /&gt;
Install Needed 32-bit Open Motif libraries to /usr/lib32&lt;br /&gt;
&lt;br /&gt;
Setup a temporary environment&lt;br /&gt;
&lt;br /&gt;
 mkdir -p ~/tmp/Citrix&lt;br /&gt;
 cd ~/tmp/Citrix&lt;br /&gt;
&lt;br /&gt;
Download a recent i386 libmotif3 .deb package to the above folder&lt;br /&gt;
&lt;br /&gt;
 wget http://mirrors.kernel.org/ubuntu/pool/multiverse/o/openmotif/libmotif3_2.2.3-1.4_i386.deb&lt;br /&gt;
&lt;br /&gt;
Use dpkg to extract the package&lt;br /&gt;
&lt;br /&gt;
 dpkg -x libmotif3*i386.deb libmotif&lt;br /&gt;
&lt;br /&gt;
Copy the libraries to /usr/lib32&lt;br /&gt;
&lt;br /&gt;
 sudo cp libmotif/usr/lib/*.so.* /usr/lib32/&lt;br /&gt;
 sudo cp -r libmotif/usr/lib/X11/bindings /usr/lib32/X11/&lt;br /&gt;
&lt;br /&gt;
== Make DVD ==&lt;br /&gt;
&lt;br /&gt;
To make a video DVD you can burn you&#039;re image on the dvd. If you just have the VIDEO_TS files then the easiest way is to convert these into a iso.&lt;br /&gt;
&lt;br /&gt;
 mkisofs -dvd-video -o ~/moviename.iso /path/to/the/VIDEO_TS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/path/to/the/VIDEO_TS path is for example /moviename not /moviename/VIDEO_TS&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Horde3&amp;diff=2452</id>
		<title>Horde3</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Horde3&amp;diff=2452"/>
		<updated>2009-08-30T09:24:21Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Configure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A standard howto can be found at [http://wiki.debian.org/Horde]. Our notes on Horde3 installation are the following:&lt;br /&gt;
&lt;br /&gt;
 apt-get install horde3&lt;br /&gt;
&lt;br /&gt;
Now make the site available&lt;br /&gt;
In etc/apache2-sites-available there is already a file horde3&lt;br /&gt;
 Alias /horde3 /usr/share/horde3&lt;br /&gt;
        &amp;lt;Directory /usr/share/horde3&amp;gt;&lt;br /&gt;
            Options FollowSymLinks&lt;br /&gt;
            AllowOverride Limit&lt;br /&gt;
            deny from all&lt;br /&gt;
            allow from all 192.168 127.0.0&lt;br /&gt;
        &amp;lt;/Directory&amp;gt;&lt;br /&gt;
 &amp;lt;Location /horde3&amp;gt;&lt;br /&gt;
        SSLCipherSuite HIGH:MEDIUM&lt;br /&gt;
 &amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And make the site enabled&lt;br /&gt;
 ln -s /etc/apache2/sites-available/horde3 00X-horde3&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
&lt;br /&gt;
To make the database there are several scripts in /usr/share/doc/horde3/examples/scripts/. We use MYsql:&lt;br /&gt;
 gunzip /usr/share/doc/horde3/examples/scripts/sql/create.mysql.sql.gz&lt;br /&gt;
&lt;br /&gt;
and change the password in the script for the user horde&lt;br /&gt;
Run the script&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 source  /usr/share/doc/horde3/examples/scripts/sql/create.mysql.sql&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configure ==&lt;br /&gt;
&lt;br /&gt;
To use the web configuration wizard we need to change the following&lt;br /&gt;
 chgrp -R www-data /etc/horde/horde3/&lt;br /&gt;
 chmod -R 750 /etc/horde/horde3&lt;br /&gt;
 chmod 777 /etc/horde/horde3/conf.php&lt;br /&gt;
 cp /etc/horde/horde3/conf.php /etc/horde/horde3/conf.php.bak&lt;br /&gt;
 chmod 777 /etc/horde/horde3/conf.php.bak&lt;br /&gt;
 &lt;br /&gt;
 Prepare log file:&lt;br /&gt;
 touch /var/log/horde/horde3.log&lt;br /&gt;
 chown root.www-data /var/log/horde/horde3.log&lt;br /&gt;
 chmod 770 /var/log/horde/horde3.log&lt;br /&gt;
&lt;br /&gt;
Now we can browse to the site&lt;br /&gt;
 http://192.168.70.9/horde3/&lt;br /&gt;
&lt;br /&gt;
This will give us the following&lt;br /&gt;
 Horde3 configuration disabled by default because the administration/install wizard gives the whole world too much access to the system. Read /usr/share /doc/horde3/README.Debian.gz on how to allow access.&lt;br /&gt;
&lt;br /&gt;
Change /var/log/horde/horde3/conf.php and comment line 2 and 3 leave the first line as is.&lt;br /&gt;
&lt;br /&gt;
Choose setup from the menu &#039;horde setup&#039;&lt;br /&gt;
- edit database			-&amp;gt; username en WW - connect to database = tcp/ip - localhost - naam database&lt;br /&gt;
- edit preference system	-&amp;gt; SQL database&lt;br /&gt;
- edit authentication           -&amp;gt; Administrator,user@sample.com - SQL authentication&lt;br /&gt;
Choose Users from the menu&lt;br /&gt;
- add users			-&amp;gt; user@sample.com&lt;br /&gt;
&lt;br /&gt;
klik generate Horde Configurtion&lt;br /&gt;
 Could not save the backup configuration file /usr/share/horde3/config/conf.bak.php &lt;br /&gt;
I had to change permissions on the /etc/horde/horde3 folder&lt;br /&gt;
&lt;br /&gt;
== IMP ==&lt;br /&gt;
 apt-get install imp4&lt;br /&gt;
Now prepare file permissions for web configuration:&lt;br /&gt;
&lt;br /&gt;
 chmod 777 /etc/horde/imp4/conf.php&lt;br /&gt;
 touch /etc/horde/imp4/conf.bak.php&lt;br /&gt;
 chmod 777 /etc/horde/imp4/conf.bak.php&lt;br /&gt;
&lt;br /&gt;
Choose setup from the menu &#039;mail(imp)&#039;&lt;br /&gt;
Generate your configuration (GPG/PGP, user constraints, enable spam/ham report, hooks...). &lt;br /&gt;
&lt;br /&gt;
And when you&#039;re done change the permissions back&lt;br /&gt;
&lt;br /&gt;
 chmod 644 /etc/horde/imp4/conf.php&lt;br /&gt;
 chmod 700 /etc/horde/imp4/conf.bak.php&lt;br /&gt;
&lt;br /&gt;
And specify your mail server(s) in /etc/horde/imp4/servers.php file&lt;br /&gt;
 $servers[&#039;imap&#039;] = array(&lt;br /&gt;
    &#039;name&#039; =&amp;gt; &#039;IMAP Server&#039;,&lt;br /&gt;
    &#039;server&#039; =&amp;gt; &#039;localhost&#039;,&lt;br /&gt;
    &#039;hordeauth&#039; =&amp;gt; &#039;full&#039;,&lt;br /&gt;
    &#039;protocol&#039; =&amp;gt; &#039;imap/notls&#039;,&lt;br /&gt;
    &#039;port&#039; =&amp;gt; 143,&lt;br /&gt;
    &#039;maildomain&#039; =&amp;gt; &#039;sample.com&#039;,&lt;br /&gt;
    &#039;smtphost&#039; =&amp;gt; &#039;localhost&#039;,&lt;br /&gt;
    &#039;smtpport&#039; =&amp;gt; 25,&lt;br /&gt;
    &#039;realm&#039; =&amp;gt; &#039;sample.com&#039;,&lt;br /&gt;
    &#039;preferred&#039; =&amp;gt; &#039;&#039;,&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
When you are ready, enable IMP in /etc/horde/horde3/registry.php file and verify if all is right. Yes, you read well, you MUST enable manually module in registry.php file after configuration! &lt;br /&gt;
&lt;br /&gt;
 $this-&amp;gt;applications[&#039;imp&#039;] = array(&lt;br /&gt;
    &#039;fileroot&#039; =&amp;gt; &#039;/usr/share/horde3/lib&#039; . &#039;/../imp&#039;,&lt;br /&gt;
    &#039;webroot&#039; =&amp;gt; $this-&amp;gt;applications[&#039;horde&#039;][&#039;webroot&#039;] . &#039;/imp&#039;,&lt;br /&gt;
    &#039;name&#039; =&amp;gt; _(&amp;quot;Mail&amp;quot;),&lt;br /&gt;
    &#039;status&#039; =&amp;gt; &#039;active&#039;,&lt;br /&gt;
    &#039;provides&#039; =&amp;gt; array(&#039;mail&#039;, &#039;contacts/favouriteRecipients&#039;)&lt;br /&gt;
 );&lt;br /&gt;
&lt;br /&gt;
Change the status from inactive to active&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Horde3&amp;diff=2449</id>
		<title>Horde3</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Horde3&amp;diff=2449"/>
		<updated>2009-08-29T09:07:03Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: Horde3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; apt-get install horde3&lt;br /&gt;
&lt;br /&gt;
Now make the site available&lt;br /&gt;
In etc/apache2-sites-available there is already a file horde3&lt;br /&gt;
 Alias /horde3 /usr/share/horde3&lt;br /&gt;
        &amp;lt;Directory /usr/share/horde3&amp;gt;&lt;br /&gt;
            Options FollowSymLinks&lt;br /&gt;
            AllowOverride Limit&lt;br /&gt;
            deny from all&lt;br /&gt;
            allow from all 192.168 127.0.0&lt;br /&gt;
        &amp;lt;/Directory&amp;gt;&lt;br /&gt;
 &amp;lt;Location /horde3&amp;gt;&lt;br /&gt;
        SSLCipherSuite HIGH:MEDIUM&lt;br /&gt;
 &amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And make the site enabled&lt;br /&gt;
 ln -s /etc/apache2/sites-available/horde3 00X-horde3&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
&lt;br /&gt;
To make the database there are several scripts. We use MYsql:&lt;br /&gt;
 gunzip /usr/share/doc/horde3/examples/scripts/sql/create.mysql.sql.gz&lt;br /&gt;
&lt;br /&gt;
and change the password in the script for the user horde&lt;br /&gt;
Run the script&lt;br /&gt;
 mysql -u root -p&lt;br /&gt;
 source  /usr/share/doc/horde3/examples/scripts/sql/create.mysql.sql&lt;br /&gt;
&lt;br /&gt;
Now we can browse to the site&lt;br /&gt;
 http://192.168.70.9/horde3/&lt;br /&gt;
&lt;br /&gt;
This will give us the following&lt;br /&gt;
 Horde3 configuration disabled by default because the administration/install wizard gives the whole world too much access to the system. Read /usr/share   /doc/horde3/README.Debian.gz on how to allow access.&lt;br /&gt;
&lt;br /&gt;
To use the web configuration wizard we need to change the following&lt;br /&gt;
 chgrp www-data /etc/horde/horde3/&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Database_101&amp;diff=2448</id>
		<title>Database 101</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Database_101&amp;diff=2448"/>
		<updated>2009-08-29T08:14:38Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Moving the MySQL databases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== MySQL installation ==&lt;br /&gt;
As with any package to be installed: use aptitude, update your APT, then make sure all your (other) software is up-to-date. Then find package &#039;&#039;mysql-server&#039;&#039; - under Debian 5.0 &amp;quot;Lenny&amp;quot; it&#039;ll be version 5.0.51a-something. Installing it will also automatically install some dependent packages, like mysql-common, mysql-client etcetera. So after downloading some 40MiB of files, MySQL is installed. The installation script under Debian Lenny asks you for a password for the MySQL root user. Think up a strong password for the MySQL root user; something like &#039;&#039;waYacUbaT2uW&#039;&#039;. DON&#039;T use this example password, [http://www.pctools.com/guides/password/ generate your own one!]. DO NOT use the password of the Linux &#039;&#039;root&#039;&#039; user.&lt;br /&gt;
&lt;br /&gt;
Should you consult [http://dev.mysql.com/doc/refman/5.0/en/unix-post-installation.html the official MySQL documentation], you might see mention of the &#039;&#039;mysql_install_db&#039;&#039; script - do not worry about that, since Debian has run it for you when it was setting up the database.&lt;br /&gt;
&lt;br /&gt;
The standard user accounts that have been created by the installation script are:&lt;br /&gt;
* &#039;root&#039;@&#039;localhost&#039;&lt;br /&gt;
* &#039;root&#039;@&#039;&amp;lt;hostname&amp;gt;&#039;&lt;br /&gt;
* &#039;root&#039;@&#039;127.0.0.1&#039;&lt;br /&gt;
All three root accounts are secured with the same password, the one you specified when installing the package &#039;&#039;mysql-server&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&#039;&#039;&#039;NOTE for Debian 4.0 &amp;quot;Etch&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
When you install MySQL under Etch, there are two root accounts with empty passwords, and two anonymous accounts. NOT safe! You&#039;ll want to rectify this in order to secure your MySQL server. Please take the following steps. Start the MySQL client from the command line:&lt;br /&gt;
 mysql -u root&lt;br /&gt;
Then, from the mysql client prompt, set the password for the MySQL root users. They can be treated as two different accounts, but we don&#039;t recommend that. We thus give both accounts the same password:&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR &#039;root&#039;@&#039;localhost&#039; = PASSWORD(&#039;waYacUbaT2uW&#039;);&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR &#039;root&#039;@&#039;&amp;lt;hostname&amp;gt;&#039; = PASSWORD(&#039;waYacUbaT2uW&#039;);&lt;br /&gt;
Furthermore, there are two anonymous accounts created. These also have no password, and get full permission on the &#039;&#039;test&#039;&#039; database, as well as on any database who&#039;s name begins with &#039;&#039;test_&#039;&#039;. These accounts can be fitted with a password (like we did for root - just use two quotes with nothing in between them, instead of two quotes with &#039;&#039;root&#039;&#039; in between), or they can be removed - which we recommend. The (single) command for this is:&lt;br /&gt;
&amp;lt;pre&amp;gt;mysql&amp;gt; DROP USER &#039;&#039;;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;End of NOTE&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
To verify the installation you might want to take some of the following steps:&lt;br /&gt;
* run &#039;&#039;mysqlshow -u root -p&#039;&#039;, and see if that command outputs at least two databases (&#039;&#039;information_schema&#039;&#039; and &#039;&#039;mysql&#039;&#039;);&lt;br /&gt;
* check out the settings of your MySQL server by running &#039;&#039;mysqladmin -u root -p variables&#039;&#039; (piping the output to &#039;&#039;less&#039;&#039; or a file, if necessary);&lt;br /&gt;
* have a peek in &#039;&#039;/var/lib/mysql&#039;&#039;; the database data files should be there;&lt;br /&gt;
* check &#039;&#039;/var/log&#039;&#039; for two logfiles &#039;&#039;mysql.err&#039;&#039; and &#039;&#039;mysql.log&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Moving the MySQL databases==&lt;br /&gt;
By default the location of your Debian MySQL databases is &#039;&#039;/var/lib/mysql/&amp;lt;database&amp;gt;&#039;&#039;. However, sometimes you wish your databases to be in a different location. E.g. &#039;&#039;/data/mysql&#039;&#039;, where &#039;&#039;/data&#039;&#039; is a mounted dedicated RAID array. Or perhaps even &#039;&#039;/data/mysql&#039;&#039; is its own array.&lt;br /&gt;
&lt;br /&gt;
Whatever the reason, to move &#039;&#039;all&#039;&#039; MySQL databases from &#039;&#039;/var/lib/mysql&#039;&#039; to another location, you can follow these steps:&lt;br /&gt;
* Create the new directory, e.g. &#039;&#039;/data/mysql&#039;&#039;&lt;br /&gt;
* Make this directory owned by user/group &#039;&#039;mysql&#039;&#039;&lt;br /&gt;
 cd /data&lt;br /&gt;
 mkdir mysql&lt;br /&gt;
 chown mysql:mysql mysql&lt;br /&gt;
* Shut down the database server with one of the following commands:&lt;br /&gt;
 mysqladmin -u root -p shutdown&lt;br /&gt;
 invoke-rc.d mysql stop&lt;br /&gt;
* Make a backup copy of &#039;&#039;/etc/mysql/my.cnf&#039;&#039;, then edit this file. Find the section &#039;&#039;[mysqld]&#039;&#039; and change the line &#039;&#039;datadir         = /var/lib/mysql&#039;&#039; to&lt;br /&gt;
 datadir         = /data/mysql&lt;br /&gt;
* As root, move (or better yet: copy) &#039;&#039;all&#039;&#039; of the content of &#039;&#039;/var/lib/mysql&#039;&#039; over to &#039;&#039;/data/mysql&#039;&#039;. Make sure you don&#039;t accidentally change the ownership or permissions of the files and folders in the &#039;&#039;/var/lib/mysql&#039;&#039; folder. We expect each and every file and folder to be owned by &#039;&#039;mysql:mysql&#039;&#039;. Copy command would be (as root):&lt;br /&gt;
 cp -p -r /var/lib/mysql/* /data/mysql&lt;br /&gt;
* Check and doublecheck your &#039;&#039;my.cnf&#039;&#039; settings and your database file owners, attributes and size. After the next step, there &#039;&#039;may&#039;&#039; be no way back!&lt;br /&gt;
* Start up your database server:&lt;br /&gt;
 invoke-rc.d mysql start&lt;br /&gt;
* Check the working of your MySQL server:&lt;br /&gt;
** issue the following command to get status information (to see if MySQL is running after your start command):&lt;br /&gt;
 invoke-rc.d mysql status&lt;br /&gt;
** look under &#039;&#039;/var/log&#039;&#039; for the default MySQL log files &#039;&#039;mysql.log&#039;&#039; and &#039;&#039;mysql.err&#039;&#039;&lt;br /&gt;
** check your SysLog (standard: &#039;&#039;/var/log/syslog&#039;&#039;) for MySQL error messages, since the default Debian configuration is to log MySQL errors there, rather than in the previously mentioned MySQL logfiles.&lt;br /&gt;
&lt;br /&gt;
== MYsql commands ==&lt;br /&gt;
&lt;br /&gt;
 DELETE FROM &amp;quot;table name&amp;quot; WHERE &amp;quot;colomn name&amp;quot;=&#039;VALUE&#039;&lt;br /&gt;
 UPDATE &amp;quot;table name&amp;quot; set &amp;quot;colomn name&amp;quot; = &#039;VALUE&#039; where &amp;quot;colomn name&amp;quot; = &#039;VALUE&#039;;&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=E-mail_server_section&amp;diff=2447</id>
		<title>E-mail server section</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=E-mail_server_section&amp;diff=2447"/>
		<updated>2009-08-29T08:02:46Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Dovecot default configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E-mail server setup==&lt;br /&gt;
What we want to accomplish here is the setup of a mail server with the following properties:&lt;br /&gt;
* can serve multiple mail domains&lt;br /&gt;
* can relay mail for other domains to other mail servers&lt;br /&gt;
* can have one or more mailboxes per domain&lt;br /&gt;
* users of these mailboxes can be virtual (do not need to have a Linux user account)&lt;br /&gt;
* can have multiple aliases per mailbox&lt;br /&gt;
* can forward mail for certain aliases to multiple mailboxes&lt;br /&gt;
For this type of mail server setup, we owe a great thankyou to [http://workaround.org/articles/ispmail-etch/ Christoph Haas], whose advise has helped us create flexible and reliable mail servers since 2003.&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
We&#039;ll assume that the server currently has no mailserver installed, at least no other than the default &#039;&#039;exim&#039;&#039; mailserver. Furthermore, the server is already fitted with MySQL, and this database is running without problems.&lt;br /&gt;
&lt;br /&gt;
The hostname of the server must be set correctly, so that &#039;&#039;hostname -f&#039;&#039; returns a valid DNS name, like &#039;&#039;lighthouse.saruman.biz.&#039;&#039;. It might also be an internal name like &#039;&#039;lighthouse.saruman.lan.&#039;&#039; but that will require us to give extra attention to the name under which Postfix will contact its collegues on the Internet. Also, the server can correctly [Networking_section#DNS_resolution_under_Debian | resolve DNS names] like [http://www.debian.org www.debian.org], preferably by running it&#039;s own caching DNS server.&lt;br /&gt;
&lt;br /&gt;
The server is kept on the correct date and time using NTP, TCP port 25 is open on the server, the ISP will allow connections from Internet to this port, and if there&#039;s a firewall running on this server, then it has port 25 open so as to not block incoming e-mail.&lt;br /&gt;
&lt;br /&gt;
==Software installation==&lt;br /&gt;
As a first step, we use [[APT and aptitude|apt or aptitude]] to make sure that our server is up-to-date. Then we can install the necessary software packages. Under Debian 5.0 &amp;quot;Lenny&amp;quot;, the (single) packages is:&lt;br /&gt;
* &#039;&#039;postfix&#039;&#039;, the mail server itself - this includes the &amp;quot;virtual package&amp;quot; postfix-tls, that we want to use to secure connections to Postfix with the TLS protocol&lt;br /&gt;
At the same time we can - and must - purge the following packages:&lt;br /&gt;
* exim4&lt;br /&gt;
* exim4-base&lt;br /&gt;
* exim4-daemon-light&lt;br /&gt;
* exim4-config&lt;br /&gt;
In &#039;&#039;aptitude&#039;&#039;, only press &amp;quot;go&amp;quot; when you&#039;ve marked all four of these packages &amp;quot;purge&amp;quot;, or you cannot install postfix.&lt;br /&gt;
&lt;br /&gt;
When installing the postfix package, the Debian installer script will ask you several questions, which you can answer like this:&lt;br /&gt;
* General type of mail configuration: Internet site&lt;br /&gt;
* System mail name: the FQDN of the mail server that you&#039;ve verified in the previous section. Note that the script will try to guess the DNS name, but that might yield a DNS name with a trailing dot. That is technically correct, but the installation script will barf. Remove the trailing dot before hitting &amp;amp;lt;enter&amp;gt;!&lt;br /&gt;
* Postmaster mail address: the address that all mail should go to that is addressed to &amp;quot;root&amp;quot; and &amp;quot;postmaster&amp;quot;.&lt;br /&gt;
* Domain list: give the list of all domains that the machine can consider itself the FINAL destination for. This should at a minimum include an empty value, &amp;quot;localhost&amp;quot; and the FQDN of the machine itself (no trailing dots!); however, if you&#039;re running your own mail domain, you can also add that (e.g. &amp;quot;saruman.biz&amp;quot;). Thus, the list could look like this:&lt;br /&gt;
 saruman.biz, lighthouse.saruman.lan, localhost.saruman.lan, , localhost&lt;br /&gt;
* Force synchronous updates? We think that&#039;s not necessary, but please read the question and decide for yourself&lt;br /&gt;
* Local networks: something like &#039;&#039;127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.67.0/24&#039;&#039; (the default, augmented with your local IP range)&lt;br /&gt;
* Mailbox size limits: you can give postfix a limit in bytes, but we&#039;re going to use one single big mailbox for all users, so we cannot let Postfix guard it. Leave it at 0 (zero) so we don&#039;t have a size limit.&lt;br /&gt;
* Character for local address extension: we leave it at &#039;&#039;+&#039;&#039;&lt;br /&gt;
* Internet protocols to use: currently we don&#039;t have IPv6 support, so there&#039;s no sense in letting Postfix try to serve IPv6. We choose &#039;&#039;ipv4&#039;&#039; only.&lt;br /&gt;
With the above data, the Debian install script for Postfix can do its job and configure Postfix with some basic settings.&lt;br /&gt;
&lt;br /&gt;
Now that Postfix is installed, we can install some dependent packages (we could install them in the same run, but if anything goes amiss with the postfix installation, then these packages are going to remain unconfigured as well):&lt;br /&gt;
* &#039;&#039;postfix-doc&#039;&#039;, the accompanying documentation;&lt;br /&gt;
* &#039;&#039;postfix-mysql&#039;&#039;, necessary to have Postfix talk to our MySQL server;&lt;br /&gt;
* &#039;&#039;postfix-pcre&#039;&#039; to be able to parse regular expressions, which which we can combat spam;&lt;br /&gt;
* &#039;&#039;dovecot-imapd&#039;&#039; is a daemon that will provide your users with IMAP access to their mail;&lt;br /&gt;
* &#039;&#039;dovecot-pop3d&#039;&#039; is another daemon, but for the POP3 protocol.&lt;br /&gt;
&lt;br /&gt;
==Virtual Mailman creation==&lt;br /&gt;
When we&#039;re done, we&#039;ll need a &amp;quot;system user&amp;quot;, a sort of virtual mailman that is the owner of all mailboxes that we&#039;re serving. We suggest the name &amp;quot;vmail&amp;quot; for this user. Note: this user does not get his own mailbox (i.e. there&#039;s no mailbox at vmail@saruman.biz).&lt;br /&gt;
&lt;br /&gt;
To create this user, and his home directory, we can run the following commands:&lt;br /&gt;
 groupadd -g 120 vmail&lt;br /&gt;
 useradd -g vmail -u 120 vmail -d /data/vmail -m -s /bin/false&lt;br /&gt;
As you see, we&#039;ve chosen a group ID and user ID of 120 (after confirming that this ID was not taken by another group or user, by checking &#039;&#039;/etc/passwd&#039;&#039; and &#039;&#039;/etc/group&#039;&#039;. Furthermore, we&#039;ve decided to keep the &#039;&#039;vmail&#039;&#039; user&#039;s home directory not under &#039;&#039;/home/vmail&#039;&#039;, but in a special place where we&#039;re going to expect server data to reside - in our server, the &#039;&#039;/data&#039;&#039; directory (which is a RAID-5 array mounted under root). By adding &#039;&#039;-m&#039;&#039;, we&#039;ve actually created the home directory, and adding &#039;&#039;-s /bin/false&#039;&#039; makes totally sure that the user &#039;&#039;vmail&#039;&#039; can never ever log in - even if we&#039;ve not created a password for this user, so &#039;&#039;vmail&#039;&#039; shouldn&#039;t be able to log in anyway. Better safe than sorry.&lt;br /&gt;
&lt;br /&gt;
To tell Postfix that this &#039;&#039;vmail&#039;&#039; user is someone special, we run&lt;br /&gt;
 postconf -e virtual_uid_maps=static:120&lt;br /&gt;
 postconf -e virtual_gid_maps=static:120&lt;br /&gt;
That makes postfix understand that all mail for the virtual mail domains must be written to disk with these specified user and group ID&#039;s.&lt;br /&gt;
&lt;br /&gt;
==MySQL configuration==&lt;br /&gt;
&lt;br /&gt;
===Database preparation===&lt;br /&gt;
We will use the MySQL database to record data on our mail system, and then give our Postfix access to this database so that it can read its configuration from there. For starters, we&#039;ll create a MySQL database named &amp;quot;vmail&amp;quot;, and a MySQL user named &amp;quot;vmail_admin&amp;quot; that can read all necessary data from that &amp;quot;vmail&amp;quot; database. Then, we create the necessary tables, and a view that links these tables. We do this with the MySQL client &#039;&#039;mysql&#039;&#039;. However, we&#039;re quite lazy, so we don&#039;t create this database by hand (that&#039;s error-prone), but by use of a script [[create.vmail.sql]]. To this end, feed the [[create.vmail.sql]] script into the &#039;&#039;mysql&#039;&#039; client like this:&lt;br /&gt;
 mysql -u root -p &amp;lt; create.vmail.sql&lt;br /&gt;
(This of course assumes you have &#039;&#039;create.vmail.sql&#039;&#039; in your current working directory; if not you can include the path to the file.) Simply give the MySQL root user password, and the script creates the database, the user, the necessary tables, and the view.&amp;lt;br&amp;gt;&lt;br /&gt;
A note of caution: it is never a good idea to just run scripts without a proper understanding of what it does. Especially with MySQL, it will be advantageous if you understand the SQL commands. Open the script in a text editor, open the [http://dev.mysql.com/doc/refman/5.0/en/ MySQL command reference], and trace back what the script does exactly.&lt;br /&gt;
&lt;br /&gt;
===Inserting data===&lt;br /&gt;
Next up, we fill the database with the first sets of values (either test data or the first of our production data). We&#039;ll start off with the virtual domains that we&#039;re hosting, by running the mysql client and feeding it information like this:&lt;br /&gt;
 mysql -u root -p vmail&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_domains (id, vdomain) VALUES (1, &#039;saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_domains (vdomain) VALUES (&#039;wiki.saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_domains (vdomain) VALUES (&#039;shop.saruman.biz&#039;);&lt;br /&gt;
This has the effect of creating three entries. You can check that everything worked as planned by executing&lt;br /&gt;
 mysql&amp;gt; select * from virtual_domains;&lt;br /&gt;
Note: only the first entry needs an &#039;&#039;id&#039;&#039; value, because in MySQL we&#039;ve defined that field as AUTO_INCREMENT. After creating your first virtual domain in the table, you never have to use a statement like the first INSERT again, only statements like the other two.&lt;br /&gt;
&lt;br /&gt;
Now the MySQL database has the information needed by Postfix to recognise that you have three virtual mail domains (namely the three domains in the VALUES section) for which it hosts virtual mailboxes. Postfix cannot read this information yet, but that&#039;ll be taken care of in the next section.&lt;br /&gt;
&lt;br /&gt;
Whle still within the mysql client, we can now create users:&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_users (id, domain_id, user, passwd) VALUES (1, 1, &#039;jan&#039;, MD5(&#039;JanSecret&#039;));&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_users (domain_id, user, passwd) VALUES (1, &#039;mike&#039;, MD5(&#039;MikeSecret&#039;));&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_users (domain_id, user, passwd) VALUES (3, &#039;shopkeeper&#039;, MD5(&#039;ShopSecret&#039;));&lt;br /&gt;
This has the effect of creating three users &amp;quot;jan&amp;quot; (in domain saruman.biz), &amp;quot;mike&amp;quot; (in domain saruman.biz) and &amp;quot;shopkeeper&amp;quot; (in domain shop.saruman.biz). Again, the &#039;&#039;id&#039;&#039; value is only ever needed in the first statement, because from now on every user addition will auto-increment &#039;&#039;id&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The passwords shown are encrypted with MD5, and put in the &#039;&#039;passwd&#039;&#039; field. Later on, the users will be able to access their mailboxes using this password; we won&#039;t tell Postfix anything about them, because it doesn&#039;t need the passwords. You can check the content of the &#039;&#039;virtual_users&#039;&#039; table with the right &amp;quot;select&amp;quot; statement, and you can now also see that the view &#039;&#039;view-users&#039;&#039; works:&lt;br /&gt;
 mysql&amp;gt; select * from virtual_users;&lt;br /&gt;
 mysql&amp;gt; select * from view_users;&lt;br /&gt;
&lt;br /&gt;
Next up, we&#039;re going to add some aliases, which are alternative e-mail addresses for the users; their primary e-mail address can already be seen in the &#039;&#039;view_users&#039;&#039; view, but perhaps you also want mail to &amp;quot;webmaster@shop.saruman.biz&amp;quot; to arrive at one or more mailboxes, e.g. in the mailbox for user &amp;quot;shopkeeper&amp;quot; (within domain &amp;quot;shop.saruman.biz&amp;quot;) and this guy&#039;s home address (&amp;quot;j.doe@example.com&amp;quot;). Furthermore, we&#039;ll define catchall-addresses for all domains, that&#039;ll send all mail for which no mailbox can be found to the mailbox of user Mike (for the first two domains) and Webmaster (for shop.saruman.biz; Webmaster himself is an alias yet again, that points to shopkeeper@shop.saruman.biz). To create the catchall, leave out a value for the source address. This creates the empty value for source that will be expanded (using source@domain) to &amp;quot;@domain&amp;quot;.&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (id, domain_id, source, destination)&lt;br /&gt;
        VALUES (1, 2, &#039;webmaster&#039;, &#039;shopkeeper@shop.saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (domain_id, source, destination)&lt;br /&gt;
        VALUES (2, &#039;webmaster&#039;, &#039;j.doe@example.com&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (domain_id, destination)&lt;br /&gt;
        VALUES (1, &#039;mike@saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (domain_id, destination)&lt;br /&gt;
        VALUES (2, &#039;mike@saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (domain_id, destination)&lt;br /&gt;
        VALUES (3, &#039;webmaster@saruman.biz&#039;);&lt;br /&gt;
 &lt;br /&gt;
Again, we don&#039;t need to add the &#039;&#039;id&#039;&#039; value any more after the first ever insertion into this table.&lt;br /&gt;
&lt;br /&gt;
We can check the result by running a select statement against the &#039;&#039;virtual_aliases&#039;&#039; table and &#039;&#039;view_aliases&#039;&#039; view:&lt;br /&gt;
 mysql&amp;gt; select * from virtual_aliases;&lt;br /&gt;
 mysql&amp;gt; select * from view_aliases;&lt;br /&gt;
&lt;br /&gt;
== Postfix configuration for MySQL lookups==&lt;br /&gt;
Next, we&#039;re going to tell Postfix to use the &#039;&#039;vmail&#039;&#039; database, and also how to read the database (Postfix never writes the MySQL database). To this end, we&#039;re going to create three configuration files in directory &#039;&#039;/etc/postfix&#039;&#039;. We&#039;ll start off with one configuration file, with which Postfix can determine if a domain name is among the domain(s) that it&#039;s actually hosting mailboxes for. Then we&#039;ll create the config file that checks the table that contains all the users that have a virtual mailbox, and finally we create the lookup for the table with all the aliases.&lt;br /&gt;
&lt;br /&gt;
===Virtual mail domains lookup===&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/postfix/mysql-virtual-domains.cf&#039;&#039; with the following content:&lt;br /&gt;
 user = vmail_admin&lt;br /&gt;
 password = SuperSecret&lt;br /&gt;
 hosts = 127.0.0.1&lt;br /&gt;
 dbname = vmail&lt;br /&gt;
 query = SELECT 1 FROM virtual_domains WHERE vdomain=&#039;%s&#039;&lt;br /&gt;
Next, we tell postfix to check this configuration file when it needs to check &amp;quot;virtual_mailbox_domains&amp;quot;:&lt;br /&gt;
 postconf -e virtual_mailbox_domains=mysql:/etc/postfix/mysql-virtual-domains.cf&lt;br /&gt;
Use of this configuration file in postfix has the effect of returning &amp;quot;yes&amp;quot; when checking our database for the domain part of an email address. Naturally, this configuration file has to be fitted with the actual &#039;&#039;vmail_admin&#039;&#039; password rather than our example &amp;quot;SuperSecret&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
=== Virtual mail user lookup===&lt;br /&gt;
Create the file &#039;&#039;/etc/postfix/mysql-virtual-mailbox-maps.cf&#039;&#039; with the following content:&lt;br /&gt;
 user = vmail_admin&lt;br /&gt;
 password = SuperSecret&lt;br /&gt;
 hosts = 127.0.0.1&lt;br /&gt;
 dbname = vmail&lt;br /&gt;
 query = SELECT 1 FROM view_users WHERE email=&#039;%s&#039;&lt;br /&gt;
Next, we tell Postfix that this mapping file is supposed to be used for the &#039;&#039;virtual_mailbox_maps&#039;&#039; mapping:&lt;br /&gt;
 postconf -e virtual_mailbox_maps=mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf&lt;br /&gt;
The lookup of virtual mailboxes should work with the data we&#039;ve put into the database previously. i.e.&lt;br /&gt;
 postmap -q jan@saruman.biz mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf&lt;br /&gt;
should return a &#039;&#039;&#039;1&#039;&#039;&#039; to acknowledge that &amp;quot;jan@saruman.biz&amp;quot; is indeed a virtual mailbox in our Postfix configuration.&lt;br /&gt;
&lt;br /&gt;
=== Virtual alias lookup===&lt;br /&gt;
Create another cf file at &#039;&#039;/etc/postfix/mysql-virtual-alias-maps.cf&#039;&#039;:&lt;br /&gt;
 user = vmail_admin&lt;br /&gt;
 password = SuperSecret&lt;br /&gt;
 hosts = 127.0.0.1&lt;br /&gt;
 dbname = vmail&lt;br /&gt;
 query = SELECT destination FROM view_aliases WHERE email=&#039;%s&#039;&lt;br /&gt;
And create yet another cf file at &#039;&#039;/etc/postfix/mysql-email2email.cf&#039;&#039;:&lt;br /&gt;
 user = vmail_admin&lt;br /&gt;
 password = SuperSecret&lt;br /&gt;
 hosts = 127.0.0.1&lt;br /&gt;
 dbname = vmail&lt;br /&gt;
 query = SELECT email FROM view_users WHERE email=&#039;%s&#039;&lt;br /&gt;
&lt;br /&gt;
Again, we tell Postfix that this mapping file is supposed to be used for the &#039;&#039;virtual_alias_maps&#039;&#039; mapping:&lt;br /&gt;
 postconf -e virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf&lt;br /&gt;
The lookup of virtual aliases should now work as designed:&lt;br /&gt;
 postmap -q shopkeeper@shop.saruman.biz mysql:/etc/postfix/mysql-virtual-alias-maps.cf&lt;br /&gt;
 postmap -q webmaster@shop.saruman.biz mysql:/etc/postfix/mysql-virtual-alias-maps.cf&lt;br /&gt;
If you&#039;ve put in the data from the previous section, then both commands should return the same result: &#039;&#039;shopkeeper@saruman.biz&#039;&#039;. This shows that Postfix will deliver  mail to shopkeeper or to webmaster to the mailbox of shopkeeper.&lt;br /&gt;
&lt;br /&gt;
===Finishing up configuration files===&lt;br /&gt;
When everything works as planned, then we secure the configuration files against prying eyes. Remember, the configuration files contain the user/password combination which which to access the &#039;&#039;vmail&#039;&#039; SQL database. The &#039;&#039;vmail_admin&#039;&#039; user has only read rights, and passwords in there are encrypted, but nevertheless, this is information we need to protect. Thus:&lt;br /&gt;
 chown root:postfix /etc/postfix/mysql-*.cf&lt;br /&gt;
 chmod u=rw,g=r,o= /etc/postfix/mysql-*.cf&lt;br /&gt;
This protects all four configuration files since only root can write them, members of group &#039;&#039;postfix&#039;&#039; can read them, and the rest of the world cannot access them at all.&lt;br /&gt;
&lt;br /&gt;
==Configuring mail delivery through Dovecot LDA==&lt;br /&gt;
E-mails get delivered to the virtual mailboxes by means of a Mail Delivery Agent (MDA). With Postfix, the standard MDA for delivery to virtual mailboxes is called &#039;&#039;virtual&#039;&#039;, but we&#039;re not going to use that; we&#039;re going to use &#039;&#039;[http://wiki.dovecot.org/LDA Dovecot LDA]&#039;&#039;, which is a program called &#039;&#039;deliver&#039;&#039;. By the way, the abbreviation LDA stands for Local Delivery Agent, which of course means more or less the same as MDA.&lt;br /&gt;
===Enabling the Dovecot daemon===&lt;br /&gt;
To make Postfix use Dovecot LDA, we add the following line to &#039;&#039;/etc/postfix/master.cf&#039;&#039;:&lt;br /&gt;
 dovecot   unix  -       n       n       -       -       pipe&lt;br /&gt;
     flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}&lt;br /&gt;
This declares the service &amp;quot;dovecot&amp;quot; to mean using the program &#039;&#039;/usr/lib/dovecot/deliver&#039;&#039; with the right parameters. If we now let Postfix reload its files, it&#039;ll learn about this new service. Subsequently we can instruct Postfix to start using it, by declaring service &amp;quot;dovecot&amp;quot; to be the virtual transport of choice, and specifying one Dovecot-specific variable:&lt;br /&gt;
 postfix reload&lt;br /&gt;
 postconf -e virtual_transport=dovecot&lt;br /&gt;
 postconf -e dovecot_destination_recipient_limit=1&lt;br /&gt;
===Dovecot default configuration===&lt;br /&gt;
Now to configure Dovecot itself: open &#039;&#039;/etc/dovecot/dovecot.conf&#039;&#039; with your favourite editor [[vim]]; first make sure the &#039;&#039;protocols =&#039;&#039; line reads&lt;br /&gt;
 protocols = imap imaps pop3 pop3s&lt;br /&gt;
(which it should by default). The second setting is quite crucial. By default, the location of the mail directories is found automatically by Dovecot, but here that won&#039;t work. Find the line that reads &#039;&#039;#mail_location =&#039;&#039;, and change it to&lt;br /&gt;
 mail_location = maildir:/data/vmail/%d/%n/Maildir&lt;br /&gt;
This will look for mail in directory &#039;&#039;/data/vmail/&#039;&#039;&#039;DOMAIN&#039;&#039;&#039;/&#039;&#039;&#039;USER&#039;&#039;&#039;/Maildir&#039;&#039;, and expect this directory to be in &amp;quot;maildir&amp;quot; format.&lt;br /&gt;
Next look for a section called &amp;quot;auth default&amp;quot;. First define the allowed authentication mechanisms:&lt;br /&gt;
 mechanisms = plain login&lt;br /&gt;
Then inside that same section you need to uncomment:&lt;br /&gt;
 passdb sql {&lt;br /&gt;
     args = /etc/dovecot/dovecot-sql.conf&lt;br /&gt;
 }&lt;br /&gt;
which tells Dovecot that the passwords are stored in an SQL database (it&#039;s obvious that we&#039;ll now have to create this conf-file) and:&lt;br /&gt;
 userdb static {&lt;br /&gt;
     args = uid=120 gid=120 home=/data/vmail/%d/%n allow_all_users=yes&lt;br /&gt;
 }&lt;br /&gt;
to tell Dovecot where the mailboxes are located. This is similar to the &#039;&#039;mail_location&#039;&#039; setting. Next task: comment out the section &#039;&#039;passdb pam&#039;&#039;, so that Dovecot doesn&#039;t accidentally try to service local users as well.&lt;br /&gt;
&lt;br /&gt;
Next up: tell Dovecot to handle IMAP the same as previous versions of this virtual mailserver have - this can prove to be quite tricky if you already have mailboxes full of mail, put there by e.g. Courier-IMAP. What works for us, is&lt;br /&gt;
 namespace private {&lt;br /&gt;
     separator = .&lt;br /&gt;
     prefix = &lt;br /&gt;
     inbox = yes&lt;br /&gt;
 }&lt;br /&gt;
However, your mileage may vary.&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also want to comment out the &#039;&#039;passdb pam&#039;&#039; sections, since we&#039;re not hosting mail for local users.&lt;br /&gt;
&lt;br /&gt;
Next up, we&#039;ll edit the section &#039;&#039;socket listen&#039;&#039; so that Dovecot can access the user database (master section), and our Postfix mailserver can access Dovecot (client section):&lt;br /&gt;
 socket listen {&lt;br /&gt;
   master {&lt;br /&gt;
     path = /var/run/dovecot/auth-master&lt;br /&gt;
     mode = 0600&lt;br /&gt;
     user = vmail&lt;br /&gt;
   }&lt;br /&gt;
   client {&lt;br /&gt;
     path = /var/spool/postfix/private/auth&lt;br /&gt;
     mode = 0660&lt;br /&gt;
     user = postfix&lt;br /&gt;
     group = postfix&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Finally, the protocol section, where we specify log files, an address to put in mails when we send out nondelivery reports, and a place to store scripts:&lt;br /&gt;
 protocol lda {&lt;br /&gt;
     log_path = /var/log/appslog/mail/dovecot-deliver.log&lt;br /&gt;
     auth_socket_path = /var/run/dovecot/auth-master&lt;br /&gt;
     postmaster_address = postmaster@saruman.biz&lt;br /&gt;
     mail_plugins = cmusieve&lt;br /&gt;
     global_script_path = /data/vmail/globalsieverc&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You could change the log path to &amp;quot;log_path =&amp;quot; With a empty logpath syslog will log the events. &lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve finished the Dovecot configuration file, we need to create a fitting MySQL configuration file for Dovecot. The file is &#039;&#039;/etc/dovecot/dovecot-sql.conf&#039;&#039;, and its contents are&lt;br /&gt;
 driver = mysql&lt;br /&gt;
 connect = host=127.0.0.1 dbname=vmail user=vmail_admin password=SuperSecret&lt;br /&gt;
 default_pass_scheme = PLAIN-MD5&lt;br /&gt;
 password_query = SELECT email as user, passwd as password FROM view_users WHERE email=&#039;%u&#039;;&lt;br /&gt;
When you&#039;ve created this file (as root), change the attributes of &#039;&#039;dovecot-sql.conf&#039;&#039; and &#039;&#039;dovecot.conf&#039;&#039;, and then restart Dovecot to start using the new configuration. Note: &#039;&#039;dovecot.conf&#039;&#039; needs to be read by Postfix, hence the group ownership for the file.&lt;br /&gt;
 chmod u=rw,g=,o= /etc/dovecot/dovecot-sql.conf&lt;br /&gt;
 chgrp vmail /etc/dovecot/dovecot.conf&lt;br /&gt;
 chmod u=rw,g=r,o= /etc/dovecot/dovecot.conf&lt;br /&gt;
 /etc/init.d/dovecot restart&lt;br /&gt;
&lt;br /&gt;
To get some more logging in the case something goes wrong. Uncomment the folling and change to yes.&lt;br /&gt;
 auth_verbose = yes&lt;br /&gt;
 auth_debug = yes&lt;br /&gt;
 auth_debug_passwords = yes&lt;br /&gt;
&lt;br /&gt;
===Dovecot SSL configuration===&lt;br /&gt;
Out of the (Debian) box, Dovecot is SSL-enabled. We&#039;ll now replace the generic SSL-certificate, generated for the host by the Dovecot installation script, by our own certificate. To ths end, we first [[Creating_digital_certificates_with_our_root_certificate | generate an appropriate certificate]], e.g. an SSL wildcard certificate: &amp;quot;*.saruman.biz&amp;quot;. This results in a public and a private certificate, both of which must be placed somewhere where Dovecot expects them and can read them.&lt;br /&gt;
&lt;br /&gt;
By default, Dovecot expects the following locations/filenames/owner/attributes:&lt;br /&gt;
 /etc/ssl/certs/dovecot.pem    -rw-r--r--  root:dovecot  4624 bytes&lt;br /&gt;
 /etc/ssl/private/dovecot.pem  -rw-------  root:dovecot  1743 bytes&lt;br /&gt;
If we may make a suggestion: rename the generated certificates in both locations to dovecot.pem.bak, place your generated certificates in their place, and set the owner/permissions like displayed here.&lt;br /&gt;
&lt;br /&gt;
However, if you&#039;ve generated your own keys, you might have used a passphrase on the private key. You&#039;ll have to tell dovecot about it in its configuration file /etc/dovecot/dovecot.conf. To this end, edit the corresponding section by uncommenting the &amp;quot;ssl_&amp;quot; lines, and using your private key password (e.g. &amp;quot;zM7Ertq12&amp;quot;) in the appropriate line:&lt;br /&gt;
 ssl_cert_file = /etc/ssl/certs/dovecot.pem&lt;br /&gt;
 ssl_key_file = /etc/ssl/private/dovecot.pem&lt;br /&gt;
 &lt;br /&gt;
 # If key file is password protected, give the password here. Alternatively&lt;br /&gt;
 # give it when starting dovecot with -p parameter.&lt;br /&gt;
 ssl_key_password = zM7Ertq12&lt;br /&gt;
Naturally you are free to place the keys in a different location, and/or use a different name...&lt;br /&gt;
&lt;br /&gt;
==Finishing up==&lt;br /&gt;
&lt;br /&gt;
This is a good moment to test your configuration, if you haven&#039;t been able to test your work inbetween. If everything works as expected, you can add bells and whistles to your configuration.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;smtpd&#039;&#039; TLS encryption===&lt;br /&gt;
The first addition we&#039;d like to present covers the way Postfix handles incoming connections. Since authentication works, we can have Postfix distrust every (unauthenticated) connection:&lt;br /&gt;
 postconf -e mynetworks=&lt;br /&gt;
Furthermore, since a default SSL certificate is installed by the Debian Postfix installation routine, we can encrypt all our connections using TLS; we enforce this using&lt;br /&gt;
 postconf -e smtpd_use_tls=yes&lt;br /&gt;
 postconf -e smtpd_tls_auth_only=yes&lt;br /&gt;
Of course, you need to adjust the settings of your IMAP client so that it properly uses TLS and properly authenticates itself.&lt;br /&gt;
&lt;br /&gt;
If TLS works, you&#039;ll probably want to change the certificate as you have for Dovecot in the previous section. This is again pretty easy. If you haven&#039;t yet, now is the time to [[Creating_digital_certificates_with_our_root_certificate | creating that custom SSL certificate]] for our mail server - but you have to make sure that you DON&#039;T use a password on the private key. Unlike Dovecot, Postfix cannot be told the password to the private key somewhere.&lt;br /&gt;
&lt;br /&gt;
For starters, look at the TLS-section of your &#039;&#039;main.cf&#039;&#039; that you currently have. Chances are a big chunk of it looks like this:&lt;br /&gt;
 # TLS parameters&lt;br /&gt;
 smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem&lt;br /&gt;
 smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key&lt;br /&gt;
 smtpd_use_tls=yes&lt;br /&gt;
Now all you need to do is replace the name of the snakeoil-keys with those of appropriate ssl-certificates, the private key of which needs to be NOT passphrase-protected. For this you could copy the Dovecot certificates, if you strip that passphrase in the manner described in the [[Creating_digital_certificates_with_our_root_certificate#Creating_an_SSL_certificate | SSL certificate section]]. The &#039;&#039;main.cf&#039;&#039; then would become:&lt;br /&gt;
 # TLS parameters&lt;br /&gt;
 smtpd_tls_cert_file=/etc/ssl/certs/postfix.pem&lt;br /&gt;
 smtpd_tls_key_file=/etc/ssl/private/postfix.key&lt;br /&gt;
 smtpd_use_tls=yes&lt;br /&gt;
Restart Postfix, and presto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other additions ===&lt;br /&gt;
If everything &#039;&#039;still&#039;&#039; works after these changes, then congratulations, you now have a powerful, flexible and pretty secure mail setup. Of course, there are always points for improvements. We&#039;ll cover these in separate pages. One page that we want to direct you to now, is&lt;br /&gt;
* [[Antispam measures]] for our Postfix mailserver&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Creating_digital_certificates_with_our_root_certificate&amp;diff=2444</id>
		<title>Creating digital certificates with our root certificate</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Creating_digital_certificates_with_our_root_certificate&amp;diff=2444"/>
		<updated>2009-08-28T07:48:18Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Preparing for certificate creation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preparing for certificate creation==&lt;br /&gt;
When we&#039;re going to create certificates, we&#039;re going to use the &#039;&#039;openssl&#039;&#039; command twice:&lt;br /&gt;
* once to create a &amp;quot;certificate signing request&amp;quot;, in which we define all information to be included in the certificate, and actually generate the public and private key parts of the key pair, and&lt;br /&gt;
* once to instruct the OpenSSL package to sign the certificate with our CA root certificate.&lt;br /&gt;
The first step thus &#039;&#039;&#039;creates&#039;&#039;&#039; the actual keypair, and the second step &#039;&#039;&#039;signs&#039;&#039;&#039; the public key.&lt;br /&gt;
&lt;br /&gt;
However, we&#039;re going to need to input a lot of parameters on the &#039;&#039;openssl&#039;&#039; command line. We can make things a bit easier for us by specifying these in the &#039;&#039;openssl.cnf&#039;&#039; file, just as we have added some values when creating the CA itself. To be precise, we&#039;re going to add &#039;&#039;&#039;X.509 V3 extensions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default OpenSSL generates V1 certificates, but if we&#039;re not extremely worried about offending certain ancient web browsers, we can add V3 extensions, and even make &#039;&#039;openssl&#039;&#039; do that by default. To do this, we find in &#039;&#039;/etc/ssl/openssl.cnf&#039;&#039; the following line in the section &#039;&#039;[ req ]&#039;&#039;, which is likely present but commented out:&lt;br /&gt;
 req_extensions = v3_req # The extensions to add to a certificate request&lt;br /&gt;
Simply remove the # sign in front of it, so that it appears as given above. This by default enables V3 extensions.&lt;br /&gt;
&lt;br /&gt;
Furthermore, check the section &#039;&#039;[ v3_req ]&#039;&#039;. It should look like this:&lt;br /&gt;
 [ v3_req ]&lt;br /&gt;
 &lt;br /&gt;
 # Extensions to add to a certificate request&lt;br /&gt;
 &lt;br /&gt;
 basicConstraints = CA:FALSE&lt;br /&gt;
 keyUsage = nonRepudiation, digitalSignature, keyEncipherment&lt;br /&gt;
 subjectKeyIdentifier = hash&lt;br /&gt;
What is added is the last line, with &#039;&#039;subjectKeyIdentifier&#039;&#039;; this line specifies how to identify the public key being certified, so that distinct keys used by the same subject can be differentiated (e.g. as key updating occurs, for example). Four values are possible, but the IETF Public Key Infrastructure (PKIX) working group recommends the setting &#039;&#039;subjectKeyIdentifier=hash&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Creating an SSL certificate==&lt;br /&gt;
Now we can create an SSL certificate for a web server. For the Common Name of the certificate, we need the &#039;&#039;&#039;exact&#039;&#039;&#039; name of the web server that&#039;ll offer the SSL connections. However, some servers run different websites as Virtual Hosts, so they could be running, for example, www.saruman.biz, as well as shop.saruman.biz. That might present a problem, because if the certificate is issued for www.saruman.biz, then each visitor of shop.saruman.biz will get a warning along the lines of &amp;quot;Warning: The website you&#039;re trying to visit is shop.saruman.biz, but the certificate offered is for www.saruman.biz&amp;quot;. To prevent that, we could use the wildcard character in the name of the certificate, so as to generate a certificate for *.saruman.biz.&lt;br /&gt;
&lt;br /&gt;
=== CA.sh - certificate creation made easy===&lt;br /&gt;
Since we have the &#039;&#039;openssl.cnf&#039;&#039; set up just right, and the &#039;&#039;CA.sh&#039;&#039; script primed, generating an SSL certificate is not very hard. From any old directory, run as root&lt;br /&gt;
 /usr/lib/ssl/misc/CA.sh -newreq&lt;br /&gt;
This will create the signing request. The questions it&#039;ll ask, are&lt;br /&gt;
* a PEM passphrase, with which to protect the private key of the key pair. Note: you cannot generate a signing request without passphrase, so the private key you&#039;ll generate will &#039;&#039;always&#039;&#039; have a passphrase. If this is not what you want, do not despair: you can easily remove the passphrase from the private key after it&#039;s been generated (see further down). So just use a passphrase, even if you don&#039;t need one.&lt;br /&gt;
* Country/State/Locality/Organization/Organizational Unit; just as with the CA root certificate creation, these have your preprogrammed defaults that you may or may not change.&lt;br /&gt;
* Common Name; here we MUST give the DNS name of the host that is going to use the certificate, e.g. &#039;&#039;shop.saruman.biz&#039;&#039;, or &#039;&#039;*.saruman.biz&#039;&#039;.&lt;br /&gt;
* Challenge password; leave it blank, it&#039;s just to protect your signing request while en-route to the CA - but that&#039;s you anyway :-)&lt;br /&gt;
* Optional company name; leave that blank too, it&#039;s also extra information for the CA.&lt;br /&gt;
&lt;br /&gt;
Now your private key and your certificate signing request (CSR) are ready; they&#039;re called &#039;&#039;newkey.pem&#039;&#039; and &#039;&#039;newreq.pem&#039;&#039; by default, and are located in your working directory. Time to do some signing! From that same working directory, run&lt;br /&gt;
 /usr/lib/ssl/misc/CA.sh -sign&lt;br /&gt;
The script will show that it&#039;s using the config file &#039;&#039;/usr/lib/ssl/openssl.cnf&#039;&#039; (as we indeed wish), and then ask for the super-duper-secret passphrase to the CA private key (provided you&#039;ve left that in directory &#039;&#039;/etc/ssl/ca/private&#039;&#039;). Feed the script the passphrase, and it&#039;ll get to work. It&#039;ll check the request, then show you the details of the certificate you&#039;re about to sign. An example would be&lt;br /&gt;
 Certificate Details:&lt;br /&gt;
         Serial Number: 1 (0x1)&lt;br /&gt;
         Validity&lt;br /&gt;
             Not Before: Oct 27 09:34:00 2008 GMT&lt;br /&gt;
             Not After : Nov  1 09:34:00 2009 GMT&lt;br /&gt;
         Subject:&lt;br /&gt;
             countryName               = NL&lt;br /&gt;
             stateOrProvinceName       = Utrecht&lt;br /&gt;
             organizationName          = Saruman.biz&lt;br /&gt;
             organizationalUnitName    = Internet Dept.&lt;br /&gt;
             commonName                = shop.saruman.biz&lt;br /&gt;
             emailAddress              = webmaster@saruman.biz&lt;br /&gt;
         X509v3 extensions:&lt;br /&gt;
             X509v3 Basic Constraints:&lt;br /&gt;
                 CA:FALSE&lt;br /&gt;
             Netscape Comment:&lt;br /&gt;
                 OpenSSL Generated Certificate&lt;br /&gt;
             X509v3 Subject Key Identifier:&lt;br /&gt;
                 30:F2:61:80:AA:CF:1B:F0:3E:44:41:D6:38:CC:31:F0:94:28:BD:2B&lt;br /&gt;
             X509v3 Authority Key Identifier:&lt;br /&gt;
                 keyid:80:41:F8:A5:1F:C2:27:6E:CF:A9:28:8E:8A:EF:83:E7:FD:8A:D5:26&lt;br /&gt;
 &lt;br /&gt;
 Certificate is to be certified until Nov  1 09:34:00 2009 GMT (370 days)&lt;br /&gt;
 Sign the certificate? [y/n]:&lt;br /&gt;
After doing your CA duty and diligently checking all the data, just press &#039;&#039;y&#039;&#039;. The script certifies the request, and asks if it is to commit the request. This means it&#039;ll update it&#039;s own database, by saving a copy of the signed certificate in &#039;&#039;/etc/ssl/ca/newcerts&#039;&#039; named after its serial number (&#039;&#039;01.pem&#039;&#039; for this example). Furthermore the script will record the serial and ID&#039;s of the generated certificate so that the next certificate will have a new serial number. And now: hey presto! We have a &#039;&#039;newcert.pem&#039;&#039; in our working directory!&lt;br /&gt;
&lt;br /&gt;
For good measure:&lt;br /&gt;
* delete &#039;&#039;newreq.pem&#039;&#039;&lt;br /&gt;
* rename the generated private key &#039;&#039;newkey.pem&#039;&#039; to &#039;&#039;shop.saruman.biz.seckey.pem&#039;&#039;&lt;br /&gt;
* rename the generated public certificate &#039;&#039;newcert.pem&#039;&#039; to &#039;&#039;shop.saruman.biz.pem&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To remove the passphrase from the private key, use a command like this:&lt;br /&gt;
 openssl rsa -in shop.saruman.biz.seckey.key -out shop.saruman.biz.key.key&lt;br /&gt;
This will make &#039;&#039;openssl&#039;&#039; ask for your passphrase, and then create the unsecured &#039;&#039;shop.saruman.biz.key.pem&#039;&#039; key file. Best practice: ALWAYS use a passphrase-protected key, unless the application cannot support it (e.g. Postfix).&lt;br /&gt;
&lt;br /&gt;
Save the secure private key and its PEM passphrase in a safe place (e.g. Keepass database). And if you removed the passphrase from the private key, then store it in an even safer place!&lt;br /&gt;
&lt;br /&gt;
Now you can deploy your certificate. (more on that in another section).&lt;br /&gt;
&lt;br /&gt;
=== openssl - the hard way to certificate creation===&lt;br /&gt;
We don&#039;t actually need to use the &#039;&#039;CA.sh&#039;&#039; script, because we can do manually what the &#039;&#039;CA.sh&#039;&#039; script does. That gives us more control, but also more work. Let&#039;s see what we&#039;ve got to do.&lt;br /&gt;
&lt;br /&gt;
We will now perform the first step in our &amp;quot;manual&amp;quot; certificate generation: we create a signing request with all the information that we want in our SSL certificate. We run the magic incantation - note how we already&lt;br /&gt;
 openssl req -new -nodes -keyout webmail.saruman.biz.key.pem -out webmail.saruman.biz.req.pem&lt;br /&gt;
This generates a new private key (named &#039;&#039;webmail.saruman.biz.key.pem&#039;&#039;), and a new, non-encrypted (because of &#039;&#039;-nodes&#039;&#039;), key signing request named &#039;&#039;webmail.saruman.biz.req.pem&#039;&#039;. We can leave out terms like &#039;&#039;-newkey rsa:2048&#039;&#039; and &#039;&#039;-days 370&#039;&#039; since we&#039;ve put that in the configuration file. And naturally you&#039;re free to choose your own names for the keys.&lt;br /&gt;
&lt;br /&gt;
FIXME - need the full process here&lt;br /&gt;
&lt;br /&gt;
=== Validating the generated certificates===&lt;br /&gt;
Again, we can use the &#039;&#039;openssl&#039;&#039; command to validate the keys we&#039;ve generated. For instance, the &#039;&#039;CA.sh&#039;&#039; generated certificate, after renaming, is verified with&lt;br /&gt;
 openssl x509 -in shop.saruman.biz.pem -noout -purpose&lt;br /&gt;
 Certificate purposes:&lt;br /&gt;
 SSL client : Yes&lt;br /&gt;
 SSL client CA : No&lt;br /&gt;
 SSL server : Yes&lt;br /&gt;
 SSL server CA : No&lt;br /&gt;
 Netscape SSL server : Yes&lt;br /&gt;
 Netscape SSL server CA : No&lt;br /&gt;
 S/MIME signing : Yes&lt;br /&gt;
 S/MIME signing CA : No&lt;br /&gt;
 S/MIME encryption : Yes&lt;br /&gt;
 S/MIME encryption CA : No&lt;br /&gt;
 CRL signing : Yes&lt;br /&gt;
 CRL signing CA : No&lt;br /&gt;
 Any Purpose : Yes&lt;br /&gt;
 Any Purpose CA : Yes&lt;br /&gt;
 OCSP helper : Yes&lt;br /&gt;
 OCSP helper CA : No&lt;br /&gt;
Notice that the certificate is valid for everything except CA tasks.&lt;br /&gt;
&lt;br /&gt;
Likewise, using &#039;&#039;-dates&#039;&#039; instead of &#039;&#039;-purpose&#039;&#039; lets you see the validity time period, and &#039;&#039;-text&#039;&#039; gives the whole text of the certificate. Note the line marked &amp;quot;issuer&amp;quot;, and see how your own CA is referenced there.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=E-mail_server_section&amp;diff=2443</id>
		<title>E-mail server section</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=E-mail_server_section&amp;diff=2443"/>
		<updated>2009-08-28T07:13:22Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Dovecot default configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==E-mail server setup==&lt;br /&gt;
What we want to accomplish here is the setup of a mail server with the following properties:&lt;br /&gt;
* can serve multiple mail domains&lt;br /&gt;
* can relay mail for other domains to other mail servers&lt;br /&gt;
* can have one or more mailboxes per domain&lt;br /&gt;
* users of these mailboxes can be virtual (do not need to have a Linux user account)&lt;br /&gt;
* can have multiple aliases per mailbox&lt;br /&gt;
* can forward mail for certain aliases to multiple mailboxes&lt;br /&gt;
For this type of mail server setup, we owe a great thankyou to [http://workaround.org/articles/ispmail-etch/ Christoph Haas], whose advise has helped us create flexible and reliable mail servers since 2003.&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
We&#039;ll assume that the server currently has no mailserver installed, at least no other than the default &#039;&#039;exim&#039;&#039; mailserver. Furthermore, the server is already fitted with MySQL, and this database is running without problems.&lt;br /&gt;
&lt;br /&gt;
The hostname of the server must be set correctly, so that &#039;&#039;hostname -f&#039;&#039; returns a valid DNS name, like &#039;&#039;lighthouse.saruman.biz.&#039;&#039;. It might also be an internal name like &#039;&#039;lighthouse.saruman.lan.&#039;&#039; but that will require us to give extra attention to the name under which Postfix will contact its collegues on the Internet. Also, the server can correctly [Networking_section#DNS_resolution_under_Debian | resolve DNS names] like [http://www.debian.org www.debian.org], preferably by running it&#039;s own caching DNS server.&lt;br /&gt;
&lt;br /&gt;
The server is kept on the correct date and time using NTP, TCP port 25 is open on the server, the ISP will allow connections from Internet to this port, and if there&#039;s a firewall running on this server, then it has port 25 open so as to not block incoming e-mail.&lt;br /&gt;
&lt;br /&gt;
==Software installation==&lt;br /&gt;
As a first step, we use [[APT and aptitude|apt or aptitude]] to make sure that our server is up-to-date. Then we can install the necessary software packages. Under Debian 5.0 &amp;quot;Lenny&amp;quot;, the (single) packages is:&lt;br /&gt;
* &#039;&#039;postfix&#039;&#039;, the mail server itself - this includes the &amp;quot;virtual package&amp;quot; postfix-tls, that we want to use to secure connections to Postfix with the TLS protocol&lt;br /&gt;
At the same time we can - and must - purge the following packages:&lt;br /&gt;
* exim4&lt;br /&gt;
* exim4-base&lt;br /&gt;
* exim4-daemon-light&lt;br /&gt;
* exim4-config&lt;br /&gt;
In &#039;&#039;aptitude&#039;&#039;, only press &amp;quot;go&amp;quot; when you&#039;ve marked all four of these packages &amp;quot;purge&amp;quot;, or you cannot install postfix.&lt;br /&gt;
&lt;br /&gt;
When installing the postfix package, the Debian installer script will ask you several questions, which you can answer like this:&lt;br /&gt;
* General type of mail configuration: Internet site&lt;br /&gt;
* System mail name: the FQDN of the mail server that you&#039;ve verified in the previous section. Note that the script will try to guess the DNS name, but that might yield a DNS name with a trailing dot. That is technically correct, but the installation script will barf. Remove the trailing dot before hitting &amp;amp;lt;enter&amp;gt;!&lt;br /&gt;
* Postmaster mail address: the address that all mail should go to that is addressed to &amp;quot;root&amp;quot; and &amp;quot;postmaster&amp;quot;.&lt;br /&gt;
* Domain list: give the list of all domains that the machine can consider itself the FINAL destination for. This should at a minimum include an empty value, &amp;quot;localhost&amp;quot; and the FQDN of the machine itself (no trailing dots!); however, if you&#039;re running your own mail domain, you can also add that (e.g. &amp;quot;saruman.biz&amp;quot;). Thus, the list could look like this:&lt;br /&gt;
 saruman.biz, lighthouse.saruman.lan, localhost.saruman.lan, , localhost&lt;br /&gt;
* Force synchronous updates? We think that&#039;s not necessary, but please read the question and decide for yourself&lt;br /&gt;
* Local networks: something like &#039;&#039;127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.67.0/24&#039;&#039; (the default, augmented with your local IP range)&lt;br /&gt;
* Mailbox size limits: you can give postfix a limit in bytes, but we&#039;re going to use one single big mailbox for all users, so we cannot let Postfix guard it. Leave it at 0 (zero) so we don&#039;t have a size limit.&lt;br /&gt;
* Character for local address extension: we leave it at &#039;&#039;+&#039;&#039;&lt;br /&gt;
* Internet protocols to use: currently we don&#039;t have IPv6 support, so there&#039;s no sense in letting Postfix try to serve IPv6. We choose &#039;&#039;ipv4&#039;&#039; only.&lt;br /&gt;
With the above data, the Debian install script for Postfix can do its job and configure Postfix with some basic settings.&lt;br /&gt;
&lt;br /&gt;
Now that Postfix is installed, we can install some dependent packages (we could install them in the same run, but if anything goes amiss with the postfix installation, then these packages are going to remain unconfigured as well):&lt;br /&gt;
* &#039;&#039;postfix-doc&#039;&#039;, the accompanying documentation;&lt;br /&gt;
* &#039;&#039;postfix-mysql&#039;&#039;, necessary to have Postfix talk to our MySQL server;&lt;br /&gt;
* &#039;&#039;postfix-pcre&#039;&#039; to be able to parse regular expressions, which which we can combat spam;&lt;br /&gt;
* &#039;&#039;dovecot-imapd&#039;&#039; is a daemon that will provide your users with IMAP access to their mail;&lt;br /&gt;
* &#039;&#039;dovecot-pop3d&#039;&#039; is another daemon, but for the POP3 protocol.&lt;br /&gt;
&lt;br /&gt;
==Virtual Mailman creation==&lt;br /&gt;
When we&#039;re done, we&#039;ll need a &amp;quot;system user&amp;quot;, a sort of virtual mailman that is the owner of all mailboxes that we&#039;re serving. We suggest the name &amp;quot;vmail&amp;quot; for this user. Note: this user does not get his own mailbox (i.e. there&#039;s no mailbox at vmail@saruman.biz).&lt;br /&gt;
&lt;br /&gt;
To create this user, and his home directory, we can run the following commands:&lt;br /&gt;
 groupadd -g 120 vmail&lt;br /&gt;
 useradd -g vmail -u 120 vmail -d /data/vmail -m -s /bin/false&lt;br /&gt;
As you see, we&#039;ve chosen a group ID and user ID of 120 (after confirming that this ID was not taken by another group or user, by checking &#039;&#039;/etc/passwd&#039;&#039; and &#039;&#039;/etc/group&#039;&#039;. Furthermore, we&#039;ve decided to keep the &#039;&#039;vmail&#039;&#039; user&#039;s home directory not under &#039;&#039;/home/vmail&#039;&#039;, but in a special place where we&#039;re going to expect server data to reside - in our server, the &#039;&#039;/data&#039;&#039; directory (which is a RAID-5 array mounted under root). By adding &#039;&#039;-m&#039;&#039;, we&#039;ve actually created the home directory, and adding &#039;&#039;-s /bin/false&#039;&#039; makes totally sure that the user &#039;&#039;vmail&#039;&#039; can never ever log in - even if we&#039;ve not created a password for this user, so &#039;&#039;vmail&#039;&#039; shouldn&#039;t be able to log in anyway. Better safe than sorry.&lt;br /&gt;
&lt;br /&gt;
To tell Postfix that this &#039;&#039;vmail&#039;&#039; user is someone special, we run&lt;br /&gt;
 postconf -e virtual_uid_maps=static:120&lt;br /&gt;
 postconf -e virtual_gid_maps=static:120&lt;br /&gt;
That makes postfix understand that all mail for the virtual mail domains must be written to disk with these specified user and group ID&#039;s.&lt;br /&gt;
&lt;br /&gt;
==MySQL configuration==&lt;br /&gt;
&lt;br /&gt;
===Database preparation===&lt;br /&gt;
We will use the MySQL database to record data on our mail system, and then give our Postfix access to this database so that it can read its configuration from there. For starters, we&#039;ll create a MySQL database named &amp;quot;vmail&amp;quot;, and a MySQL user named &amp;quot;vmail_admin&amp;quot; that can read all necessary data from that &amp;quot;vmail&amp;quot; database. Then, we create the necessary tables, and a view that links these tables. We do this with the MySQL client &#039;&#039;mysql&#039;&#039;. However, we&#039;re quite lazy, so we don&#039;t create this database by hand (that&#039;s error-prone), but by use of a script [[create.vmail.sql]]. To this end, feed the [[create.vmail.sql]] script into the &#039;&#039;mysql&#039;&#039; client like this:&lt;br /&gt;
 mysql -u root -p &amp;lt; create.vmail.sql&lt;br /&gt;
(This of course assumes you have &#039;&#039;create.vmail.sql&#039;&#039; in your current working directory; if not you can include the path to the file.) Simply give the MySQL root user password, and the script creates the database, the user, the necessary tables, and the view.&amp;lt;br&amp;gt;&lt;br /&gt;
A note of caution: it is never a good idea to just run scripts without a proper understanding of what it does. Especially with MySQL, it will be advantageous if you understand the SQL commands. Open the script in a text editor, open the [http://dev.mysql.com/doc/refman/5.0/en/ MySQL command reference], and trace back what the script does exactly.&lt;br /&gt;
&lt;br /&gt;
===Inserting data===&lt;br /&gt;
Next up, we fill the database with the first sets of values (either test data or the first of our production data). We&#039;ll start off with the virtual domains that we&#039;re hosting, by running the mysql client and feeding it information like this:&lt;br /&gt;
 mysql -u root -p vmail&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_domains (id, vdomain) VALUES (1, &#039;saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_domains (vdomain) VALUES (&#039;wiki.saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_domains (vdomain) VALUES (&#039;shop.saruman.biz&#039;);&lt;br /&gt;
This has the effect of creating three entries. You can check that everything worked as planned by executing&lt;br /&gt;
 mysql&amp;gt; select * from virtual_domains;&lt;br /&gt;
Note: only the first entry needs an &#039;&#039;id&#039;&#039; value, because in MySQL we&#039;ve defined that field as AUTO_INCREMENT. After creating your first virtual domain in the table, you never have to use a statement like the first INSERT again, only statements like the other two.&lt;br /&gt;
&lt;br /&gt;
Now the MySQL database has the information needed by Postfix to recognise that you have three virtual mail domains (namely the three domains in the VALUES section) for which it hosts virtual mailboxes. Postfix cannot read this information yet, but that&#039;ll be taken care of in the next section.&lt;br /&gt;
&lt;br /&gt;
Whle still within the mysql client, we can now create users:&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_users (id, domain_id, user, passwd) VALUES (1, 1, &#039;jan&#039;, MD5(&#039;JanSecret&#039;));&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_users (domain_id, user, passwd) VALUES (1, &#039;mike&#039;, MD5(&#039;MikeSecret&#039;));&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_users (domain_id, user, passwd) VALUES (3, &#039;shopkeeper&#039;, MD5(&#039;ShopSecret&#039;));&lt;br /&gt;
This has the effect of creating three users &amp;quot;jan&amp;quot; (in domain saruman.biz), &amp;quot;mike&amp;quot; (in domain saruman.biz) and &amp;quot;shopkeeper&amp;quot; (in domain shop.saruman.biz). Again, the &#039;&#039;id&#039;&#039; value is only ever needed in the first statement, because from now on every user addition will auto-increment &#039;&#039;id&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The passwords shown are encrypted with MD5, and put in the &#039;&#039;passwd&#039;&#039; field. Later on, the users will be able to access their mailboxes using this password; we won&#039;t tell Postfix anything about them, because it doesn&#039;t need the passwords. You can check the content of the &#039;&#039;virtual_users&#039;&#039; table with the right &amp;quot;select&amp;quot; statement, and you can now also see that the view &#039;&#039;view-users&#039;&#039; works:&lt;br /&gt;
 mysql&amp;gt; select * from virtual_users;&lt;br /&gt;
 mysql&amp;gt; select * from view_users;&lt;br /&gt;
&lt;br /&gt;
Next up, we&#039;re going to add some aliases, which are alternative e-mail addresses for the users; their primary e-mail address can already be seen in the &#039;&#039;view_users&#039;&#039; view, but perhaps you also want mail to &amp;quot;webmaster@shop.saruman.biz&amp;quot; to arrive at one or more mailboxes, e.g. in the mailbox for user &amp;quot;shopkeeper&amp;quot; (within domain &amp;quot;shop.saruman.biz&amp;quot;) and this guy&#039;s home address (&amp;quot;j.doe@example.com&amp;quot;). Furthermore, we&#039;ll define catchall-addresses for all domains, that&#039;ll send all mail for which no mailbox can be found to the mailbox of user Mike (for the first two domains) and Webmaster (for shop.saruman.biz; Webmaster himself is an alias yet again, that points to shopkeeper@shop.saruman.biz). To create the catchall, leave out a value for the source address. This creates the empty value for source that will be expanded (using source@domain) to &amp;quot;@domain&amp;quot;.&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (id, domain_id, source, destination)&lt;br /&gt;
        VALUES (1, 2, &#039;webmaster&#039;, &#039;shopkeeper@shop.saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (domain_id, source, destination)&lt;br /&gt;
        VALUES (2, &#039;webmaster&#039;, &#039;j.doe@example.com&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (domain_id, destination)&lt;br /&gt;
        VALUES (1, &#039;mike@saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (domain_id, destination)&lt;br /&gt;
        VALUES (2, &#039;mike@saruman.biz&#039;);&lt;br /&gt;
 mysql&amp;gt; INSERT INTO virtual_aliases (domain_id, destination)&lt;br /&gt;
        VALUES (3, &#039;webmaster@saruman.biz&#039;);&lt;br /&gt;
 &lt;br /&gt;
Again, we don&#039;t need to add the &#039;&#039;id&#039;&#039; value any more after the first ever insertion into this table.&lt;br /&gt;
&lt;br /&gt;
We can check the result by running a select statement against the &#039;&#039;virtual_aliases&#039;&#039; table and &#039;&#039;view_aliases&#039;&#039; view:&lt;br /&gt;
 mysql&amp;gt; select * from virtual_aliases;&lt;br /&gt;
 mysql&amp;gt; select * from view_aliases;&lt;br /&gt;
&lt;br /&gt;
== Postfix configuration for MySQL lookups==&lt;br /&gt;
Next, we&#039;re going to tell Postfix to use the &#039;&#039;vmail&#039;&#039; database, and also how to read the database (Postfix never writes the MySQL database). To this end, we&#039;re going to create three configuration files in directory &#039;&#039;/etc/postfix&#039;&#039;. We&#039;ll start off with one configuration file, with which Postfix can determine if a domain name is among the domain(s) that it&#039;s actually hosting mailboxes for. Then we&#039;ll create the config file that checks the table that contains all the users that have a virtual mailbox, and finally we create the lookup for the table with all the aliases.&lt;br /&gt;
&lt;br /&gt;
===Virtual mail domains lookup===&lt;br /&gt;
&lt;br /&gt;
Create file &#039;&#039;/etc/postfix/mysql-virtual-domains.cf&#039;&#039; with the following content:&lt;br /&gt;
 user = vmail_admin&lt;br /&gt;
 password = SuperSecret&lt;br /&gt;
 hosts = 127.0.0.1&lt;br /&gt;
 dbname = vmail&lt;br /&gt;
 query = SELECT 1 FROM virtual_domains WHERE vdomain=&#039;%s&#039;&lt;br /&gt;
Next, we tell postfix to check this configuration file when it needs to check &amp;quot;virtual_mailbox_domains&amp;quot;:&lt;br /&gt;
 postconf -e virtual_mailbox_domains=mysql:/etc/postfix/mysql-virtual-domains.cf&lt;br /&gt;
Use of this configuration file in postfix has the effect of returning &amp;quot;yes&amp;quot; when checking our database for the domain part of an email address. Naturally, this configuration file has to be fitted with the actual &#039;&#039;vmail_admin&#039;&#039; password rather than our example &amp;quot;SuperSecret&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
=== Virtual mail user lookup===&lt;br /&gt;
Create the file &#039;&#039;/etc/postfix/mysql-virtual-mailbox-maps.cf&#039;&#039; with the following content:&lt;br /&gt;
 user = vmail_admin&lt;br /&gt;
 password = SuperSecret&lt;br /&gt;
 hosts = 127.0.0.1&lt;br /&gt;
 dbname = vmail&lt;br /&gt;
 query = SELECT 1 FROM view_users WHERE email=&#039;%s&#039;&lt;br /&gt;
Next, we tell Postfix that this mapping file is supposed to be used for the &#039;&#039;virtual_mailbox_maps&#039;&#039; mapping:&lt;br /&gt;
 postconf -e virtual_mailbox_maps=mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf&lt;br /&gt;
The lookup of virtual mailboxes should work with the data we&#039;ve put into the database previously. i.e.&lt;br /&gt;
 postmap -q jan@saruman.biz mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf&lt;br /&gt;
should return a &#039;&#039;&#039;1&#039;&#039;&#039; to acknowledge that &amp;quot;jan@saruman.biz&amp;quot; is indeed a virtual mailbox in our Postfix configuration.&lt;br /&gt;
&lt;br /&gt;
=== Virtual alias lookup===&lt;br /&gt;
Create another cf file at &#039;&#039;/etc/postfix/mysql-virtual-alias-maps.cf&#039;&#039;:&lt;br /&gt;
 user = vmail_admin&lt;br /&gt;
 password = SuperSecret&lt;br /&gt;
 hosts = 127.0.0.1&lt;br /&gt;
 dbname = vmail&lt;br /&gt;
 query = SELECT destination FROM view_aliases WHERE email=&#039;%s&#039;&lt;br /&gt;
And create yet another cf file at &#039;&#039;/etc/postfix/mysql-email2email.cf&#039;&#039;:&lt;br /&gt;
 user = vmail_admin&lt;br /&gt;
 password = SuperSecret&lt;br /&gt;
 hosts = 127.0.0.1&lt;br /&gt;
 dbname = vmail&lt;br /&gt;
 query = SELECT email FROM view_users WHERE email=&#039;%s&#039;&lt;br /&gt;
&lt;br /&gt;
Again, we tell Postfix that this mapping file is supposed to be used for the &#039;&#039;virtual_alias_maps&#039;&#039; mapping:&lt;br /&gt;
 postconf -e virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf&lt;br /&gt;
The lookup of virtual aliases should now work as designed:&lt;br /&gt;
 postmap -q shopkeeper@shop.saruman.biz mysql:/etc/postfix/mysql-virtual-alias-maps.cf&lt;br /&gt;
 postmap -q webmaster@shop.saruman.biz mysql:/etc/postfix/mysql-virtual-alias-maps.cf&lt;br /&gt;
If you&#039;ve put in the data from the previous section, then both commands should return the same result: &#039;&#039;shopkeeper@saruman.biz&#039;&#039;. This shows that Postfix will deliver  mail to shopkeeper or to webmaster to the mailbox of shopkeeper.&lt;br /&gt;
&lt;br /&gt;
===Finishing up configuration files===&lt;br /&gt;
When everything works as planned, then we secure the configuration files against prying eyes. Remember, the configuration files contain the user/password combination which which to access the &#039;&#039;vmail&#039;&#039; SQL database. The &#039;&#039;vmail_admin&#039;&#039; user has only read rights, and passwords in there are encrypted, but nevertheless, this is information we need to protect. Thus:&lt;br /&gt;
 chown root:postfix /etc/postfix/mysql-*.cf&lt;br /&gt;
 chmod u=rw,g=r,o= /etc/postfix/mysql-*.cf&lt;br /&gt;
This protects all four configuration files since only root can write them, members of group &#039;&#039;postfix&#039;&#039; can read them, and the rest of the world cannot access them at all.&lt;br /&gt;
&lt;br /&gt;
==Configuring mail delivery through Dovecot LDA==&lt;br /&gt;
E-mails get delivered to the virtual mailboxes by means of a Mail Delivery Agent (MDA). With Postfix, the standard MDA for delivery to virtual mailboxes is called &#039;&#039;virtual&#039;&#039;, but we&#039;re not going to use that; we&#039;re going to use &#039;&#039;[http://wiki.dovecot.org/LDA Dovecot LDA]&#039;&#039;, which is a program called &#039;&#039;deliver&#039;&#039;. By the way, the abbreviation LDA stands for Local Delivery Agent, which of course means more or less the same as MDA.&lt;br /&gt;
===Enabling the Dovecot daemon===&lt;br /&gt;
To make Postfix use Dovecot LDA, we add the following line to &#039;&#039;/etc/postfix/master.cf&#039;&#039;:&lt;br /&gt;
 dovecot   unix  -       n       n       -       -       pipe&lt;br /&gt;
     flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}&lt;br /&gt;
This declares the service &amp;quot;dovecot&amp;quot; to mean using the program &#039;&#039;/usr/lib/dovecot/deliver&#039;&#039; with the right parameters. If we now let Postfix reload its files, it&#039;ll learn about this new service. Subsequently we can instruct Postfix to start using it, by declaring service &amp;quot;dovecot&amp;quot; to be the virtual transport of choice, and specifying one Dovecot-specific variable:&lt;br /&gt;
 postfix reload&lt;br /&gt;
 postconf -e virtual_transport=dovecot&lt;br /&gt;
 postconf -e dovecot_destination_recipient_limit=1&lt;br /&gt;
===Dovecot default configuration===&lt;br /&gt;
Now to configure Dovecot itself: open &#039;&#039;/etc/dovecot/dovecot.conf&#039;&#039; with your favourite editor [[vim]]; first make sure the &#039;&#039;protocols =&#039;&#039; line reads&lt;br /&gt;
 protocols = imap imaps pop3 pop3s&lt;br /&gt;
(which it should by default). The second setting is quite crucial. By default, the location of the mail directories is found automatically by Dovecot, but here that won&#039;t work. Find the line that reads &#039;&#039;#mail_location =&#039;&#039;, and change it to&lt;br /&gt;
 mail_location = maildir:/data/vmail/%d/%n/Maildir&lt;br /&gt;
This will look for mail in directory &#039;&#039;/data/vmail/&#039;&#039;&#039;DOMAIN&#039;&#039;&#039;/&#039;&#039;&#039;USER&#039;&#039;&#039;/Maildir&#039;&#039;, and expect this directory to be in &amp;quot;maildir&amp;quot; format.&lt;br /&gt;
Next look for a section called &amp;quot;auth default&amp;quot;. First define the allowed authentication mechanisms:&lt;br /&gt;
 mechanisms = plain login&lt;br /&gt;
Then inside that same section you need to uncomment:&lt;br /&gt;
 passdb sql {&lt;br /&gt;
     args = /etc/dovecot/dovecot-sql.conf&lt;br /&gt;
 }&lt;br /&gt;
which tells Dovecot that the passwords are stored in an SQL database (it&#039;s obvious that we&#039;ll now have to create this conf-file) and:&lt;br /&gt;
 userdb static {&lt;br /&gt;
     args = uid=120 gid=120 home=/data/vmail/%d/%n allow_all_users=yes&lt;br /&gt;
 }&lt;br /&gt;
to tell Dovecot where the mailboxes are located. This is similar to the &#039;&#039;mail_location&#039;&#039; setting. Next task: comment out the section &#039;&#039;passdb pam&#039;&#039;, so that Dovecot doesn&#039;t accidentally try to service local users as well.&lt;br /&gt;
&lt;br /&gt;
Next up: tell Dovecot to handle IMAP the same as previous versions of this virtual mailserver have - this can prove to be quite tricky if you already have mailboxes full of mail, put there by e.g. Courier-IMAP. What works for us, is&lt;br /&gt;
 namespace private {&lt;br /&gt;
     separator = .&lt;br /&gt;
     prefix = &lt;br /&gt;
     inbox = yes&lt;br /&gt;
 }&lt;br /&gt;
However, your mileage may vary.&lt;br /&gt;
&lt;br /&gt;
You&#039;ll also want to comment out the &#039;&#039;passdb pam&#039;&#039; sections, since we&#039;re not hosting mail for local users.&lt;br /&gt;
&lt;br /&gt;
Next up, we&#039;ll edit the section &#039;&#039;socket listen&#039;&#039; so that Dovecot can access the user database (master section), and our Postfix mailserver can access Dovecot (client section):&lt;br /&gt;
 socket listen {&lt;br /&gt;
   master {&lt;br /&gt;
     path = /var/run/dovecot/auth-master&lt;br /&gt;
     mode = 0600&lt;br /&gt;
     user = vmail&lt;br /&gt;
   }&lt;br /&gt;
   client {&lt;br /&gt;
     path = /var/spool/postfix/private/auth&lt;br /&gt;
     mode = 0660&lt;br /&gt;
     user = postfix&lt;br /&gt;
     group = postfix&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Finally, the protocol section, where we specify log files, an address to put in mails when we send out nondelivery reports, and a place to store scripts:&lt;br /&gt;
 protocol lda {&lt;br /&gt;
     log_path = /var/log/appslog/mail/dovecot-deliver.log&lt;br /&gt;
     auth_socket_path = /var/run/dovecot/auth-master&lt;br /&gt;
     postmaster_address = postmaster@saruman.biz&lt;br /&gt;
     mail_plugins = cmusieve&lt;br /&gt;
     global_script_path = /data/vmail/globalsieverc&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Now that we&#039;ve finished the Dovecot configuration file, we need to create a fitting MySQL configuration file for Dovecot. The file is &#039;&#039;/etc/dovecot/dovecot-sql.conf&#039;&#039;, and its contents are&lt;br /&gt;
 driver = mysql&lt;br /&gt;
 connect = host=127.0.0.1 dbname=vmail user=vmail_admin password=SuperSecret&lt;br /&gt;
 default_pass_scheme = PLAIN-MD5&lt;br /&gt;
 password_query = SELECT email as user, passwd as password FROM view_users WHERE email=&#039;%u&#039;;&lt;br /&gt;
When you&#039;ve created this file (as root), change the attributes of &#039;&#039;dovecot-sql.conf&#039;&#039; and &#039;&#039;dovecot.conf&#039;&#039;, and then restart Dovecot to start using the new configuration. Note: &#039;&#039;dovecot.conf&#039;&#039; needs to be read by Postfix, hence the group ownership for the file.&lt;br /&gt;
 chmod u=rw,g=,o= /etc/dovecot/dovecot-sql.conf&lt;br /&gt;
 chgrp vmail /etc/dovecot/dovecot.conf&lt;br /&gt;
 chmod u=rw,g=r,o= /etc/dovecot/dovecot.conf&lt;br /&gt;
 /etc/init.d/dovecot restart&lt;br /&gt;
&lt;br /&gt;
===Dovecot SSL configuration===&lt;br /&gt;
Out of the (Debian) box, Dovecot is SSL-enabled. We&#039;ll now replace the generic SSL-certificate, generated for the host by the Dovecot installation script, by our own certificate. To ths end, we first [[Creating_digital_certificates_with_our_root_certificate | generate an appropriate certificate]], e.g. an SSL wildcard certificate: &amp;quot;*.saruman.biz&amp;quot;. This results in a public and a private certificate, both of which must be placed somewhere where Dovecot expects them and can read them.&lt;br /&gt;
&lt;br /&gt;
By default, Dovecot expects the following locations/filenames/owner/attributes:&lt;br /&gt;
 /etc/ssl/certs/dovecot.pem    -rw-r--r--  root:dovecot  4624 bytes&lt;br /&gt;
 /etc/ssl/private/dovecot.pem  -rw-------  root:dovecot  1743 bytes&lt;br /&gt;
If we may make a suggestion: rename the generated certificates in both locations to dovecot.pem.bak, place your generated certificates in their place, and set the owner/permissions like displayed here.&lt;br /&gt;
&lt;br /&gt;
However, if you&#039;ve generated your own keys, you might have used a passphrase on the private key. You&#039;ll have to tell dovecot about it in its configuration file /etc/dovecot/dovecot.conf. To this end, edit the corresponding section by uncommenting the &amp;quot;ssl_&amp;quot; lines, and using your private key password (e.g. &amp;quot;zM7Ertq12&amp;quot;) in the appropriate line:&lt;br /&gt;
 ssl_cert_file = /etc/ssl/certs/dovecot.pem&lt;br /&gt;
 ssl_key_file = /etc/ssl/private/dovecot.pem&lt;br /&gt;
 &lt;br /&gt;
 # If key file is password protected, give the password here. Alternatively&lt;br /&gt;
 # give it when starting dovecot with -p parameter.&lt;br /&gt;
 ssl_key_password = zM7Ertq12&lt;br /&gt;
Naturally you are free to place the keys in a different location, and/or use a different name...&lt;br /&gt;
&lt;br /&gt;
==Finishing up==&lt;br /&gt;
&lt;br /&gt;
This is a good moment to test your configuration, if you haven&#039;t been able to test your work inbetween. If everything works as expected, you can add bells and whistles to your configuration.&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;smtpd&#039;&#039; TLS encryption===&lt;br /&gt;
The first addition we&#039;d like to present covers the way Postfix handles incoming connections. Since authentication works, we can have Postfix distrust every (unauthenticated) connection:&lt;br /&gt;
 postconf -e mynetworks=&lt;br /&gt;
Furthermore, since a default SSL certificate is installed by the Debian Postfix installation routine, we can encrypt all our connections using TLS; we enforce this using&lt;br /&gt;
 postconf -e smtpd_use_tls=yes&lt;br /&gt;
 postconf -e smtpd_tls_auth_only=yes&lt;br /&gt;
Of course, you need to adjust the settings of your IMAP client so that it properly uses TLS and properly authenticates itself.&lt;br /&gt;
&lt;br /&gt;
If TLS works, you&#039;ll probably want to change the certificate as you have for Dovecot in the previous section. This is again pretty easy. If you haven&#039;t yet, now is the time to [[Creating_digital_certificates_with_our_root_certificate | creating that custom SSL certificate]] for our mail server - but you have to make sure that you DON&#039;T use a password on the private key. Unlike Dovecot, Postfix cannot be told the password to the private key somewhere.&lt;br /&gt;
&lt;br /&gt;
For starters, look at the TLS-section of your &#039;&#039;main.cf&#039;&#039; that you currently have. Chances are a big chunk of it looks like this:&lt;br /&gt;
 # TLS parameters&lt;br /&gt;
 smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem&lt;br /&gt;
 smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key&lt;br /&gt;
 smtpd_use_tls=yes&lt;br /&gt;
Now all you need to do is replace the name of the snakeoil-keys with those of appropriate ssl-certificates, the private key of which needs to be NOT passphrase-protected. For this you could copy the Dovecot certificates, if you strip that passphrase in the manner described in the [[Creating_digital_certificates_with_our_root_certificate#Creating_an_SSL_certificate | SSL certificate section]]. The &#039;&#039;main.cf&#039;&#039; then would become:&lt;br /&gt;
 # TLS parameters&lt;br /&gt;
 smtpd_tls_cert_file=/etc/ssl/certs/postfix.pem&lt;br /&gt;
 smtpd_tls_key_file=/etc/ssl/private/postfix.key&lt;br /&gt;
 smtpd_use_tls=yes&lt;br /&gt;
Restart Postfix, and presto.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other additions ===&lt;br /&gt;
If everything &#039;&#039;still&#039;&#039; works after these changes, then congratulations, you now have a powerful, flexible and pretty secure mail setup. Of course, there are always points for improvements. We&#039;ll cover these in separate pages. One page that we want to direct you to now, is&lt;br /&gt;
* [[Antispam measures]] for our Postfix mailserver&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2441</id>
		<title>Asterisk basic configuration</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2441"/>
		<updated>2009-08-25T21:25:06Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* DAHDI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Asterisk basic configuration principles =&lt;br /&gt;
In this section we&#039;ll have a look at the basic configuration of an Asterisk PBX. Contrary to the TFOT-book, we&#039;ll be looking at it from the theory side, and from there go to an example configuration. For this example configuration, we&#039;ll start from a server with on the &amp;quot;outside&amp;quot; a POTS line and a SIP account with an Internet provider, and on the &amp;quot;inside&amp;quot; two analogue telephones and a SIP softphone. Our goal is to let the PBX behave as if we don&#039;t even have a PBX, but a standard home situation: for an incoming call, all phones ring; and every internal phone can make calls to the outside.&lt;br /&gt;
&lt;br /&gt;
= Asterisk channel configuration basics =&lt;br /&gt;
The first thing to realise is that Asterisk sees each connected telephony device as a &amp;quot;channel&amp;quot;. But what is a Channel? To Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
The second thing to realise, is that every type of device attached to the Asterisk PBX have their own specific configuration files. Correctly setting up each (set of) telephony devices makes them available in our Asterisk PBX as channels. Thus, the device configuration files serve as a kind of abstraction layer, and simplify our final Asterisk configuration by putting &amp;quot;channel-specific&amp;quot; information in separate files.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the previous Asterisk sections in this Wiki, or followed the first four chapters of the TFOT-book, then you&#039;ve encountered the following configuration files:&lt;br /&gt;
* &#039;&#039;zaptel.conf&#039;&#039; - in this file, you can set up the most basic parameters for your Zap-type hardware channels, most notably Digium telephony cards. You&#039;re configuring the hardware itself, via its driver. You could think of this file as belonging to the hardware, not Asterisk. If you&#039;d have other software on your machine besides Asterisk that could make use of your telephony hardware, then that&#039;d be influenced as well when you change &#039;&#039;zaptel.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;zapata.conf&#039;&#039; (and possibly &#039;&#039;zapata-channels.conf&#039;&#039; if you&#039;re on Debian) - this file handles the Asterisk-specific configuration of the hardware telephony channels. It thus &amp;quot;sets up the Zap channels&amp;quot; that Asterisk sees - for incoming and outgoing calls. All parameters that set up the channel are specified here.&lt;br /&gt;
* &#039;&#039;vpb.conf&#039;&#039; - this file is used to configure [http://www.voicetronix.com/ Voicetronix] cards with Asterisk. If you&#039;ve a Voicetronix card in use, then you&#039;ve also installed the Voicetronix drivers. This makes the card(s) useable under Linux. But to have Asterisk use the card(s), you need this &#039;&#039;vpb.conf&#039;&#039; file. It thus serves the same purpose as &#039;&#039;zapata.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;sip.conf&#039;&#039; - this file contains all information on all SIP devices that we want to connect to our Asterisk server; be it one or more SIP accounts with Internet providers, or SIP capable telephones (hardware or software). When &#039;&#039;sip.conf&#039;&#039; has been set up correctly, we can refer to a SIP device by a friendly name like [1000] or [Jane].&lt;br /&gt;
* &#039;&#039;iax.conf&#039;&#039; - this file is just the same as the &#039;&#039;sip.conf&#039;&#039; file, only it handles devices that talk IAX2 protocol instead of the SIP protocol.&lt;br /&gt;
These five files define all channels that our basic Asterisk PBX might handle (well, it won&#039;t even handle the last one, since we&#039;re not connecting any other Asterisk boxes or IAX-(soft)phones to our PBX, and it won&#039;t handle the third one if you don&#039;t have a Voicetronix card).&lt;br /&gt;
&lt;br /&gt;
As a reference, we&#039;re going to list the contents of four example files, and explain what they do in the way of preparing channels for our simple Asterisk server.:&lt;br /&gt;
==zaptel.conf==&lt;br /&gt;
 # Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 # Zaptel Configuration File&lt;br /&gt;
 #&lt;br /&gt;
 # This file is parsed by the Zaptel Configurator, ztcfg&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # It must be in the module loading order&lt;br /&gt;
 &lt;br /&gt;
 # Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 fxoks=1&lt;br /&gt;
 fxoks=2&lt;br /&gt;
 fxsks=3&lt;br /&gt;
 # channel 4, WCTDM, no module.&lt;br /&gt;
 &lt;br /&gt;
 # Global data&lt;br /&gt;
 &lt;br /&gt;
 loadzone        = nl&lt;br /&gt;
 defaultzone     = nl&lt;br /&gt;
This is a relatively simple file, configuring three Digium modules. As you can see, the &#039;&#039;genzaptelconf&#039;&#039; command has generated it for us. It belongs with a Digium TDM410P card, which has two FXS modules in positions 1 and 2, and one FXO module in position 3. The first two non-commented lines define the protocol that the FXS modules must &amp;quot;talk&amp;quot; with the attached devices, which &amp;quot;naturally&amp;quot; is the FXO protocol (yes, FXS talks FXO, and FXO talks FXS... a bit like electric current flowing from negative to positive. It&#039;s just a matter of definitions).&amp;lt;br&amp;gt;&lt;br /&gt;
The third line defines that the FXO module talks FXS protocol.&amp;lt;br&amp;gt;&lt;br /&gt;
The fourth line configures a set of indications to use for the defined channels. Since we&#039;re loading &amp;quot;nl&amp;quot;, we&#039;re configuring Dutch dialtones etcetera for the channels.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, the last line tell the server that any channel that does not have a zone assigned to it, should have the specified default zone configured - Dutch as well in this example.&amp;lt;br&amp;gt;&lt;br /&gt;
With this simple file, the driver for our example card (&#039;&#039;wctdm24xxp&#039;&#039;, by the way) can set up the hardware just as we want it. Now to tell Asterisk how to use it...&lt;br /&gt;
==zapata-channels.conf==&lt;br /&gt;
 ; Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 ; Zaptel Channels Configurations (zapata.conf)&lt;br /&gt;
 ;&lt;br /&gt;
 ; This is not intended to be a complete zapata.conf. Rather, it is intended&lt;br /&gt;
 ; to be #include-d by /etc/zapata.conf that will include the global settings&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 ;;; line=&amp;quot;1 WCTDM/0/0&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;2 WCTDM/0/1&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;3 WCTDM/0/2&amp;quot;&lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
 context=default&lt;br /&gt;
This second file is also auto-generated. It sets up three channels, associated with the three Digium hardware modules that we&#039;ve configured with &#039;&#039;zaptel.conf&#039;&#039;. Here, we also see how the channel numbers get assigned to the physical ports. The first module gets to be Zap channel 1 (&#039;&#039;&#039;Zap/1&#039;&#039;&#039;), the second &#039;&#039;&#039;Zap/2&#039;&#039;&#039; and so on. So if we would like our FXO module to be channel 1, and our FXS modules 2 and three, we could rotate the three channel numbers in this file. Probably we&#039;d then also want to rotate the &#039;&#039;callerid&#039;&#039;`s though... Furthermore, we don&#039;t think it&#039;s a good idea to assign channels to Zap devices in a different order than the devices are found in the system - meaning &amp;quot;stick with the default numbering as much as possible&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the way &#039;&#039;zapata-channels.conf&#039;&#039; is interpreted, means that any statement like &#039;&#039;signalling=fxs_ks&#039;&#039; actually &#039;&#039;sets&#039;&#039; the &#039;&#039;signalling&#039;&#039; parameter; when the &#039;&#039;channel =&amp;gt; 1&#039;&#039; line is reached, then all preceding parameter assignments are applied to that particular channel. This also means that if you somewhere have set a channel to belong to context &amp;quot;foo&amp;quot;, and then never set a context again, then every next channel also gets assigned to &amp;quot;foo&amp;quot;. So remember: if you don&#039;t see a parameter being set with a specific channel, you CANNOT assume that it then has it&#039;s default value; if a preceding channel has set that parameter to value &amp;quot;bar&amp;quot;, then for your specific channel, it is &amp;quot;bar&amp;quot; also.&lt;br /&gt;
&lt;br /&gt;
An interesting thing to see here is how &#039;&#039;genzaptelconf&#039;&#039; deals with the above concept. After defining each channel, it resets the most important parameters (a.o. the ones that should be unique with a channel) to empty or &amp;quot;default&amp;quot;. This means that if you yourself are very meticulous, you could do without that safety net, and rewrite the above configuration file as:&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
Note: we like the thoroughnes of the &#039;&#039;genzaptelconf&#039;&#039; configuration, but we like the readability of the second file more.&lt;br /&gt;
&lt;br /&gt;
==zapata.conf==&lt;br /&gt;
 [trunkgroups]&lt;br /&gt;
 &lt;br /&gt;
 [channels]&lt;br /&gt;
 switchtype=national&lt;br /&gt;
 rxwink=300              ; Atlas seems to use long (250ms) winks&lt;br /&gt;
 usecallerid=yes&lt;br /&gt;
 hidecallerid=no&lt;br /&gt;
 callwaiting=yes&lt;br /&gt;
 usecallingpres=yes&lt;br /&gt;
 callwaitingcallerid=yes&lt;br /&gt;
 threewaycalling=yes&lt;br /&gt;
 transfer=yes&lt;br /&gt;
 canpark=yes&lt;br /&gt;
 cancallforward=yes&lt;br /&gt;
 callreturn=yes&lt;br /&gt;
 echocancel=yes&lt;br /&gt;
 echocancelwhenbridged=yes&lt;br /&gt;
 rxgain=0.0&lt;br /&gt;
 txgain=0.0&lt;br /&gt;
 callgroup=1&lt;br /&gt;
 pickupgroup=1&lt;br /&gt;
 immediate=no&lt;br /&gt;
 #include zapata-channels.conf&lt;br /&gt;
Under Debian, &lt;br /&gt;
&lt;br /&gt;
==sip.conf==&lt;br /&gt;
&lt;br /&gt;
This is a sample configuration for VOIP with XS4ALL&lt;br /&gt;
&lt;br /&gt;
 ;;/etc/asterisk/sip.conf;;&lt;br /&gt;
 [general]&lt;br /&gt;
 context=default&lt;br /&gt;
 externip=setyoureiphere&lt;br /&gt;
 dtfmmode=inband&lt;br /&gt;
 localnet=192.168.70.0/24&lt;br /&gt;
 port=5060&lt;br /&gt;
 bindaddr=0.0.0.0&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
 registerattempts=0&lt;br /&gt;
 defaultexpiry=7200&lt;br /&gt;
 register =&amp;gt; 08787XXXXX:PASSWORD@sip.xs4all.nl/08787XXXXX&lt;br /&gt;
&lt;br /&gt;
 [xs4all]&lt;br /&gt;
 type=friend&lt;br /&gt;
 username=08787XXXXX&lt;br /&gt;
 fromuser=08787XXXXX&lt;br /&gt;
 fromdomain=sip.xs4all.nl&lt;br /&gt;
 secret=PASSWORD&lt;br /&gt;
 host=sip.xs4all.nl&lt;br /&gt;
 insecure=invite&lt;br /&gt;
 context=fromxs4all&lt;br /&gt;
 canreinvite=no&lt;br /&gt;
 dtmfmode=inband&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
&lt;br /&gt;
== DAHDI ==&lt;br /&gt;
&lt;br /&gt;
From asterisk version 1.4 zaptel is renamed in DAHDI witch stands for Digium Asterisk Hardware Device Interface. &lt;br /&gt;
If you installed the dahdi-tools (highly recommended) then you can configure you&#039;re hardware&lt;br /&gt;
&lt;br /&gt;
Conversion from zaptel&lt;br /&gt;
/etc/zaptel.conf Becomes /etc/dahdi/system.conf&lt;br /&gt;
/etc/asterisk/zapata.conf Becomes /etc/asterisk/chan_dahdi.conf &lt;br /&gt;
&lt;br /&gt;
Lets look at what we have&lt;br /&gt;
 #dahdi_tool&lt;br /&gt;
This will give a overview of the hardware and if it is configured or not. It will all so show alarms on the hardware.&lt;br /&gt;
&lt;br /&gt;
Now lets configure the card. First edit /etc/dadi/genconf_parameters. This file is used with dahdi_genconf and will produce /etc/dahdi-system.conf&lt;br /&gt;
*lc_country              nl&lt;br /&gt;
You can also set the echo cancelation here MG2 is default&lt;br /&gt;
 #dahdi_genconf&lt;br /&gt;
&lt;br /&gt;
 #dahdi_cfg -vv&lt;br /&gt;
 &lt;br /&gt;
 DAHDI Tools Version - 2.2.0&lt;br /&gt;
 DAHDI Version: 2.2.0.1&lt;br /&gt;
 Echo Canceller(s): MG2&lt;br /&gt;
 Configuration&lt;br /&gt;
 ======================&lt;br /&gt;
 Channel map:&lt;br /&gt;
  &lt;br /&gt;
 Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)&lt;br /&gt;
 Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)&lt;br /&gt;
 &lt;br /&gt;
 2 channels to configure.&lt;br /&gt;
 &lt;br /&gt;
 Setting echocan for channel 1 to mg2&lt;br /&gt;
 Setting echocan for channel 2 to mg2&lt;br /&gt;
&lt;br /&gt;
Check if the right module is loaded. &lt;br /&gt;
 #cat /etc/dahdi/modules&lt;br /&gt;
&lt;br /&gt;
You can configure the options of dahdi in /etc/asterisk/chan_dahdi.conf&lt;br /&gt;
for example turn off the echo cancelation&lt;br /&gt;
Also include this line #include dahdi-channels.conf in your chan_dahdi.conf (yes with the #) Otherwise you&#039;re asterisk will not see the channels.&lt;br /&gt;
&lt;br /&gt;
You can also check the channels in asterisk&lt;br /&gt;
 #asterisk -r&lt;br /&gt;
 #server*CLI&amp;gt; dahdi show channels&lt;br /&gt;
Or set the verbose level on asterisk to see more output&lt;br /&gt;
 #server*CLI&amp;gt; core set verbose 10&lt;br /&gt;
&lt;br /&gt;
I had some trouble with the sounds. When asterisk plays hello-world.gsm it sounded stutterd.&lt;br /&gt;
I did a &lt;br /&gt;
 #dahdi_test&lt;br /&gt;
This gives a readout from the timinsettings in asterisk. Mine was -133% and it should give a reading close to 100%.I did a&lt;br /&gt;
 #dahdi destroy channel 1&lt;br /&gt;
 #dahdi destroy channel 2&lt;br /&gt;
 #dahdi restart&lt;br /&gt;
Now i have 2 channels and no Pseudo channel (not shure were it&#039;s for)&lt;br /&gt;
Dahdi_test gives me 99,6% and the spound is good&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - contexts =&lt;br /&gt;
&lt;br /&gt;
A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called. &lt;br /&gt;
 [context]&lt;br /&gt;
 exten =&amp;gt; id, priority, command&lt;br /&gt;
&lt;br /&gt;
When Asterisk receives an incoming connection on a channel, Asterisk looks at the context defined for that channel for commands telling Asterisk what it should do. The context defines different sets of commands depending on what extension the user has dialed. For example, a context might provide one set of commands for what to do if the user dials &amp;quot;123&amp;quot;, and another set of commands for what to do if the user dials &amp;quot;9&amp;quot;, and another set of commands for what to do if the user dials any number beginning with &amp;quot;555&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For some kinds of connections — such incoming calls from an outside telephone line — the user has not dialed an extension. In that case, Asterisk behaves as if the user had dialed a special extension named &amp;quot;s&amp;quot; (for Start). Asterisk will look for an extension &amp;quot;number&amp;quot; s in the definition of the context for that channel for instructions about what it should do to handle the call.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say, for example, that you have a channel &amp;quot;Zap/1&amp;quot; which is a connection to a telephone handset in your building. And let&#039;s say that in the configuration file for Zap channels (zapata.conf), you have defined context=john for Zap channel 1. So when you use that handset to dial a number, Asterisk looks for a context with the name &amp;quot;john&amp;quot; in extensions.conf to find out what it should do. You begin the definition of a context in extensions.conf by putting the name of the context in square brackets on a line by itself, like this:&lt;br /&gt;
 [john]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== extensions.conf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [globals]&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 autofallthrough=yes&lt;br /&gt;
&lt;br /&gt;
 [default]&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
&lt;br /&gt;
 [fromxs4all]&lt;br /&gt;
 exten =&amp;gt; 08787XXXXX,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 08787XXXXX,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [outgoing]&lt;br /&gt;
 exten =&amp;gt; _X.,1,Dial(sip/xs4all/${EXTEN},60,r)&lt;br /&gt;
&lt;br /&gt;
 [internal]&lt;br /&gt;
 exten =&amp;gt; 6004,1,Dial(sip/6004)&lt;br /&gt;
 exten =&amp;gt; 6003,1,Dial(sip/6003)&lt;br /&gt;
 exten =&amp;gt; 6005,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 6006,1,Answer()&lt;br /&gt;
 exten =&amp;gt; 6006,n,Playback(hello-world)&lt;br /&gt;
 exten =&amp;gt; 6006,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [phones]&lt;br /&gt;
 include =&amp;gt; internal&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
 include =&amp;gt; outgoing&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Installing_SaMBa_with_OpenLDAP_support&amp;diff=2439</id>
		<title>Installing SaMBa with OpenLDAP support</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Installing_SaMBa_with_OpenLDAP_support&amp;diff=2439"/>
		<updated>2009-08-23T15:09:39Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* WINS configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Samba Section==&lt;br /&gt;
&lt;br /&gt;
== Preparations ==&lt;br /&gt;
First off, get yourself [http://oreilly.com/catalog/9780596007690/index.html this wonderful book] - and READ IT. Next, make sure our user backend of choice, OpenLDAP, is properly installed and can be used to authenticate users. If you haven&#039;t yet installed OpenLDAP, go to [[OpenLDAP | the relevant section]] of this wiki, and get going. Make sure your OpenLDAP is running well.&lt;br /&gt;
&lt;br /&gt;
=== Software installation ===&lt;br /&gt;
This is easy: using &#039;&#039;aptitude&#039;&#039;, install the following packages:&lt;br /&gt;
* &#039;&#039;samba&#039;&#039;, the actual server.&lt;br /&gt;
* &#039;&#039;samba-tools&#039;&#039;, a set of utilities.&lt;br /&gt;
* &#039;&#039;samba-doc&#039;&#039; - note that we NEED &#039;&#039;samba-doc&#039;&#039;, as this package contains a configuration file that we need (the LDAP schema file).&lt;br /&gt;
* &#039;&#039;smbclient&#039;&#039;, that can make your Linux server work with a Windows or SaMBa server; we need this to test our own server.&lt;br /&gt;
&lt;br /&gt;
As usual, Debian is asking us for the configuration details. For SaMBa 3.2, there are only two simple questions:&lt;br /&gt;
* What do you want to be your Windows workgroup name? (we provide the name &amp;quot;AMBER&amp;quot;)&lt;br /&gt;
* Do you want to modify &#039;&#039;smb.conf&#039;&#039; to use WINS setting from DHCP? (we provide &amp;quot;no&amp;quot;)&lt;br /&gt;
Now we have our SaMBa configuration file as &#039;&#039;/etc/samba/smb.conf&#039;&#039;, but we&#039;re going to follow two time-honoured tradions: we&#039;re going to save the original configuration file for future reference, and we&#039;re going to rename our configuration file to &#039;&#039;smb.conf.master&#039;&#039;, while providing SaMBa with a comment-stripped version of it:&lt;br /&gt;
 cd /etc/samba&lt;br /&gt;
 cp smb.conf smb.conf.sample&lt;br /&gt;
 mv smb.conf smb.conf.master&lt;br /&gt;
 testparm smb.conf.master&lt;br /&gt;
 testparm -s smb.conf.master &amp;gt; smb.conf&lt;br /&gt;
Now remember: when we want to change our SaMBa configuration, we edit &#039;&#039;smb.conf.master&#039;&#039;. Once we&#039;re ready with that, we ALWAYS need to run those last two lines; the first of those will check our updated configuration, to see if we haven&#039;t made some silly typo that renders the configuration wholly or partially crippled, and the second one creates a comment-stripped version of it that SaMBa will actually be using.&lt;br /&gt;
&lt;br /&gt;
=== WINS configuration ===&lt;br /&gt;
To enable WINS, we add the following lines to &#039;&#039;smb.conf.master&#039;&#039;:&lt;br /&gt;
 ## Browsing/Identification ###&lt;br /&gt;
    workgroup = AMBER&lt;br /&gt;
    netbios name = DWORKIN&lt;br /&gt;
&lt;br /&gt;
 # Windows Internet Name Serving Support Section:&lt;br /&gt;
 # WINS Support - Tells the NMBD component of Samba to enable its WINS Server&lt;br /&gt;
    wins support = yes&lt;br /&gt;
    os level = 33&lt;br /&gt;
    domain master = yes&lt;br /&gt;
    local master = yes&lt;br /&gt;
    preferred master = yes&lt;br /&gt;
    name resolve order = wins lmhosts hosts bcast&lt;br /&gt;
    dns proxy = yes&lt;br /&gt;
Now this does a whole lot of things with the SaMBa &#039;&#039;nmbd&#039;&#039; daemon - at least when you remember to save the master config file, test it with &#039;&#039;testparm&#039;&#039; and write the actual &#039;&#039;smb.conf&#039;&#039; as desribed previously, AND then restart your &#039;&#039;nmbd&#039;&#039; daemon:&lt;br /&gt;
 /etc/init.d/samba restart&lt;br /&gt;
OK so what do the configuration lines mean?&lt;br /&gt;
* &#039;&#039;workgroup = AMBER&#039;&#039; - this line makes the SaMBa server a member of workgroup AMBER.&lt;br /&gt;
* &#039;&#039;netbios name = DWORKIN&#039;&#039; - here we define the server NetBIOS name to be &amp;quot;dworkin&amp;quot;.&lt;br /&gt;
* &#039;&#039;wins support = yes&#039;&#039; - this line actually turns on the WINS support, so it instructs the &#039;&#039;nmbd&#039;&#039; daemon to start acting as a WINS server.&lt;br /&gt;
* &#039;&#039;os level = 33&#039;&#039; - this gives our WINS server a &amp;quot;rank&amp;quot; of 33, meaning that it will be sure to become the WINS master browser, even if there are Windows servers on the network tat act as domain controllers.&lt;br /&gt;
* &#039;&#039;domain master = yes&#039;&#039; - this will tell our server that it will not be just any master browser, but a &#039;&#039;&#039;domain&#039;&#039;&#039; master browser, so that our server will be the master browser on each and every subnet that it is connected to.&lt;br /&gt;
* &#039;&#039;local master = yes&#039;&#039; - this setting is vital to being a domain master browser, as it ensures that our WINS server is also the local master browser.&lt;br /&gt;
* &#039;&#039;preferred master = yes&#039;&#039; - adding this line makes the &#039;&#039;nmbd&#039;&#039; daemon initiate a browser election as soon as it starts up, so that it essentially gets the master browser role as fast as possible.&lt;br /&gt;
* &#039;&#039;name resolve order = wins lmhosts hosts bcast&#039;&#039; - this ensures that for a WINS request, the &#039;&#039;nmbd&#039;&#039; daemon not only checks its WINS database, but also the local &#039;&#039;lmhosts&#039;&#039; file (if it exists), the Linux &#039;&#039;/etc/hosts&#039;&#039; file, and finally, to revert to a broadcast to see if it can locate the requested name by shouting out for it.&lt;br /&gt;
* &#039;&#039;dns proxy = yes&#039;&#039; - this makes &#039;&#039;nmbd&#039;&#039; to check a requested name with the DNS server, if it cannot be found in the WINS database itself.&lt;br /&gt;
After restarting, we can see if our Linux server is now a WINS master browser by inspecting the SaMBa log file, by default &#039;&#039;/var/log/samba/nmbd.log&#039;&#039;. It should show something like&lt;br /&gt;
 [2008/11/21 16:18:03,  0] nmbd/nmbd.c:main(849)&lt;br /&gt;
   nmbd version 3.2.4 started.&lt;br /&gt;
   Copyright Andrew Tridgell and the Samba Team 1992-2008&lt;br /&gt;
 [2008/11/21 16:18:03,  0] nmbd/asyncdns.c:start_async_dns(155)&lt;br /&gt;
   started asyncdns process 25707&lt;br /&gt;
 [2008/11/21 16:18:03,  0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(336)&lt;br /&gt;
   become_domain_master_browser_wins:&lt;br /&gt;
   Attempting to become domain master browser on workgroup AMBER, subnet UNICAST_SUBNET.&lt;br /&gt;
 [2008/11/21 16:18:03,  0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_wins(350)&lt;br /&gt;
   become_domain_master_browser_wins: querying WINS server from IP 192.168.67.10 for domain master browser name AMBER&amp;lt;1b&amp;gt; on workgroup AMBER&lt;br /&gt;
 [2008/11/21 16:18:03,  0] nmbd/nmbd_become_dmb.c:become_domain_master_stage2(110)&lt;br /&gt;
   *****  &lt;br /&gt;
 &lt;br /&gt;
   Samba server DWORKIN is now a domain master browser for workgroup AMBER on subnet UNICAST_SUBNET&lt;br /&gt;
 &lt;br /&gt;
   *****&lt;br /&gt;
 [2008/11/21 16:18:03,  0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(291)&lt;br /&gt;
   become_domain_master_browser_bcast:&lt;br /&gt;
   Attempting to become domain master browser on workgroup AMBER on subnet 192.168.67.10&lt;br /&gt;
 [2008/11/21 16:18:03,  0] nmbd/nmbd_become_dmb.c:become_domain_master_browser_bcast(304)&lt;br /&gt;
   become_domain_master_browser_bcast: querying subnet 192.168.67.9 for domain master browser on workgroup AMBER&lt;br /&gt;
 [2008/11/21 16:18:11,  0] nmbd/nmbd_become_dmb.c:become_domain_master_stage2(110)&lt;br /&gt;
   *****&lt;br /&gt;
 &lt;br /&gt;
   Samba server DWORKIN is now a domain master browser for workgroup AMBER on subnet 192.168.67.10&lt;br /&gt;
 &lt;br /&gt;
   *****&lt;br /&gt;
 [2008/11/21 16:18:26,  0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(395)&lt;br /&gt;
   *****&lt;br /&gt;
 &lt;br /&gt;
   Samba name server DWORKIN is now a local master browser for workgroup AMBER on subnet 192.168.67.10&lt;br /&gt;
 &lt;br /&gt;
   *****&lt;br /&gt;
&lt;br /&gt;
Furthermore, we can test on the server itself if a WINS lookup succeeds:&lt;br /&gt;
 dworkin:# nmblookup -M amber&lt;br /&gt;
 querying amber on 127.255.255.255&lt;br /&gt;
 192.168.67.10 amber&amp;lt;1d&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, we tell our DHCP server to provide clients with the IP address of our WINS server. We do this by adding the following line to &#039;&#039;/etc/dhcp3-server/dhcpd.conf&#039;&#039;:&lt;br /&gt;
 option netbios-name-servers 192.168.67.10;&lt;br /&gt;
This line can either be added to the global section, or within the &#039;&#039;subnet&#039;&#039; declaration for each individual subnet that you want to inform of this WINS server.&lt;br /&gt;
&lt;br /&gt;
=== OpenLDAP adaptation ===&lt;br /&gt;
In order for our OpenLDAP server to recognise the SaMBa-specific attributes that we&#039;re going to use, we need to add the &amp;quot;samba&amp;quot; schema to the OpenLDAP server. After installation of &#039;&#039;samba-doc&#039;&#039;, we can find this schema in &#039;&#039;/usr/share/doc/samba-doc/examples/LDAP&#039;&#039;, where it sits gzipped between some other schema files; as the README explains, what we need is &#039;&#039;samba.schema.gz&#039;&#039;, so we unzip it and copy it to our OpenLDAP schema directory&lt;br /&gt;
 cd /usr/share/doc/samba-doc/examples/LDAP&lt;br /&gt;
 gunzip samba.schema.gz&lt;br /&gt;
 cp samba.schema /etc/ldap/schema&lt;br /&gt;
Next up, we include this schema into our LDAP configuration, by adding the following line to &#039;&#039;/etc/ldap/slapd.conf&#039;&#039;:&lt;br /&gt;
 include         /etc/ldap/schema/samba.schema&lt;br /&gt;
Not only do we need schema updates, we could also do with some more indices. Thus, we change the relevant section of &#039;&#039;/etc/ldap/slapd.conf&#039;&#039; to read:&lt;br /&gt;
 # Indexing options for database #1&lt;br /&gt;
 index     objectClass,uidNumber,gidNumber                eq&lt;br /&gt;
 index     cn,sn,uid,displayName                          pres,sub,eq&lt;br /&gt;
 index     memberUid,mail,givenname                       eq,subinitial&lt;br /&gt;
 index     sambaSID,sambaPrimaryGroupSID,sambaDomainName  eq&lt;br /&gt;
Ofcourse, it&#039;s not just enough to add these parameters, we also need to generate the indices, and restart our LDAP server:&lt;br /&gt;
 sudo invoke-rc.d slapd stop&lt;br /&gt;
 sudo -u openldap slapindex&lt;br /&gt;
 sudo invoke-rc.d slapd start&lt;br /&gt;
Check to see if the Samba objects are now usable in your LDAP server, e.g. by opening your LDAP Account Manager, and go to tools &amp;gt; schema browser; you should have objects like &amp;quot;sambaConfig&amp;quot; and &amp;quot;sambaDomain&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Feed OpenLDAP with Samba information===&lt;br /&gt;
Now we can add the Samba3 account information to our LDAP server. There are two ways of doing that: create an LDAP ldif file with the necessary information, or use the graphic LDAP manager to add it. For small amounts of users, the last way is quickest. What you need is to take two steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Add the SaMBa domain to the LDAP tree&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
For this step, as root you perform the following command&lt;br /&gt;
 net getlocalsid&lt;br /&gt;
This will a string like &amp;quot;SID for domain DWORKIN is: S-1-5-21-2406862431-3150385097-213705319&amp;quot;. With this SID, we can create the LDAP object that represents the SaMBa domain. To that end we log into our LDAP account manager, go to &amp;quot;Samba domains&amp;quot;, and create our domain. There are only three pieces of information that are mandatory:&lt;br /&gt;
* the domain name, in our example &amp;quot;amber&amp;quot;&lt;br /&gt;
* the forementioned SID, in our example &amp;quot;S-1-5-21-2406862431-3150385097-213705319&amp;quot;.&lt;br /&gt;
* the RID base; this has a default of 1000, which you should not change unless you know exactly what you&#039;re doing.&lt;br /&gt;
However, there are other options that you might find it worth setting, like the minimal password length, password history length, if users should be disconnected &amp;quot;outside logon hours&amp;quot; etcetera. We would advise you to not set too many options until you&#039;ve finished testing all basic functionality of your SaMBa server.&lt;br /&gt;
&lt;br /&gt;
In case you&#039;re curious, the LDAP ldif file for such an account could look like this:&lt;br /&gt;
 dn: sambaDomainName=amber,ou=domains,dc=saruman,dc=biz&lt;br /&gt;
 objectClass: sambaDomain&lt;br /&gt;
 sambaDomainName: amber&lt;br /&gt;
 sambaSID: S-1-5-21-2476862421-3150885297-210706319&lt;br /&gt;
 sambaAlgorithmicRidBase: 1000&lt;br /&gt;
 sambaMinPwdLength: 7&lt;br /&gt;
 sambaPwdHistoryLength: 5&lt;br /&gt;
 sambaLogonToChgPwd: 0&lt;br /&gt;
 sambaForceLogoff: -1&lt;br /&gt;
 sambaRefuseMachinePwdChange: 1&lt;br /&gt;
 &lt;br /&gt;
 dn: sambaDomainName=DWORKIN,dc=saruman,dc=biz&lt;br /&gt;
 objectClass: sambaDomain&lt;br /&gt;
 sambaDomainName: DWORKIN&lt;br /&gt;
 sambaSID: S-1-5-21-2476862421-3150885297-210706319&lt;br /&gt;
 sambaAlgorithmicRidBase: 1000&lt;br /&gt;
 sambaNextUserRid: 1000&lt;br /&gt;
 sambaMinPwdLength: 5&lt;br /&gt;
 sambaPwdHistoryLength: 0&lt;br /&gt;
 sambaLogonToChgPwd: 0&lt;br /&gt;
 sambaMaxPwdAge: -1&lt;br /&gt;
 sambaMinPwdAge: 0&lt;br /&gt;
 sambaLockoutDuration: 30&lt;br /&gt;
 sambaLockoutObservationWindow: 30&lt;br /&gt;
 sambaLockoutThreshold: 0&lt;br /&gt;
 sambaForceLogoff: -1&lt;br /&gt;
 sambaRefuseMachinePwdChange: 0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Add the SaMBa account information to LDAP user accounts&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Again we use our LDAP account manager, and we now go to a user that we want to provide access to SaMBa. When you choose to edit the user, there should be a tab &amp;quot;Samba 3&amp;quot;. In this tab, you can click the button &amp;quot;Add Samba 3 account&amp;quot;; until you&#039;ve done that, this user has no access at all to the Samba server.&amp;lt;br&amp;gt;&lt;br /&gt;
When adding (or changing) a users Samba account information, there is actually only one mandatory field:&lt;br /&gt;
* &amp;quot;Domain&amp;quot;: from this pulldown list you can choose the SaMBa/Windows domain that the user will belong to. When you have only your one SaMBa domain entered in your LDAP, this field will show the name of that domain.&lt;br /&gt;
Furthermore, there are a few more fields that you might want to fill. They are:&lt;br /&gt;
* &amp;quot;Display name&amp;quot;: the name that Windows shows for a user&lt;br /&gt;
* &amp;quot;Samba password&amp;quot;: this may be a different password from a Unix account that the user may have&lt;br /&gt;
* Windows group: this is the primary group that the user belongs to, from a SaMBa perspective instead of a Unix perspective.&lt;br /&gt;
Having added the necessary information, the user should be able from a Windows machine to browse the SaMBa server, and see all non-hidden shares that are available to him. Furthermore, from a Linux prompt, you could use &#039;&#039;smbclient&#039;&#039; to verify that SaMBa honours the users name and password:&lt;br /&gt;
 smbclient //192.168.67.10/Data -U jan&lt;br /&gt;
If the Data share has been made (for that: see further down), and if user &amp;quot;jan&amp;quot; has a Samba account in LDAP, and if you type the correct password, then you&#039;re greeted with an SMB client prompt:&lt;br /&gt;
 smb: \&amp;gt;&lt;br /&gt;
Here you can type commands like &amp;quot;dir&amp;quot;, &amp;quot;del&amp;quot; and &amp;quot;mkdir&amp;quot;; type &amp;quot;help&amp;quot; to see all available commands.&lt;br /&gt;
&lt;br /&gt;
== Samba configuration for LDAP authentication==&lt;br /&gt;
To get SaMBA to use OpenLDAP as a backend is actually quite straightforward.  The main work is done in &#039;&#039;smb.conf.master&#039;&#039;, where we add the following section:&lt;br /&gt;
 passdb backend = ldapsam:ldap://127.0.0.1&lt;br /&gt;
 ldap suffix = dc=saruman,dc=biz&lt;br /&gt;
 ldap machine suffix = ou=hosts&lt;br /&gt;
 ldap user suffix = ou=people&lt;br /&gt;
 ldap group suffix = ou=groups&lt;br /&gt;
 ldap admin dn = cn=admin,dc=saruman,dc=biz&lt;br /&gt;
 ldap delete dn = no&lt;br /&gt;
 # allow user privileges&lt;br /&gt;
 enable privileges = yes&lt;br /&gt;
One note: if you use &#039;&#039;testparm -s&#039;&#039; to test and convert &#039;&#039;smb.conf.master&#039;&#039;, then it&#039;s possible that your &#039;&#039;ldap suffix&#039;&#039; statement gets lower than one or more than the other &#039;&#039;ldap&#039;&#039; statements; you should rectify that before starting SaMBa, because otherwise SaMBa gets mighty confused, and cannot find the right LDAP OU&#039;s.&lt;br /&gt;
 &lt;br /&gt;
Now the above declares the LDAP account &#039;&#039;admin,saruman,biz&#039;&#039; to be the LDAP admin account - but SaMBa hasn&#039;t got the admin password yet, so it can&#039;t do much. To this end, we let SaMBa store the password for this admin account in its own little secret file &#039;&#039;/etc/samba/secrets.tdb&#039;&#039;. We do this by running&lt;br /&gt;
 smbpasswd -W&lt;br /&gt;
 Setting stored password for &amp;quot;cn=admin,dc=saruman,dc=biz&amp;quot; in secrets.tdb&lt;br /&gt;
 New SMB password:&lt;br /&gt;
 Retype new SMB password:&lt;br /&gt;
If we used a lowercase &#039;&#039;-w&#039;&#039;, then we could have specified the password on the command line (&#039;&#039;smbpasswd -w SuperSecret&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
= Samba share configuration =&lt;br /&gt;
With the above configuration, we should now be able to create a share, and make it available to our LDAP accounts. To this end, we create a directory that we&#039;re going to share, and give it a workable set of permissions. Suppose we have an LDAP user &amp;quot;jan&amp;quot; and an LDAP group &amp;quot;networkusers&amp;quot;. We could then, as root, do this:&lt;br /&gt;
 cd /data/samba&lt;br /&gt;
 mkdir Data&lt;br /&gt;
 chown jan:networkusers Data&lt;br /&gt;
 chmod g+rwxs,o-rwx Data&lt;br /&gt;
This ensures that user &amp;quot;jan&amp;quot;, as well as every user that&#039;s a member of &amp;quot;networkusers&amp;quot;, is allowed to read and write in this share. However, thanks to the &amp;quot;sticky bit&amp;quot; set for the group with the &#039;&#039;chmod&#039;&#039; command, files that are written to this directory are automatically owned by the group &amp;quot;networkusers&amp;quot;, who have read &amp;amp; write rights.&lt;br /&gt;
&lt;br /&gt;
Next step would be to share this directory, by adding the following section to &#039;&#039;smb.conf.master&#039;&#039;:&lt;br /&gt;
 [Data]&lt;br /&gt;
    comment = Data directory for us all&lt;br /&gt;
    browseable = yes&lt;br /&gt;
    path = /data/samba/Data&lt;br /&gt;
    guest ok = no&lt;br /&gt;
    read only = no&lt;br /&gt;
    create mask = 0770&lt;br /&gt;
    create directory mask = 0770&lt;br /&gt;
This makes the directory usable via the share &amp;quot;Data&amp;quot;. Notice that we do not allow unauthenticated users (&amp;quot;guest ok = no&amp;quot;), that we allow writing in this share (&amp;quot;read only = no&amp;quot;, although we could also have used &amp;quot;writeable = yes&amp;quot;, which is the same), and that we mask every create operation (for both files and directories) so that they can set any right under &amp;quot;user&amp;quot; and &amp;quot;group&amp;quot;, but cannot set any rights under &amp;quot;other&amp;quot;. This prevents anyone other than the &amp;quot;networkusers&amp;quot; to read (let alone write) the files in this share.&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_Installation_on_Lenny&amp;diff=2438</id>
		<title>Asterisk Installation on Lenny</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_Installation_on_Lenny&amp;diff=2438"/>
		<updated>2009-08-19T14:29:28Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Compile Asterisk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Asterisk installation on Lenny can be performed with ease using Aptitude. This brings you Asterisk version 1.4.20. Since this has a graphical GUI manager, it might be wise to add X to your server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Compile Asterisk =&lt;br /&gt;
&lt;br /&gt;
If you have a previous version of asterik first Backup config files /ets/asterisk and then uninstall it. From the original source files &lt;br /&gt;
 #make uninstall-all&lt;br /&gt;
&lt;br /&gt;
Get the latest version from http://www.asterisk.org/downloads&lt;br /&gt;
 #cd /usr/src&lt;br /&gt;
Get asterisk version 1.6.1.1&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.1.1.tar.gz&lt;br /&gt;
Get the DAHDI linux drivers&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.2.0.1.tar.gz&lt;br /&gt;
Get the DAHDI linux tools&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.2.0.tar.gz&lt;br /&gt;
Get the ISDN drivers (not sure if its still needed even if you don&#039;t have ISDN)&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.1.tar.gz&lt;br /&gt;
Get the Addon&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.1.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack all the tarballs&lt;br /&gt;
&lt;br /&gt;
Go to the asterisk 1.6.1.1 folder and launch the install script&lt;br /&gt;
 # ./configure&lt;br /&gt;
I had a C++ preprocessor &amp;quot;/lib/cpp&amp;quot; fails sanity check and needed to install g++&lt;br /&gt;
 #apt-get install g++&lt;br /&gt;
&lt;br /&gt;
 #make menuselect (OPTIONAL)&lt;br /&gt;
 #make&lt;br /&gt;
 #make install&lt;br /&gt;
 #make samples&lt;br /&gt;
 #make config&lt;br /&gt;
&lt;br /&gt;
 +---- Asterisk Installation Complete -------+&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +    YOU MUST READ THE SECURITY DOCUMENT    +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + Asterisk has successfully been installed. +&lt;br /&gt;
 + If you would like to install the sample   +&lt;br /&gt;
 + configuration files (overwriting any      +&lt;br /&gt;
 + existing config files), run:              +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +                make samples               +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +-----------------  or ---------------------+&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + You can go ahead and install the asterisk +&lt;br /&gt;
 + program documentation now or later run:   +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +               make progdocs               +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + **Note** This requires that you have      +&lt;br /&gt;
 + doxygen installed on your local system    +&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile DAHDI ==&lt;br /&gt;
&lt;br /&gt;
Go to the dahdi folder&lt;br /&gt;
 # make &lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
 ###################################################&lt;br /&gt;
 ###&lt;br /&gt;
 ### DAHDI installed successfully.&lt;br /&gt;
 ### If you have not done so before, install the package&lt;br /&gt;
 ### dahdi-tools.&lt;br /&gt;
 ###&lt;br /&gt;
&lt;br /&gt;
Go to dahdi-tools&lt;br /&gt;
First run the configure script or you get a error &amp;quot;no rule to make target &#039;makeopts&#039;&amp;quot;&lt;br /&gt;
 #./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install &lt;br /&gt;
&lt;br /&gt;
 ###################################################&lt;br /&gt;
 ###&lt;br /&gt;
 ### DAHDI tools installed successfully.&lt;br /&gt;
 ### If you have not done so before, install init scripts with:&lt;br /&gt;
 ###&lt;br /&gt;
 ###   make config&lt;br /&gt;
 ###&lt;br /&gt;
 ###################################################&lt;br /&gt;
&lt;br /&gt;
Go to the DAHDI tools folder&lt;br /&gt;
 # make config&lt;br /&gt;
&lt;br /&gt;
 install -D dahdi.init /etc/init.d/dahdi&lt;br /&gt;
 /usr/bin/install -c -D -m 644 init.conf.sample /etc/dahdi/init.conf&lt;br /&gt;
 /usr/bin/install -c -D -m 644 modules.sample /etc/dahdi/modules&lt;br /&gt;
 /usr/bin/install -c -D -m 644 xpp/genconf_parameters /etc/dahdi/genconf_parameters&lt;br /&gt;
 /usr/bin/install -c -D -m 644 modprobe.conf.sample /etc/modprobe.d/dahdi&lt;br /&gt;
 /usr/bin/install -c -D -m 644 blacklist.sample /etc/modprobe.d/dahdi.blacklist&lt;br /&gt;
 /usr/sbin/update-rc.d dahdi defaults 15 30&lt;br /&gt;
  Adding system startup for /etc/init.d/dahdi ...&lt;br /&gt;
    /etc/rc0.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
     /etc/rc1.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc6.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc2.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc3.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc4.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc5.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
 DAHDI has been configured.&lt;br /&gt;
&lt;br /&gt;
 List of detected DAHDI devices:&lt;br /&gt;
&lt;br /&gt;
 pci:0000:04:05.0     wctdm24xxp+  d161:8005 Wildcard TDM410P&lt;br /&gt;
&lt;br /&gt;
 run &#039;dahdi_genconf modules&#039; to load support for only&lt;br /&gt;
 the DAHDI hardware installed in this system.  By&lt;br /&gt;
 default support for all DAHDI hardware is loaded at&lt;br /&gt;
 DAHDI start.&lt;br /&gt;
 darktower:/usr/src/dahdi-tools-2.2.0#&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_Installation_on_Lenny&amp;diff=2437</id>
		<title>Asterisk Installation on Lenny</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_Installation_on_Lenny&amp;diff=2437"/>
		<updated>2009-08-19T13:46:22Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Compile Asterisk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Asterisk installation on Lenny can be performed with ease using Aptitude. This brings you Asterisk version 1.4.20. Since this has a graphical GUI manager, it might be wise to add X to your server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Compile Asterisk =&lt;br /&gt;
&lt;br /&gt;
If you have a previous version of asterik first Backup config files /ets/asterisk and then uninstall it. From the original source files &lt;br /&gt;
 #make uninstall-all&lt;br /&gt;
&lt;br /&gt;
Get the latest version from http://www.asterisk.org/downloads&lt;br /&gt;
 #cd /usr/src&lt;br /&gt;
Get asterisk version 1.6.1.1&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.1.1.tar.gz&lt;br /&gt;
Get the DAHDI linux drivers&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.2.0.1.tar.gz&lt;br /&gt;
Get the DAHDI linux tools&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.2.0.tar.gz&lt;br /&gt;
Get the ISDN drivers (not sure if its still needed even if you don&#039;t have ISDN)&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.1.tar.gz&lt;br /&gt;
Get the Addon&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.1.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack all the tarballs&lt;br /&gt;
&lt;br /&gt;
Go to the asterisk 1.6.1.1 folder and launch the install script&lt;br /&gt;
 #./install.pl&lt;br /&gt;
 # ./configure&lt;br /&gt;
 #make menuselect&lt;br /&gt;
 #make install&lt;br /&gt;
 #make&lt;br /&gt;
 #make install&lt;br /&gt;
 #make samples&lt;br /&gt;
 #make config&lt;br /&gt;
&lt;br /&gt;
 +---- Asterisk Installation Complete -------+&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +    YOU MUST READ THE SECURITY DOCUMENT    +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + Asterisk has successfully been installed. +&lt;br /&gt;
 + If you would like to install the sample   +&lt;br /&gt;
 + configuration files (overwriting any      +&lt;br /&gt;
 + existing config files), run:              +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +                make samples               +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +-----------------  or ---------------------+&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + You can go ahead and install the asterisk +&lt;br /&gt;
 + program documentation now or later run:   +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +               make progdocs               +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + **Note** This requires that you have      +&lt;br /&gt;
 + doxygen installed on your local system    +&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile DAHDI ==&lt;br /&gt;
&lt;br /&gt;
Go to the dahdi folder&lt;br /&gt;
 # make &lt;br /&gt;
&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
 ###################################################&lt;br /&gt;
 ###&lt;br /&gt;
 ### DAHDI installed successfully.&lt;br /&gt;
 ### If you have not done so before, install the package&lt;br /&gt;
 ### dahdi-tools.&lt;br /&gt;
 ###&lt;br /&gt;
&lt;br /&gt;
Go to dahdi-tools&lt;br /&gt;
First run the configure script or you get a error &amp;quot;no rule to make target &#039;makeopts&#039;&amp;quot;&lt;br /&gt;
 #./configure&lt;br /&gt;
 # make&lt;br /&gt;
 # make install &lt;br /&gt;
&lt;br /&gt;
 ###################################################&lt;br /&gt;
 ###&lt;br /&gt;
 ### DAHDI tools installed successfully.&lt;br /&gt;
 ### If you have not done so before, install init scripts with:&lt;br /&gt;
 ###&lt;br /&gt;
 ###   make config&lt;br /&gt;
 ###&lt;br /&gt;
 ###################################################&lt;br /&gt;
&lt;br /&gt;
Go to the DAHDI tools folder&lt;br /&gt;
 # make config&lt;br /&gt;
&lt;br /&gt;
 install -D dahdi.init /etc/init.d/dahdi&lt;br /&gt;
 /usr/bin/install -c -D -m 644 init.conf.sample /etc/dahdi/init.conf&lt;br /&gt;
 /usr/bin/install -c -D -m 644 modules.sample /etc/dahdi/modules&lt;br /&gt;
 /usr/bin/install -c -D -m 644 xpp/genconf_parameters /etc/dahdi/genconf_parameters&lt;br /&gt;
 /usr/bin/install -c -D -m 644 modprobe.conf.sample /etc/modprobe.d/dahdi&lt;br /&gt;
 /usr/bin/install -c -D -m 644 blacklist.sample /etc/modprobe.d/dahdi.blacklist&lt;br /&gt;
 /usr/sbin/update-rc.d dahdi defaults 15 30&lt;br /&gt;
  Adding system startup for /etc/init.d/dahdi ...&lt;br /&gt;
    /etc/rc0.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
     /etc/rc1.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc6.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc2.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc3.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc4.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc5.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
 DAHDI has been configured.&lt;br /&gt;
&lt;br /&gt;
 List of detected DAHDI devices:&lt;br /&gt;
&lt;br /&gt;
 pci:0000:04:05.0     wctdm24xxp+  d161:8005 Wildcard TDM410P&lt;br /&gt;
&lt;br /&gt;
 run &#039;dahdi_genconf modules&#039; to load support for only&lt;br /&gt;
 the DAHDI hardware installed in this system.  By&lt;br /&gt;
 default support for all DAHDI hardware is loaded at&lt;br /&gt;
 DAHDI start.&lt;br /&gt;
 darktower:/usr/src/dahdi-tools-2.2.0#&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_Installation_on_Lenny&amp;diff=2422</id>
		<title>Asterisk Installation on Lenny</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_Installation_on_Lenny&amp;diff=2422"/>
		<updated>2009-07-14T20:47:56Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Compile Asterisk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Asterisk installation on Lenny can be performed with ease using Aptitude. This brings you Asterisk version 1.4.20. Since this has a graphical GUI manager, it might be wise to add X to your server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Compile Asterisk =&lt;br /&gt;
&lt;br /&gt;
If you have a previous version of asterik first Backup config files /ets/asterisk and then uninstall it. From the original source files &lt;br /&gt;
 #make uninstall-all&lt;br /&gt;
&lt;br /&gt;
Get the latest version from http://www.asterisk.org/downloads&lt;br /&gt;
 #cd /usr/src&lt;br /&gt;
Get asterisk version 1.6.1.1&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.1.1.tar.gz&lt;br /&gt;
Get the DAHDI linux drivers&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.2.0.1.tar.gz&lt;br /&gt;
Get the DAHDI linux tools&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.2.0.tar.gz&lt;br /&gt;
Get the ISDN drivers (not sure if its still needed even if you don&#039;t have ISDN)&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.1.tar.gz&lt;br /&gt;
Get the Addon&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.1.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack all the tarballs&lt;br /&gt;
&lt;br /&gt;
Go to the asterisk 1.6.1.1 folder and launch the install script&lt;br /&gt;
 #./install.pl&lt;br /&gt;
 # ./configure&lt;br /&gt;
 #make menuselect&lt;br /&gt;
 #make install&lt;br /&gt;
 #make&lt;br /&gt;
 #make install&lt;br /&gt;
 #make samples&lt;br /&gt;
 #make config&lt;br /&gt;
&lt;br /&gt;
 +---- Asterisk Installation Complete -------+&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +    YOU MUST READ THE SECURITY DOCUMENT    +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + Asterisk has successfully been installed. +&lt;br /&gt;
 + If you would like to install the sample   +&lt;br /&gt;
 + configuration files (overwriting any      +&lt;br /&gt;
 + existing config files), run:              +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +                make samples               +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +-----------------  or ---------------------+&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + You can go ahead and install the asterisk +&lt;br /&gt;
 + program documentation now or later run:   +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 +               make progdocs               +&lt;br /&gt;
 +                                           +&lt;br /&gt;
 + **Note** This requires that you have      +&lt;br /&gt;
 + doxygen installed on your local system    +&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to the dahdi folder&lt;br /&gt;
 # make install&lt;br /&gt;
&lt;br /&gt;
 ###################################################&lt;br /&gt;
 ###&lt;br /&gt;
 ### DAHDI installed successfully.&lt;br /&gt;
 ### If you have not done so before, install the package&lt;br /&gt;
 ### dahdi-tools.&lt;br /&gt;
 ###&lt;br /&gt;
&lt;br /&gt;
Go to dahdi-tools&lt;br /&gt;
First run the configure script or you get a error &amp;quot;no rule to make target &#039;makeopts&#039;&amp;quot;&lt;br /&gt;
 #./configure&lt;br /&gt;
 # make install &lt;br /&gt;
&lt;br /&gt;
 ###################################################&lt;br /&gt;
 ###&lt;br /&gt;
 ### DAHDI tools installed successfully.&lt;br /&gt;
 ### If you have not done so before, install init scripts with:&lt;br /&gt;
 ###&lt;br /&gt;
 ###   make config&lt;br /&gt;
 ###&lt;br /&gt;
 ###################################################&lt;br /&gt;
&lt;br /&gt;
Go to the DAHDI tools folder&lt;br /&gt;
 # make config&lt;br /&gt;
&lt;br /&gt;
 install -D dahdi.init /etc/init.d/dahdi&lt;br /&gt;
 /usr/bin/install -c -D -m 644 init.conf.sample /etc/dahdi/init.conf&lt;br /&gt;
 /usr/bin/install -c -D -m 644 modules.sample /etc/dahdi/modules&lt;br /&gt;
 /usr/bin/install -c -D -m 644 xpp/genconf_parameters /etc/dahdi/genconf_parameters&lt;br /&gt;
 /usr/bin/install -c -D -m 644 modprobe.conf.sample /etc/modprobe.d/dahdi&lt;br /&gt;
 /usr/bin/install -c -D -m 644 blacklist.sample /etc/modprobe.d/dahdi.blacklist&lt;br /&gt;
 /usr/sbin/update-rc.d dahdi defaults 15 30&lt;br /&gt;
  Adding system startup for /etc/init.d/dahdi ...&lt;br /&gt;
    /etc/rc0.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
     /etc/rc1.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc6.d/K30dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc2.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc3.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc4.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
   /etc/rc5.d/S15dahdi -&amp;gt; ../init.d/dahdi&lt;br /&gt;
 DAHDI has been configured.&lt;br /&gt;
&lt;br /&gt;
 List of detected DAHDI devices:&lt;br /&gt;
&lt;br /&gt;
 pci:0000:04:05.0     wctdm24xxp+  d161:8005 Wildcard TDM410P&lt;br /&gt;
&lt;br /&gt;
 run &#039;dahdi_genconf modules&#039; to load support for only&lt;br /&gt;
 the DAHDI hardware installed in this system.  By&lt;br /&gt;
 default support for all DAHDI hardware is loaded at&lt;br /&gt;
 DAHDI start.&lt;br /&gt;
 darktower:/usr/src/dahdi-tools-2.2.0#&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2420</id>
		<title>Asterisk basic configuration</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2420"/>
		<updated>2009-07-13T09:46:31Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* DAHDI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Asterisk basic configuration principles =&lt;br /&gt;
In this section we&#039;ll have a look at the basic configuration of an Asterisk PBX. Contrary to the TFOT-book, we&#039;ll be looking at it from the theory side, and from there go to an example configuration. For this example configuration, we&#039;ll start from a server with on the &amp;quot;outside&amp;quot; a POTS line and a SIP account with an Internet provider, and on the &amp;quot;inside&amp;quot; two analogue telephones and a SIP softphone. Our goal is to let the PBX behave as if we don&#039;t even have a PBX, but a standard home situation: for an incoming call, all phones ring; and every internal phone can make calls to the outside.&lt;br /&gt;
&lt;br /&gt;
= Asterisk channel configuration basics =&lt;br /&gt;
The first thing to realise is that Asterisk sees each connected telephony device as a &amp;quot;channel&amp;quot;. But what is a Channel? To Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
The second thing to realise, is that every type of device attached to the Asterisk PBX have their own specific configuration files. Correctly setting up each (set of) telephony devices makes them available in our Asterisk PBX as channels. Thus, the device configuration files serve as a kind of abstraction layer, and simplify our final Asterisk configuration by putting &amp;quot;channel-specific&amp;quot; information in separate files.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the previous Asterisk sections in this Wiki, or followed the first four chapters of the TFOT-book, then you&#039;ve encountered the following configuration files:&lt;br /&gt;
* &#039;&#039;zaptel.conf&#039;&#039; - in this file, you can set up the most basic parameters for your Zap-type hardware channels, most notably Digium telephony cards. You&#039;re configuring the hardware itself, via its driver. You could think of this file as belonging to the hardware, not Asterisk. If you&#039;d have other software on your machine besides Asterisk that could make use of your telephony hardware, then that&#039;d be influenced as well when you change &#039;&#039;zaptel.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;zapata.conf&#039;&#039; (and possibly &#039;&#039;zapata-channels.conf&#039;&#039; if you&#039;re on Debian) - this file handles the Asterisk-specific configuration of the hardware telephony channels. It thus &amp;quot;sets up the Zap channels&amp;quot; that Asterisk sees - for incoming and outgoing calls. All parameters that set up the channel are specified here.&lt;br /&gt;
* &#039;&#039;vpb.conf&#039;&#039; - this file is used to configure [http://www.voicetronix.com/ Voicetronix] cards with Asterisk. If you&#039;ve a Voicetronix card in use, then you&#039;ve also installed the Voicetronix drivers. This makes the card(s) useable under Linux. But to have Asterisk use the card(s), you need this &#039;&#039;vpb.conf&#039;&#039; file. It thus serves the same purpose as &#039;&#039;zapata.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;sip.conf&#039;&#039; - this file contains all information on all SIP devices that we want to connect to our Asterisk server; be it one or more SIP accounts with Internet providers, or SIP capable telephones (hardware or software). When &#039;&#039;sip.conf&#039;&#039; has been set up correctly, we can refer to a SIP device by a friendly name like [1000] or [Jane].&lt;br /&gt;
* &#039;&#039;iax.conf&#039;&#039; - this file is just the same as the &#039;&#039;sip.conf&#039;&#039; file, only it handles devices that talk IAX2 protocol instead of the SIP protocol.&lt;br /&gt;
These five files define all channels that our basic Asterisk PBX might handle (well, it won&#039;t even handle the last one, since we&#039;re not connecting any other Asterisk boxes or IAX-(soft)phones to our PBX, and it won&#039;t handle the third one if you don&#039;t have a Voicetronix card).&lt;br /&gt;
&lt;br /&gt;
As a reference, we&#039;re going to list the contents of four example files, and explain what they do in the way of preparing channels for our simple Asterisk server.:&lt;br /&gt;
==zaptel.conf==&lt;br /&gt;
 # Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 # Zaptel Configuration File&lt;br /&gt;
 #&lt;br /&gt;
 # This file is parsed by the Zaptel Configurator, ztcfg&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # It must be in the module loading order&lt;br /&gt;
 &lt;br /&gt;
 # Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 fxoks=1&lt;br /&gt;
 fxoks=2&lt;br /&gt;
 fxsks=3&lt;br /&gt;
 # channel 4, WCTDM, no module.&lt;br /&gt;
 &lt;br /&gt;
 # Global data&lt;br /&gt;
 &lt;br /&gt;
 loadzone        = nl&lt;br /&gt;
 defaultzone     = nl&lt;br /&gt;
This is a relatively simple file, configuring three Digium modules. As you can see, the &#039;&#039;genzaptelconf&#039;&#039; command has generated it for us. It belongs with a Digium TDM410P card, which has two FXS modules in positions 1 and 2, and one FXO module in position 3. The first two non-commented lines define the protocol that the FXS modules must &amp;quot;talk&amp;quot; with the attached devices, which &amp;quot;naturally&amp;quot; is the FXO protocol (yes, FXS talks FXO, and FXO talks FXS... a bit like electric current flowing from negative to positive. It&#039;s just a matter of definitions).&amp;lt;br&amp;gt;&lt;br /&gt;
The third line defines that the FXO module talks FXS protocol.&amp;lt;br&amp;gt;&lt;br /&gt;
The fourth line configures a set of indications to use for the defined channels. Since we&#039;re loading &amp;quot;nl&amp;quot;, we&#039;re configuring Dutch dialtones etcetera for the channels.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, the last line tell the server that any channel that does not have a zone assigned to it, should have the specified default zone configured - Dutch as well in this example.&amp;lt;br&amp;gt;&lt;br /&gt;
With this simple file, the driver for our example card (&#039;&#039;wctdm24xxp&#039;&#039;, by the way) can set up the hardware just as we want it. Now to tell Asterisk how to use it...&lt;br /&gt;
==zapata-channels.conf==&lt;br /&gt;
 ; Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 ; Zaptel Channels Configurations (zapata.conf)&lt;br /&gt;
 ;&lt;br /&gt;
 ; This is not intended to be a complete zapata.conf. Rather, it is intended&lt;br /&gt;
 ; to be #include-d by /etc/zapata.conf that will include the global settings&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 ;;; line=&amp;quot;1 WCTDM/0/0&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;2 WCTDM/0/1&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;3 WCTDM/0/2&amp;quot;&lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
 context=default&lt;br /&gt;
This second file is also auto-generated. It sets up three channels, associated with the three Digium hardware modules that we&#039;ve configured with &#039;&#039;zaptel.conf&#039;&#039;. Here, we also see how the channel numbers get assigned to the physical ports. The first module gets to be Zap channel 1 (&#039;&#039;&#039;Zap/1&#039;&#039;&#039;), the second &#039;&#039;&#039;Zap/2&#039;&#039;&#039; and so on. So if we would like our FXO module to be channel 1, and our FXS modules 2 and three, we could rotate the three channel numbers in this file. Probably we&#039;d then also want to rotate the &#039;&#039;callerid&#039;&#039;`s though... Furthermore, we don&#039;t think it&#039;s a good idea to assign channels to Zap devices in a different order than the devices are found in the system - meaning &amp;quot;stick with the default numbering as much as possible&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the way &#039;&#039;zapata-channels.conf&#039;&#039; is interpreted, means that any statement like &#039;&#039;signalling=fxs_ks&#039;&#039; actually &#039;&#039;sets&#039;&#039; the &#039;&#039;signalling&#039;&#039; parameter; when the &#039;&#039;channel =&amp;gt; 1&#039;&#039; line is reached, then all preceding parameter assignments are applied to that particular channel. This also means that if you somewhere have set a channel to belong to context &amp;quot;foo&amp;quot;, and then never set a context again, then every next channel also gets assigned to &amp;quot;foo&amp;quot;. So remember: if you don&#039;t see a parameter being set with a specific channel, you CANNOT assume that it then has it&#039;s default value; if a preceding channel has set that parameter to value &amp;quot;bar&amp;quot;, then for your specific channel, it is &amp;quot;bar&amp;quot; also.&lt;br /&gt;
&lt;br /&gt;
An interesting thing to see here is how &#039;&#039;genzaptelconf&#039;&#039; deals with the above concept. After defining each channel, it resets the most important parameters (a.o. the ones that should be unique with a channel) to empty or &amp;quot;default&amp;quot;. This means that if you yourself are very meticulous, you could do without that safety net, and rewrite the above configuration file as:&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
Note: we like the thoroughnes of the &#039;&#039;genzaptelconf&#039;&#039; configuration, but we like the readability of the second file more.&lt;br /&gt;
&lt;br /&gt;
==zapata.conf==&lt;br /&gt;
 [trunkgroups]&lt;br /&gt;
 &lt;br /&gt;
 [channels]&lt;br /&gt;
 switchtype=national&lt;br /&gt;
 rxwink=300              ; Atlas seems to use long (250ms) winks&lt;br /&gt;
 usecallerid=yes&lt;br /&gt;
 hidecallerid=no&lt;br /&gt;
 callwaiting=yes&lt;br /&gt;
 usecallingpres=yes&lt;br /&gt;
 callwaitingcallerid=yes&lt;br /&gt;
 threewaycalling=yes&lt;br /&gt;
 transfer=yes&lt;br /&gt;
 canpark=yes&lt;br /&gt;
 cancallforward=yes&lt;br /&gt;
 callreturn=yes&lt;br /&gt;
 echocancel=yes&lt;br /&gt;
 echocancelwhenbridged=yes&lt;br /&gt;
 rxgain=0.0&lt;br /&gt;
 txgain=0.0&lt;br /&gt;
 callgroup=1&lt;br /&gt;
 pickupgroup=1&lt;br /&gt;
 immediate=no&lt;br /&gt;
 #include zapata-channels.conf&lt;br /&gt;
Under Debian, &lt;br /&gt;
&lt;br /&gt;
==sip.conf==&lt;br /&gt;
&lt;br /&gt;
This is a sample configuration for VOIP with XS4ALL&lt;br /&gt;
&lt;br /&gt;
 ;;/etc/asterisk/sip.conf;;&lt;br /&gt;
 [general]&lt;br /&gt;
 context=default&lt;br /&gt;
 externip=setyoureiphere&lt;br /&gt;
 dtfmmode=inband&lt;br /&gt;
 localnet=192.168.70.0/24&lt;br /&gt;
 port=5060&lt;br /&gt;
 bindaddr=0.0.0.0&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
 registerattempts=0&lt;br /&gt;
 defaultexpiry=7200&lt;br /&gt;
 register =&amp;gt; 08787XXXXX:PASSWORD@sip.xs4all.nl/08787XXXXX&lt;br /&gt;
&lt;br /&gt;
 [xs4all]&lt;br /&gt;
 type=friend&lt;br /&gt;
 username=08787XXXXX&lt;br /&gt;
 fromuser=08787XXXXX&lt;br /&gt;
 fromdomain=sip.xs4all.nl&lt;br /&gt;
 secret=PASSWORD&lt;br /&gt;
 host=sip.xs4all.nl&lt;br /&gt;
 insecure=invite&lt;br /&gt;
 context=fromxs4all&lt;br /&gt;
 canreinvite=no&lt;br /&gt;
 dtmfmode=inband&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
&lt;br /&gt;
== DAHDI ==&lt;br /&gt;
&lt;br /&gt;
From asterisk version 1.4 zaptel is renamed in DAHDI witch stands for Digium Asterisk Hardware Device Interface. &lt;br /&gt;
If you installed the dahdi-tools (highly recommended) then you can configure you&#039;re hardware&lt;br /&gt;
&lt;br /&gt;
Conversion from zaptel&lt;br /&gt;
/etc/zaptel.conf Becomes /etc/dahdi/system.conf&lt;br /&gt;
/etc/asterisk/zapata.conf Becomes /etc/asterisk/chan_dahdi.conf &lt;br /&gt;
&lt;br /&gt;
Lets look at what we have&lt;br /&gt;
 #dahdi_tool&lt;br /&gt;
This will give a overview of the hardware and if it is configured or not. It will all so show alarms on the hardware.&lt;br /&gt;
&lt;br /&gt;
Now lets configure the card. First edit /etc/dadi/genconf_parameters. This file is used with dahdi_genconf and will produce /etc/dahdi-system.conf&lt;br /&gt;
*lc_country              nl&lt;br /&gt;
You can also set the echo cancelation here MG2 is default&lt;br /&gt;
 #dahdi_genconf&lt;br /&gt;
&lt;br /&gt;
 #dahdi_cfg -vv&lt;br /&gt;
 &lt;br /&gt;
 DAHDI Tools Version - 2.2.0&lt;br /&gt;
 DAHDI Version: 2.2.0.1&lt;br /&gt;
 Echo Canceller(s): MG2&lt;br /&gt;
 Configuration&lt;br /&gt;
 ======================&lt;br /&gt;
 Channel map:&lt;br /&gt;
  &lt;br /&gt;
 Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)&lt;br /&gt;
 Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)&lt;br /&gt;
 &lt;br /&gt;
 2 channels to configure.&lt;br /&gt;
 &lt;br /&gt;
 Setting echocan for channel 1 to mg2&lt;br /&gt;
 Setting echocan for channel 2 to mg2&lt;br /&gt;
&lt;br /&gt;
Check if the right module is loaded. &lt;br /&gt;
 #cat /etc/dahdi/modules&lt;br /&gt;
&lt;br /&gt;
You can configure the options of dahdi in /etc/asterisk/chan_dahdi.conf&lt;br /&gt;
for example turn off the echo cancelation&lt;br /&gt;
&lt;br /&gt;
You can also check teh channels in asterisk&lt;br /&gt;
 #asterisk -r&lt;br /&gt;
 #server*CLI&amp;gt; dahdi show channels&lt;br /&gt;
Or set the verbose level on asterisk to see more output&lt;br /&gt;
 #server*CLI&amp;gt; core set verbose 10&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - contexts =&lt;br /&gt;
&lt;br /&gt;
A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called. &lt;br /&gt;
 [context]&lt;br /&gt;
 exten =&amp;gt; id, priority, command&lt;br /&gt;
&lt;br /&gt;
When Asterisk receives an incoming connection on a channel, Asterisk looks at the context defined for that channel for commands telling Asterisk what it should do. The context defines different sets of commands depending on what extension the user has dialed. For example, a context might provide one set of commands for what to do if the user dials &amp;quot;123&amp;quot;, and another set of commands for what to do if the user dials &amp;quot;9&amp;quot;, and another set of commands for what to do if the user dials any number beginning with &amp;quot;555&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For some kinds of connections — such incoming calls from an outside telephone line — the user has not dialed an extension. In that case, Asterisk behaves as if the user had dialed a special extension named &amp;quot;s&amp;quot; (for Start). Asterisk will look for an extension &amp;quot;number&amp;quot; s in the definition of the context for that channel for instructions about what it should do to handle the call.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say, for example, that you have a channel &amp;quot;Zap/1&amp;quot; which is a connection to a telephone handset in your building. And let&#039;s say that in the configuration file for Zap channels (zapata.conf), you have defined context=john for Zap channel 1. So when you use that handset to dial a number, Asterisk looks for a context with the name &amp;quot;john&amp;quot; in extensions.conf to find out what it should do. You begin the definition of a context in extensions.conf by putting the name of the context in square brackets on a line by itself, like this:&lt;br /&gt;
 [john]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== extensions.conf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [globals]&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 autofallthrough=yes&lt;br /&gt;
&lt;br /&gt;
 [default]&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
&lt;br /&gt;
 [fromxs4all]&lt;br /&gt;
 exten =&amp;gt; 08787XXXXX,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 08787XXXXX,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [outgoing]&lt;br /&gt;
 exten =&amp;gt; _X.,1,Dial(sip/xs4all/${EXTEN},60,r)&lt;br /&gt;
&lt;br /&gt;
 [internal]&lt;br /&gt;
 exten =&amp;gt; 6004,1,Dial(sip/6004)&lt;br /&gt;
 exten =&amp;gt; 6003,1,Dial(sip/6003)&lt;br /&gt;
 exten =&amp;gt; 6005,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 6006,1,Answer()&lt;br /&gt;
 exten =&amp;gt; 6006,n,Playback(hello-world)&lt;br /&gt;
 exten =&amp;gt; 6006,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [phones]&lt;br /&gt;
 include =&amp;gt; internal&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
 include =&amp;gt; outgoing&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2419</id>
		<title>Asterisk basic configuration</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2419"/>
		<updated>2009-07-13T09:42:01Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* sip.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Asterisk basic configuration principles =&lt;br /&gt;
In this section we&#039;ll have a look at the basic configuration of an Asterisk PBX. Contrary to the TFOT-book, we&#039;ll be looking at it from the theory side, and from there go to an example configuration. For this example configuration, we&#039;ll start from a server with on the &amp;quot;outside&amp;quot; a POTS line and a SIP account with an Internet provider, and on the &amp;quot;inside&amp;quot; two analogue telephones and a SIP softphone. Our goal is to let the PBX behave as if we don&#039;t even have a PBX, but a standard home situation: for an incoming call, all phones ring; and every internal phone can make calls to the outside.&lt;br /&gt;
&lt;br /&gt;
= Asterisk channel configuration basics =&lt;br /&gt;
The first thing to realise is that Asterisk sees each connected telephony device as a &amp;quot;channel&amp;quot;. But what is a Channel? To Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
The second thing to realise, is that every type of device attached to the Asterisk PBX have their own specific configuration files. Correctly setting up each (set of) telephony devices makes them available in our Asterisk PBX as channels. Thus, the device configuration files serve as a kind of abstraction layer, and simplify our final Asterisk configuration by putting &amp;quot;channel-specific&amp;quot; information in separate files.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the previous Asterisk sections in this Wiki, or followed the first four chapters of the TFOT-book, then you&#039;ve encountered the following configuration files:&lt;br /&gt;
* &#039;&#039;zaptel.conf&#039;&#039; - in this file, you can set up the most basic parameters for your Zap-type hardware channels, most notably Digium telephony cards. You&#039;re configuring the hardware itself, via its driver. You could think of this file as belonging to the hardware, not Asterisk. If you&#039;d have other software on your machine besides Asterisk that could make use of your telephony hardware, then that&#039;d be influenced as well when you change &#039;&#039;zaptel.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;zapata.conf&#039;&#039; (and possibly &#039;&#039;zapata-channels.conf&#039;&#039; if you&#039;re on Debian) - this file handles the Asterisk-specific configuration of the hardware telephony channels. It thus &amp;quot;sets up the Zap channels&amp;quot; that Asterisk sees - for incoming and outgoing calls. All parameters that set up the channel are specified here.&lt;br /&gt;
* &#039;&#039;vpb.conf&#039;&#039; - this file is used to configure [http://www.voicetronix.com/ Voicetronix] cards with Asterisk. If you&#039;ve a Voicetronix card in use, then you&#039;ve also installed the Voicetronix drivers. This makes the card(s) useable under Linux. But to have Asterisk use the card(s), you need this &#039;&#039;vpb.conf&#039;&#039; file. It thus serves the same purpose as &#039;&#039;zapata.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;sip.conf&#039;&#039; - this file contains all information on all SIP devices that we want to connect to our Asterisk server; be it one or more SIP accounts with Internet providers, or SIP capable telephones (hardware or software). When &#039;&#039;sip.conf&#039;&#039; has been set up correctly, we can refer to a SIP device by a friendly name like [1000] or [Jane].&lt;br /&gt;
* &#039;&#039;iax.conf&#039;&#039; - this file is just the same as the &#039;&#039;sip.conf&#039;&#039; file, only it handles devices that talk IAX2 protocol instead of the SIP protocol.&lt;br /&gt;
These five files define all channels that our basic Asterisk PBX might handle (well, it won&#039;t even handle the last one, since we&#039;re not connecting any other Asterisk boxes or IAX-(soft)phones to our PBX, and it won&#039;t handle the third one if you don&#039;t have a Voicetronix card).&lt;br /&gt;
&lt;br /&gt;
As a reference, we&#039;re going to list the contents of four example files, and explain what they do in the way of preparing channels for our simple Asterisk server.:&lt;br /&gt;
==zaptel.conf==&lt;br /&gt;
 # Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 # Zaptel Configuration File&lt;br /&gt;
 #&lt;br /&gt;
 # This file is parsed by the Zaptel Configurator, ztcfg&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # It must be in the module loading order&lt;br /&gt;
 &lt;br /&gt;
 # Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 fxoks=1&lt;br /&gt;
 fxoks=2&lt;br /&gt;
 fxsks=3&lt;br /&gt;
 # channel 4, WCTDM, no module.&lt;br /&gt;
 &lt;br /&gt;
 # Global data&lt;br /&gt;
 &lt;br /&gt;
 loadzone        = nl&lt;br /&gt;
 defaultzone     = nl&lt;br /&gt;
This is a relatively simple file, configuring three Digium modules. As you can see, the &#039;&#039;genzaptelconf&#039;&#039; command has generated it for us. It belongs with a Digium TDM410P card, which has two FXS modules in positions 1 and 2, and one FXO module in position 3. The first two non-commented lines define the protocol that the FXS modules must &amp;quot;talk&amp;quot; with the attached devices, which &amp;quot;naturally&amp;quot; is the FXO protocol (yes, FXS talks FXO, and FXO talks FXS... a bit like electric current flowing from negative to positive. It&#039;s just a matter of definitions).&amp;lt;br&amp;gt;&lt;br /&gt;
The third line defines that the FXO module talks FXS protocol.&amp;lt;br&amp;gt;&lt;br /&gt;
The fourth line configures a set of indications to use for the defined channels. Since we&#039;re loading &amp;quot;nl&amp;quot;, we&#039;re configuring Dutch dialtones etcetera for the channels.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, the last line tell the server that any channel that does not have a zone assigned to it, should have the specified default zone configured - Dutch as well in this example.&amp;lt;br&amp;gt;&lt;br /&gt;
With this simple file, the driver for our example card (&#039;&#039;wctdm24xxp&#039;&#039;, by the way) can set up the hardware just as we want it. Now to tell Asterisk how to use it...&lt;br /&gt;
==zapata-channels.conf==&lt;br /&gt;
 ; Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 ; Zaptel Channels Configurations (zapata.conf)&lt;br /&gt;
 ;&lt;br /&gt;
 ; This is not intended to be a complete zapata.conf. Rather, it is intended&lt;br /&gt;
 ; to be #include-d by /etc/zapata.conf that will include the global settings&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 ;;; line=&amp;quot;1 WCTDM/0/0&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;2 WCTDM/0/1&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;3 WCTDM/0/2&amp;quot;&lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
 context=default&lt;br /&gt;
This second file is also auto-generated. It sets up three channels, associated with the three Digium hardware modules that we&#039;ve configured with &#039;&#039;zaptel.conf&#039;&#039;. Here, we also see how the channel numbers get assigned to the physical ports. The first module gets to be Zap channel 1 (&#039;&#039;&#039;Zap/1&#039;&#039;&#039;), the second &#039;&#039;&#039;Zap/2&#039;&#039;&#039; and so on. So if we would like our FXO module to be channel 1, and our FXS modules 2 and three, we could rotate the three channel numbers in this file. Probably we&#039;d then also want to rotate the &#039;&#039;callerid&#039;&#039;`s though... Furthermore, we don&#039;t think it&#039;s a good idea to assign channels to Zap devices in a different order than the devices are found in the system - meaning &amp;quot;stick with the default numbering as much as possible&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the way &#039;&#039;zapata-channels.conf&#039;&#039; is interpreted, means that any statement like &#039;&#039;signalling=fxs_ks&#039;&#039; actually &#039;&#039;sets&#039;&#039; the &#039;&#039;signalling&#039;&#039; parameter; when the &#039;&#039;channel =&amp;gt; 1&#039;&#039; line is reached, then all preceding parameter assignments are applied to that particular channel. This also means that if you somewhere have set a channel to belong to context &amp;quot;foo&amp;quot;, and then never set a context again, then every next channel also gets assigned to &amp;quot;foo&amp;quot;. So remember: if you don&#039;t see a parameter being set with a specific channel, you CANNOT assume that it then has it&#039;s default value; if a preceding channel has set that parameter to value &amp;quot;bar&amp;quot;, then for your specific channel, it is &amp;quot;bar&amp;quot; also.&lt;br /&gt;
&lt;br /&gt;
An interesting thing to see here is how &#039;&#039;genzaptelconf&#039;&#039; deals with the above concept. After defining each channel, it resets the most important parameters (a.o. the ones that should be unique with a channel) to empty or &amp;quot;default&amp;quot;. This means that if you yourself are very meticulous, you could do without that safety net, and rewrite the above configuration file as:&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
Note: we like the thoroughnes of the &#039;&#039;genzaptelconf&#039;&#039; configuration, but we like the readability of the second file more.&lt;br /&gt;
&lt;br /&gt;
==zapata.conf==&lt;br /&gt;
 [trunkgroups]&lt;br /&gt;
 &lt;br /&gt;
 [channels]&lt;br /&gt;
 switchtype=national&lt;br /&gt;
 rxwink=300              ; Atlas seems to use long (250ms) winks&lt;br /&gt;
 usecallerid=yes&lt;br /&gt;
 hidecallerid=no&lt;br /&gt;
 callwaiting=yes&lt;br /&gt;
 usecallingpres=yes&lt;br /&gt;
 callwaitingcallerid=yes&lt;br /&gt;
 threewaycalling=yes&lt;br /&gt;
 transfer=yes&lt;br /&gt;
 canpark=yes&lt;br /&gt;
 cancallforward=yes&lt;br /&gt;
 callreturn=yes&lt;br /&gt;
 echocancel=yes&lt;br /&gt;
 echocancelwhenbridged=yes&lt;br /&gt;
 rxgain=0.0&lt;br /&gt;
 txgain=0.0&lt;br /&gt;
 callgroup=1&lt;br /&gt;
 pickupgroup=1&lt;br /&gt;
 immediate=no&lt;br /&gt;
 #include zapata-channels.conf&lt;br /&gt;
Under Debian, &lt;br /&gt;
&lt;br /&gt;
==sip.conf==&lt;br /&gt;
&lt;br /&gt;
This is a sample configuration for VOIP with XS4ALL&lt;br /&gt;
&lt;br /&gt;
 ;;/etc/asterisk/sip.conf;;&lt;br /&gt;
 [general]&lt;br /&gt;
 context=default&lt;br /&gt;
 externip=setyoureiphere&lt;br /&gt;
 dtfmmode=inband&lt;br /&gt;
 localnet=192.168.70.0/24&lt;br /&gt;
 port=5060&lt;br /&gt;
 bindaddr=0.0.0.0&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
 registerattempts=0&lt;br /&gt;
 defaultexpiry=7200&lt;br /&gt;
 register =&amp;gt; 08787XXXXX:PASSWORD@sip.xs4all.nl/08787XXXXX&lt;br /&gt;
&lt;br /&gt;
 [xs4all]&lt;br /&gt;
 type=friend&lt;br /&gt;
 username=08787XXXXX&lt;br /&gt;
 fromuser=08787XXXXX&lt;br /&gt;
 fromdomain=sip.xs4all.nl&lt;br /&gt;
 secret=PASSWORD&lt;br /&gt;
 host=sip.xs4all.nl&lt;br /&gt;
 insecure=invite&lt;br /&gt;
 context=fromxs4all&lt;br /&gt;
 canreinvite=no&lt;br /&gt;
 dtmfmode=inband&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
&lt;br /&gt;
== DAHDI ==&lt;br /&gt;
&lt;br /&gt;
From asterisk version 1.4 zaptel is renamed in DAHDI witch stands for Digium Asterisk Hardware Device Interface. &lt;br /&gt;
If you installed the dahdi-tools (highly recommended) then you can configure you&#039;re hardware&lt;br /&gt;
&lt;br /&gt;
Conversion from zaptel&lt;br /&gt;
/etc/zaptel.conf Becomes /etc/dahdi/system.conf&lt;br /&gt;
/etc/asterisk/zapata.conf Becomes /etc/asterisk/chan_dahdi.conf &lt;br /&gt;
&lt;br /&gt;
Lets look at what we have&lt;br /&gt;
 #dahdi_tool&lt;br /&gt;
This will give a overview of the hardware and if it is configured or not. It will all so show alarms on the hardware.&lt;br /&gt;
&lt;br /&gt;
Now lets configure the card. First edit /etc/dadi/genconf_parameters. This file is used with dahdi_genconf and will produce /etc/dahdi-system.conf&lt;br /&gt;
*lc_country              nl&lt;br /&gt;
You can also set the echo cancelation here MG2 is default&lt;br /&gt;
 #dahdi_genconf&lt;br /&gt;
&lt;br /&gt;
 #dahdi_cfg -vv&lt;br /&gt;
 &lt;br /&gt;
 DAHDI Tools Version - 2.2.0&lt;br /&gt;
 DAHDI Version: 2.2.0.1&lt;br /&gt;
 Echo Canceller(s): MG2&lt;br /&gt;
 Configuration&lt;br /&gt;
 ======================&lt;br /&gt;
 Channel map:&lt;br /&gt;
  &lt;br /&gt;
 Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)&lt;br /&gt;
 Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)&lt;br /&gt;
 &lt;br /&gt;
 2 channels to configure.&lt;br /&gt;
 &lt;br /&gt;
 Setting echocan for channel 1 to mg2&lt;br /&gt;
 Setting echocan for channel 2 to mg2&lt;br /&gt;
&lt;br /&gt;
Check if the right module is loaded. &lt;br /&gt;
 #cat /etc/dahdi/modules&lt;br /&gt;
&lt;br /&gt;
You can configure the options of dahdi in /etc/asterisk/chan_dahdi.conf&lt;br /&gt;
for example turn off the echo cancelation&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - contexts =&lt;br /&gt;
&lt;br /&gt;
A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called. &lt;br /&gt;
 [context]&lt;br /&gt;
 exten =&amp;gt; id, priority, command&lt;br /&gt;
&lt;br /&gt;
When Asterisk receives an incoming connection on a channel, Asterisk looks at the context defined for that channel for commands telling Asterisk what it should do. The context defines different sets of commands depending on what extension the user has dialed. For example, a context might provide one set of commands for what to do if the user dials &amp;quot;123&amp;quot;, and another set of commands for what to do if the user dials &amp;quot;9&amp;quot;, and another set of commands for what to do if the user dials any number beginning with &amp;quot;555&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For some kinds of connections — such incoming calls from an outside telephone line — the user has not dialed an extension. In that case, Asterisk behaves as if the user had dialed a special extension named &amp;quot;s&amp;quot; (for Start). Asterisk will look for an extension &amp;quot;number&amp;quot; s in the definition of the context for that channel for instructions about what it should do to handle the call.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say, for example, that you have a channel &amp;quot;Zap/1&amp;quot; which is a connection to a telephone handset in your building. And let&#039;s say that in the configuration file for Zap channels (zapata.conf), you have defined context=john for Zap channel 1. So when you use that handset to dial a number, Asterisk looks for a context with the name &amp;quot;john&amp;quot; in extensions.conf to find out what it should do. You begin the definition of a context in extensions.conf by putting the name of the context in square brackets on a line by itself, like this:&lt;br /&gt;
 [john]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== extensions.conf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [globals]&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 autofallthrough=yes&lt;br /&gt;
&lt;br /&gt;
 [default]&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
&lt;br /&gt;
 [fromxs4all]&lt;br /&gt;
 exten =&amp;gt; 08787XXXXX,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 08787XXXXX,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [outgoing]&lt;br /&gt;
 exten =&amp;gt; _X.,1,Dial(sip/xs4all/${EXTEN},60,r)&lt;br /&gt;
&lt;br /&gt;
 [internal]&lt;br /&gt;
 exten =&amp;gt; 6004,1,Dial(sip/6004)&lt;br /&gt;
 exten =&amp;gt; 6003,1,Dial(sip/6003)&lt;br /&gt;
 exten =&amp;gt; 6005,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 6006,1,Answer()&lt;br /&gt;
 exten =&amp;gt; 6006,n,Playback(hello-world)&lt;br /&gt;
 exten =&amp;gt; 6006,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [phones]&lt;br /&gt;
 include =&amp;gt; internal&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
 include =&amp;gt; outgoing&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2418</id>
		<title>Asterisk basic configuration</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2418"/>
		<updated>2009-07-13T09:40:47Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* extensions.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Asterisk basic configuration principles =&lt;br /&gt;
In this section we&#039;ll have a look at the basic configuration of an Asterisk PBX. Contrary to the TFOT-book, we&#039;ll be looking at it from the theory side, and from there go to an example configuration. For this example configuration, we&#039;ll start from a server with on the &amp;quot;outside&amp;quot; a POTS line and a SIP account with an Internet provider, and on the &amp;quot;inside&amp;quot; two analogue telephones and a SIP softphone. Our goal is to let the PBX behave as if we don&#039;t even have a PBX, but a standard home situation: for an incoming call, all phones ring; and every internal phone can make calls to the outside.&lt;br /&gt;
&lt;br /&gt;
= Asterisk channel configuration basics =&lt;br /&gt;
The first thing to realise is that Asterisk sees each connected telephony device as a &amp;quot;channel&amp;quot;. But what is a Channel? To Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
The second thing to realise, is that every type of device attached to the Asterisk PBX have their own specific configuration files. Correctly setting up each (set of) telephony devices makes them available in our Asterisk PBX as channels. Thus, the device configuration files serve as a kind of abstraction layer, and simplify our final Asterisk configuration by putting &amp;quot;channel-specific&amp;quot; information in separate files.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the previous Asterisk sections in this Wiki, or followed the first four chapters of the TFOT-book, then you&#039;ve encountered the following configuration files:&lt;br /&gt;
* &#039;&#039;zaptel.conf&#039;&#039; - in this file, you can set up the most basic parameters for your Zap-type hardware channels, most notably Digium telephony cards. You&#039;re configuring the hardware itself, via its driver. You could think of this file as belonging to the hardware, not Asterisk. If you&#039;d have other software on your machine besides Asterisk that could make use of your telephony hardware, then that&#039;d be influenced as well when you change &#039;&#039;zaptel.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;zapata.conf&#039;&#039; (and possibly &#039;&#039;zapata-channels.conf&#039;&#039; if you&#039;re on Debian) - this file handles the Asterisk-specific configuration of the hardware telephony channels. It thus &amp;quot;sets up the Zap channels&amp;quot; that Asterisk sees - for incoming and outgoing calls. All parameters that set up the channel are specified here.&lt;br /&gt;
* &#039;&#039;vpb.conf&#039;&#039; - this file is used to configure [http://www.voicetronix.com/ Voicetronix] cards with Asterisk. If you&#039;ve a Voicetronix card in use, then you&#039;ve also installed the Voicetronix drivers. This makes the card(s) useable under Linux. But to have Asterisk use the card(s), you need this &#039;&#039;vpb.conf&#039;&#039; file. It thus serves the same purpose as &#039;&#039;zapata.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;sip.conf&#039;&#039; - this file contains all information on all SIP devices that we want to connect to our Asterisk server; be it one or more SIP accounts with Internet providers, or SIP capable telephones (hardware or software). When &#039;&#039;sip.conf&#039;&#039; has been set up correctly, we can refer to a SIP device by a friendly name like [1000] or [Jane].&lt;br /&gt;
* &#039;&#039;iax.conf&#039;&#039; - this file is just the same as the &#039;&#039;sip.conf&#039;&#039; file, only it handles devices that talk IAX2 protocol instead of the SIP protocol.&lt;br /&gt;
These five files define all channels that our basic Asterisk PBX might handle (well, it won&#039;t even handle the last one, since we&#039;re not connecting any other Asterisk boxes or IAX-(soft)phones to our PBX, and it won&#039;t handle the third one if you don&#039;t have a Voicetronix card).&lt;br /&gt;
&lt;br /&gt;
As a reference, we&#039;re going to list the contents of four example files, and explain what they do in the way of preparing channels for our simple Asterisk server.:&lt;br /&gt;
==zaptel.conf==&lt;br /&gt;
 # Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 # Zaptel Configuration File&lt;br /&gt;
 #&lt;br /&gt;
 # This file is parsed by the Zaptel Configurator, ztcfg&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # It must be in the module loading order&lt;br /&gt;
 &lt;br /&gt;
 # Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 fxoks=1&lt;br /&gt;
 fxoks=2&lt;br /&gt;
 fxsks=3&lt;br /&gt;
 # channel 4, WCTDM, no module.&lt;br /&gt;
 &lt;br /&gt;
 # Global data&lt;br /&gt;
 &lt;br /&gt;
 loadzone        = nl&lt;br /&gt;
 defaultzone     = nl&lt;br /&gt;
This is a relatively simple file, configuring three Digium modules. As you can see, the &#039;&#039;genzaptelconf&#039;&#039; command has generated it for us. It belongs with a Digium TDM410P card, which has two FXS modules in positions 1 and 2, and one FXO module in position 3. The first two non-commented lines define the protocol that the FXS modules must &amp;quot;talk&amp;quot; with the attached devices, which &amp;quot;naturally&amp;quot; is the FXO protocol (yes, FXS talks FXO, and FXO talks FXS... a bit like electric current flowing from negative to positive. It&#039;s just a matter of definitions).&amp;lt;br&amp;gt;&lt;br /&gt;
The third line defines that the FXO module talks FXS protocol.&amp;lt;br&amp;gt;&lt;br /&gt;
The fourth line configures a set of indications to use for the defined channels. Since we&#039;re loading &amp;quot;nl&amp;quot;, we&#039;re configuring Dutch dialtones etcetera for the channels.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, the last line tell the server that any channel that does not have a zone assigned to it, should have the specified default zone configured - Dutch as well in this example.&amp;lt;br&amp;gt;&lt;br /&gt;
With this simple file, the driver for our example card (&#039;&#039;wctdm24xxp&#039;&#039;, by the way) can set up the hardware just as we want it. Now to tell Asterisk how to use it...&lt;br /&gt;
==zapata-channels.conf==&lt;br /&gt;
 ; Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 ; Zaptel Channels Configurations (zapata.conf)&lt;br /&gt;
 ;&lt;br /&gt;
 ; This is not intended to be a complete zapata.conf. Rather, it is intended&lt;br /&gt;
 ; to be #include-d by /etc/zapata.conf that will include the global settings&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 ;;; line=&amp;quot;1 WCTDM/0/0&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;2 WCTDM/0/1&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;3 WCTDM/0/2&amp;quot;&lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
 context=default&lt;br /&gt;
This second file is also auto-generated. It sets up three channels, associated with the three Digium hardware modules that we&#039;ve configured with &#039;&#039;zaptel.conf&#039;&#039;. Here, we also see how the channel numbers get assigned to the physical ports. The first module gets to be Zap channel 1 (&#039;&#039;&#039;Zap/1&#039;&#039;&#039;), the second &#039;&#039;&#039;Zap/2&#039;&#039;&#039; and so on. So if we would like our FXO module to be channel 1, and our FXS modules 2 and three, we could rotate the three channel numbers in this file. Probably we&#039;d then also want to rotate the &#039;&#039;callerid&#039;&#039;`s though... Furthermore, we don&#039;t think it&#039;s a good idea to assign channels to Zap devices in a different order than the devices are found in the system - meaning &amp;quot;stick with the default numbering as much as possible&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the way &#039;&#039;zapata-channels.conf&#039;&#039; is interpreted, means that any statement like &#039;&#039;signalling=fxs_ks&#039;&#039; actually &#039;&#039;sets&#039;&#039; the &#039;&#039;signalling&#039;&#039; parameter; when the &#039;&#039;channel =&amp;gt; 1&#039;&#039; line is reached, then all preceding parameter assignments are applied to that particular channel. This also means that if you somewhere have set a channel to belong to context &amp;quot;foo&amp;quot;, and then never set a context again, then every next channel also gets assigned to &amp;quot;foo&amp;quot;. So remember: if you don&#039;t see a parameter being set with a specific channel, you CANNOT assume that it then has it&#039;s default value; if a preceding channel has set that parameter to value &amp;quot;bar&amp;quot;, then for your specific channel, it is &amp;quot;bar&amp;quot; also.&lt;br /&gt;
&lt;br /&gt;
An interesting thing to see here is how &#039;&#039;genzaptelconf&#039;&#039; deals with the above concept. After defining each channel, it resets the most important parameters (a.o. the ones that should be unique with a channel) to empty or &amp;quot;default&amp;quot;. This means that if you yourself are very meticulous, you could do without that safety net, and rewrite the above configuration file as:&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
Note: we like the thoroughnes of the &#039;&#039;genzaptelconf&#039;&#039; configuration, but we like the readability of the second file more.&lt;br /&gt;
&lt;br /&gt;
==zapata.conf==&lt;br /&gt;
 [trunkgroups]&lt;br /&gt;
 &lt;br /&gt;
 [channels]&lt;br /&gt;
 switchtype=national&lt;br /&gt;
 rxwink=300              ; Atlas seems to use long (250ms) winks&lt;br /&gt;
 usecallerid=yes&lt;br /&gt;
 hidecallerid=no&lt;br /&gt;
 callwaiting=yes&lt;br /&gt;
 usecallingpres=yes&lt;br /&gt;
 callwaitingcallerid=yes&lt;br /&gt;
 threewaycalling=yes&lt;br /&gt;
 transfer=yes&lt;br /&gt;
 canpark=yes&lt;br /&gt;
 cancallforward=yes&lt;br /&gt;
 callreturn=yes&lt;br /&gt;
 echocancel=yes&lt;br /&gt;
 echocancelwhenbridged=yes&lt;br /&gt;
 rxgain=0.0&lt;br /&gt;
 txgain=0.0&lt;br /&gt;
 callgroup=1&lt;br /&gt;
 pickupgroup=1&lt;br /&gt;
 immediate=no&lt;br /&gt;
 #include zapata-channels.conf&lt;br /&gt;
Under Debian, &lt;br /&gt;
&lt;br /&gt;
==sip.conf==&lt;br /&gt;
&lt;br /&gt;
This is a sample configuration for VOIP with XS4ALL&lt;br /&gt;
&lt;br /&gt;
 ;;/etc/asterisk/sip.conf;;&lt;br /&gt;
 [general]&lt;br /&gt;
 context=default&lt;br /&gt;
 externip=82.161.20.132&lt;br /&gt;
 dtfmmode=inband&lt;br /&gt;
 localnet=192.168.70.0/24&lt;br /&gt;
 port=5060&lt;br /&gt;
 bindaddr=0.0.0.0&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
 registerattempts=0&lt;br /&gt;
 defaultexpiry=7200&lt;br /&gt;
 register =&amp;gt; 08787XXXXX:PASSWORD@sip.xs4all.nl/08787XXXXX&lt;br /&gt;
&lt;br /&gt;
 [xs4all]&lt;br /&gt;
 type=friend&lt;br /&gt;
 username=08787XXXXX&lt;br /&gt;
 fromuser=08787XXXXX&lt;br /&gt;
 fromdomain=sip.xs4all.nl&lt;br /&gt;
 secret=PASSWORD&lt;br /&gt;
 host=sip.xs4all.nl&lt;br /&gt;
 insecure=invite&lt;br /&gt;
 context=fromxs4all&lt;br /&gt;
 canreinvite=no&lt;br /&gt;
 dtmfmode=inband&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DAHDI ==&lt;br /&gt;
&lt;br /&gt;
From asterisk version 1.4 zaptel is renamed in DAHDI witch stands for Digium Asterisk Hardware Device Interface. &lt;br /&gt;
If you installed the dahdi-tools (highly recommended) then you can configure you&#039;re hardware&lt;br /&gt;
&lt;br /&gt;
Conversion from zaptel&lt;br /&gt;
/etc/zaptel.conf Becomes /etc/dahdi/system.conf&lt;br /&gt;
/etc/asterisk/zapata.conf Becomes /etc/asterisk/chan_dahdi.conf &lt;br /&gt;
&lt;br /&gt;
Lets look at what we have&lt;br /&gt;
 #dahdi_tool&lt;br /&gt;
This will give a overview of the hardware and if it is configured or not. It will all so show alarms on the hardware.&lt;br /&gt;
&lt;br /&gt;
Now lets configure the card. First edit /etc/dadi/genconf_parameters. This file is used with dahdi_genconf and will produce /etc/dahdi-system.conf&lt;br /&gt;
*lc_country              nl&lt;br /&gt;
You can also set the echo cancelation here MG2 is default&lt;br /&gt;
 #dahdi_genconf&lt;br /&gt;
&lt;br /&gt;
 #dahdi_cfg -vv&lt;br /&gt;
 &lt;br /&gt;
 DAHDI Tools Version - 2.2.0&lt;br /&gt;
 DAHDI Version: 2.2.0.1&lt;br /&gt;
 Echo Canceller(s): MG2&lt;br /&gt;
 Configuration&lt;br /&gt;
 ======================&lt;br /&gt;
 Channel map:&lt;br /&gt;
  &lt;br /&gt;
 Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)&lt;br /&gt;
 Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)&lt;br /&gt;
 &lt;br /&gt;
 2 channels to configure.&lt;br /&gt;
 &lt;br /&gt;
 Setting echocan for channel 1 to mg2&lt;br /&gt;
 Setting echocan for channel 2 to mg2&lt;br /&gt;
&lt;br /&gt;
Check if the right module is loaded. &lt;br /&gt;
 #cat /etc/dahdi/modules&lt;br /&gt;
&lt;br /&gt;
You can configure the options of dahdi in /etc/asterisk/chan_dahdi.conf&lt;br /&gt;
for example turn off the echo cancelation&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - contexts =&lt;br /&gt;
&lt;br /&gt;
A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called. &lt;br /&gt;
 [context]&lt;br /&gt;
 exten =&amp;gt; id, priority, command&lt;br /&gt;
&lt;br /&gt;
When Asterisk receives an incoming connection on a channel, Asterisk looks at the context defined for that channel for commands telling Asterisk what it should do. The context defines different sets of commands depending on what extension the user has dialed. For example, a context might provide one set of commands for what to do if the user dials &amp;quot;123&amp;quot;, and another set of commands for what to do if the user dials &amp;quot;9&amp;quot;, and another set of commands for what to do if the user dials any number beginning with &amp;quot;555&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For some kinds of connections — such incoming calls from an outside telephone line — the user has not dialed an extension. In that case, Asterisk behaves as if the user had dialed a special extension named &amp;quot;s&amp;quot; (for Start). Asterisk will look for an extension &amp;quot;number&amp;quot; s in the definition of the context for that channel for instructions about what it should do to handle the call.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say, for example, that you have a channel &amp;quot;Zap/1&amp;quot; which is a connection to a telephone handset in your building. And let&#039;s say that in the configuration file for Zap channels (zapata.conf), you have defined context=john for Zap channel 1. So when you use that handset to dial a number, Asterisk looks for a context with the name &amp;quot;john&amp;quot; in extensions.conf to find out what it should do. You begin the definition of a context in extensions.conf by putting the name of the context in square brackets on a line by itself, like this:&lt;br /&gt;
 [john]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== extensions.conf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [globals]&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 autofallthrough=yes&lt;br /&gt;
&lt;br /&gt;
 [default]&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
&lt;br /&gt;
 [fromxs4all]&lt;br /&gt;
 exten =&amp;gt; 08787XXXXX,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 08787XXXXX,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [outgoing]&lt;br /&gt;
 exten =&amp;gt; _X.,1,Dial(sip/xs4all/${EXTEN},60,r)&lt;br /&gt;
&lt;br /&gt;
 [internal]&lt;br /&gt;
 exten =&amp;gt; 6004,1,Dial(sip/6004)&lt;br /&gt;
 exten =&amp;gt; 6003,1,Dial(sip/6003)&lt;br /&gt;
 exten =&amp;gt; 6005,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 6006,1,Answer()&lt;br /&gt;
 exten =&amp;gt; 6006,n,Playback(hello-world)&lt;br /&gt;
 exten =&amp;gt; 6006,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [phones]&lt;br /&gt;
 include =&amp;gt; internal&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
 include =&amp;gt; outgoing&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2417</id>
		<title>Asterisk basic configuration</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2417"/>
		<updated>2009-07-13T09:32:13Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Asterisk channel configuration basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Asterisk basic configuration principles =&lt;br /&gt;
In this section we&#039;ll have a look at the basic configuration of an Asterisk PBX. Contrary to the TFOT-book, we&#039;ll be looking at it from the theory side, and from there go to an example configuration. For this example configuration, we&#039;ll start from a server with on the &amp;quot;outside&amp;quot; a POTS line and a SIP account with an Internet provider, and on the &amp;quot;inside&amp;quot; two analogue telephones and a SIP softphone. Our goal is to let the PBX behave as if we don&#039;t even have a PBX, but a standard home situation: for an incoming call, all phones ring; and every internal phone can make calls to the outside.&lt;br /&gt;
&lt;br /&gt;
= Asterisk channel configuration basics =&lt;br /&gt;
The first thing to realise is that Asterisk sees each connected telephony device as a &amp;quot;channel&amp;quot;. But what is a Channel? To Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
The second thing to realise, is that every type of device attached to the Asterisk PBX have their own specific configuration files. Correctly setting up each (set of) telephony devices makes them available in our Asterisk PBX as channels. Thus, the device configuration files serve as a kind of abstraction layer, and simplify our final Asterisk configuration by putting &amp;quot;channel-specific&amp;quot; information in separate files.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the previous Asterisk sections in this Wiki, or followed the first four chapters of the TFOT-book, then you&#039;ve encountered the following configuration files:&lt;br /&gt;
* &#039;&#039;zaptel.conf&#039;&#039; - in this file, you can set up the most basic parameters for your Zap-type hardware channels, most notably Digium telephony cards. You&#039;re configuring the hardware itself, via its driver. You could think of this file as belonging to the hardware, not Asterisk. If you&#039;d have other software on your machine besides Asterisk that could make use of your telephony hardware, then that&#039;d be influenced as well when you change &#039;&#039;zaptel.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;zapata.conf&#039;&#039; (and possibly &#039;&#039;zapata-channels.conf&#039;&#039; if you&#039;re on Debian) - this file handles the Asterisk-specific configuration of the hardware telephony channels. It thus &amp;quot;sets up the Zap channels&amp;quot; that Asterisk sees - for incoming and outgoing calls. All parameters that set up the channel are specified here.&lt;br /&gt;
* &#039;&#039;vpb.conf&#039;&#039; - this file is used to configure [http://www.voicetronix.com/ Voicetronix] cards with Asterisk. If you&#039;ve a Voicetronix card in use, then you&#039;ve also installed the Voicetronix drivers. This makes the card(s) useable under Linux. But to have Asterisk use the card(s), you need this &#039;&#039;vpb.conf&#039;&#039; file. It thus serves the same purpose as &#039;&#039;zapata.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;sip.conf&#039;&#039; - this file contains all information on all SIP devices that we want to connect to our Asterisk server; be it one or more SIP accounts with Internet providers, or SIP capable telephones (hardware or software). When &#039;&#039;sip.conf&#039;&#039; has been set up correctly, we can refer to a SIP device by a friendly name like [1000] or [Jane].&lt;br /&gt;
* &#039;&#039;iax.conf&#039;&#039; - this file is just the same as the &#039;&#039;sip.conf&#039;&#039; file, only it handles devices that talk IAX2 protocol instead of the SIP protocol.&lt;br /&gt;
These five files define all channels that our basic Asterisk PBX might handle (well, it won&#039;t even handle the last one, since we&#039;re not connecting any other Asterisk boxes or IAX-(soft)phones to our PBX, and it won&#039;t handle the third one if you don&#039;t have a Voicetronix card).&lt;br /&gt;
&lt;br /&gt;
As a reference, we&#039;re going to list the contents of four example files, and explain what they do in the way of preparing channels for our simple Asterisk server.:&lt;br /&gt;
==zaptel.conf==&lt;br /&gt;
 # Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 # Zaptel Configuration File&lt;br /&gt;
 #&lt;br /&gt;
 # This file is parsed by the Zaptel Configurator, ztcfg&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # It must be in the module loading order&lt;br /&gt;
 &lt;br /&gt;
 # Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 fxoks=1&lt;br /&gt;
 fxoks=2&lt;br /&gt;
 fxsks=3&lt;br /&gt;
 # channel 4, WCTDM, no module.&lt;br /&gt;
 &lt;br /&gt;
 # Global data&lt;br /&gt;
 &lt;br /&gt;
 loadzone        = nl&lt;br /&gt;
 defaultzone     = nl&lt;br /&gt;
This is a relatively simple file, configuring three Digium modules. As you can see, the &#039;&#039;genzaptelconf&#039;&#039; command has generated it for us. It belongs with a Digium TDM410P card, which has two FXS modules in positions 1 and 2, and one FXO module in position 3. The first two non-commented lines define the protocol that the FXS modules must &amp;quot;talk&amp;quot; with the attached devices, which &amp;quot;naturally&amp;quot; is the FXO protocol (yes, FXS talks FXO, and FXO talks FXS... a bit like electric current flowing from negative to positive. It&#039;s just a matter of definitions).&amp;lt;br&amp;gt;&lt;br /&gt;
The third line defines that the FXO module talks FXS protocol.&amp;lt;br&amp;gt;&lt;br /&gt;
The fourth line configures a set of indications to use for the defined channels. Since we&#039;re loading &amp;quot;nl&amp;quot;, we&#039;re configuring Dutch dialtones etcetera for the channels.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, the last line tell the server that any channel that does not have a zone assigned to it, should have the specified default zone configured - Dutch as well in this example.&amp;lt;br&amp;gt;&lt;br /&gt;
With this simple file, the driver for our example card (&#039;&#039;wctdm24xxp&#039;&#039;, by the way) can set up the hardware just as we want it. Now to tell Asterisk how to use it...&lt;br /&gt;
==zapata-channels.conf==&lt;br /&gt;
 ; Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 ; Zaptel Channels Configurations (zapata.conf)&lt;br /&gt;
 ;&lt;br /&gt;
 ; This is not intended to be a complete zapata.conf. Rather, it is intended&lt;br /&gt;
 ; to be #include-d by /etc/zapata.conf that will include the global settings&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 ;;; line=&amp;quot;1 WCTDM/0/0&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;2 WCTDM/0/1&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;3 WCTDM/0/2&amp;quot;&lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
 context=default&lt;br /&gt;
This second file is also auto-generated. It sets up three channels, associated with the three Digium hardware modules that we&#039;ve configured with &#039;&#039;zaptel.conf&#039;&#039;. Here, we also see how the channel numbers get assigned to the physical ports. The first module gets to be Zap channel 1 (&#039;&#039;&#039;Zap/1&#039;&#039;&#039;), the second &#039;&#039;&#039;Zap/2&#039;&#039;&#039; and so on. So if we would like our FXO module to be channel 1, and our FXS modules 2 and three, we could rotate the three channel numbers in this file. Probably we&#039;d then also want to rotate the &#039;&#039;callerid&#039;&#039;`s though... Furthermore, we don&#039;t think it&#039;s a good idea to assign channels to Zap devices in a different order than the devices are found in the system - meaning &amp;quot;stick with the default numbering as much as possible&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the way &#039;&#039;zapata-channels.conf&#039;&#039; is interpreted, means that any statement like &#039;&#039;signalling=fxs_ks&#039;&#039; actually &#039;&#039;sets&#039;&#039; the &#039;&#039;signalling&#039;&#039; parameter; when the &#039;&#039;channel =&amp;gt; 1&#039;&#039; line is reached, then all preceding parameter assignments are applied to that particular channel. This also means that if you somewhere have set a channel to belong to context &amp;quot;foo&amp;quot;, and then never set a context again, then every next channel also gets assigned to &amp;quot;foo&amp;quot;. So remember: if you don&#039;t see a parameter being set with a specific channel, you CANNOT assume that it then has it&#039;s default value; if a preceding channel has set that parameter to value &amp;quot;bar&amp;quot;, then for your specific channel, it is &amp;quot;bar&amp;quot; also.&lt;br /&gt;
&lt;br /&gt;
An interesting thing to see here is how &#039;&#039;genzaptelconf&#039;&#039; deals with the above concept. After defining each channel, it resets the most important parameters (a.o. the ones that should be unique with a channel) to empty or &amp;quot;default&amp;quot;. This means that if you yourself are very meticulous, you could do without that safety net, and rewrite the above configuration file as:&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
Note: we like the thoroughnes of the &#039;&#039;genzaptelconf&#039;&#039; configuration, but we like the readability of the second file more.&lt;br /&gt;
&lt;br /&gt;
==zapata.conf==&lt;br /&gt;
 [trunkgroups]&lt;br /&gt;
 &lt;br /&gt;
 [channels]&lt;br /&gt;
 switchtype=national&lt;br /&gt;
 rxwink=300              ; Atlas seems to use long (250ms) winks&lt;br /&gt;
 usecallerid=yes&lt;br /&gt;
 hidecallerid=no&lt;br /&gt;
 callwaiting=yes&lt;br /&gt;
 usecallingpres=yes&lt;br /&gt;
 callwaitingcallerid=yes&lt;br /&gt;
 threewaycalling=yes&lt;br /&gt;
 transfer=yes&lt;br /&gt;
 canpark=yes&lt;br /&gt;
 cancallforward=yes&lt;br /&gt;
 callreturn=yes&lt;br /&gt;
 echocancel=yes&lt;br /&gt;
 echocancelwhenbridged=yes&lt;br /&gt;
 rxgain=0.0&lt;br /&gt;
 txgain=0.0&lt;br /&gt;
 callgroup=1&lt;br /&gt;
 pickupgroup=1&lt;br /&gt;
 immediate=no&lt;br /&gt;
 #include zapata-channels.conf&lt;br /&gt;
Under Debian, &lt;br /&gt;
&lt;br /&gt;
==sip.conf==&lt;br /&gt;
&lt;br /&gt;
This is a sample configuration for VOIP with XS4ALL&lt;br /&gt;
&lt;br /&gt;
 ;;/etc/asterisk/sip.conf;;&lt;br /&gt;
 [general]&lt;br /&gt;
 context=default&lt;br /&gt;
 externip=82.161.20.132&lt;br /&gt;
 dtfmmode=inband&lt;br /&gt;
 localnet=192.168.70.0/24&lt;br /&gt;
 port=5060&lt;br /&gt;
 bindaddr=0.0.0.0&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
 registerattempts=0&lt;br /&gt;
 defaultexpiry=7200&lt;br /&gt;
 register =&amp;gt; 08787XXXXX:PASSWORD@sip.xs4all.nl/08787XXXXX&lt;br /&gt;
&lt;br /&gt;
 [xs4all]&lt;br /&gt;
 type=friend&lt;br /&gt;
 username=08787XXXXX&lt;br /&gt;
 fromuser=08787XXXXX&lt;br /&gt;
 fromdomain=sip.xs4all.nl&lt;br /&gt;
 secret=PASSWORD&lt;br /&gt;
 host=sip.xs4all.nl&lt;br /&gt;
 insecure=invite&lt;br /&gt;
 context=fromxs4all&lt;br /&gt;
 canreinvite=no&lt;br /&gt;
 dtmfmode=inband&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== DAHDI ==&lt;br /&gt;
&lt;br /&gt;
From asterisk version 1.4 zaptel is renamed in DAHDI witch stands for Digium Asterisk Hardware Device Interface. &lt;br /&gt;
If you installed the dahdi-tools (highly recommended) then you can configure you&#039;re hardware&lt;br /&gt;
&lt;br /&gt;
Conversion from zaptel&lt;br /&gt;
/etc/zaptel.conf Becomes /etc/dahdi/system.conf&lt;br /&gt;
/etc/asterisk/zapata.conf Becomes /etc/asterisk/chan_dahdi.conf &lt;br /&gt;
&lt;br /&gt;
Lets look at what we have&lt;br /&gt;
 #dahdi_tool&lt;br /&gt;
This will give a overview of the hardware and if it is configured or not. It will all so show alarms on the hardware.&lt;br /&gt;
&lt;br /&gt;
Now lets configure the card. First edit /etc/dadi/genconf_parameters. This file is used with dahdi_genconf and will produce /etc/dahdi-system.conf&lt;br /&gt;
*lc_country              nl&lt;br /&gt;
You can also set the echo cancelation here MG2 is default&lt;br /&gt;
 #dahdi_genconf&lt;br /&gt;
&lt;br /&gt;
 #dahdi_cfg -vv&lt;br /&gt;
 &lt;br /&gt;
 DAHDI Tools Version - 2.2.0&lt;br /&gt;
 DAHDI Version: 2.2.0.1&lt;br /&gt;
 Echo Canceller(s): MG2&lt;br /&gt;
 Configuration&lt;br /&gt;
 ======================&lt;br /&gt;
 Channel map:&lt;br /&gt;
  &lt;br /&gt;
 Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)&lt;br /&gt;
 Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)&lt;br /&gt;
 &lt;br /&gt;
 2 channels to configure.&lt;br /&gt;
 &lt;br /&gt;
 Setting echocan for channel 1 to mg2&lt;br /&gt;
 Setting echocan for channel 2 to mg2&lt;br /&gt;
&lt;br /&gt;
Check if the right module is loaded. &lt;br /&gt;
 #cat /etc/dahdi/modules&lt;br /&gt;
&lt;br /&gt;
You can configure the options of dahdi in /etc/asterisk/chan_dahdi.conf&lt;br /&gt;
for example turn off the echo cancelation&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - contexts =&lt;br /&gt;
&lt;br /&gt;
A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called. &lt;br /&gt;
 [context]&lt;br /&gt;
 exten =&amp;gt; id, priority, command&lt;br /&gt;
&lt;br /&gt;
When Asterisk receives an incoming connection on a channel, Asterisk looks at the context defined for that channel for commands telling Asterisk what it should do. The context defines different sets of commands depending on what extension the user has dialed. For example, a context might provide one set of commands for what to do if the user dials &amp;quot;123&amp;quot;, and another set of commands for what to do if the user dials &amp;quot;9&amp;quot;, and another set of commands for what to do if the user dials any number beginning with &amp;quot;555&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For some kinds of connections — such incoming calls from an outside telephone line — the user has not dialed an extension. In that case, Asterisk behaves as if the user had dialed a special extension named &amp;quot;s&amp;quot; (for Start). Asterisk will look for an extension &amp;quot;number&amp;quot; s in the definition of the context for that channel for instructions about what it should do to handle the call.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say, for example, that you have a channel &amp;quot;Zap/1&amp;quot; which is a connection to a telephone handset in your building. And let&#039;s say that in the configuration file for Zap channels (zapata.conf), you have defined context=john for Zap channel 1. So when you use that handset to dial a number, Asterisk looks for a context with the name &amp;quot;john&amp;quot; in extensions.conf to find out what it should do. You begin the definition of a context in extensions.conf by putting the name of the context in square brackets on a line by itself, like this:&lt;br /&gt;
 [john]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== extensions.conf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [globals]&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 autofallthrough=yes&lt;br /&gt;
&lt;br /&gt;
 [default]&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
&lt;br /&gt;
 [fromxs4all]&lt;br /&gt;
 exten =&amp;gt; 0878767430,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 0878767430,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [outgoing]&lt;br /&gt;
 exten =&amp;gt; _X.,1,Dial(sip/xs4all/${EXTEN},60,r)&lt;br /&gt;
&lt;br /&gt;
 [internal]&lt;br /&gt;
 exten =&amp;gt; 6004,1,Dial(sip/6004)&lt;br /&gt;
 exten =&amp;gt; 6003,1,Dial(sip/6003)&lt;br /&gt;
 exten =&amp;gt; 6005,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 6006,1,Answer()&lt;br /&gt;
 exten =&amp;gt; 6006,n,Playback(hello-world)&lt;br /&gt;
 exten =&amp;gt; 6006,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [phones]&lt;br /&gt;
 include =&amp;gt; internal&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
 include =&amp;gt; outgoing&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_Installation_on_Lenny&amp;diff=2416</id>
		<title>Asterisk Installation on Lenny</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_Installation_on_Lenny&amp;diff=2416"/>
		<updated>2009-07-13T08:30:07Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: Compile asterisk&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Asterisk installation on Lenny can be performed with ease using Aptitude. This brings you Asterisk version 1.4.20. Since this has a graphical GUI manager, it might be wise to add X to your server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Compile Asterisk =&lt;br /&gt;
&lt;br /&gt;
You can also compile asterisk and use the latest version.&lt;br /&gt;
&lt;br /&gt;
Get the latest version from http://www.asterisk.org/downloads&lt;br /&gt;
 #cd /usr/src&lt;br /&gt;
Get asterisk version 1.6.1.1&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.1.1.tar.gz&lt;br /&gt;
Get the DAHDI linux drivers&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.2.0.1.tar.gz&lt;br /&gt;
Get the DAHDI linux tools&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.2.0.tar.gz&lt;br /&gt;
Get the ISDN drivers (not sure if its still needed even if you don&#039;t have ISDN)&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.1.tar.gz&lt;br /&gt;
Get the Addon&lt;br /&gt;
 wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.1.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unpack all the tarballs&lt;br /&gt;
&lt;br /&gt;
Go to the asterisk 1.6.1.1 folder and launch the install script&lt;br /&gt;
 #./install.pl&lt;br /&gt;
&lt;br /&gt;
Go to the asterisk 1.6.1.1 folder and launch the install script&lt;br /&gt;
 #./install.pl&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2415</id>
		<title>Asterisk basic configuration</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2415"/>
		<updated>2009-07-13T08:15:16Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Asterisk dialplans - contexts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Asterisk basic configuration principles =&lt;br /&gt;
In this section we&#039;ll have a look at the basic configuration of an Asterisk PBX. Contrary to the TFOT-book, we&#039;ll be looking at it from the theory side, and from there go to an example configuration. For this example configuration, we&#039;ll start from a server with on the &amp;quot;outside&amp;quot; a POTS line and a SIP account with an Internet provider, and on the &amp;quot;inside&amp;quot; two analogue telephones and a SIP softphone. Our goal is to let the PBX behave as if we don&#039;t even have a PBX, but a standard home situation: for an incoming call, all phones ring; and every internal phone can make calls to the outside.&lt;br /&gt;
&lt;br /&gt;
= Asterisk channel configuration basics =&lt;br /&gt;
The first thing to realise is that Asterisk sees each connected telephony device as a &amp;quot;channel&amp;quot;. But what is a Channel? To Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
The second thing to realise, is that every type of device attached to the Asterisk PBX have their own specific configuration files. Correctly setting up each (set of) telephony devices makes them available in our Asterisk PBX as channels. Thus, the device configuration files serve as a kind of abstraction layer, and simplify our final Asterisk configuration by putting &amp;quot;channel-specific&amp;quot; information in separate files.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the previous Asterisk sections in this Wiki, or followed the first four chapters of the TFOT-book, then you&#039;ve encountered the following configuration files:&lt;br /&gt;
* &#039;&#039;zaptel.conf&#039;&#039; - in this file, you can set up the most basic parameters for your Zap-type hardware channels, most notably Digium telephony cards. You&#039;re configuring the hardware itself, via its driver. You could think of this file as belonging to the hardware, not Asterisk. If you&#039;d have other software on your machine besides Asterisk that could make use of your telephony hardware, then that&#039;d be influenced as well when you change &#039;&#039;zaptel.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;zapata.conf&#039;&#039; (and possibly &#039;&#039;zapata-channels.conf&#039;&#039; if you&#039;re on Debian) - this file handles the Asterisk-specific configuration of the hardware telephony channels. It thus &amp;quot;sets up the Zap channels&amp;quot; that Asterisk sees - for incoming and outgoing calls. All parameters that set up the channel are specified here.&lt;br /&gt;
* &#039;&#039;vpb.conf&#039;&#039; - this file is used to configure [http://www.voicetronix.com/ Voicetronix] cards with Asterisk. If you&#039;ve a Voicetronix card in use, then you&#039;ve also installed the Voicetronix drivers. This makes the card(s) useable under Linux. But to have Asterisk use the card(s), you need this &#039;&#039;vpb.conf&#039;&#039; file. It thus serves the same purpose as &#039;&#039;zapata.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;sip.conf&#039;&#039; - this file contains all information on all SIP devices that we want to connect to our Asterisk server; be it one or more SIP accounts with Internet providers, or SIP capable telephones (hardware or software). When &#039;&#039;sip.conf&#039;&#039; has been set up correctly, we can refer to a SIP device by a friendly name like [1000] or [Jane].&lt;br /&gt;
* &#039;&#039;iax.conf&#039;&#039; - this file is just the same as the &#039;&#039;sip.conf&#039;&#039; file, only it handles devices that talk IAX2 protocol instead of the SIP protocol.&lt;br /&gt;
These five files define all channels that our basic Asterisk PBX might handle (well, it won&#039;t even handle the last one, since we&#039;re not connecting any other Asterisk boxes or IAX-(soft)phones to our PBX, and it won&#039;t handle the third one if you don&#039;t have a Voicetronix card).&lt;br /&gt;
&lt;br /&gt;
As a reference, we&#039;re going to list the contents of four example files, and explain what they do in the way of preparing channels for our simple Asterisk server.:&lt;br /&gt;
==zaptel.conf==&lt;br /&gt;
 # Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 # Zaptel Configuration File&lt;br /&gt;
 #&lt;br /&gt;
 # This file is parsed by the Zaptel Configurator, ztcfg&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # It must be in the module loading order&lt;br /&gt;
 &lt;br /&gt;
 # Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 fxoks=1&lt;br /&gt;
 fxoks=2&lt;br /&gt;
 fxsks=3&lt;br /&gt;
 # channel 4, WCTDM, no module.&lt;br /&gt;
 &lt;br /&gt;
 # Global data&lt;br /&gt;
 &lt;br /&gt;
 loadzone        = nl&lt;br /&gt;
 defaultzone     = nl&lt;br /&gt;
This is a relatively simple file, configuring three Digium modules. As you can see, the &#039;&#039;genzaptelconf&#039;&#039; command has generated it for us. It belongs with a Digium TDM410P card, which has two FXS modules in positions 1 and 2, and one FXO module in position 3. The first two non-commented lines define the protocol that the FXS modules must &amp;quot;talk&amp;quot; with the attached devices, which &amp;quot;naturally&amp;quot; is the FXO protocol (yes, FXS talks FXO, and FXO talks FXS... a bit like electric current flowing from negative to positive. It&#039;s just a matter of definitions).&amp;lt;br&amp;gt;&lt;br /&gt;
The third line defines that the FXO module talks FXS protocol.&amp;lt;br&amp;gt;&lt;br /&gt;
The fourth line configures a set of indications to use for the defined channels. Since we&#039;re loading &amp;quot;nl&amp;quot;, we&#039;re configuring Dutch dialtones etcetera for the channels.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, the last line tell the server that any channel that does not have a zone assigned to it, should have the specified default zone configured - Dutch as well in this example.&amp;lt;br&amp;gt;&lt;br /&gt;
With this simple file, the driver for our example card (&#039;&#039;wctdm24xxp&#039;&#039;, by the way) can set up the hardware just as we want it. Now to tell Asterisk how to use it...&lt;br /&gt;
==zapata-channels.conf==&lt;br /&gt;
 ; Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 ; Zaptel Channels Configurations (zapata.conf)&lt;br /&gt;
 ;&lt;br /&gt;
 ; This is not intended to be a complete zapata.conf. Rather, it is intended&lt;br /&gt;
 ; to be #include-d by /etc/zapata.conf that will include the global settings&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 ;;; line=&amp;quot;1 WCTDM/0/0&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;2 WCTDM/0/1&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;3 WCTDM/0/2&amp;quot;&lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
 context=default&lt;br /&gt;
This second file is also auto-generated. It sets up three channels, associated with the three Digium hardware modules that we&#039;ve configured with &#039;&#039;zaptel.conf&#039;&#039;. Here, we also see how the channel numbers get assigned to the physical ports. The first module gets to be Zap channel 1 (&#039;&#039;&#039;Zap/1&#039;&#039;&#039;), the second &#039;&#039;&#039;Zap/2&#039;&#039;&#039; and so on. So if we would like our FXO module to be channel 1, and our FXS modules 2 and three, we could rotate the three channel numbers in this file. Probably we&#039;d then also want to rotate the &#039;&#039;callerid&#039;&#039;`s though... Furthermore, we don&#039;t think it&#039;s a good idea to assign channels to Zap devices in a different order than the devices are found in the system - meaning &amp;quot;stick with the default numbering as much as possible&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the way &#039;&#039;zapata-channels.conf&#039;&#039; is interpreted, means that any statement like &#039;&#039;signalling=fxs_ks&#039;&#039; actually &#039;&#039;sets&#039;&#039; the &#039;&#039;signalling&#039;&#039; parameter; when the &#039;&#039;channel =&amp;gt; 1&#039;&#039; line is reached, then all preceding parameter assignments are applied to that particular channel. This also means that if you somewhere have set a channel to belong to context &amp;quot;foo&amp;quot;, and then never set a context again, then every next channel also gets assigned to &amp;quot;foo&amp;quot;. So remember: if you don&#039;t see a parameter being set with a specific channel, you CANNOT assume that it then has it&#039;s default value; if a preceding channel has set that parameter to value &amp;quot;bar&amp;quot;, then for your specific channel, it is &amp;quot;bar&amp;quot; also.&lt;br /&gt;
&lt;br /&gt;
An interesting thing to see here is how &#039;&#039;genzaptelconf&#039;&#039; deals with the above concept. After defining each channel, it resets the most important parameters (a.o. the ones that should be unique with a channel) to empty or &amp;quot;default&amp;quot;. This means that if you yourself are very meticulous, you could do without that safety net, and rewrite the above configuration file as:&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
Note: we like the thoroughnes of the &#039;&#039;genzaptelconf&#039;&#039; configuration, but we like the readability of the second file more.&lt;br /&gt;
&lt;br /&gt;
==zapata.conf==&lt;br /&gt;
 [trunkgroups]&lt;br /&gt;
 &lt;br /&gt;
 [channels]&lt;br /&gt;
 switchtype=national&lt;br /&gt;
 rxwink=300              ; Atlas seems to use long (250ms) winks&lt;br /&gt;
 usecallerid=yes&lt;br /&gt;
 hidecallerid=no&lt;br /&gt;
 callwaiting=yes&lt;br /&gt;
 usecallingpres=yes&lt;br /&gt;
 callwaitingcallerid=yes&lt;br /&gt;
 threewaycalling=yes&lt;br /&gt;
 transfer=yes&lt;br /&gt;
 canpark=yes&lt;br /&gt;
 cancallforward=yes&lt;br /&gt;
 callreturn=yes&lt;br /&gt;
 echocancel=yes&lt;br /&gt;
 echocancelwhenbridged=yes&lt;br /&gt;
 rxgain=0.0&lt;br /&gt;
 txgain=0.0&lt;br /&gt;
 callgroup=1&lt;br /&gt;
 pickupgroup=1&lt;br /&gt;
 immediate=no&lt;br /&gt;
 #include zapata-channels.conf&lt;br /&gt;
Under Debian, &lt;br /&gt;
&lt;br /&gt;
==sip.conf==&lt;br /&gt;
&lt;br /&gt;
This is a sample configuration for VOIP with XS4ALL&lt;br /&gt;
&lt;br /&gt;
 ;;/etc/asterisk/sip.conf;;&lt;br /&gt;
 [general]&lt;br /&gt;
 context=default&lt;br /&gt;
 externip=82.161.20.132&lt;br /&gt;
 dtfmmode=inband&lt;br /&gt;
 localnet=192.168.70.0/24&lt;br /&gt;
 port=5060&lt;br /&gt;
 bindaddr=0.0.0.0&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
 registerattempts=0&lt;br /&gt;
 defaultexpiry=7200&lt;br /&gt;
 register =&amp;gt; 08787XXXXX:PASSWORD@sip.xs4all.nl/08787XXXXX&lt;br /&gt;
&lt;br /&gt;
 [xs4all]&lt;br /&gt;
 type=friend&lt;br /&gt;
 username=08787XXXXX&lt;br /&gt;
 fromuser=08787XXXXX&lt;br /&gt;
 fromdomain=sip.xs4all.nl&lt;br /&gt;
 secret=PASSWORD&lt;br /&gt;
 host=sip.xs4all.nl&lt;br /&gt;
 insecure=invite&lt;br /&gt;
 context=fromxs4all&lt;br /&gt;
 canreinvite=no&lt;br /&gt;
 dtmfmode=inband&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - contexts =&lt;br /&gt;
&lt;br /&gt;
A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called. &lt;br /&gt;
 [context]&lt;br /&gt;
 exten =&amp;gt; id, priority, command&lt;br /&gt;
&lt;br /&gt;
When Asterisk receives an incoming connection on a channel, Asterisk looks at the context defined for that channel for commands telling Asterisk what it should do. The context defines different sets of commands depending on what extension the user has dialed. For example, a context might provide one set of commands for what to do if the user dials &amp;quot;123&amp;quot;, and another set of commands for what to do if the user dials &amp;quot;9&amp;quot;, and another set of commands for what to do if the user dials any number beginning with &amp;quot;555&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For some kinds of connections — such incoming calls from an outside telephone line — the user has not dialed an extension. In that case, Asterisk behaves as if the user had dialed a special extension named &amp;quot;s&amp;quot; (for Start). Asterisk will look for an extension &amp;quot;number&amp;quot; s in the definition of the context for that channel for instructions about what it should do to handle the call.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say, for example, that you have a channel &amp;quot;Zap/1&amp;quot; which is a connection to a telephone handset in your building. And let&#039;s say that in the configuration file for Zap channels (zapata.conf), you have defined context=john for Zap channel 1. So when you use that handset to dial a number, Asterisk looks for a context with the name &amp;quot;john&amp;quot; in extensions.conf to find out what it should do. You begin the definition of a context in extensions.conf by putting the name of the context in square brackets on a line by itself, like this:&lt;br /&gt;
 [john]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== extensions.conf ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 [globals]&lt;br /&gt;
&lt;br /&gt;
 [general]&lt;br /&gt;
 autofallthrough=yes&lt;br /&gt;
&lt;br /&gt;
 [default]&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
&lt;br /&gt;
 [fromxs4all]&lt;br /&gt;
 exten =&amp;gt; 0878767430,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 0878767430,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [outgoing]&lt;br /&gt;
 exten =&amp;gt; _X.,1,Dial(sip/xs4all/${EXTEN},60,r)&lt;br /&gt;
&lt;br /&gt;
 [internal]&lt;br /&gt;
 exten =&amp;gt; 6004,1,Dial(sip/6004)&lt;br /&gt;
 exten =&amp;gt; 6003,1,Dial(sip/6003)&lt;br /&gt;
 exten =&amp;gt; 6005,1,Dial(DAHDI/2)&lt;br /&gt;
 exten =&amp;gt; 6006,1,Answer()&lt;br /&gt;
 exten =&amp;gt; 6006,n,Playback(hello-world)&lt;br /&gt;
 exten =&amp;gt; 6006,n,Hangup()&lt;br /&gt;
&lt;br /&gt;
 [phones]&lt;br /&gt;
 include =&amp;gt; internal&lt;br /&gt;
 include =&amp;gt; fromxs4all&lt;br /&gt;
 include =&amp;gt; outgoing&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2414</id>
		<title>Asterisk basic configuration</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2414"/>
		<updated>2009-07-13T08:10:55Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* sip.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Asterisk basic configuration principles =&lt;br /&gt;
In this section we&#039;ll have a look at the basic configuration of an Asterisk PBX. Contrary to the TFOT-book, we&#039;ll be looking at it from the theory side, and from there go to an example configuration. For this example configuration, we&#039;ll start from a server with on the &amp;quot;outside&amp;quot; a POTS line and a SIP account with an Internet provider, and on the &amp;quot;inside&amp;quot; two analogue telephones and a SIP softphone. Our goal is to let the PBX behave as if we don&#039;t even have a PBX, but a standard home situation: for an incoming call, all phones ring; and every internal phone can make calls to the outside.&lt;br /&gt;
&lt;br /&gt;
= Asterisk channel configuration basics =&lt;br /&gt;
The first thing to realise is that Asterisk sees each connected telephony device as a &amp;quot;channel&amp;quot;. But what is a Channel? To Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
The second thing to realise, is that every type of device attached to the Asterisk PBX have their own specific configuration files. Correctly setting up each (set of) telephony devices makes them available in our Asterisk PBX as channels. Thus, the device configuration files serve as a kind of abstraction layer, and simplify our final Asterisk configuration by putting &amp;quot;channel-specific&amp;quot; information in separate files.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the previous Asterisk sections in this Wiki, or followed the first four chapters of the TFOT-book, then you&#039;ve encountered the following configuration files:&lt;br /&gt;
* &#039;&#039;zaptel.conf&#039;&#039; - in this file, you can set up the most basic parameters for your Zap-type hardware channels, most notably Digium telephony cards. You&#039;re configuring the hardware itself, via its driver. You could think of this file as belonging to the hardware, not Asterisk. If you&#039;d have other software on your machine besides Asterisk that could make use of your telephony hardware, then that&#039;d be influenced as well when you change &#039;&#039;zaptel.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;zapata.conf&#039;&#039; (and possibly &#039;&#039;zapata-channels.conf&#039;&#039; if you&#039;re on Debian) - this file handles the Asterisk-specific configuration of the hardware telephony channels. It thus &amp;quot;sets up the Zap channels&amp;quot; that Asterisk sees - for incoming and outgoing calls. All parameters that set up the channel are specified here.&lt;br /&gt;
* &#039;&#039;vpb.conf&#039;&#039; - this file is used to configure [http://www.voicetronix.com/ Voicetronix] cards with Asterisk. If you&#039;ve a Voicetronix card in use, then you&#039;ve also installed the Voicetronix drivers. This makes the card(s) useable under Linux. But to have Asterisk use the card(s), you need this &#039;&#039;vpb.conf&#039;&#039; file. It thus serves the same purpose as &#039;&#039;zapata.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;sip.conf&#039;&#039; - this file contains all information on all SIP devices that we want to connect to our Asterisk server; be it one or more SIP accounts with Internet providers, or SIP capable telephones (hardware or software). When &#039;&#039;sip.conf&#039;&#039; has been set up correctly, we can refer to a SIP device by a friendly name like [1000] or [Jane].&lt;br /&gt;
* &#039;&#039;iax.conf&#039;&#039; - this file is just the same as the &#039;&#039;sip.conf&#039;&#039; file, only it handles devices that talk IAX2 protocol instead of the SIP protocol.&lt;br /&gt;
These five files define all channels that our basic Asterisk PBX might handle (well, it won&#039;t even handle the last one, since we&#039;re not connecting any other Asterisk boxes or IAX-(soft)phones to our PBX, and it won&#039;t handle the third one if you don&#039;t have a Voicetronix card).&lt;br /&gt;
&lt;br /&gt;
As a reference, we&#039;re going to list the contents of four example files, and explain what they do in the way of preparing channels for our simple Asterisk server.:&lt;br /&gt;
==zaptel.conf==&lt;br /&gt;
 # Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 # Zaptel Configuration File&lt;br /&gt;
 #&lt;br /&gt;
 # This file is parsed by the Zaptel Configurator, ztcfg&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # It must be in the module loading order&lt;br /&gt;
 &lt;br /&gt;
 # Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 fxoks=1&lt;br /&gt;
 fxoks=2&lt;br /&gt;
 fxsks=3&lt;br /&gt;
 # channel 4, WCTDM, no module.&lt;br /&gt;
 &lt;br /&gt;
 # Global data&lt;br /&gt;
 &lt;br /&gt;
 loadzone        = nl&lt;br /&gt;
 defaultzone     = nl&lt;br /&gt;
This is a relatively simple file, configuring three Digium modules. As you can see, the &#039;&#039;genzaptelconf&#039;&#039; command has generated it for us. It belongs with a Digium TDM410P card, which has two FXS modules in positions 1 and 2, and one FXO module in position 3. The first two non-commented lines define the protocol that the FXS modules must &amp;quot;talk&amp;quot; with the attached devices, which &amp;quot;naturally&amp;quot; is the FXO protocol (yes, FXS talks FXO, and FXO talks FXS... a bit like electric current flowing from negative to positive. It&#039;s just a matter of definitions).&amp;lt;br&amp;gt;&lt;br /&gt;
The third line defines that the FXO module talks FXS protocol.&amp;lt;br&amp;gt;&lt;br /&gt;
The fourth line configures a set of indications to use for the defined channels. Since we&#039;re loading &amp;quot;nl&amp;quot;, we&#039;re configuring Dutch dialtones etcetera for the channels.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, the last line tell the server that any channel that does not have a zone assigned to it, should have the specified default zone configured - Dutch as well in this example.&amp;lt;br&amp;gt;&lt;br /&gt;
With this simple file, the driver for our example card (&#039;&#039;wctdm24xxp&#039;&#039;, by the way) can set up the hardware just as we want it. Now to tell Asterisk how to use it...&lt;br /&gt;
==zapata-channels.conf==&lt;br /&gt;
 ; Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 ; Zaptel Channels Configurations (zapata.conf)&lt;br /&gt;
 ;&lt;br /&gt;
 ; This is not intended to be a complete zapata.conf. Rather, it is intended&lt;br /&gt;
 ; to be #include-d by /etc/zapata.conf that will include the global settings&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 ;;; line=&amp;quot;1 WCTDM/0/0&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;2 WCTDM/0/1&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;3 WCTDM/0/2&amp;quot;&lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
 context=default&lt;br /&gt;
This second file is also auto-generated. It sets up three channels, associated with the three Digium hardware modules that we&#039;ve configured with &#039;&#039;zaptel.conf&#039;&#039;. Here, we also see how the channel numbers get assigned to the physical ports. The first module gets to be Zap channel 1 (&#039;&#039;&#039;Zap/1&#039;&#039;&#039;), the second &#039;&#039;&#039;Zap/2&#039;&#039;&#039; and so on. So if we would like our FXO module to be channel 1, and our FXS modules 2 and three, we could rotate the three channel numbers in this file. Probably we&#039;d then also want to rotate the &#039;&#039;callerid&#039;&#039;`s though... Furthermore, we don&#039;t think it&#039;s a good idea to assign channels to Zap devices in a different order than the devices are found in the system - meaning &amp;quot;stick with the default numbering as much as possible&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the way &#039;&#039;zapata-channels.conf&#039;&#039; is interpreted, means that any statement like &#039;&#039;signalling=fxs_ks&#039;&#039; actually &#039;&#039;sets&#039;&#039; the &#039;&#039;signalling&#039;&#039; parameter; when the &#039;&#039;channel =&amp;gt; 1&#039;&#039; line is reached, then all preceding parameter assignments are applied to that particular channel. This also means that if you somewhere have set a channel to belong to context &amp;quot;foo&amp;quot;, and then never set a context again, then every next channel also gets assigned to &amp;quot;foo&amp;quot;. So remember: if you don&#039;t see a parameter being set with a specific channel, you CANNOT assume that it then has it&#039;s default value; if a preceding channel has set that parameter to value &amp;quot;bar&amp;quot;, then for your specific channel, it is &amp;quot;bar&amp;quot; also.&lt;br /&gt;
&lt;br /&gt;
An interesting thing to see here is how &#039;&#039;genzaptelconf&#039;&#039; deals with the above concept. After defining each channel, it resets the most important parameters (a.o. the ones that should be unique with a channel) to empty or &amp;quot;default&amp;quot;. This means that if you yourself are very meticulous, you could do without that safety net, and rewrite the above configuration file as:&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
Note: we like the thoroughnes of the &#039;&#039;genzaptelconf&#039;&#039; configuration, but we like the readability of the second file more.&lt;br /&gt;
&lt;br /&gt;
==zapata.conf==&lt;br /&gt;
 [trunkgroups]&lt;br /&gt;
 &lt;br /&gt;
 [channels]&lt;br /&gt;
 switchtype=national&lt;br /&gt;
 rxwink=300              ; Atlas seems to use long (250ms) winks&lt;br /&gt;
 usecallerid=yes&lt;br /&gt;
 hidecallerid=no&lt;br /&gt;
 callwaiting=yes&lt;br /&gt;
 usecallingpres=yes&lt;br /&gt;
 callwaitingcallerid=yes&lt;br /&gt;
 threewaycalling=yes&lt;br /&gt;
 transfer=yes&lt;br /&gt;
 canpark=yes&lt;br /&gt;
 cancallforward=yes&lt;br /&gt;
 callreturn=yes&lt;br /&gt;
 echocancel=yes&lt;br /&gt;
 echocancelwhenbridged=yes&lt;br /&gt;
 rxgain=0.0&lt;br /&gt;
 txgain=0.0&lt;br /&gt;
 callgroup=1&lt;br /&gt;
 pickupgroup=1&lt;br /&gt;
 immediate=no&lt;br /&gt;
 #include zapata-channels.conf&lt;br /&gt;
Under Debian, &lt;br /&gt;
&lt;br /&gt;
==sip.conf==&lt;br /&gt;
&lt;br /&gt;
This is a sample configuration for VOIP with XS4ALL&lt;br /&gt;
&lt;br /&gt;
 ;;/etc/asterisk/sip.conf;;&lt;br /&gt;
 [general]&lt;br /&gt;
 context=default&lt;br /&gt;
 externip=82.161.20.132&lt;br /&gt;
 dtfmmode=inband&lt;br /&gt;
 localnet=192.168.70.0/24&lt;br /&gt;
 port=5060&lt;br /&gt;
 bindaddr=0.0.0.0&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
 registerattempts=0&lt;br /&gt;
 defaultexpiry=7200&lt;br /&gt;
 register =&amp;gt; 08787XXXXX:PASSWORD@sip.xs4all.nl/08787XXXXX&lt;br /&gt;
&lt;br /&gt;
 [xs4all]&lt;br /&gt;
 type=friend&lt;br /&gt;
 username=08787XXXXX&lt;br /&gt;
 fromuser=08787XXXXX&lt;br /&gt;
 fromdomain=sip.xs4all.nl&lt;br /&gt;
 secret=PASSWORD&lt;br /&gt;
 host=sip.xs4all.nl&lt;br /&gt;
 insecure=invite&lt;br /&gt;
 context=fromxs4all&lt;br /&gt;
 canreinvite=no&lt;br /&gt;
 dtmfmode=inband&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - contexts =&lt;br /&gt;
&lt;br /&gt;
A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called. &lt;br /&gt;
 [context]&lt;br /&gt;
 exten =&amp;gt; id, priority, command&lt;br /&gt;
&lt;br /&gt;
When Asterisk receives an incoming connection on a channel, Asterisk looks at the context defined for that channel for commands telling Asterisk what it should do. The context defines different sets of commands depending on what extension the user has dialed. For example, a context might provide one set of commands for what to do if the user dials &amp;quot;123&amp;quot;, and another set of commands for what to do if the user dials &amp;quot;9&amp;quot;, and another set of commands for what to do if the user dials any number beginning with &amp;quot;555&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For some kinds of connections — such incoming calls from an outside telephone line — the user has not dialed an extension. In that case, Asterisk behaves as if the user had dialed a special extension named &amp;quot;s&amp;quot; (for Start). Asterisk will look for an extension &amp;quot;number&amp;quot; s in the definition of the context for that channel for instructions about what it should do to handle the call.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say, for example, that you have a channel &amp;quot;Zap/1&amp;quot; which is a connection to a telephone handset in your building. And let&#039;s say that in the configuration file for Zap channels (zapata.conf), you have defined context=john for Zap channel 1. So when you use that handset to dial a number, Asterisk looks for a context with the name &amp;quot;john&amp;quot; in extensions.conf to find out what it should do. You begin the definition of a context in extensions.conf by putting the name of the context in square brackets on a line by itself, like this:&lt;br /&gt;
 [john]&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2413</id>
		<title>Asterisk basic configuration</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Asterisk_basic_configuration&amp;diff=2413"/>
		<updated>2009-07-13T08:09:54Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* sip.conf */ xs4all sip.conf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Asterisk basic configuration principles =&lt;br /&gt;
In this section we&#039;ll have a look at the basic configuration of an Asterisk PBX. Contrary to the TFOT-book, we&#039;ll be looking at it from the theory side, and from there go to an example configuration. For this example configuration, we&#039;ll start from a server with on the &amp;quot;outside&amp;quot; a POTS line and a SIP account with an Internet provider, and on the &amp;quot;inside&amp;quot; two analogue telephones and a SIP softphone. Our goal is to let the PBX behave as if we don&#039;t even have a PBX, but a standard home situation: for an incoming call, all phones ring; and every internal phone can make calls to the outside.&lt;br /&gt;
&lt;br /&gt;
= Asterisk channel configuration basics =&lt;br /&gt;
The first thing to realise is that Asterisk sees each connected telephony device as a &amp;quot;channel&amp;quot;. But what is a Channel? To Asterisk, a channel is a connection which brings in a call to the Asterisk PBX. A channel could be a connection to an ordinary telephone handset or an ordinary telephone line, or to a logical call (like an Internet phone call). Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn&#039;t distinguish between telephone lines and telephones). Every call is placed or received on a distinct channel.&lt;br /&gt;
&lt;br /&gt;
The second thing to realise, is that every type of device attached to the Asterisk PBX have their own specific configuration files. Correctly setting up each (set of) telephony devices makes them available in our Asterisk PBX as channels. Thus, the device configuration files serve as a kind of abstraction layer, and simplify our final Asterisk configuration by putting &amp;quot;channel-specific&amp;quot; information in separate files.&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the previous Asterisk sections in this Wiki, or followed the first four chapters of the TFOT-book, then you&#039;ve encountered the following configuration files:&lt;br /&gt;
* &#039;&#039;zaptel.conf&#039;&#039; - in this file, you can set up the most basic parameters for your Zap-type hardware channels, most notably Digium telephony cards. You&#039;re configuring the hardware itself, via its driver. You could think of this file as belonging to the hardware, not Asterisk. If you&#039;d have other software on your machine besides Asterisk that could make use of your telephony hardware, then that&#039;d be influenced as well when you change &#039;&#039;zaptel.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;zapata.conf&#039;&#039; (and possibly &#039;&#039;zapata-channels.conf&#039;&#039; if you&#039;re on Debian) - this file handles the Asterisk-specific configuration of the hardware telephony channels. It thus &amp;quot;sets up the Zap channels&amp;quot; that Asterisk sees - for incoming and outgoing calls. All parameters that set up the channel are specified here.&lt;br /&gt;
* &#039;&#039;vpb.conf&#039;&#039; - this file is used to configure [http://www.voicetronix.com/ Voicetronix] cards with Asterisk. If you&#039;ve a Voicetronix card in use, then you&#039;ve also installed the Voicetronix drivers. This makes the card(s) useable under Linux. But to have Asterisk use the card(s), you need this &#039;&#039;vpb.conf&#039;&#039; file. It thus serves the same purpose as &#039;&#039;zapata.conf&#039;&#039;.&lt;br /&gt;
* &#039;&#039;sip.conf&#039;&#039; - this file contains all information on all SIP devices that we want to connect to our Asterisk server; be it one or more SIP accounts with Internet providers, or SIP capable telephones (hardware or software). When &#039;&#039;sip.conf&#039;&#039; has been set up correctly, we can refer to a SIP device by a friendly name like [1000] or [Jane].&lt;br /&gt;
* &#039;&#039;iax.conf&#039;&#039; - this file is just the same as the &#039;&#039;sip.conf&#039;&#039; file, only it handles devices that talk IAX2 protocol instead of the SIP protocol.&lt;br /&gt;
These five files define all channels that our basic Asterisk PBX might handle (well, it won&#039;t even handle the last one, since we&#039;re not connecting any other Asterisk boxes or IAX-(soft)phones to our PBX, and it won&#039;t handle the third one if you don&#039;t have a Voicetronix card).&lt;br /&gt;
&lt;br /&gt;
As a reference, we&#039;re going to list the contents of four example files, and explain what they do in the way of preparing channels for our simple Asterisk server.:&lt;br /&gt;
==zaptel.conf==&lt;br /&gt;
 # Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 # Zaptel Configuration File&lt;br /&gt;
 #&lt;br /&gt;
 # This file is parsed by the Zaptel Configurator, ztcfg&lt;br /&gt;
 #&lt;br /&gt;
 &lt;br /&gt;
 # It must be in the module loading order&lt;br /&gt;
 &lt;br /&gt;
 # Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 fxoks=1&lt;br /&gt;
 fxoks=2&lt;br /&gt;
 fxsks=3&lt;br /&gt;
 # channel 4, WCTDM, no module.&lt;br /&gt;
 &lt;br /&gt;
 # Global data&lt;br /&gt;
 &lt;br /&gt;
 loadzone        = nl&lt;br /&gt;
 defaultzone     = nl&lt;br /&gt;
This is a relatively simple file, configuring three Digium modules. As you can see, the &#039;&#039;genzaptelconf&#039;&#039; command has generated it for us. It belongs with a Digium TDM410P card, which has two FXS modules in positions 1 and 2, and one FXO module in position 3. The first two non-commented lines define the protocol that the FXS modules must &amp;quot;talk&amp;quot; with the attached devices, which &amp;quot;naturally&amp;quot; is the FXO protocol (yes, FXS talks FXO, and FXO talks FXS... a bit like electric current flowing from negative to positive. It&#039;s just a matter of definitions).&amp;lt;br&amp;gt;&lt;br /&gt;
The third line defines that the FXO module talks FXS protocol.&amp;lt;br&amp;gt;&lt;br /&gt;
The fourth line configures a set of indications to use for the defined channels. Since we&#039;re loading &amp;quot;nl&amp;quot;, we&#039;re configuring Dutch dialtones etcetera for the channels.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, the last line tell the server that any channel that does not have a zone assigned to it, should have the specified default zone configured - Dutch as well in this example.&amp;lt;br&amp;gt;&lt;br /&gt;
With this simple file, the driver for our example card (&#039;&#039;wctdm24xxp&#039;&#039;, by the way) can set up the hardware just as we want it. Now to tell Asterisk how to use it...&lt;br /&gt;
==zapata-channels.conf==&lt;br /&gt;
 ; Autogenerated by ./genzaptelconf -- do not hand edit&lt;br /&gt;
 ; Zaptel Channels Configurations (zapata.conf)&lt;br /&gt;
 ;&lt;br /&gt;
 ; This is not intended to be a complete zapata.conf. Rather, it is intended&lt;br /&gt;
 ; to be #include-d by /etc/zapata.conf that will include the global settings&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Span 1: WCTDM/0 &amp;quot;Wildcard TDM410P Board 1&amp;quot; (MASTER)&lt;br /&gt;
 ;;; line=&amp;quot;1 WCTDM/0/0&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;2 WCTDM/0/1&amp;quot;&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 callerid=&lt;br /&gt;
 mailbox=&lt;br /&gt;
 group=&lt;br /&gt;
 context=default&lt;br /&gt;
 &lt;br /&gt;
 ;;; line=&amp;quot;3 WCTDM/0/2&amp;quot;&lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
 context=default&lt;br /&gt;
This second file is also auto-generated. It sets up three channels, associated with the three Digium hardware modules that we&#039;ve configured with &#039;&#039;zaptel.conf&#039;&#039;. Here, we also see how the channel numbers get assigned to the physical ports. The first module gets to be Zap channel 1 (&#039;&#039;&#039;Zap/1&#039;&#039;&#039;), the second &#039;&#039;&#039;Zap/2&#039;&#039;&#039; and so on. So if we would like our FXO module to be channel 1, and our FXS modules 2 and three, we could rotate the three channel numbers in this file. Probably we&#039;d then also want to rotate the &#039;&#039;callerid&#039;&#039;`s though... Furthermore, we don&#039;t think it&#039;s a good idea to assign channels to Zap devices in a different order than the devices are found in the system - meaning &amp;quot;stick with the default numbering as much as possible&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that the way &#039;&#039;zapata-channels.conf&#039;&#039; is interpreted, means that any statement like &#039;&#039;signalling=fxs_ks&#039;&#039; actually &#039;&#039;sets&#039;&#039; the &#039;&#039;signalling&#039;&#039; parameter; when the &#039;&#039;channel =&amp;gt; 1&#039;&#039; line is reached, then all preceding parameter assignments are applied to that particular channel. This also means that if you somewhere have set a channel to belong to context &amp;quot;foo&amp;quot;, and then never set a context again, then every next channel also gets assigned to &amp;quot;foo&amp;quot;. So remember: if you don&#039;t see a parameter being set with a specific channel, you CANNOT assume that it then has it&#039;s default value; if a preceding channel has set that parameter to value &amp;quot;bar&amp;quot;, then for your specific channel, it is &amp;quot;bar&amp;quot; also.&lt;br /&gt;
&lt;br /&gt;
An interesting thing to see here is how &#039;&#039;genzaptelconf&#039;&#039; deals with the above concept. After defining each channel, it resets the most important parameters (a.o. the ones that should be unique with a channel) to empty or &amp;quot;default&amp;quot;. This means that if you yourself are very meticulous, you could do without that safety net, and rewrite the above configuration file as:&lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 1&amp;quot; &amp;lt;6001&amp;gt;&lt;br /&gt;
 mailbox=6001&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 1&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxo_ks&lt;br /&gt;
 callerid=&amp;quot;Channel 2&amp;quot; &amp;lt;6002&amp;gt;&lt;br /&gt;
 mailbox=6002&lt;br /&gt;
 group=5&lt;br /&gt;
 context=from-internal&lt;br /&gt;
 channel =&amp;gt; 2&lt;br /&gt;
 &lt;br /&gt;
 signalling=fxs_ks&lt;br /&gt;
 callerid=asreceived&lt;br /&gt;
 group=0&lt;br /&gt;
 context=from-pstn&lt;br /&gt;
 channel =&amp;gt; 3&lt;br /&gt;
Note: we like the thoroughnes of the &#039;&#039;genzaptelconf&#039;&#039; configuration, but we like the readability of the second file more.&lt;br /&gt;
&lt;br /&gt;
==zapata.conf==&lt;br /&gt;
 [trunkgroups]&lt;br /&gt;
 &lt;br /&gt;
 [channels]&lt;br /&gt;
 switchtype=national&lt;br /&gt;
 rxwink=300              ; Atlas seems to use long (250ms) winks&lt;br /&gt;
 usecallerid=yes&lt;br /&gt;
 hidecallerid=no&lt;br /&gt;
 callwaiting=yes&lt;br /&gt;
 usecallingpres=yes&lt;br /&gt;
 callwaitingcallerid=yes&lt;br /&gt;
 threewaycalling=yes&lt;br /&gt;
 transfer=yes&lt;br /&gt;
 canpark=yes&lt;br /&gt;
 cancallforward=yes&lt;br /&gt;
 callreturn=yes&lt;br /&gt;
 echocancel=yes&lt;br /&gt;
 echocancelwhenbridged=yes&lt;br /&gt;
 rxgain=0.0&lt;br /&gt;
 txgain=0.0&lt;br /&gt;
 callgroup=1&lt;br /&gt;
 pickupgroup=1&lt;br /&gt;
 immediate=no&lt;br /&gt;
 #include zapata-channels.conf&lt;br /&gt;
Under Debian, &lt;br /&gt;
&lt;br /&gt;
==sip.conf==&lt;br /&gt;
&lt;br /&gt;
This is a sample configuration for VOIP with XS4ALL&lt;br /&gt;
&lt;br /&gt;
;;/etc/asterisk/sip.conf;;&lt;br /&gt;
[general]&lt;br /&gt;
context=default&lt;br /&gt;
externip=82.161.20.132&lt;br /&gt;
dtfmmode=inband&lt;br /&gt;
localnet=192.168.70.0/24&lt;br /&gt;
port=5060&lt;br /&gt;
bindaddr=0.0.0.0&lt;br /&gt;
disallow=all&lt;br /&gt;
allow=alaw&lt;br /&gt;
allow=ulaw&lt;br /&gt;
registerattempts=0&lt;br /&gt;
defaultexpiry=7200&lt;br /&gt;
register =&amp;gt; 08787XXXXX:PASSWORD@sip.xs4all.nl/08787XXXXX&lt;br /&gt;
&lt;br /&gt;
[xs4all]&lt;br /&gt;
type=friend&lt;br /&gt;
username=08787XXXXX&lt;br /&gt;
fromuser=08787XXXXX&lt;br /&gt;
fromdomain=sip.xs4all.nl&lt;br /&gt;
secret=PASSWORD&lt;br /&gt;
host=sip.xs4all.nl&lt;br /&gt;
insecure=invite&lt;br /&gt;
context=fromxs4all&lt;br /&gt;
canreinvite=no&lt;br /&gt;
dtmfmode=inband&lt;br /&gt;
disallow=all&lt;br /&gt;
allow=alaw&lt;br /&gt;
allow=ulaw&lt;br /&gt;
&lt;br /&gt;
= Asterisk dialplans - contexts =&lt;br /&gt;
&lt;br /&gt;
A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called. &lt;br /&gt;
 [context]&lt;br /&gt;
 exten =&amp;gt; id, priority, command&lt;br /&gt;
&lt;br /&gt;
When Asterisk receives an incoming connection on a channel, Asterisk looks at the context defined for that channel for commands telling Asterisk what it should do. The context defines different sets of commands depending on what extension the user has dialed. For example, a context might provide one set of commands for what to do if the user dials &amp;quot;123&amp;quot;, and another set of commands for what to do if the user dials &amp;quot;9&amp;quot;, and another set of commands for what to do if the user dials any number beginning with &amp;quot;555&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
For some kinds of connections — such incoming calls from an outside telephone line — the user has not dialed an extension. In that case, Asterisk behaves as if the user had dialed a special extension named &amp;quot;s&amp;quot; (for Start). Asterisk will look for an extension &amp;quot;number&amp;quot; s in the definition of the context for that channel for instructions about what it should do to handle the call.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say, for example, that you have a channel &amp;quot;Zap/1&amp;quot; which is a connection to a telephone handset in your building. And let&#039;s say that in the configuration file for Zap channels (zapata.conf), you have defined context=john for Zap channel 1. So when you use that handset to dial a number, Asterisk looks for a context with the name &amp;quot;john&amp;quot; in extensions.conf to find out what it should do. You begin the definition of a context in extensions.conf by putting the name of the context in square brackets on a line by itself, like this:&lt;br /&gt;
 [john]&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=2412</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=2412"/>
		<updated>2009-07-01T06:29:08Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Compiz */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;br /&gt;
&lt;br /&gt;
== Compiz ==&lt;br /&gt;
&lt;br /&gt;
To enable compiz install the Nvidia drivers and install CompizConfig Settings Manager&lt;br /&gt;
 sudo apt-get install simple-ccsm&lt;br /&gt;
Now navigate to system &amp;gt; preferences &amp;gt; Appereance And go to the Visual effects tab. Choose custum there&lt;br /&gt;
&lt;br /&gt;
On Kubuntu change the default windows manager&lt;br /&gt;
&lt;br /&gt;
 System Settings -&amp;gt; Default Applications -&amp;gt; Windows manager&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Desktop Effects&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Keyboard Shortcuts&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube Manually&lt;br /&gt;
|Ctrl + Alt + Left Mouse Button&lt;br /&gt;
|-&lt;br /&gt;
|Expo&lt;br /&gt;
|Super + E (toggle)&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube&lt;br /&gt;
|Mousewheel on Desktop&lt;br /&gt;
|-&lt;br /&gt;
|Film Effect&lt;br /&gt;
|Ctrl + Alt + Down Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Scale Windows&lt;br /&gt;
|Alt + Shift + Up Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Ring Switcher&lt;br /&gt;
|Super + Tab - overrides Shift Switcher&lt;br /&gt;
|}&lt;br /&gt;
Super key is the windows key :-)&lt;br /&gt;
&lt;br /&gt;
== Mount Network Share ==&lt;br /&gt;
&lt;br /&gt;
First install smbfs&lt;br /&gt;
 apt-get install smbfs&lt;br /&gt;
Then create a folder inside of the /media directory to mount the share on or choose you&#039;re own directory&lt;br /&gt;
 sudo mkdir /media/Storage&lt;br /&gt;
Create a credentials file in /root so that you can save your password and have it protected by the root account:&lt;br /&gt;
 sudo gedit /root/.cifscredentials&lt;br /&gt;
Add this to the file&lt;br /&gt;
 username=Guest&lt;br /&gt;
 password=&lt;br /&gt;
&lt;br /&gt;
sudo vi /etc/fstab&lt;br /&gt;
Add the following line&lt;br /&gt;
 //192.168.0.10/SHARENAME /media/Storage cifs auto,iocharset=utf8,uid=USER,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0&lt;br /&gt;
&lt;br /&gt;
To check if the file works&lt;br /&gt;
 sudo mount -a&lt;br /&gt;
And you should see you&#039;re drives on the desktop&lt;br /&gt;
&lt;br /&gt;
Ik you get  error when you shut down the pc &#039;&#039;CIFS VFS: server not responding&#039;&#039; then you have to unmount first. Do this with the following&lt;br /&gt;
&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh&lt;br /&gt;
&lt;br /&gt;
== Citrix Ica client ==&lt;br /&gt;
&lt;br /&gt;
Download the Linux citrix ica client from Citrix&lt;br /&gt;
 http://citrix.com/English/SS/downloads/details.asp?downloadID=3323&amp;amp;productID=-1 &lt;br /&gt;
&lt;br /&gt;
Install the 32bits libraries if youŕe working on a 64bits platform&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs&lt;br /&gt;
&lt;br /&gt;
Install the Open-motif libraries&lt;br /&gt;
&lt;br /&gt;
 apt-get install libmotif3&lt;br /&gt;
&lt;br /&gt;
Unpack the package and execute the installation script&lt;br /&gt;
 ./setupwfc&lt;br /&gt;
Find the plugin directory of firefox. Probably is /usr/lib/firefox/plugins/ otherwise use&lt;br /&gt;
 find / -name plugins | grep -i &amp;quot;netscape\|firefox\|mozilla&amp;quot;&lt;br /&gt;
Create a symlink to the citrix ica library&lt;br /&gt;
 ln –s /usr/lib/ICAClient/npica.so npica.so&lt;br /&gt;
&lt;br /&gt;
If you open a connection to your citrix server. The browser will ask you if you want to open or save the session. Browse to the ica client&lt;br /&gt;
 /usr/lib/ICAClient/wfica&lt;br /&gt;
and tell it to use it for all applications.&lt;br /&gt;
&lt;br /&gt;
When you get a ssl error &amp;quot;you have not chosen to thrust.....&amp;quot; Then copy the certificate in this location.&lt;br /&gt;
 /usr/lib/ICAClient/keystore/cacerts/&lt;br /&gt;
&lt;br /&gt;
For 64Bits OS&lt;br /&gt;
&lt;br /&gt;
Install Needed 32-bit Open Motif libraries to /usr/lib32&lt;br /&gt;
&lt;br /&gt;
Setup a temporary environment&lt;br /&gt;
&lt;br /&gt;
 mkdir -p ~/tmp/Citrix&lt;br /&gt;
 cd ~/tmp/Citrix&lt;br /&gt;
&lt;br /&gt;
Download a recent i386 libmotif3 .deb package to the above folder&lt;br /&gt;
&lt;br /&gt;
 wget http://mirrors.kernel.org/ubuntu/pool/multiverse/o/openmotif/libmotif3_2.2.3-1.4_i386.deb&lt;br /&gt;
&lt;br /&gt;
Use dpkg to extract the package&lt;br /&gt;
&lt;br /&gt;
 dpkg -x libmotif3*i386.deb libmotif&lt;br /&gt;
&lt;br /&gt;
Copy the libraries to /usr/lib32&lt;br /&gt;
&lt;br /&gt;
 sudo cp libmotif/usr/lib/*.so.* /usr/lib32/&lt;br /&gt;
 sudo cp -r libmotif/usr/lib/X11/bindings /usr/lib32/X11/&lt;br /&gt;
&lt;br /&gt;
== Make DVD ==&lt;br /&gt;
&lt;br /&gt;
To make a video DVD you can burn you&#039;re image on the dvd. If you just have the VIDEO_TS files then the easiest way is to convert these into a iso.&lt;br /&gt;
&lt;br /&gt;
 mkisofs -dvd-video -o ~/moviename.iso /path/to/the/VIDEO_TS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/path/to/the/VIDEO_TS path is for example /moviename not /moviename/VIDEO_TS&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=2410</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=2410"/>
		<updated>2009-06-29T10:21:01Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Citrix Ica client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;br /&gt;
&lt;br /&gt;
== Compiz ==&lt;br /&gt;
&lt;br /&gt;
To enable compiz install the Nvidia drivers and install CompizConfig Settings Manager&lt;br /&gt;
 sudo apt-get install simple-ccsm&lt;br /&gt;
Now navigate to system &amp;gt; preferences &amp;gt; Appereance And go to the Visual effects tab. Choose custum there&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Desktop Effects&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Keyboard Shortcuts&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube Manually&lt;br /&gt;
|Ctrl + Alt + Left Mouse Button&lt;br /&gt;
|-&lt;br /&gt;
|Expo&lt;br /&gt;
|Super + E (toggle)&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube&lt;br /&gt;
|Mousewheel on Desktop&lt;br /&gt;
|-&lt;br /&gt;
|Film Effect&lt;br /&gt;
|Ctrl + Alt + Down Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Scale Windows&lt;br /&gt;
|Alt + Shift + Up Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Ring Switcher&lt;br /&gt;
|Super + Tab - overrides Shift Switcher&lt;br /&gt;
|}&lt;br /&gt;
Super key is the windows key :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mount Network Share ==&lt;br /&gt;
&lt;br /&gt;
First install smbfs&lt;br /&gt;
 apt-get install smbfs&lt;br /&gt;
Then create a folder inside of the /media directory to mount the share on or choose you&#039;re own directory&lt;br /&gt;
 sudo mkdir /media/Storage&lt;br /&gt;
Create a credentials file in /root so that you can save your password and have it protected by the root account:&lt;br /&gt;
 sudo gedit /root/.cifscredentials&lt;br /&gt;
Add this to the file&lt;br /&gt;
 username=Guest&lt;br /&gt;
 password=&lt;br /&gt;
&lt;br /&gt;
sudo vi /etc/fstab&lt;br /&gt;
Add the following line&lt;br /&gt;
 //192.168.0.10/SHARENAME /media/Storage cifs auto,iocharset=utf8,uid=USER,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0&lt;br /&gt;
&lt;br /&gt;
To check if the file works&lt;br /&gt;
 sudo mount -a&lt;br /&gt;
And you should see you&#039;re drives on the desktop&lt;br /&gt;
&lt;br /&gt;
Ik you get  error when you shut down the pc &#039;&#039;CIFS VFS: server not responding&#039;&#039; then you have to unmount first. Do this with the following&lt;br /&gt;
&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh&lt;br /&gt;
&lt;br /&gt;
== Citrix Ica client ==&lt;br /&gt;
&lt;br /&gt;
Download the Linux citrix ica client from Citrix&lt;br /&gt;
 http://citrix.com/English/SS/downloads/details.asp?downloadID=3323&amp;amp;productID=-1 &lt;br /&gt;
&lt;br /&gt;
Install the 32bits libraries if youŕe working on a 64bits platform&lt;br /&gt;
&lt;br /&gt;
 apt-get install ia32-libs&lt;br /&gt;
&lt;br /&gt;
Install the Open-motif libraries&lt;br /&gt;
&lt;br /&gt;
 apt-get install libmotif3&lt;br /&gt;
&lt;br /&gt;
Unpack the package and execute the installation script&lt;br /&gt;
 ./setupwfc&lt;br /&gt;
Find the plugin directory of firefox. Probably is /usr/lib/firefox/plugins/ otherwise use&lt;br /&gt;
 find / -name plugins | grep -i &amp;quot;netscape\|firefox\|mozilla&amp;quot;&lt;br /&gt;
Create a symlink to the citrix ica library&lt;br /&gt;
 ln –s /usr/lib/ICAClient/npica.so npica.so&lt;br /&gt;
&lt;br /&gt;
If you open a connection to your citrix server. The browser will ask you if you want to open or save the session. Browse to the ica client&lt;br /&gt;
 /usr/lib/ICAClient/wfica&lt;br /&gt;
and tell it to use it for all applications.&lt;br /&gt;
&lt;br /&gt;
When you get a ssl error &amp;quot;you have not chosen to thrust.....&amp;quot; Then copy the certificate in this location.&lt;br /&gt;
 /usr/lib/ICAClient/keystore/cacerts/&lt;br /&gt;
&lt;br /&gt;
== Make DVD ==&lt;br /&gt;
&lt;br /&gt;
To make a video DVD you can burn you&#039;re image on the dvd. If you just have the VIDEO_TS files then the easiest way is to convert these into a iso.&lt;br /&gt;
&lt;br /&gt;
 mkisofs -dvd-video -o ~/moviename.iso /path/to/the/VIDEO_TS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/path/to/the/VIDEO_TS path is for example /moviename not /moviename/VIDEO_TS&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=2409</id>
		<title>Hostap</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=2409"/>
		<updated>2009-06-27T19:17:05Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Firmware update */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We want to build a wireless access point (AP) on a debian based server. You can use any wireless pci adapter as long as it supports &#039;&#039;iwconfig ath0 mode master&#039;&#039; If you get a error try another driver. I use the madwifi driver for my atheros based card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
 wireless-tools (for iwconfig)&lt;br /&gt;
 Bridge-utils&lt;br /&gt;
 Hostapd&lt;br /&gt;
 Hostap-utils ??&lt;br /&gt;
&lt;br /&gt;
I used an old netgear wireless pci card. To see wich chipset it has type&lt;br /&gt;
 lspci&lt;br /&gt;
 00:0e.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)&lt;br /&gt;
&lt;br /&gt;
The atheros chip uses the madwifi driver http://sourceforge.net&lt;br /&gt;
Download the driver and compile the module. Or use the 2.6.27.2 kernel where the atheros chip is supported as a module. Use modprobe ath9k&lt;br /&gt;
 make install&lt;br /&gt;
 modprobe ath_pci&lt;br /&gt;
&lt;br /&gt;
To enable ath9k, you must first enable mac80211:&lt;br /&gt;
&lt;br /&gt;
 Networking  ---&amp;gt;&lt;br /&gt;
  Wireless  ---&amp;gt;&lt;br /&gt;
    &amp;lt;M&amp;gt; Improved wireless configuration API&lt;br /&gt;
    &amp;lt;M&amp;gt; Generic IEEE 802.11 Networking Stack (mac80211)&lt;br /&gt;
&lt;br /&gt;
You can then enable ath9k in the kernel configuration under&lt;br /&gt;
&lt;br /&gt;
 Device Drivers  ---&amp;gt;&lt;br /&gt;
  [*] Network device support  ---&amp;gt;&lt;br /&gt;
        Wireless LAN  ---&amp;gt;&lt;br /&gt;
          &amp;lt;M&amp;gt;   Atheros 802.11n wireless cards support&lt;br /&gt;
&lt;br /&gt;
Now you should see the card&lt;br /&gt;
 thinner:/# iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions. &lt;br /&gt;
 &lt;br /&gt;
 eth1      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wifi0     no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated&lt;br /&gt;
          Bit Rate:0 kb/s   Tx-Power:14 dBm   Sensitivity=1/1&lt;br /&gt;
          Retry:off   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:off&lt;br /&gt;
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm&lt;br /&gt;
          Rx invalid nwid:4378  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
To bring the card up&lt;br /&gt;
 #ifconfig ath0 up&lt;br /&gt;
And to scan for networks&lt;br /&gt;
 #wlanconfig ath0 list scan&lt;br /&gt;
And for more info&lt;br /&gt;
 #iwlist ath0 scan&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 destroy&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 create wlandev wifi0 wlanmode ap&lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:09:5B:C3:97:3E&lt;br /&gt;
&lt;br /&gt;
Now create a new text file named /etc/hostapd/wpa_psk and paste your pass phrase as:&lt;br /&gt;
 00:00:00:00:00:00 PASSPHRASE&lt;br /&gt;
&lt;br /&gt;
Turn on the routing engine&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
Create the routing rule&lt;br /&gt;
 route add -net 192.168.70.0 netmask 255.255.255.0 gateway 192.168.70.7 dev eth0&lt;br /&gt;
&lt;br /&gt;
== Firmware update ==&lt;br /&gt;
&lt;br /&gt;
Prism2/2.5/3 cards and Host AP driver support two different mechanism&lt;br /&gt;
of upgrading the card firmware. Firmware images (primary and station)&lt;br /&gt;
can be downloaded either into volatile memory (RAM download) or&lt;br /&gt;
non-volatile memory (flash upgrade). Firmware images downloaded into&lt;br /&gt;
volatile memory are lost when the card is resetted, so they are quite&lt;br /&gt;
safe. Flash upgrade with incorrect images may cause permanent problems&lt;br /&gt;
(i.e., render the card useless), so certain amount of caution is&lt;br /&gt;
always recommended for this.&lt;br /&gt;
&lt;br /&gt;
Check your existing firmware&lt;br /&gt;
 hostap_diag wlan0&lt;br /&gt;
&lt;br /&gt;
I downloaded the softmac firmware and placed it in&lt;br /&gt;
&lt;br /&gt;
 mv 2.13.12.0.arm /usr/lib/hotplug/firmware/isl3890&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=2408</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=2408"/>
		<updated>2009-06-25T07:09:14Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Make DVD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;br /&gt;
&lt;br /&gt;
== Compiz ==&lt;br /&gt;
&lt;br /&gt;
To enable compiz install the Nvidia drivers and install CompizConfig Settings Manager&lt;br /&gt;
 sudo apt-get install simple-ccsm&lt;br /&gt;
Now navigate to system &amp;gt; preferences &amp;gt; Appereance And go to the Visual effects tab. Choose custum there&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Desktop Effects&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Keyboard Shortcuts&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube Manually&lt;br /&gt;
|Ctrl + Alt + Left Mouse Button&lt;br /&gt;
|-&lt;br /&gt;
|Expo&lt;br /&gt;
|Super + E (toggle)&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube&lt;br /&gt;
|Mousewheel on Desktop&lt;br /&gt;
|-&lt;br /&gt;
|Film Effect&lt;br /&gt;
|Ctrl + Alt + Down Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Scale Windows&lt;br /&gt;
|Alt + Shift + Up Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Ring Switcher&lt;br /&gt;
|Super + Tab - overrides Shift Switcher&lt;br /&gt;
|}&lt;br /&gt;
Super key is the windows key :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mount Network Share ==&lt;br /&gt;
&lt;br /&gt;
First install smbfs&lt;br /&gt;
 apt-get install smbfs&lt;br /&gt;
Then create a folder inside of the /media directory to mount the share on or choose you&#039;re own directory&lt;br /&gt;
 sudo mkdir /media/Storage&lt;br /&gt;
Create a credentials file in /root so that you can save your password and have it protected by the root account:&lt;br /&gt;
 sudo gedit /root/.cifscredentials&lt;br /&gt;
Add this to the file&lt;br /&gt;
 username=Guest&lt;br /&gt;
 password=&lt;br /&gt;
&lt;br /&gt;
sudo vi /etc/fstab&lt;br /&gt;
Add the following line&lt;br /&gt;
 //192.168.0.10/SHARENAME /media/Storage cifs auto,iocharset=utf8,uid=USER,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0&lt;br /&gt;
&lt;br /&gt;
To check if the file works&lt;br /&gt;
 sudo mount -a&lt;br /&gt;
And you should see you&#039;re drives on the desktop&lt;br /&gt;
&lt;br /&gt;
Ik you get  error when you shut down the pc &#039;&#039;CIFS VFS: server not responding&#039;&#039; then you have to unmount first. Do this with the following&lt;br /&gt;
&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh&lt;br /&gt;
&lt;br /&gt;
== Citrix Ica client ==&lt;br /&gt;
&lt;br /&gt;
Download the Linux citrix ica client from Citrix&lt;br /&gt;
 http://citrix.com/English/SS/downloads/details.asp?downloadID=3323&amp;amp;productID=-1 &lt;br /&gt;
&lt;br /&gt;
Unpack the package and execute the installation script&lt;br /&gt;
 ./setupwfc&lt;br /&gt;
Find the plugin directory of firefox. Probably is /usr/lib/firefox/plugins/ otherwise use&lt;br /&gt;
 find / -name plugins | grep -i &amp;quot;netscape\|firefox\|mozilla&amp;quot;&lt;br /&gt;
Create a symlink to the citrix ica library&lt;br /&gt;
 ln –s /usr/lib/ICAClient/npica.so npica.so&lt;br /&gt;
&lt;br /&gt;
If you open a connection to your citrix server. The browser will ask you if you want to open or save the session. Browse to the ica client&lt;br /&gt;
 /usr/lib/ICAClient/wfica&lt;br /&gt;
and tell it to use it for all applications.&lt;br /&gt;
&lt;br /&gt;
When you get a ssl error &amp;quot;you have not chosen to thrust.....&amp;quot; Then copy the certificate in this location.&lt;br /&gt;
 /usr/lib/ICAClient/keystore/cacerts/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make DVD ==&lt;br /&gt;
&lt;br /&gt;
To make a video DVD you can burn you&#039;re image on the dvd. If you just have the VIDEO_TS files then the easiest way is to convert these into a iso.&lt;br /&gt;
&lt;br /&gt;
 mkisofs -dvd-video -o ~/moviename.iso /path/to/the/VIDEO_TS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/path/to/the/VIDEO_TS path is for example /moviename not /moviename/VIDEO_TS&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=2405</id>
		<title>Hostap</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=2405"/>
		<updated>2009-06-14T21:04:09Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We want to build a wireless access point (AP) on a debian based server. You can use any wireless pci adapter as long as it supports &#039;&#039;iwconfig ath0 mode master&#039;&#039; If you get a error try another driver. I use the madwifi driver for my atheros based card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
 wireless-tools (for iwconfig)&lt;br /&gt;
 Bridge-utils&lt;br /&gt;
 Hostapd&lt;br /&gt;
 Hostap-utils ??&lt;br /&gt;
&lt;br /&gt;
I used an old netgear wireless pci card. To see wich chipset it has type&lt;br /&gt;
 lspci&lt;br /&gt;
 00:0e.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)&lt;br /&gt;
&lt;br /&gt;
The atheros chip uses the madwifi driver http://sourceforge.net&lt;br /&gt;
Download the driver and compile the module. Or use the 2.6.27.2 kernel where the atheros chip is supported as a module. Use modprobe ath9k&lt;br /&gt;
 make install&lt;br /&gt;
 modprobe ath_pci&lt;br /&gt;
&lt;br /&gt;
To enable ath9k, you must first enable mac80211:&lt;br /&gt;
&lt;br /&gt;
 Networking  ---&amp;gt;&lt;br /&gt;
  Wireless  ---&amp;gt;&lt;br /&gt;
    &amp;lt;M&amp;gt; Improved wireless configuration API&lt;br /&gt;
    &amp;lt;M&amp;gt; Generic IEEE 802.11 Networking Stack (mac80211)&lt;br /&gt;
&lt;br /&gt;
You can then enable ath9k in the kernel configuration under&lt;br /&gt;
&lt;br /&gt;
 Device Drivers  ---&amp;gt;&lt;br /&gt;
  [*] Network device support  ---&amp;gt;&lt;br /&gt;
        Wireless LAN  ---&amp;gt;&lt;br /&gt;
          &amp;lt;M&amp;gt;   Atheros 802.11n wireless cards support&lt;br /&gt;
&lt;br /&gt;
Now you should see the card&lt;br /&gt;
 thinner:/# iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions. &lt;br /&gt;
 &lt;br /&gt;
 eth1      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wifi0     no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated&lt;br /&gt;
          Bit Rate:0 kb/s   Tx-Power:14 dBm   Sensitivity=1/1&lt;br /&gt;
          Retry:off   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:off&lt;br /&gt;
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm&lt;br /&gt;
          Rx invalid nwid:4378  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
To bring the card up&lt;br /&gt;
 #ifconfig ath0 up&lt;br /&gt;
And to scan for networks&lt;br /&gt;
 #wlanconfig ath0 list scan&lt;br /&gt;
And for more info&lt;br /&gt;
 #iwlist ath0 scan&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 destroy&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 create wlandev wifi0 wlanmode ap&lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:09:5B:C3:97:3E&lt;br /&gt;
&lt;br /&gt;
Now create a new text file named /etc/hostapd/wpa_psk and paste your pass phrase as:&lt;br /&gt;
 00:00:00:00:00:00 PASSPHRASE&lt;br /&gt;
&lt;br /&gt;
Turn on the routing engine&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
Create the routing rule&lt;br /&gt;
 route add -net 192.168.70.0 netmask 255.255.255.0 gateway 192.168.70.7 dev eth0&lt;br /&gt;
&lt;br /&gt;
== Firmware update ==&lt;br /&gt;
&lt;br /&gt;
Prism2/2.5/3 cards and Host AP driver support two different mechanism&lt;br /&gt;
of upgrading the card firmware. Firmware images (primary and station)&lt;br /&gt;
can be downloaded either into volatile memory (RAM download) or&lt;br /&gt;
non-volatile memory (flash upgrade). Firmware images downloaded into&lt;br /&gt;
volatile memory are lost when the card is resetted, so they are quite&lt;br /&gt;
safe. Flash upgrade with incorrect images may cause permanent problems&lt;br /&gt;
(i.e., render the card useless), so certain amount of caution is&lt;br /&gt;
always recommended for this.&lt;br /&gt;
&lt;br /&gt;
Check your existing firmware&lt;br /&gt;
 hostap_diag wlan0&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Debian_Lenny_base_server&amp;diff=2394</id>
		<title>Debian Lenny base server</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Debian_Lenny_base_server&amp;diff=2394"/>
		<updated>2009-04-18T19:22:35Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Partitioning */  added varlog LV&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;&#039;&#039;&#039;Debian Lenny Base Server setup&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Getting the hardware==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; |-&lt;br /&gt;
|Note: in the following we&#039;re assuming you&#039;ll be assembling an x86 or x64 type of machine, as it has about the best price/performance ratio you could wish. Hardware costs for other platforms, e.g. IBM&#039;s Series p or HP 9000, can be much higher, while platforms like ARM are just not very powerful. Also, the availability of components and of help can be less than with the ubiquietous x86/x64 platforms.&lt;br /&gt;
|}&lt;br /&gt;
Naturally, before we can begin to install the operating system, we need to obtain the necessary hardware. Which hardware you require depends on what you want the server for; a testserver on which you will test only a single feature for a short while does not need the same quality of hardware as does a server that&#039;s supposed to act as a homeserver for many tasks for a long time. We&#039;ll assume your server will be like ours: a home server that must perform many tasks with sufficient performance for a few users, that&#039;s reliable and will last for a couple of years.&lt;br /&gt;
So build or obtain a server with at least the following hardware:&lt;br /&gt;
* a spacious casing with big, quiet cooling fans, like the [http://www.coolermaster.com/products/product.php?act=detail&amp;amp;id=317 one we have];&lt;br /&gt;
* an efficient, heavy-duty power supply that&#039;s rated high enough for your devices, and has a decent efficiency. For example, a [http://www.corsair.com/products/power_supplies.aspx Corsair HX520] power supply;&lt;br /&gt;
* a server class motherboard, e.g. an [http://www.intel.com/products/server/index.htm?iid=home+hdr_nav2_server Intel] or [http://uk.asus.com/products.aspx?l1=9&amp;amp;l2=39&amp;amp;l3=263 AMD] based single-processor motherboard. DO NOT go for the cheapest motherboard you can find: if you pay peanuts, that&#039;s what you get. Server class motherboards have the quality, stability and durability you&#039;ll need from it, and usually also most of the needed peripherals, like multiple ethernet network cards on-board. Usually a Linux server doesn not require much in the way of video performance (and the screen will be used rarely, if ever), so any old integrated graphics will do.&lt;br /&gt;
* a matching CPU - or multiple, if you think you need the power and the selected motherboard has the sockets. Furthermore, it pays to think about the energy use of your server CPU. For instance, you could choose an AMD Athlon X2 5600+, running at 2,8 Ghz and 89W maximum, but you can also go for an AMD Athlon X2 4850E, which is dualcore at 2,5GHz, but uses only 45W maximum - almost half of the former! And over a one year period, this choice can save up to 385 kWH. With electricity costing close to €0,20 per kWH (at least for some of us), that could save you €77,- a year. All I&#039;m saying is: think about power use.&lt;br /&gt;
* a CD-ROM- or DVD-player - although you might not need it any more after installation.&lt;br /&gt;
* &#039;&#039;multiple&#039;&#039; harddisks - you&#039;ll want redundancy, because every harddisk fails at some time. The drive with your data on it will fail fatally when it is most inconvenient to you, and any data on it that you consider valuable will likely be lost forever. To make Murphy&#039;s work somewhat harder for him, we&#039;re going to store our data redundantly, so that if any drive in the server fails, we&#039;ll not lose our data or our server. Thus, get yourself at least two harddisks for your operating system, at least 40GiB in size (don&#039;t think you&#039;ll be able to buy smaller ones nowadays), and spanking new (NEVER use old harddisks for your production server, new ones are just too cheap to run that risk!).&lt;br /&gt;
* (multipe) network card(s) (NICs) if your motherboard does not have enough NICs integrated on-board. You&#039;ll want a NIC for your network, and another one for your Internet connection; and possible a third one for the wireless segment of your network.&lt;br /&gt;
Now build a machine out of the above, or have someone build it for you.&lt;br /&gt;
&lt;br /&gt;
==Preparation of the hardware==&lt;br /&gt;
&lt;br /&gt;
(Note: in the following we&#039;re again assuming you&#039;re running an x86/x64 type of machine. Hardware requirements and preparation for other platforms, e.g. IBM&#039;s Series p or HP 9000, can differ significantly)&lt;br /&gt;
&lt;br /&gt;
Next, check the assembled hardware: &lt;br /&gt;
* is the configuration complete? If it does not have a CD/DVDplayer from which it can boot, then installing the software gets more difficult - at least get an USB external DVDdrive or something like that.&lt;br /&gt;
* are all components connected properly (memory DIMMs seated correctly in their sockets, AGP card inserted correctly into the AGP slot, et cetera) and are all cable connections made (multiple power cables to the motherboard, one power cable plus one data cable to each hard disk, etcetera)?&lt;br /&gt;
Following this, you may hook up the machine. It&#039;s going to need power, and you will need at least a keyboard and a monitor attached. And if you want to use a Graphic User Interface to install, a mouse is required also. When you&#039;ve ensured that everything is safe, you can turn on the machine, and continue to check it:&lt;br /&gt;
* do all fans start to run when you turn on the machine? (if not, then &#039;&#039;&#039;quickly&#039;&#039;&#039; turn off your machine and correct the problem!)&lt;br /&gt;
* does/do the hard disk(s) spin up?&lt;br /&gt;
* do the power button and reset button operate correctly?&lt;br /&gt;
* are the power led, HDD led and other display gadgetry functional?&lt;br /&gt;
* when you let the machine power up, does it emit a single beep? And does it then show a Power-On Self Test screen (POST)?&lt;br /&gt;
* Does it show the correct amount of memory in the POST screen? The correct number &amp;amp; speed of the CPU(s)?&lt;br /&gt;
* Does the machine recognise all controller cards (SCSI, S-ATA etc)? And all attached DVD-drives and hard disks?&lt;br /&gt;
* are all BIOSes/firmwares up to date?&lt;br /&gt;
* If you have a hardware RAID controller, are your RAID arrays built already?&lt;br /&gt;
* does the machine attempt to boot from at least the hard disk?&lt;br /&gt;
...et cetera. If there is any problem, or you want to update the BIOS or firmwares, it&#039;s best to do it before the operating system is installed. This Wiki, however, is not the place (yet) to get the information on how to accomplish these type of tasks.&lt;br /&gt;
&lt;br /&gt;
The last steps in the preparation of the hardware, are&lt;br /&gt;
* to ensure that the machine can boot from CD/DVD, so that you can start installing Debian from it. It is possible to install Debian over the network, but that requires setting up a [http://www.debian-administration.org/articles/478 PXE Boot server] which is (currently) outside the scope of this wiki.&lt;br /&gt;
* to connect the hardware to the Internet, so that it can get all required updates etcetera; please do &#039;&#039;not&#039;&#039; connect the box &#039;&#039;straight&#039;&#039; to the Internet, but make sure that it&#039;s safely behind a firewall, or failing that, a NAT router.&lt;br /&gt;
&lt;br /&gt;
By now the system should be almost ready to receive it&#039;s Operating System. But first we have an issue to tackle: that of redundancy. &lt;br /&gt;
&lt;br /&gt;
==Software or hardware RAID==&lt;br /&gt;
Your hard disks will fail. They absolutely will. It is never a question of &amp;quot;if&amp;quot;, only of &amp;quot;when&amp;quot;. So what will you do when the hard disk containing your complete operating system fails (besides pulling your hair out, that is)?&lt;br /&gt;
What we propose is this: hard disks are pretty cheap nowadays, so let&#039;s use [http://en.wikipedia.org/wiki/Redundant_array_of_independent_disks RAID technology] to make our hard drive space resilient against failure of a whole drive. So first make sure that you have &#039;&#039;two&#039;&#039; disks of equal size instead of only one. Had you already been planning to use multiple disks already, then make sure you have at least &#039;&#039;one&#039;&#039; disk more than your space requirements prescribe; the space on that extra drive will provide the needed redundancy.&lt;br /&gt;
Next, [[RAID fundamentals under Linux | click here]] to learn a bit more about RAID, to make the decision to use hardware-based and/or software-based RAID, and to plan your RAID arrays.&lt;br /&gt;
In this example, we&#039;ll assume you&#039;re using hardware RAID on a RAID controller that&#039;s supported by the Debian installation software. This means that the installation software will &amp;quot;see&amp;quot; your RAID array(s) and present them as usable drives.&lt;br /&gt;
&lt;br /&gt;
==Planning your network names==&lt;br /&gt;
If your machine must become a part of an existing network, then it&#039;s almost certain that you already have a DNS domain in place; in that case: obtain the DNS suffix your machine will get (the DNS domain your machine will &amp;quot;belong&amp;quot; to). However, it&#039;s also possible that this machine is going to be the first machine in your new network, in which case the whole issue of DNS suffixes is wide open. If you need more information on DNS, go [[http://www.isc.org/sw/bind/arm95/Bv9ARM-all.html#id2564824 here]]. For now we&#039;ll assume you have (or will quickly obtain) a working knowledge of the DNS system. &lt;br /&gt;
Here is our tip on choosing a DNS domain for your home network:&lt;br /&gt;
* do &#039;&#039;&#039;not&#039;&#039;&#039; use a publicly registered domain name (e.g. &amp;quot;cocacola.com&amp;quot;) for any machine that&#039;s not primarily intended to serve the public on the Internet;&lt;br /&gt;
* for machines serving a private network, we urge you to use Top Level Domain name &amp;quot;lan&amp;quot; (to signify your machine is on a Local Area Network or LAN)&lt;br /&gt;
* for the Domain Name itself, we suggest you use a level 2 name, like &amp;quot;saruman.lan&amp;quot;, and not a level 3 name, like &amp;quot;mister.saruman.lan&amp;quot;.&lt;br /&gt;
This is only a short section on DNS, but remember that once a proper DNS system is in place, it&#039;s pretty much work to change it. At any rate, this section has most likely showed you that you need to put some thought into the DNS Domain Name design of your home network.&lt;br /&gt;
OK, with this out of the way, we can get to installing the OS.&lt;br /&gt;
&lt;br /&gt;
==Operating System installation==&lt;br /&gt;
To install an Operating System (OS), it&#039;s kinda instrumental that you have one. Here, we&#039;re going to use [http://www.debian.org/intro/about Debian], the biggest [http://www.debian.org/intro/about#free Free] OS that we know of. Free stands for Freedom, but incidentally that Freedom also means it&#039;s gratis, an appealing aspect of Free. To get your own copy of Debian, go to their [http://www.debian.org/distrib/ download site] and obtain the latest [http://www.debian.org/releases/ Stable] image - in this wiki it&#039;s Debian 5.0, or &amp;quot;Lenny&amp;quot; as it&#039;s also known (although it wasn&#039;t stable at the time of writing this).&lt;br /&gt;
&lt;br /&gt;
Besides the choice which release of Debian you want to run, you also have to know for which platform you&#039;re downloading (in our case: either &#039;&#039;amd64&#039;&#039; or &#039;&#039;i386&#039;&#039; depending on your hardware platform) and what kind of install you wish - if you have a working, fast Internet connection available at the time of install, then we recommend getting the [[http://www.debian.org/CD/netinst/ netinst] CD image; it&#039;s a relatively small CD, that&#039;ll be able to get you going, but gets most of the software you&#039;ll need straight from the &#039;net at install time.&lt;br /&gt;
&lt;br /&gt;
In the example at hand we&#039;re installing on an AMD Athlon x2-based server, on which we wish to install 64-bits software. We&#039;ll download [http://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-cd/debian-testing-amd64-CD-1.iso debian-testing-amd64-CD-1.iso], which is Lenny, not yet stable at the time of writing. Burn this to a CD-recordable and boot your prepared hardware platform from this CD.&lt;br /&gt;
&lt;br /&gt;
After booting from the CD, a friendly prompt invites you to indicate how you want to start installing (image 1). Your choices are listed under &amp;amp;lt;F3&amp;amp;gt;; we&#039;re going to use the standard Command Line installation, so we choose &amp;quot;install&amp;quot; and hit &amp;amp;lt;enter&amp;amp;gt;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; |-&lt;br /&gt;
|We could easily use &amp;quot;Graphic install&amp;quot;, in which case we&#039;d have a nice fresh Graphical User Interface for our installation. &#039;&#039;We&#039;re&#039;&#039; not going to, because we&#039;re real men, and [http://isg.ee.ethz.ch/tools/realmen/ Real Men Don&#039;t Click]. Also, we&#039;ve found that from the GUI it&#039;s hard to switch to a second console and then back.&lt;br /&gt;
We could also go to the Advanced options (image 2), and opt for &amp;quot;Expert install&amp;quot; or &amp;quot;Graphical expert install&amp;quot; as installation method, because it gives a much finer grain of control; however we usually don&#039;t need that control, and can do without the barrage of extra questions that the &amp;quot;expert&amp;quot; installation method pose.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After the Linux kernel finishes initializing the machine, a simple text-based installer appears (image 3) that immediately starts asking questions. Answer them according to your needs. Our example system uses the following choices:&lt;br /&gt;
* Language: english&lt;br /&gt;
* country: other &amp;amp;gt; Netherlands&lt;br /&gt;
* keymap: American English (since we have a keyboard with US layout)&lt;br /&gt;
Some installation software loads, and we get to the next phase: if you have multiple NICs in your machine (which we believe you &#039;&#039;should&#039;&#039; have!!), and if they&#039;re detected properly, then you&#039;re required to indicate which of the detected network interface cards (NIC) is going to be the &amp;quot;primary&amp;quot; NIC.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; |-&lt;br /&gt;
|Here, trouble could begin. If your machine has only network cards that are &#039;&#039;&#039;not&#039;&#039;&#039; supported, then you&#039;ll see &#039;&#039;&#039;no&#039;&#039;&#039; cards here - but then how are you going to do a NetInstall? A solution would be to (temporarily) install a NIC that &#039;&#039;is&#039;&#039; supported, like a cheap Realtek card, or an old 3Com 905 card. Then, when the whole system is installed, up and running, you could compile a new kernel that contains support for your actual NICs, and when these work, remove the temporary NIC. For now, we&#039;ll assume that at least one of your NICs is recognised properly by the Debian installation routine.&lt;br /&gt;
|}&lt;br /&gt;
Select the card that&#039;s connected and has (indirect) access to Internet (again: it should &#039;&#039;not&#039;&#039; be connected straight to the wild wild web, but sit safely behind a firewall, at least until we&#039;ve installed our own firewall); if at all possible, let it be the NIC that&#039;ll be connected to your home network itself, on the &#039;&#039;inside&#039;&#039; of your server. Let&#039;s assume that this NIC is designated &#039;&#039;eth0&#039;&#039; by the Debian installation. This card will now be configured using DHCP, so if you&#039;re on a network with a DHCP-server, the network will work straight away. If it&#039;s not, you can either configure the network manually or fix your DHCP-server and connection between it and &#039;&#039;eth0&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Next is one of the hardest questions that any OS installation is going to ask you: what will be the host name of the system? You could change it at any time in the future, but with lots of hassle, so you better choose wisely. Here are our tips:&lt;br /&gt;
* do &#039;&#039;&#039;not&#039;&#039;&#039; name your machine after the user that&#039;s going to use it, e.g. &amp;quot;bernie-pc&amp;quot; (at some time in the future, Bernie&#039;s machine will be moved to Alice, so then Alice is working on &amp;quot;bernie-pc&amp;quot; which makes the situation quite unclear);&lt;br /&gt;
* do &#039;&#039;&#039;not&#039;&#039;&#039; name your machine after the department or workgroup that&#039;s using it most, e.g. &amp;quot;accounting-srv&amp;quot; (same reasoning);&lt;br /&gt;
* do &#039;&#039;&#039;not&#039;&#039;&#039; name your machine after it&#039;s main function, e.g. &amp;quot;printserver&amp;quot; (at some time in the future, the main function is moved to another machine, and/or an alternative function will become the main function of the machine);&lt;br /&gt;
* do &#039;&#039;&#039;not&#039;&#039;&#039; name your machine after it&#039;s location, e.g. &amp;quot;srv-boston&amp;quot; (at some time in the future, the box will be moved to another location);&lt;br /&gt;
* do &#039;&#039;&#039;not&#039;&#039;&#039; name your machine after it&#039;s hardware configuration, e.g. &amp;quot;ibmx346&amp;quot; (at some time in the future, either another xSeries x346 will be wheeled in, or the machine will be upgraded to accomodate increased use or overcome hardware problems - your &amp;quot;ibmx346&amp;quot; could suddenly be running on an xSeries x3650).&lt;br /&gt;
What we feel are safe names for &#039;&#039;any&#039;&#039; machine in your network are true names, perhaps linked to a common theme: names of European cities, names of movie characters, names of countries or holiday destinations et cetera.&lt;br /&gt;
&lt;br /&gt;
Immediately following comes the question of the Domain Name. This is about a DNS domain, so effectively the installation program is asking which DNS suffix the host name should have; if the DHCP-server already provided something it&#039;ll be suggested, but you can override it if need be. In the preparatory phase, you&#039;ll have decided on continuation of your current DNS schema, or starting a new one. Either way, put the chosen DNS suffix in and press &amp;amp;lt;enter&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Partitioning==&lt;br /&gt;
Next comes the question of partitioning, or how to divide the available disk space into chunks for the server to use. This is a tricky subject, because if you put all storage space into one partition, then some day a runaway process will fill up the entire disk with useless logs, and the system will crash. On the other hand, if you divvy up all space into little chunks, then some application is going to need space in one of those partitions where there is none, even though there may be plenty in other partitions.&lt;br /&gt;
To prevent both problems from occuring, we&#039;re going to use [http://tldp.org/HOWTO/LVM-HOWTO/whatisvolman.html Logical Volume Management (LVM)] so that we can provision enough space to start our server, but keep some space in reserve to apply when needed, where it&#039;ll be needed.&lt;br /&gt;
&lt;br /&gt;
So, we at Saruman.biz have put together a recommended standard partitioning scheme. The basis is this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Partition&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|MD&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|LVG&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|LV-name&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Size &amp;lt;br&amp;gt; (physical machine)&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Size (VM)&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|File System&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Mount point&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| /dev/md0&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| 100MiB&lt;br /&gt;
| 100MiB&lt;br /&gt;
| ext3&lt;br /&gt;
| /boot&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| /dev/md1&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
| 3GiB&lt;br /&gt;
| 1GiB&lt;br /&gt;
| ext3&lt;br /&gt;
| /&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; valign=&amp;quot;top&amp;quot; | 3&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; valign=&amp;quot;top&amp;quot; | /dev/md2&lt;br /&gt;
| rowspan=&amp;quot;8&amp;quot; valign=&amp;quot;top&amp;quot; style=&amp;quot;background:lightgrey&amp;quot;| system&lt;br /&gt;
| style=&amp;quot;background:lightgrey&amp;quot; | swap&lt;br /&gt;
| 1GiB&amp;lt;ref name=&amp;quot;swap&amp;quot;&amp;gt;Rule of thumb: twice the size of the machine&#039;s RAM, but no less than 256MiB and no more than 2GiB&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 256MiB&amp;lt;ref name=&amp;quot;swap&amp;quot;/&amp;gt;&lt;br /&gt;
| swap&lt;br /&gt;
| &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background:lightgrey&amp;quot; | var&lt;br /&gt;
| 1GiB&lt;br /&gt;
| 512MiB&lt;br /&gt;
| ext3&lt;br /&gt;
| /var&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background:lightgrey&amp;quot; | varlog&lt;br /&gt;
| 1GiB&lt;br /&gt;
| 512MiB&lt;br /&gt;
| ext3&lt;br /&gt;
| /var/log&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background:lightgrey&amp;quot; | appslog&lt;br /&gt;
| 3GiB&lt;br /&gt;
| -&amp;lt;ref&amp;gt;Yes, we think a separate &#039;&#039;appslog&#039;&#039; is a very good idea, but when creating a minimal VM, we have to save disk space &#039;&#039;somewhere&#039;&#039;...&amp;lt;/ref&amp;gt;&lt;br /&gt;
| ext3&lt;br /&gt;
| /var/appslog&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background:lightgrey&amp;quot; | home&lt;br /&gt;
| 1GiB&amp;lt;ref name=&amp;quot;home&amp;quot;&amp;gt;Note that this heavily depends on the purpose of the machine; if it is not to house any users, then (almost) no space is needed for /home. But on the other hand if e.g. a virtual user is to be used for keeping mailstores, or other service users need home space, then /home needs to be big enough for that.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 512MiB&amp;lt;ref name=&amp;quot;home&amp;quot;/&amp;gt;&lt;br /&gt;
| ext3&lt;br /&gt;
| /home&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background:lightgrey&amp;quot; | usr&lt;br /&gt;
| 3GiB&lt;br /&gt;
| 3GiB&lt;br /&gt;
| ext3&lt;br /&gt;
| /usr&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background:lightgrey&amp;quot; | tmp&lt;br /&gt;
| 1GiB&lt;br /&gt;
| 512MiB&lt;br /&gt;
| ext3&lt;br /&gt;
| /tmp&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background:lightgrey&amp;quot; | opt&lt;br /&gt;
| 1GiB&lt;br /&gt;
| -&lt;br /&gt;
| ext3&lt;br /&gt;
| /opt&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;4&amp;quot; style=&amp;quot;text-align:right&amp;quot;| Total&lt;br /&gt;
! 18.1GiB&lt;br /&gt;
! 6.9GiB&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can see, the partition table works as follows: we assume that we wind up with 3 partitions, either on three separate software RAID arrays (&#039;&#039;md0&#039;&#039; through &#039;&#039;md2&#039;&#039;) or on one single hardware RAID array (in which case the 2nd column &#039;&#039;MD&#039;&#039; does not apply). The size of the partitions depends on your machine&#039;s make: for standard physical machines the 5th column does sensible suggestions, even though you could choose to have different sizes and of course different divisions altogether. If your machine happens to be a virtual one, running inside a [http://www.vmware.com/products/server/ VMware Server] or [http://www.vmware.com/products/vi/esx/ VMware ESX host], or the like, then you might want to start out with more modest partitions. The same holds for small servers that must run off Flash drives.&lt;br /&gt;
&lt;br /&gt;
Anyways, we&#039;re now at the Debian installation screen that lets us partition our disks. We&#039;re &#039;&#039;not&#039;&#039; going to use any of the &amp;quot;guided&amp;quot; partitionings, we go for &amp;quot;manual&amp;quot;. Choosing that brings us to a screen showing all drives that the installation routine has detected, and all partitions on those drives that the installer can &amp;quot;see&amp;quot;. We&#039;re going to do some assuming here once more: let&#039;s assume the drive(s) on which you want to install are visible, and are empty (containing no other partitions).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Software RAID partitioning===&lt;br /&gt;
If you&#039;re to use software RAID, you now have to select the free space on the first drive, press &amp;amp;lt;enter&amp;amp;gt;, and then tell what you want to do with the free space: create a new partition, tell which size you want it to be (see table above), give the type of partition (primary), and give where on the disk it&#039;ll sit (the beginning). Next, a screen comes up that details how the partition you&#039;re requesting will be created. Here we make some changes: under &amp;quot;use as&amp;quot; we&#039;re going to select &amp;quot;physical volume for RAID&amp;quot;. This clears all the other options in this screen, except for the &amp;quot;bootable&amp;quot; flag, which must be &amp;quot;on&amp;quot; for the first partition that we&#039;ll mount as &#039;&#039;/boot&#039;&#039;. Now select &amp;quot;Done setting up the partition&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Next, go to the free space on the second disk, and do &#039;&#039;exactly&#039;&#039; the same, to create an identical physical volume for RAID - if it&#039;s the first partition, select the &amp;quot;bootable&amp;quot; flag as well (we&#039;ll want to be able to boot from this second disk if the first disk fails, right?).&lt;br /&gt;
&lt;br /&gt;
Then go back to the rest of the free space on the first disk, make the second physical volume for RAID, duplicate it on the second disk. Then, go back to the rest of the free space on the first disk, make the third physical volume for RAID, and again duplicate it on the second disk.&lt;br /&gt;
&lt;br /&gt;
If you now go back to the &amp;quot;partition disks&amp;quot; overview, you&#039;ll see all the partitions you&#039;ve specified listed on their respective disks. But at the top an extra option has appeared, called &amp;quot;configure software RAID&amp;quot;. When you now select this option, the installer will ask if it may write the changes you&#039;ve made to disk. This actually creates the partition tables on the disks.&lt;br /&gt;
&lt;br /&gt;
Note that at the end of configuring your partitions, an extra screen may appear (image 4): this asks if you care to identify which MD RAID devices must be started in order to be able to mount the root filesystem. Answering this question with a list of MD&#039;s like &amp;quot;md0 md1 md2&amp;quot; or simply &amp;quot;all&amp;quot; will let your server start the listed MD&#039;s very early in the boot sequence.&lt;br /&gt;
&lt;br /&gt;
===Hardware RAID partitioning===&lt;br /&gt;
Now, if you have hardware RAID, then on your first (boot) disk just make 3 partitions, in the following manner:&lt;br /&gt;
&lt;br /&gt;
Select the free space on the intended boot disk, press &amp;amp;lt;enter&amp;amp;gt;, select &amp;quot;create a new partition&amp;quot;, and fill out the desired size (100MB). Type is primary, location is beginning of the disk, and in the details of the partition, we only need to change the Mount point to &amp;quot;/boot&amp;quot;, and set the Bootable flag to &amp;quot;On&amp;quot;. Then we&#039;re &amp;quot;Done setting up this partition&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The second partition is made the same way, but the desired size is 3GB, the Mount point is &amp;quot;/&amp;quot;, and the Bootable flag remains off. Again, we&#039;re &amp;quot;Done setting up this partition&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The third partition is again a primary partition, it takes up the entire rest of the disk, but the type is not ext3, but &amp;quot;physical volume for LVM&amp;quot;. Again, we&#039;re &amp;quot;Done setting up this partition&amp;quot;. But now from the main partitioner screen, we can access &amp;quot;Configure the Logical Volume Manager&amp;quot;. The installer asks if it can write out the choices made to the disk, and then enters the LVM setup screen, which begins with a summary explaining that you have one Free Physical Volume, and nothing more.&lt;br /&gt;
&lt;br /&gt;
We now create a Volume Group (VG), which (in accordance to our partitioning standard) we&#039;ll call &amp;quot;system&amp;quot;. In this VG, we&#039;ll add all Physical Volumes (being the one partition we&#039;ve designated so in the previous step) using the space bar. Now we repeat the following process seven times:&lt;br /&gt;
* select &amp;quot;Create Logical Volume&amp;quot;&lt;br /&gt;
* select Volume Group &amp;quot;System&amp;quot;&lt;br /&gt;
* give the LV Name (from the table, e.g. swap, var etc)&lt;br /&gt;
* give the LV size (from the table, e.g. 1GB for swap etc)&lt;br /&gt;
After this, we can select &amp;quot;Finish&amp;quot;, the partitioner creates the seven LVs, and we&#039;re back at the partitioner screen, where there are now 7 extra &amp;quot;disks&amp;quot;, with names such as &#039;&#039;LVM VG system, LV appslog - 3.2GB Linux device mapper&#039;&#039;. Each of these &amp;quot;disks&amp;quot; has one block of empty space, which we now assign: seven times we repeat the following process:&lt;br /&gt;
* select the unassigned chunk of empty space of an LV (e.g. appslog) and press &amp;amp;lt;enter&amp;amp;gt;;&lt;br /&gt;
* Change &amp;quot;Use as: do not use&amp;quot; into the desired filesystem (ext3 - only the LV &amp;quot;swap&amp;quot; gets as filesystem type &amp;quot;swap area&amp;quot;)&lt;br /&gt;
* Change the mount point from &amp;quot;none&amp;quot; to the one corresponding with the name of the LV (note: the swap LV has no mountpoint; the appslog mountpoint must be entered manually as &amp;quot;/var/appslog&amp;quot;)&lt;br /&gt;
* If so desired, a label can be assigned to the partition (we usually don&#039;t)&lt;br /&gt;
* select &amp;quot;Done setting up the partition&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Once all this is done, we can look over the configuration once more, and then select &amp;quot;Finish partitioning and write changes to disk&amp;quot;. A summary configuration screen will show, and we&#039;ll affirm with &amp;quot;yes&amp;quot; that these partitions can indeed be formatted. After some formatting screens flashing by (unless your partitions are particularly big, your system is particularly slow, or something goes wrong) the installation procedure continues.&lt;br /&gt;
&lt;br /&gt;
==Final installer steps==&lt;br /&gt;
Next comes one &#039;&#039;&#039;VERY&#039;&#039;&#039; important question: what to use as root password? We cannot stress this enough: choose a SAFE password! Do NOT go for an easy-to-remember one, go for STRONG and SAFE. There are tools to help you generate strong passwords, like [http://www.pctools.com/guides/password/ this page]: use them! We strongly suggest 10 characters or more, including letters, mixed case, and numbers, so something like &#039;&#039;SuCRe4hecH&#039;&#039; (do NOT use this, generate your own!).&lt;br /&gt;
&lt;br /&gt;
Next, give the full name of the principal user of this server (your own, we assume), give the login-name (your given name, we assume), and a corresponding password. Again, use a SAFE password. As long as you don&#039;t make your principal user equivalent to root, you might go for a slightly weaker password (8 characters instead of 10), but we rather suggest you make the password just as strong (and different from!) the root password.&lt;br /&gt;
&lt;br /&gt;
After entering the details of these two users &amp;quot;root&amp;quot; and &amp;quot;you&amp;quot;, the Debian installer will ask you how it can contact the Debian archives, in the dialoge &amp;quot;configure the package manager&amp;quot;. For the NetInstall version of Debian, this is as good as mandatory. So here, we say &amp;quot;yes, use a Network Mirror&amp;quot;, and in the following list select the country in which we are (in our case: the Netherlands), so the installer can present us with a number of network mirrors &amp;quot;close by&amp;quot;. We select ftp.nl.debian.org. Next screen: should you be behind a proxy server, then it&#039;s possible to specify that here. And then the test: the system will say &amp;quot;scanning the mirror...&amp;quot; and try to contact the specified mirror. If it does not succeed, then there is either a network problem, a problem with this box&#039;s network card, or you&#039;ve not specified the mirror or proxy correctly - so fix it. You&#039;ll know the network mirror has succesfully been contacted when the next dialogue appears - currently &amp;quot;configuring popularity-contest&amp;quot;. Answer this question as you please.&lt;br /&gt;
&lt;br /&gt;
And then one of the last &amp;quot;big&amp;quot; questions: Software Selection. In this dialogue, you can easily select bundles of software to be installed. The choices are currently:&lt;br /&gt;
* Desktop environment&lt;br /&gt;
* Web server&lt;br /&gt;
* Print server&lt;br /&gt;
* DNS server&lt;br /&gt;
* File server&lt;br /&gt;
* Mail server&lt;br /&gt;
* SQL database&lt;br /&gt;
* Laptop&lt;br /&gt;
* Standard system (selected by default)&lt;br /&gt;
We have to make a little confession here: we&#039;ve never before used this option in the installer. In fact, we even deselect the Standard System, so as to minimize the number of software packages that the base installation of our server contains. This makes it more work to manually add packages later, but we feel it gives us more control and understanding of our systems. So if you are like us: deselect the Standard System entry, and select Continue.&lt;br /&gt;
&lt;br /&gt;
The next dialogue handles the installation of the [http://www.gnu.org/software/grub/ &#039;&#039;grub&#039;&#039; bootloader]. Unless your disks weren&#039;t empty and you&#039;re attempting to make this system multiboot, you&#039;ll most likely get a question if you&#039;ll allow the installer to install &#039;&#039;grub&#039;&#039; into the boot sector of the first hard disk. We&#039;ll confirm with &amp;quot;Yes&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After the installation of grub is completed, the CD-ROM is ejected, and the system is ready to reboot into Debian Etch. Remove the CD and select &amp;quot;Continue&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Finishing up the installation==&lt;br /&gt;
The system should reboot into Debian. This means you should see the following boot sequence:&lt;br /&gt;
* your machine&#039;s standard POST messages&lt;br /&gt;
* then, a blue grub menu on a black screen, with two entries:&lt;br /&gt;
** Debian GNU/Linux, kernel 2.6.&amp;amp;lt;something&amp;amp;gt;&lt;br /&gt;
** Debian GNU/Linux, kernel 2.6.&amp;amp;lt;something&amp;amp;gt (single-user mode);&lt;br /&gt;
* then, after a default time-out, the first grub option will go into effect, and the Linux kernel is started. Lots of cryptic messages in grey-on-black will scroll by, until the last few lines read: &amp;quot;Debian GNU/Linux 4.0 &amp;amp;lt;hostname&amp;amp;gt; tty1&amp;quot; and &amp;quot;&amp;amp;lt;hostname&amp;amp;gt; login:&amp;quot;&lt;br /&gt;
If your system does not reach this login, and/or some horrible error messages appear anywhere in this boot sequence, then you&#039;ve got some extra work ahead. For now we&#039;ll assume you&#039;ve reached the login prompt without problem.&lt;br /&gt;
&lt;br /&gt;
Log in as the principal user (try to avoid logging in as root! That&#039;s BAD practice!). Once logged in, save a copy of the boot messages using &#039;&#039;sudo dmesg &amp;gt; boot.txt&#039;&#039; or whatever you like. Then look through the boot messages, e.g. with &#039;&#039;vi -R boot.txt&#039;&#039;. Furthermore, [[APT_and_aptitude | use Aptitude]] to make sure &#039;&#039;all&#039;&#039; your software is updated to the latest version.&lt;br /&gt;
&lt;br /&gt;
Done! Your base system is ready. You probably now want to [[essential system software | install essential software]], [[roll your own kernel]] and [[connect your server to the Internet]].&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1995</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1995"/>
		<updated>2008-11-07T19:17:41Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* Mount Network Share */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;br /&gt;
&lt;br /&gt;
== Compiz ==&lt;br /&gt;
&lt;br /&gt;
To enable compiz install the Nvidia drivers and install CompizConfig Settings Manager&lt;br /&gt;
 sudo apt-get install simple-ccsm&lt;br /&gt;
Now navigate to system &amp;gt; preferences &amp;gt; Appereance And go to the Visual effects tab. Choose custum there&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Desktop Effects&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Keyboard Shortcuts&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube Manually&lt;br /&gt;
|Ctrl + Alt + Left Mouse Button&lt;br /&gt;
|-&lt;br /&gt;
|Expo&lt;br /&gt;
|Super + E (toggle)&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube&lt;br /&gt;
|Mousewheel on Desktop&lt;br /&gt;
|-&lt;br /&gt;
|Film Effect&lt;br /&gt;
|Ctrl + Alt + Down Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Scale Windows&lt;br /&gt;
|Alt + Shift + Up Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Ring Switcher&lt;br /&gt;
|Super + Tab - overrides Shift Switcher&lt;br /&gt;
|}&lt;br /&gt;
Super key is the windows key :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mount Network Share ==&lt;br /&gt;
&lt;br /&gt;
First install smbfs&lt;br /&gt;
 apt-get install smbfs&lt;br /&gt;
Then create a folder inside of the /media directory to mount the share on or choose you&#039;re own directory&lt;br /&gt;
 sudo mkdir /media/Storage&lt;br /&gt;
Create a credentials file in /root so that you can save your password and have it protected by the root account:&lt;br /&gt;
 sudo gedit /root/.cifscredentials&lt;br /&gt;
Add this to the file&lt;br /&gt;
 username=Guest&lt;br /&gt;
 password=&lt;br /&gt;
&lt;br /&gt;
sudo vi /etc/fstab&lt;br /&gt;
Add the following line&lt;br /&gt;
 //192.168.0.10/SHARENAME /media/Storage cifs auto,iocharset=utf8,uid=USER,gid=users,credentials=/root/.cifscredentials,file_mode=0775,dir_mode=0775 0 0&lt;br /&gt;
&lt;br /&gt;
To check if the file works&lt;br /&gt;
 sudo mount -a&lt;br /&gt;
And you should see you&#039;re drives on the desktop&lt;br /&gt;
&lt;br /&gt;
Ik you get  error when you shut down the pc &#039;&#039;CIFS VFS: server not responding&#039;&#039; then you have to unmount first. Do this with the following&lt;br /&gt;
&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh&lt;br /&gt;
&lt;br /&gt;
== Citrix Ica client ==&lt;br /&gt;
&lt;br /&gt;
Download the Linux citrix ica client from Citrix&lt;br /&gt;
 http://citrix.com/English/SS/downloads/details.asp?downloadID=3323&amp;amp;productID=-1 &lt;br /&gt;
&lt;br /&gt;
Unpack the package and execute the installation script&lt;br /&gt;
 ./setupwfc&lt;br /&gt;
Find the plugin directory of firefox. Probably is /usr/lib/firefox/plugins/ otherwise use&lt;br /&gt;
 find / -name plugins | grep -i &amp;quot;netscape\|firefox\|mozilla&amp;quot;&lt;br /&gt;
Create a symlink to the citrix ica library&lt;br /&gt;
 ln –s /usr/lib/ICAClient/npica.so npica.so&lt;br /&gt;
&lt;br /&gt;
If you open a connection to your citrix server. The browser will ask you if you want to open or save the session. Browse to the ica client&lt;br /&gt;
 /usr/lib/ICAClient/wfica&lt;br /&gt;
and tell it to use it for all applications.&lt;br /&gt;
&lt;br /&gt;
When you get a ssl error &amp;quot;you have not chosen to thrust.....&amp;quot; Then copy the certificate in this location.&lt;br /&gt;
 /usr/lib/ICAClient/keystore/cacerts/&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1994</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1994"/>
		<updated>2008-11-07T17:58:12Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: mount a share&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;br /&gt;
&lt;br /&gt;
== Compiz ==&lt;br /&gt;
&lt;br /&gt;
To enable compiz install the Nvidia drivers and install CompizConfig Settings Manager&lt;br /&gt;
 sudo apt-get install simple-ccsm&lt;br /&gt;
Now navigate to system &amp;gt; preferences &amp;gt; Appereance And go to the Visual effects tab. Choose custum there&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Desktop Effects&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Keyboard Shortcuts&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube Manually&lt;br /&gt;
|Ctrl + Alt + Left Mouse Button&lt;br /&gt;
|-&lt;br /&gt;
|Expo&lt;br /&gt;
|Super + E (toggle)&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube&lt;br /&gt;
|Mousewheel on Desktop&lt;br /&gt;
|-&lt;br /&gt;
|Film Effect&lt;br /&gt;
|Ctrl + Alt + Down Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Scale Windows&lt;br /&gt;
|Alt + Shift + Up Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Ring Switcher&lt;br /&gt;
|Super + Tab - overrides Shift Switcher&lt;br /&gt;
|}&lt;br /&gt;
Super key is the windows key :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Mount Network Share ==&lt;br /&gt;
&lt;br /&gt;
First install smbfs&lt;br /&gt;
 apt-get install smbfs&lt;br /&gt;
Then create a folder inside of the /media directory to mount the share on or choose you&#039;re own directory&lt;br /&gt;
 sudo mkdir /media/Storage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ik you get  error whem you shut down the pc &#039;&#039;CIFS VFS: server not responding&#039;&#039; then you have to unmount first. Do this with the following&lt;br /&gt;
&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh&lt;br /&gt;
 ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Citrix Ica client ==&lt;br /&gt;
&lt;br /&gt;
Download the Linux citrix ica client from Citrix&lt;br /&gt;
 http://citrix.com/English/SS/downloads/details.asp?downloadID=3323&amp;amp;productID=-1 &lt;br /&gt;
&lt;br /&gt;
Unpack the package and execute the installation script&lt;br /&gt;
 ./setupwfc&lt;br /&gt;
Find the plugin directory of firefox. Probably is /usr/lib/firefox/plugins/ otherwise use&lt;br /&gt;
 find / -name plugins | grep -i &amp;quot;netscape\|firefox\|mozilla&amp;quot;&lt;br /&gt;
Create a symlink to the citrix ica library&lt;br /&gt;
 ln –s /usr/lib/ICAClient/npica.so npica.so&lt;br /&gt;
&lt;br /&gt;
If you open a connection to your citrix server. The browser will ask you if you want to open or save the session. Browse to the ica client&lt;br /&gt;
 /usr/lib/ICAClient/wfica&lt;br /&gt;
and tell it to use it for all applications.&lt;br /&gt;
&lt;br /&gt;
When you get a ssl error &amp;quot;you have not chosen to thrust.....&amp;quot; Then copy the certificate in this location.&lt;br /&gt;
 /usr/lib/ICAClient/keystore/cacerts/&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1993</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1993"/>
		<updated>2008-11-06T19:29:35Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: Citrix client&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;br /&gt;
&lt;br /&gt;
== Compiz ==&lt;br /&gt;
&lt;br /&gt;
To enable compiz install the Nvidia drivers and install CompizConfig Settings Manager&lt;br /&gt;
 sudo apt-get install simple-ccsm&lt;br /&gt;
Now navigate to system &amp;gt; preferences &amp;gt; Appereance And go to the Visual effects tab. Choose custum there&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot; border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Desktop Effects&lt;br /&gt;
!style=&amp;quot;background:#ffdead;&amp;quot;|Keyboard Shortcuts&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube Manually&lt;br /&gt;
|Ctrl + Alt + Left Mouse Button&lt;br /&gt;
|-&lt;br /&gt;
|Expo&lt;br /&gt;
|Super + E (toggle)&lt;br /&gt;
|-&lt;br /&gt;
|Rotate Cube&lt;br /&gt;
|Mousewheel on Desktop&lt;br /&gt;
|-&lt;br /&gt;
|Film Effect&lt;br /&gt;
|Ctrl + Alt + Down Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Scale Windows&lt;br /&gt;
|Alt + Shift + Up Arrow&lt;br /&gt;
|-&lt;br /&gt;
|Ring Switcher&lt;br /&gt;
|Super + Tab - overrides Shift Switcher&lt;br /&gt;
|}&lt;br /&gt;
Super key is the windows key :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Citrix Ica client ==&lt;br /&gt;
&lt;br /&gt;
Download the Linux citrix ica client from Citrix&lt;br /&gt;
 http://citrix.com/English/SS/downloads/details.asp?downloadID=3323&amp;amp;productID=-1 &lt;br /&gt;
&lt;br /&gt;
Unpack the package and execute the installation script&lt;br /&gt;
 ./setupwfc&lt;br /&gt;
Find the plugin directory of firefox. Probably is /usr/lib/firefox/plugins/ otherwise use&lt;br /&gt;
 find / -name plugins | grep -i &amp;quot;netscape\|firefox\|mozilla&amp;quot;&lt;br /&gt;
Create a symlink to the citrix ica library&lt;br /&gt;
 ln –s /usr/lib/ICAClient/npica.so npica.so&lt;br /&gt;
&lt;br /&gt;
If you open a connection to your citrix server. The browser will ask you if you want to open or save the session. Browse to the ica client&lt;br /&gt;
 /usr/lib/ICAClient/wfica&lt;br /&gt;
and tell it to use it for all applications.&lt;br /&gt;
&lt;br /&gt;
When you get a ssl error &amp;quot;you have not chosen to thrust.....&amp;quot; Then copy the certificate in this location.&lt;br /&gt;
 /usr/lib/ICAClient/keystore/cacerts/&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1988</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1988"/>
		<updated>2008-11-05T20:03:16Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: Compiz&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;br /&gt;
&lt;br /&gt;
== Compiz ==&lt;br /&gt;
&lt;br /&gt;
To enable compiz install the Nvidia drivers and install CompizConfig Settings Manager&lt;br /&gt;
 sudo apt-get install simple-ccsm&lt;br /&gt;
Now navigate to system &amp;gt; preferences &amp;gt; Appereance And go to the Visual effects tab. Choose custum there&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ramdrive&amp;diff=1984</id>
		<title>Ramdrive</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ramdrive&amp;diff=1984"/>
		<updated>2008-11-04T20:59:21Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: Make a initrd ramdrive&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most kernels use a ramdrive to load the modules the need to boot. This is called a initrd image. To make such a ramdrive&lt;br /&gt;
&lt;br /&gt;
 mkinitramfs -k -o /boot/initrd.img-2.6.27.4 2.6.27.4&lt;br /&gt;
&lt;br /&gt;
And to update grub and use the ramdrive&lt;br /&gt;
 update-grub&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1978</id>
		<title>Hostap</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1978"/>
		<updated>2008-11-02T00:15:03Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: Firmware update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We want to build a wireless access point (AP) on a debian based server. You can use any wireless pci adapter as long as it supports &#039;&#039;iwconfig ath0 mode master&#039;&#039; If you get a error try another driver. I use the madwifi driver for my atheros based card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
 wireless-tools (for iwconfig)&lt;br /&gt;
 Bridge-utils&lt;br /&gt;
 Hostapd&lt;br /&gt;
 Hostap-utils ??&lt;br /&gt;
&lt;br /&gt;
I used an old netgear wireless pci card. To see wich chipset it has type&lt;br /&gt;
 lspci&lt;br /&gt;
 00:0e.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)&lt;br /&gt;
&lt;br /&gt;
The atheros chip uses the madwifi driver http://sourceforge.net&lt;br /&gt;
Download the driver and compile the module. Or use the 2.6.27.2 kernel where the atheros chip is supported as a module. Use modprobe ath9k&lt;br /&gt;
 make install&lt;br /&gt;
 modprobe ath_pci&lt;br /&gt;
&lt;br /&gt;
Now you should see the card&lt;br /&gt;
 thinner:/# iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions. &lt;br /&gt;
 &lt;br /&gt;
 eth1      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wifi0     no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated&lt;br /&gt;
          Bit Rate:0 kb/s   Tx-Power:14 dBm   Sensitivity=1/1&lt;br /&gt;
          Retry:off   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:off&lt;br /&gt;
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm&lt;br /&gt;
          Rx invalid nwid:4378  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
To bring the card up&lt;br /&gt;
 #ifconfig ath0 up&lt;br /&gt;
And to scan for networks&lt;br /&gt;
 #wlanconfig ath0 list scan&lt;br /&gt;
And for more info&lt;br /&gt;
 #iwlist ath0 scan&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 destroy&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 create wlandev wifi0 wlanmode ap&lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:09:5B:C3:97:3E&lt;br /&gt;
&lt;br /&gt;
Now create a new text file named /etc/hostapd/wpa_psk and paste your pass phrase as:&lt;br /&gt;
 00:00:00:00:00:00 PASSPHRASE&lt;br /&gt;
&lt;br /&gt;
Turn on the routing engine&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
Create the routing rule&lt;br /&gt;
 route add -net 192.168.70.0 netmask 255.255.255.0 gateway 192.168.70.7 dev eth0&lt;br /&gt;
&lt;br /&gt;
== Firmware update ==&lt;br /&gt;
&lt;br /&gt;
Prism2/2.5/3 cards and Host AP driver support two different mechanism&lt;br /&gt;
of upgrading the card firmware. Firmware images (primary and station)&lt;br /&gt;
can be downloaded either into volatile memory (RAM download) or&lt;br /&gt;
non-volatile memory (flash upgrade). Firmware images downloaded into&lt;br /&gt;
volatile memory are lost when the card is resetted, so they are quite&lt;br /&gt;
safe. Flash upgrade with incorrect images may cause permanent problems&lt;br /&gt;
(i.e., render the card useless), so certain amount of caution is&lt;br /&gt;
always recommended for this.&lt;br /&gt;
&lt;br /&gt;
Check your existing firmware&lt;br /&gt;
 hostap_diag wlan0&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1917</id>
		<title>Hostap</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1917"/>
		<updated>2008-10-26T21:30:32Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We want to build a wireless access point (AP) on a debian based server. You can use any wireless pci adapter as long as it supports &#039;&#039;iwconfig ath0 mode master&#039;&#039; If you get a error try another driver. I use the madwifi driver for my atheros based card.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
 wireless-tools (for iwconfig)&lt;br /&gt;
 Bridge-utils&lt;br /&gt;
 Hostapd&lt;br /&gt;
 Hostap-utils ??&lt;br /&gt;
&lt;br /&gt;
I used an old netgear wireless pci card. To see wich chipset it has type&lt;br /&gt;
 lspci&lt;br /&gt;
 00:0e.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)&lt;br /&gt;
&lt;br /&gt;
The atheros chip uses the madwifi driver http://sourceforge.net&lt;br /&gt;
Download the driver and compile the module. Or use the 2.6.27.2 kernel where the atheros chip is supported as a module. Use modprobe ath9k&lt;br /&gt;
 make install&lt;br /&gt;
 modprobe ath_pci&lt;br /&gt;
&lt;br /&gt;
Now you should see the card&lt;br /&gt;
 thinner:/# iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions. &lt;br /&gt;
 &lt;br /&gt;
 eth1      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wifi0     no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated&lt;br /&gt;
          Bit Rate:0 kb/s   Tx-Power:14 dBm   Sensitivity=1/1&lt;br /&gt;
          Retry:off   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:off&lt;br /&gt;
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm&lt;br /&gt;
          Rx invalid nwid:4378  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
To bring the card up&lt;br /&gt;
 #ifconfig ath0 up&lt;br /&gt;
And to scan for networks&lt;br /&gt;
 #wlanconfig ath0 list scan&lt;br /&gt;
And for more info&lt;br /&gt;
 #iwlist ath0 scan&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 destroy&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 create wlandev wifi0 wlanmode ap&lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:09:5B:C3:97:3E&lt;br /&gt;
&lt;br /&gt;
Now create a new text file named /etc/hostapd/wpa_psk and paste your pass phrase as:&lt;br /&gt;
 00:00:00:00:00:00 PASSPHRASE&lt;br /&gt;
&lt;br /&gt;
Turn on the routing engine&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
Create the routing rule&lt;br /&gt;
 route add -net 192.168.70.0 netmask 255.255.255.0 gateway 192.168.70.7 dev eth0&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1915</id>
		<title>Hostap</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1915"/>
		<updated>2008-10-26T20:38:03Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: routing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hardware ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
 wireless-tools (for iwconfig)&lt;br /&gt;
 Bridge-utils&lt;br /&gt;
 Hostapd&lt;br /&gt;
 Hostap-utils ??&lt;br /&gt;
&lt;br /&gt;
I used an old netgear wireless pci card. To see wich chipset it has type&lt;br /&gt;
 lspci&lt;br /&gt;
 00:0e.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)&lt;br /&gt;
&lt;br /&gt;
The atheros chip uses the madwifi driver http://sourceforge.net&lt;br /&gt;
Download the driver and compile the module. Or use the 2.6.27.2 kernel where the atheros chip is supported as a module. Use modprobe ath9k&lt;br /&gt;
 make install&lt;br /&gt;
 modprobe ath_pci&lt;br /&gt;
&lt;br /&gt;
Now you should see the card&lt;br /&gt;
 thinner:/# iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions. &lt;br /&gt;
 &lt;br /&gt;
 eth1      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wifi0     no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated&lt;br /&gt;
          Bit Rate:0 kb/s   Tx-Power:14 dBm   Sensitivity=1/1&lt;br /&gt;
          Retry:off   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:off&lt;br /&gt;
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm&lt;br /&gt;
          Rx invalid nwid:4378  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
To bring the card up&lt;br /&gt;
 #ifconfig ath0 up&lt;br /&gt;
And to scan for networks&lt;br /&gt;
 #wlanconfig ath0 list scan&lt;br /&gt;
And for more info&lt;br /&gt;
 #iwlist ath0 scan&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 destroy&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 create wlandev wifi0 wlanmode ap&lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:09:5B:C3:97:3E&lt;br /&gt;
&lt;br /&gt;
Now create a new text file named /etc/hostapd/wpa_psk and paste your pass phrase as:&lt;br /&gt;
 00:00:00:00:00:00 PASSPHRASE&lt;br /&gt;
&lt;br /&gt;
Turn on the routing engine&lt;br /&gt;
 echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
&lt;br /&gt;
Create the routing rule&lt;br /&gt;
 route add -net 192.168.70.0 netmask 255.255.255.0 gateway 192.168.70.7 dev eth0&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1839</id>
		<title>Hostap</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1839"/>
		<updated>2008-10-19T22:27:59Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: kernel support atheros&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hardware ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
 wireless-tools (for iwconfig)&lt;br /&gt;
 Bridge-utils&lt;br /&gt;
 Hostapd&lt;br /&gt;
 Hostap-utils ??&lt;br /&gt;
&lt;br /&gt;
I used an old netgear wireless pci card. To see wich chipset it has type&lt;br /&gt;
 lspci&lt;br /&gt;
 00:0e.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)&lt;br /&gt;
&lt;br /&gt;
The atheros chip uses the madwifi driver http://sourceforge.net&lt;br /&gt;
Download the driver and compile the module. Or use the 2.6.27.2 kernel where the atheros chip is supported as a module. Use modprobe ath9k&lt;br /&gt;
 make install&lt;br /&gt;
 modprobe ath_pci&lt;br /&gt;
&lt;br /&gt;
Now you should see the card&lt;br /&gt;
 thinner:/# iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions. &lt;br /&gt;
 &lt;br /&gt;
 eth1      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wifi0     no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated&lt;br /&gt;
          Bit Rate:0 kb/s   Tx-Power:14 dBm   Sensitivity=1/1&lt;br /&gt;
          Retry:off   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:off&lt;br /&gt;
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm&lt;br /&gt;
          Rx invalid nwid:4378  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
To bring the card up&lt;br /&gt;
 #ifconfig ath0 up&lt;br /&gt;
And to scan for networks&lt;br /&gt;
 #wlanconfig ath0 list scan&lt;br /&gt;
And for more info&lt;br /&gt;
 #iwlist ath0 scan&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 destroy&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 create wlandev wifi0 wlanmode ap&lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:09:5B:C3:97:3E&lt;br /&gt;
&lt;br /&gt;
Now create a new text file named /etc/hostapd/wpa_psk and paste your pass phrase as:&lt;br /&gt;
 00:00:00:00:00:00 PASSPHRASE&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1837</id>
		<title>Hostap</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1837"/>
		<updated>2008-10-19T19:49:55Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hardware ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
 wireless-tools (for iwconfig)&lt;br /&gt;
 Bridge-utils&lt;br /&gt;
 Hostapd&lt;br /&gt;
 Hostap-utils ??&lt;br /&gt;
&lt;br /&gt;
I used an old netgear wireless pci card. To see wich chipset it has type&lt;br /&gt;
 lspci&lt;br /&gt;
 00:0e.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)&lt;br /&gt;
&lt;br /&gt;
The atheros chip uses the madwifi driver http://sourceforge.net&lt;br /&gt;
Download the driver and compile the module.&lt;br /&gt;
 make install&lt;br /&gt;
 modprobe ath_pci&lt;br /&gt;
&lt;br /&gt;
Now you should see the card&lt;br /&gt;
 thinner:/# iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions. &lt;br /&gt;
 &lt;br /&gt;
 eth1      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wifi0     no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated&lt;br /&gt;
          Bit Rate:0 kb/s   Tx-Power:14 dBm   Sensitivity=1/1&lt;br /&gt;
          Retry:off   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:off&lt;br /&gt;
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm&lt;br /&gt;
          Rx invalid nwid:4378  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
To bring the card up&lt;br /&gt;
 #ifconfig ath0 up&lt;br /&gt;
And to scan for networks&lt;br /&gt;
 #wlanconfig ath0 list scan&lt;br /&gt;
And for more info&lt;br /&gt;
 #iwlist ath0 scan&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 destroy&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 create wlandev wifi0 wlanmode ap&lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:09:5B:C3:97:3E&lt;br /&gt;
&lt;br /&gt;
Now create a new text file named /etc/hostapd/wpa_psk and paste your pass phrase as:&lt;br /&gt;
 00:00:00:00:00:00 PASSPHRASE&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1836</id>
		<title>Hostap</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Hostap&amp;diff=1836"/>
		<updated>2008-10-19T18:31:38Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: Hostap&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hardware ==&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
 wireless-tools (for iwconfig)&lt;br /&gt;
 Bridge-utils&lt;br /&gt;
 Hostapd&lt;br /&gt;
 Hostap-utils ??&lt;br /&gt;
&lt;br /&gt;
I used an old netgear wireless pci card. To see wich chipset it has type&lt;br /&gt;
 lspci&lt;br /&gt;
 00:0e.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)&lt;br /&gt;
&lt;br /&gt;
The atheros chip uses the madwifi driver http://sourceforge.net&lt;br /&gt;
Download the driver and compile the module.&lt;br /&gt;
 make install&lt;br /&gt;
 modprobe ath_pci&lt;br /&gt;
&lt;br /&gt;
Now you should see the card&lt;br /&gt;
 thinner:/# iwconfig&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0      no wireless extensions. &lt;br /&gt;
 &lt;br /&gt;
 eth1      no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 wifi0     no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated&lt;br /&gt;
          Bit Rate:0 kb/s   Tx-Power:14 dBm   Sensitivity=1/1&lt;br /&gt;
          Retry:off   RTS thr:off   Fragment thr:off&lt;br /&gt;
          Encryption key:off&lt;br /&gt;
          Power Management:off&lt;br /&gt;
          Link Quality=0/70  Signal level=-96 dBm  Noise level=-96 dBm&lt;br /&gt;
          Rx invalid nwid:4378  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
To bring the card up&lt;br /&gt;
 #ifconfig ath0 up&lt;br /&gt;
And to scan for networks&lt;br /&gt;
 #wlanconfig ath0 list scan&lt;br /&gt;
And for more info&lt;br /&gt;
 #iwlist ath0 scan&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 destroy&lt;br /&gt;
&lt;br /&gt;
 #wlanconfig ath0 create wlandev wifi0 wlanmode ap&lt;br /&gt;
 ath0      IEEE 802.11g  ESSID:&amp;quot;&amp;quot;  Nickname:&amp;quot;&amp;quot;&lt;br /&gt;
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:09:5B:C3:97:3E&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1834</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1834"/>
		<updated>2008-10-19T14:20:35Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: /* NDISwrapper */ layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&amp;lt;br&amp;gt;&lt;br /&gt;
Install with ndiswrapper -i drivername.inf&amp;lt;br&amp;gt;&lt;br /&gt;
check the device id with lsusb or lspci -n&amp;lt;br&amp;gt;&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
	<entry>
		<id>https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1833</id>
		<title>Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://www.saruman.biz/saruwiki/index.php?title=Ubuntu&amp;diff=1833"/>
		<updated>2008-10-19T14:18:32Z</updated>

		<summary type="html">&lt;p&gt;Insomnia: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== NDISwrapper ==&lt;br /&gt;
&lt;br /&gt;
NDISwrapper is a free software driver wrapper that enables the use of Microsoft Windows drivers for wireless network devices.&lt;br /&gt;
&lt;br /&gt;
Download the windows driver wich contains the .inf file&lt;br /&gt;
Install with ndiswrapper -i drivername.inf &lt;br /&gt;
check the device id with lsusb or lspci -n&lt;br /&gt;
Now execute with ndiswrapper -a deviceid driver&lt;br /&gt;
 ndiswrapper -a 0bda:8197 net8187b&lt;br /&gt;
check the installed drivers&lt;br /&gt;
 ndiswrapper -l&lt;br /&gt;
Write the configuration for modprobe&lt;br /&gt;
 ndiswrapper -m&lt;br /&gt;
And use the module&lt;br /&gt;
 modprobe ndiswrapper&lt;/div&gt;</summary>
		<author><name>Insomnia</name></author>
	</entry>
</feed>