File: configure.html

package info (click to toggle)
lirc 0.7.1pre2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,852 kB
  • ctags: 2,924
  • sloc: ansic: 31,205; sh: 12,021; makefile: 631
file content (665 lines) | stat: -rw-r--r-- 24,662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>
  <HEAD>
    <TITLE>LIRC - Linux Infrared Remote Control</TITLE>
    <LINK REL=stylesheet TYPE="text/css" HREF="../lirc.css">
    <LINK REL="shortcut icon" HREF="../favicon.ico">
    <META NAME="description" CONTENT="LIRC - Linux Infra-red Remote Control">
    <META NAME="keywords" CONTENT="linux, kernel module, remote control, animax, multimedia">
  </HEAD>
  
  <BODY BACKGROUND="../images/marb18.jpg"
    BGCOLOR="#FFFFFF" TEXT="#000000" ALINK="#8080FF">
    <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
      <TR>
	<TD CLASS="menu" WIDTH="100%" HEIGHT="150">
	  <IMG SRC="../images/diode.gif" ALT=""
	    WIDTH="300" HEIGHT="150" BORDER="0" HSPACE="20"
	    VSPACE="0" ALIGN="LEFT"> 
	  <IMG SRC="../images/lirc.gif" ALT=""
	    WIDTH="300" HEIGHT="150" BORDER="0" HSPACE="20"
	    VSPACE="0" ALIGN="RIGHT">
	</TD>
      </TR>
      <TR>
	<TD WIDTH="100%">&#160;<BR>
	  <TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
	    <TR>
	      <TD WIDTH="15%">&#160;<BR></TD>
	      <TD WIDTH="70%" ALIGN="LEFT" VALIGN="TOP">&#160;<BR>

<!-- Text ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

    <!-- lircd.conf ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

    <A NAME="lircd.conf"></A><HR>
    <H1 ALIGN="CENTER">Configuring lircd (the LIRC daemon)</H1>
    <HR WIDTH="70%">
    
    <OL>
      <LI>Check if there is already a config file in
	<em>/etc/lircd.conf</em>. If not</LI>
      
      <LI>check if there is a config file available for your remote control
	at the LIRC homepage and copy it to
	<em>/etc/lircd.conf</em>. If not</LI>
      
      <LI>start <em>irrecord</em> (finish all applications that access
	<em>/dev/lirc</em> first) and follow the instructions given to you by
	this program. Copy the resulting file to
	<em>/etc/lircd.conf</em>.</LI>
    </OL>
    
    <P>
      If you want to use more than one remote control you can simply
      concatenate the config files: <em>cat config1 config2
      &gt;config</em>
    </P>
    <P>
      <B>Note:</B> If you already have a config file for the libirman
      package you can convert it using the <em>irman2lirc</em> script
      that you can find in the contrib directory.
    </P>
    
    <!-- lircd.conf fileformat +++++++++++++++++++++++++++++++++++++++++++ -->
    
    <A NAME="lircd.conf_format"></A><HR>
    <H1 ALIGN="CENTER">The lircd.conf file format</H1>
    <HR WIDTH="70%">
    
    <P>
      A description of the <A
	HREF="http://winlirc.sourceforge.net/technicaldetails.html">file
	format</A> is available on the WinLIRC pages. In fact you don't
      need to know anything about it except that it's maybe the most
      important part of the package.
    </P>
    
    <!-- multiple devices ++++++++++++++++++++++++++++++++++++++++++++++++ -->

    <A NAME="multiple"></A><HR>
    <H1 ALIGN="CENTER">Using multiple different devices simultaneously</H1>
    <HR WIDTH="70%">
    
    <P>
      There are some situations when you might want to use multiple
      devices with LIRC simultaneously. E.g. you might have a TV card
      receiver and want to control your set-top box with a home-brew
      serial port transmitter at the same time. Or you might have a
      serial port receiver connected to your PC and a different
      network connected receiver (UDP, different LIRC/WinLIRC
      instance) in a different room.
    </P>
    <P>
      The configuration depends much on the type of devices you want
      to use. If you are using devices that require a kernel module,
      then you should first compile and install LIRC individually for
      each device, basically just to get all required kernel modules
      installed. The further steps depend on which user-space driver
      is used in lircd for your devices. Most devices (actually all
      devices that use a kernel module) use the <em>default</em>
      driver. You can check which user-space is used for your device
      by running <em>lircd --driver=?</em>. Remember that this might
      change each time you compile lircd for a different device. If
      you want to use devices that use different user-space drivers
      then you have to compile LIRC once again using <em>./configure
      --with-driver=any</em>. This will compile almost any user-space
      driver into lircd that is available (but does not compile any
      kernel modules, that's why you had to build them individually
      before). After that you should check if the drivers you want are
      listed now with <em>lircd --driver=?</em>. You should get
      something like this:
    </P>
