Posts Tagged ‘vlc’

MCE Remote on a Mac – or: I want more buttons!

Posted in Tutorials on April 8th, 2009 by edwin – Comments Off

MCE Remote on a MacThis is a series on using an MCE Remote Control with a Mac.

While programs like Remote Buddy and Mira allow you to get much more from your apple remote, there is one drawback: it has only 6 buttons. This may work well for many people, and for applications specifically designed for it, but I just like to have much more control. As a recent switcher from a Windows desktop/media pc and FreeBSD/Unix server to a one-Mac-Mini-fits-all setup, I had one of those MCE remotes lying around, so that’s the one I wanted to use.

However, an intensive search on google and all sorts of forums did not help: as far as I know, the thing just isn’t supported. Using Remote Buddy or Mira I can use the eHome receiver delivered with my MCE Remote, but only with an Apple Remote and not the MCE Remote itself. Even looking at the Linux community did not help: while a port of the LIRC software is available in MacPorts it does not have any hardware support, but can only connect to a remote host. Having some good experience with running Windows and Linux as a virtual machine in Parallels Desktop I came to the following “solution” for my problem:

  • Take a small Linux distribution, and run it as a VM
  • Install LIRC and the needed linux kernel modules in this VM
  • Connect my USB eHome IR receiver to LIRC in this VM
  • Also install LIRC on the Mac natively and connect it to LIRC in the Linux VM
  • Convert the button presses on the Remote Control to keypresses on my Mac using a combination of LIRC software and AppleScript

It took quite a bit of digging, but in the end I got everything working and I am now controlling my VLC media player using an MCE remote control.

A few words of warning: this tutorial is not for people who:

  • Expect ready to use software with a graphical installer, neat configuration screens etc. All of this is basically a clever workaround, and it works well for me, but if the only thing you want is a way to reconfigure some buttons from your Apple remote, then Remote Buddy or Mira is the way to go.
  • Are afraid of using the Terminal. You do not need to be a UNIX guru to follow the steps in this tutorial, but if you do not know what the Terminal is within Mac OS X, you better look through some basic toturials first.

If you still want to proceed, read the following three articles for the nitty gritty instructions:
- Step 1: installing Finnix as a Parallels VM
- Step 2: installing LIRC in the Finnix VM
- Step 3: configuring LIRC in OS X

MCE Remote on a Mac – Step 3: configuring LIRC in OS X

Posted in Tutorials on April 8th, 2009 by edwin – 2 Comments

MCE Remote on a MacThis is part 3 in a series on using an MCE Remote Control with a Mac. See the:
- Main article
- Step 1: installing Finnix as a Parallels VM
- Step 2: installing LIRC in the Finnix VM

Installing LIRC using MacPorts

The LIRC client executables can be installed using MacPorts. We will use these executables to connect to the LIRC daemon in the Finnix VM.

First you need to install:

Then fire up a terminal, and execute the following commands in a Mac terminal to initialize your ports tree and install LIRC:
$ sudo port -v selfupdate
$ sudo port install lirc

While you are waiting for lirc to install, let’s already execute the next step: in order to connect to your virtual machine, you need to know the IP address used by it. Run the ifconfig command in your Finnix VM. The output looks someting like:
root@tty1:~# ifconfig eth0
eth0    Link encap:Ethernet HWaddr 00:1c:42:f0:e5:19
        inet addr:10.37.129.3 Bcast:10.37.129.255 Mask:255.255.255.0
        UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
        RX packets:813 errors:0 dropped:0 overruns:0 frame:0
        TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000
        RX bytes:73804 (72.0 KiB) TX bytes:11687 (11.4 KiB)
        Interrupt:10 Base address:0x8200

The ip address you are looking for is the one after ‘inet addr:’ on the second line.

When lirc is installed, let’s connect to it by typing the following in your Mac terminal (and not the Finnix VM), obviously replacing the ip address with the one you found in the previous step:
# sudo lircd --connect 10.37.129.3
# sudo chmod 666 /opt/local/var/run/lircd

Now let’s test your setup by running ‘irw’ and pushing some buttons. Your terminal should look like:
# irw
000000037ff07bf2 00 Home mceusb
000000037ff07bf2 01 Home mceusb
000000037ff07bf2 02 Home mceusb
000000037ff07be9 00 Play mceusb
000000037ff07be0 00 Down mceusb

Congratulations! You are now receiving your MCE Remote events on your Mac. Read on for information on how to control an application with it.
read more »