GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
AIRD(1) FreeBSD General Commands Manual AIRD(1)

aird
USB Apple IR receiver daemon

aird [-vd] [-p pidfile] [-k key] -f device [-M menu command] [-P play command] [-F forward command] [-B backward command] [-U volume up command] [-D volume down command]

The aird daemon handles Apple IR receiver button events. If your system has an USB Apple IR receiver, most likely you'll also have an Apple Remote. An Apple remote has six (6) buttons: Volume up, Volume down, Play/Pause, Forward, Backward and Menu. For each button you can assign a command to execute.

Apple IR receiver modules are found on:

  • MacBook (any generation)
  • MacBook Pro (any generation)
  • Intel iMac
  • Intel MacMini

The following program options are available:

Enable verbose mode.
Toggles the daemon flag.
pidfile
Use the specified file to store the process ID.
device
Read from the specified device entry. This is mandatory.
key
Only accept commands from the remote with the specified key. See the EXAMPLES section to understand how remote pairing works.

The following options specify commands to run upon button down events:

menu command
Command to run when the daemon recieves a notification that the Menu button was pressed.
play command
Command to run when the daemon recieves a notification that the Play/Pause button was pressed.
forward command
Command to run when the daemon recieves a notification that the Forward button was pressed.
backward command
Command to run when the daemon recieves a notification that the Backward button was pressed.
volume up command
Command to run when the daemon recieves a notification that the Volume Up button was pressed.
volume down command
Command to run when the daemon recieves a notification that the Volume Down button was pressed.

Note that lower case options are program options and upper case options specify the commands to run upon button down events.

/var/run/aird.pid
The default location of the PID file.

To pair a remote controller with your IR receiver, do the following:
aird -f /dev/uhid1 -k 0

Then press the Menu and Forward keys at the same time for five seconds. The following will show up:

Your Apple remote pairing key is: 131
Next time you run aird, pass this number as the -k argument.

This example shows how to control mpd(1) with aird(1). You need mpc(1) and ncmpc(1) installed. Run aird(1) from your ~/.xinitrc startup file like this:

aird -p ~/.aird.pid -f /dev/uhid1 -P "mpc toggle" -F "mpc next" \
  -B "mpc prev" -U "mixer vol +2" -D "mixer vol -2"  \
  -M "xterm -e ncmpc"

If you want to stop other users from gaining control of the IR receiver and to prevent commands to be executed when someone presses a button on the remote control, run aird(1) only with the -f argument:

aird -f /dev/uhid1

mpd(1) (ports/audio/musicpd), mpc(1) (ports/audio/mpc), ncmpc(1) (ports/audio/ncmpc), uhid(4), usb(4)

The aird utility first appeared in FreeBSD 8.0.

Rui Paulo ⟨rpaulo@FreeBSD.org⟩
July 30, 2007

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.