<pre>
> lircd --driver=?
Driver `?' not supported.
Supported drivers:
        audio
        bte
        creative
        creative_infracd
        default
        dev/input
        dsp
        ea65
        irman
        livedrive_midi
        livedrive_seq
        logitech
        mp3anywhere
        null
        pcmak
        pinsys
        pixelview
        silitek
        tira
        udp
        uirt2
        uirt2_raw
</pre>
    <P>
      If you want to use more than one device that uses a kernel
      module you should now have a look at the character device setup
      in /dev/. Each LIRC kernel module provides a device with major
      number 61 and a minor number beginning at 0 which is counted up
      every time a new driver is loaded (note: both the major number
      and the minor number concept are subject to change in future
      LIRC releases). If you want to use two devices then the LIRC
      related files in /dev/ should look something like this (this
      might be done automatically if you are using devfs or sysfs):
    </P>
<pre>
> ls -l /dev/lirc*
crw-r--r--    1 root     root      61,   0 Apr 25  2001 /dev/lirc
crw-r--r--    1 root     root      61,   1 Nov  6 19:24 /dev/lirc1
srw-rw-rw-    1 root     root            0 Dez 19 09:44 /dev/lircd
prw-r--r--    1 root     root            0 Okt 10 21:16 /dev/lircm
</pre>
    <P>
      You can create new entries by running:
<pre>
> mknod /dev/lirc2 c 61 2
</pre>
    </P>
    <P>
      For each device you want to use you have to start an individual
      lircd instance. If you want to receive events from all receivers
      at one socket interface you have to connect the different lircd
      interfaces with an additional TCP/IP socket. This could look
      e.g. like this:
    </P>
<pre>
> lircd --driver=default --device=/dev/lirc1 --output=/dev/lircd1 \
    --pidfile=/var/run/lircd1.pid --listen
> lircd --driver=default --device=/dev/lirc --output=/dev/lircd \
    --pidfile=/var/run/lircd.pid --connect=localhost:8765
</pre>
    <P>
      All events will now be visible at /dev/lircd. The second lircd
      instance connects to the first instance using a TCP/IP
      socket. The default port is 8765. It can be changed by providing
      an optional parameter to the <em>--listen</em> switch. If you
      have more lircd instances you want to connect to, you can
      provide multiple <em>--connect</em> parameters to the last lircd
      instance. Please note that lircd will not relay events received
      from one lircd to another. So you can't daisy-chain
      lircds. Instead you need a star topology setup.
    </P>
      In order to check each lircd instance individually if events are
      being received, just use irw providing the according socket
      interface on the command line:
<pre>
> irw /dev/lircd1
</pre>
    <P>
      Also using a special lircd instance to send infra-red commands
      is quite easy: use the --device command line option of irsend to
      provide the desired socket interface.
    </P>
    <P>
      The only situation where the described procedure will not work
      is when you have two devices that both use a kernel driver that
      can only handle one device at once like e.g. lirc_serial,
      lirc_sir or lirc_parallel. You can still make it work with a
      trick by compiling the affected driver multiple times using
      different names and different major numbers. You will find
      detailed instructions how to achieve this by searching the
      mailing list. Lifting this limitation is one of the todo items
      for future releases.
    </P>

    <!-- lircmd.conf +++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
    
    <A NAME="lircmd.conf"></A><HR>
    <H1 ALIGN="CENTER">Configuring lircmd (the LIRC mouse daemon)</H1>
    <HR WIDTH="70%">
    
    <P>
      <em>lircmd</em> can be used to emulate a mouse with your remote
      control. Depending on the config file described in the next
      section it converts IR signals into mouse events. It currently
      supports three mouse protocols (MouseSystems, IntelliMouse and
      IMPS/2). For compatibility reasons the default protocol is the
      MouseSystems protocol but the preferred is the IntelliMouse
      protocol. The advantage of this protocol is its wheel-mouse
      support. That way you can for example configure Netscape to
      scroll if you press certain buttons.
    </P>
    
    <P>
      IMPS/2 used to be the preferred protocol since it also has
      wheel-mouse support and IntelliMouse was not available. However
      PS/2 protocol specifies that the mouse must accept and reply to
      specific commands, and that can not be done through the pipe
      <em>lircmd</em> uses. For this reason IntelliMouse support was
      written and is currently the prefered protocol.
    </P>
    
    <P>
      lircmd can basically be used with two applications: X11 and gpm<BR>
      
      Configuration of both is described here:
    </P>
    
    <H3>X11</H3>
    
    <H4>3.x</H4>
    <P>
      Just put this section in your XF86Config file to use the mouse
      in addition to your normal one.
    </P>
    
    <PRE>
    Section "XInput"
        Subsection "Mouse"
            Protocol    "IntelliMouse"
            Device      "/dev/lircm"
            DeviceName  "Remote"
            AlwaysCore
        EndSubsection
    EndSection</PRE>
    <P>
      Additionally you might have to add
    </P>
    <PRE>
        Buttons 5</PRE>
    <P>
      to your normal &quot;Pointer&quot; Section in order to make the
      wheel buttons work. Of course you have to replace IntelliMouse
      with IMPS/2 or MouseSystems if you really want to use one of
      this protocols. Colas Nahaboo's <A
      HREF="http://www.inria.fr/koala/colas/mouse-wheel-scroll/">X
      mouse wheel scroll page</A> gives you further information how to
      make use of your new wheel mouse.
    </P>
    
    <P>
      Make sure you use a current version of X11. There seems to be a
      bug in X version 3.3 that can make X crash if you use both mouse
      and remote control mouse simultaneously. At least I couldn't
      reproduce this with other versions. I also received some notes
      that lircmd does not work with certain X11 versions. But almost
      always at least one of the protocols did work. So try them all
      before trying another X11 version. But always remember that you
      have to modify both XF86Config and lircmd.conf so they use the
      same protocol.
    </P>

    <H4>4.x</H4>
    <P>
      Put this section in your XF86Config-4 file to use the mouse in
      addition to your normal one.
    </P>
    <PRE>
Section "InputDevice"
        Identifier  "LIRC-Mouse"
        Driver      "mouse"
        Option      "Device" "/dev/lircm"
        Option      "Protocol" "IntelliMouse"
        Option      "SendCoreEvents"
        Option      "Buttons" "5"
        Option      "ZAxisMapping" "4 5"
EndSection</PRE>
    
    <P>
      And add a line to the ServerLayout section like this:
    </P>
    <PRE>
Section "ServerLayout"
        ...
        InputDevice    "LIRC-Mouse"           &lt;-- add this line
EndSection</PRE>

    <H3>gpm</H3>
    
    <P>
      You can also e.g. use <em>multimouse</em> (available at <A
      HREF="ftp://sunsite.unc.edu/">ftp://sunsite.unc.edu/</A> or
      mirrors) or <em>gpm</em> to use it parallel to your normal
      mouse. With:
    </P>
    <PRE>
    gpm -t ps2 -R -M -m /dev/lircm -t ms3</PRE>
    or<BR>
    <PRE>
    gpm -t ps2 -R -M -m /dev/lircm -t imps2</PRE>
    or<BR>
    <PRE>
    gpm -t ps2 -R -M -m /dev/lircm -t msc</PRE>
    <P>
      I can use my usual PS/2 mouse and my remote control
      (IntelliMouse, IMPS/2 or MouseSystems protocol) at the same time
      to control the mouse pointer.
    </P>

    <P>
      <B>Note:</B> If you update lircmd.conf you can send the HUP
      signal to lircmd:
    </P>
    <PRE>
    killall -HUP lircmd</PRE>
    <P>
      This instructs lircmd to reread its config file. The same is
      true for lircd if you change lircd.conf. lircd will also reopen
      its log file on SIGHUP.
    </P>
    
    <!-- lircmd.conf fileformat ++++++++++++++++++++++++++++++++++++++++++ -->
    
    <A NAME="lircmd.conf_format"></A><HR>
    <H1 ALIGN="CENTER">The lircmd.conf file format</H1>
    <HR WIDTH="70%">
    
    <P>
      The config file for lircmd is quite simple. Just look at the
      example in the contrib directory. Some drivers even already
      bring their config file for lircmd with them so lircmd is ready
      to run.
    </P>
    
    <DL>
      <DT>PROTOCOL&nbsp;&nbsp;&lt;<em>protocol</em>&gt;</DT>
      <DD>
	<P>
	  You can choose between MouseSystems, IntelliMouse and IMPS/2
	  protocol. The default is MouseSystems protocol.
	</P>
      </DD>
      <DT>ACCELERATOR&nbsp;&nbsp;&lt;<em>start</em>&gt; &lt;<em>max</em>&gt; &lt;<em>multiplier</em>&gt;</DT>
      <DD>
	<P>
	  Change the values here if your mouse pointer is moving too
	  fast/slow. Usually the mouse pointer moves 1 pixel every
	  time it receives a signal. The values here specify how much
	  mouse movement accelerates if you hold down the according
	  button on your remote control for a longer timer. The
	  <em>start</em> value is the threshold that starts
	  acceleration. Then the amount of pixels is calculated with
	  the following formula:
	  <em>x</em>=<em>repeat</em>*<em>multiplier</em>, where repeat
	  is the number of repeated signals. <em>max</em> specifies
	  the maximum number of pixels the pointer can move due to a
	  single command.
	</P>
      </DD>
      <DT>ACTIVATE&nbsp;&nbsp;&lt;<em>remote</em>&gt; &lt;<em>button</em>&gt;</DT>
      <DT>TOGGLE_ACTIVATE&nbsp;&nbsp;&lt;<em>remote</em>&gt; &lt;<em>button</em>&gt;</DT>
      <DD>
	<P>
	  I recommend that you use a special button to activate the
	  mouse daemon with this command. You will see whenever the
	  daemon is activated/deactivated directly on the screen. If
	  you omit this command the daemon will always be active.
	</P>
	<P>
	  The difference between ACTIVATE and TOGGLE_ACTIVATE is how
	  you leave the mouse mode. With TOGGLE_ACTIVATE you have to
	  press the button that you use to enter the mode to leave
	  it. With ACTIVATE you will leave mouse mode as soon as you
	  press a button that is not used for any function in the
	  config file.
	</P>
      </DD>
      <DT>MOVE_ [ N [ E | W ] | E | S [ E | W ] | W ]&nbsp;&nbsp;&lt;<em>remote</em>&gt; &lt;<em>button</em>&gt;</DT>
      <DD>
	<P>
	  The obvious functionality. You can even get better
	  granularity by combing different commands (copied from the
	  config file for AnimaX remotes):
	</P>
	<PRE>
MOVE_N    ANIMAX_MOUSE_PAD   MOUSE_NNE
MOVE_NE   ANIMAX_MOUSE_PAD   MOUSE_NNE</PRE>
	<P>
	  This also demonstrates that all commands are executed
	  beginning at the top.
	</P>
      </DD>
      <DT>MOVE_[IN|OUT]&nbsp;&nbsp;&lt;<em>remote</em>&gt; &lt;<em>button</em>&gt;</DT> 
      <DD>
	<P>
	  This will only work with IntelliMouse and IMPS/2 protocols
	  and indicates movement of the wheel.
	</P>
      </DD>
      <DT>BUTTONx_CLICK, BUTTONx_DOWN, BUTTONx_UP, BUTTONx_TOGGLE&nbsp;&nbsp;&lt;<em>remote</em>&gt; &lt;<em>button</em>&gt;</DT>
      <DD>
	<P>
	  This simulates according events for the left (x=1), middle
	  (x=2) or right (x=3) mouse button.
	</P>
      </DD>
      <DT>IGNORE&nbsp;&nbsp;&lt;<em>remote</em>&gt; &lt;<em>button</em>&gt;</DT> 
      <DD>
	<P>
	  Pressing ignored buttons won't cause the mouse daemon to deactivate.
	  This is useful, for example, if your remote sends seperate press or
	  release codes that you have mapped in your lircd.conf.  This only
	  makes sense if you use ACTIVATE instead of TOGGLE_ACTIVATE.
	</P>
      </DD>
    </DL>
    
    <P>
      '*' is allowed as wild card for button and remote. Please note
      that every line that fits to the received signal will be
      executed. Parsing starts at the top of the file.
    </P>
    
    <!-- .lircrc file format ++++++++++++++++++++++++++++++++++++++++++++++ -->
    
    <A NAME="lircrc_format"></A><HR>
    <H1 ALIGN="CENTER">The .lircrc file format</H1>
    <HR WIDTH="70%">
    
    <P>
      At this point all you need are the tools, which react on the
      signals decoded by lircd. To do this you need a file called
      <em>.lircrc</em>. It should be placed in your home
      directory. Optionally you can create a system-wide configuration
      file located in /etc/lircrc, which will be used when no .lircrc
      file can be found in the user's home directory. The idea is to
      have configuration information of all clients in one place. That
      lets you keep a better overview of clients and simplifies the
      use of modes explained later.
    </P>
    <P>
      First I will explain the syntax of the .lircrc file itself.  The
      config file for LIRC tools consists of one or more of the
      following constructions:
    </P>
    <PRE>
    begin
	prog	= ...
	remote	= ...
	button	= ...
	repeat	= ...
	delay	= ...
	config	= ...
	mode	= ...
	flags	= ...
    end</PRE>
    <P>
      Bringing it to the point the above says which program
      (<em>prog</em>) should do what (<em>config</em>, <em>mode</em>,
      <em>flags</em>) if you press a certain button (<em>remote</em>,
      <em>button</em>) a specified time (<em>repeat</em>,
      <em>delay</em>).
    </P>
    <DL>
      <DT>prog</DT>
      <DD>gives the name of the program that should receive the
	configstring given in config.
      </DD>
      <DT>remote, button</DT>
      <DD>specify a key of a remote control that launches an
	action. Key sequences can be specified by giving more then one
	remote/button string. The character '*' can be used as a wild
	card for remote or button. The default for remote is '*'. The
	remote name must always be given before its according
	button. When using key sequences a given remote is valid for
	all following buttons until you specify another remote.
      </DD>
      <DT>repeat</DT>
      <DD>tells the program what shall happen if a key is repeated.  A
	value of zero tells the program to ignore repeated keys.  Any
	other positive value 'n' tells the program to pass the config
	string every 'n'-th time to the according application, when a
	key is repeated. The default for repeat is zero.
      </DD>
      <DT>delay</DT>
      <DD>tells the program to ignore the specified number of key repeats
	before using the "repeat" configuration directive above. This is
	used to prevent double triggers of events when using a fast repeat
	rate. A value of zero, which also is the default, will disable the
	delay function.
      </DD>
      <DT>config</DT>
      <DD>is the string that will be passed to the according
	application whenever the specified key sequence is received by
	lircd. If you give more than one config string, the config
	strings will be passed to the applications by turns. With this
	feature you can for example implement toggle buttons.<BR>
	
	You can pass non-printable characters to applications with all
	standard C escape sequences (most common are: \n = line-feed,
	\r = carriage return, \t = tab, \e = escape,
	\&lt;<em>n</em>&gt; = ASCII code in octal representation,
	\x&lt;<em>n</em>&gt; = ASCII code in hexadecimal
	representation, \\ = backslash). Additionally you can supply
	Ctrl-X by specifying \X where X is an upper character or
	@. For example \C is Ctrl-C.
      </DD>
      <DT>mode</DT>
      <DD>tells the program to enter a special mode. You can group
	several configurations by putting them into the following,
	where mode stands for the mode where these configurations
	should be active: 
	
	<PRE>
    begin mode
	...
    end mode</PRE>
	
	If mode is equal to the name of a client application this
	application will always start in this mode. Consider this
	situation: you want to start <em>xawtv</em> with
	<em>irexec</em> and enter the <em>tv</em> mode. Then irexec
	would enter the tv mode but xawtv would begin without any mode
	enabled. By renaming the mode from <em>tv</em> to
	<em>xawtv</em> you can solve this problem.

	<br>Another way to specify a startup mode is by using the
	startup_mode flag as described below.<BR>
	<BR>
	<em>Caveat:</em> In order to avoid many identical entries all
	actions that modify the mode a program currently is in are
	independent of the <em>prog</em> token.
      </DD>
    </DL>
    The following are valid flags:
    <DL>
      <DT>once</DT>
      
      <DD>
	This is only allowed in conjunction with the mode
	directive. The config string is passed to the application only
	the first time the mode is entered or you have explicitly left
	this mode. This is useful for starting an application whenever
	you enter a special mode.
      </DD>
      <DT>quit</DT>
      <DD>Usually all configurations are examined if they have
	to be executed. You can stop this immediately with this flag.
      </DD>
      <DT>mode</DT>
      <DD>This is only allowed within a mode block. It tells the
	program to leave this mode.
      </DD>
      <DT>startup_mode</DT>
      <DD>
	Tells the program to start in the mode given in the mode
	keyword.  The following example tells the program to start in
	the <em>browser</em> mode
	<PRE>
begin
	flags = startup_mode
	mode = browser
end</PRE>
      </DD>
    </DL>
    
    <P>
      It is possible to split the lirc configuration into several
      files by using the <em>include</em> command. It tells the parser
      to read the specified file before resuming the current one:
    </P>
    <PRE>
include ~/.lirc/xawtv</PRE>
    <P>
      If the specified filename begins with &quot;~/&quot;,
      &quot;~&quot; will be substituted with the content of the
      <em>HOME</em> environment variable. The filename also can be put
      inside &lt;&gt; and &quot;&quot; characters which in contrast to
      the C preprocessor do not have special meanings.
    </P>
    <P>
      Ok, now a simple example for a <em>.lircrc</em> file (supposed
      you use an AnimaX remote and use the sample files for this
      remote from the remotes/ directory. If you have another remote
      change <em>remote=</em> and <em>button=</em> according to your
      remote [this definitions are made in the <em>lircd.conf</em>
      file] )
    </P>
    
    <PRE>
    begin
        remote = ANIMAX
        button = MENU_DOWN
        prog   = irexec
        repeat = 0
        config = echo "Hello world!"
    end</PRE>
    <P>
      If you have saved this as <em>.lircrc</em> in your home
      directory, start <em>irexec</em>. Press the button which is
      selected in the <em>button=</em> line and you will see a 'Hello
      world!' on your screen. As you can see irexec is a simple
      program launcher. Of course you can do a lot more than just
      start programs.
    </P>
    
    <P>
      If you start a LIRC client program, it reads your ~/.lircrc and
      reacts only on prog= entries which point to itself. All programs
      should give you the possibility to use an alternative config
      file. If you have included more than one program in your
      .lircrc, then start all these programs, they react only to their
      according entries in .lircrc. This also leads to a disadvantage
      of the mode concept. If you don't start all client programs at a
      time the mode they have to maintain may differ between
      applications. Also key sequences might not be recognized equally
      because all programs then don't have the same starting point.
    </P>
    

<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

		<BR><BR>
		<CENTER>[<A HREF="http://www.lirc.org/">LIRC homepage</A>]<BR>
		  <I>The LIRC Manual, last update: 12-Sep-2002</I></CENTER>
		<BR><BR>
	      </TD>
	      <TD WIDTH="15%">&#160;<BR></TD>
	    </TR>
	  </TABLE>
	</TD>
      </TR>
      <TR>
	<TD CLASS="menu" WIDTH="100%">&#160;<BR>
	</TD>
      </TR>
    </TABLE>
  </BODY>
</HTML>