Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to get LightDM to see a MCE remote as an input device at the greeter screen? I have three accounts -- my user account, MythTV, and XBMC and I'd like to be able to switch between these using a remote. I've made the following change to my xorg.conf:

Section "InputClass"
    Identifier           "Remote"
    MatchDevicePath      "/dev/input/event2"
    Option            "Ignore" "True"

And sees the remote:

#cat /var/log/Xorg.0.log | grep Media |grep input |grep event
[354591.052] (II) config/udev: Adding input device Media Center Ed. eHome Infrared Remote Transceiver (0471:060c) (/dev/input/event2)
share|improve this question

I actually solved this through a twostep process:

  • used xdotool to simulate keyboard events.
  • used irexec to listen to specific IR events, and then fire off the script

$irexec /etc/lirc/lirc.greeter.conf

Here is lirc.greeter.conf

    remote = mceusb
    button = KEY_UP
    prog   = irexec
    repeat = 0
    config = greeter_sendkey Up

    remote = mceusb
    button = KEY_DOWN
    prog   = irexec
    repeat = 0
    config = greeter_sendkey Down 

    remote = mceusb
    button = KEY_OK
    prog   = irexec
    repeat = 0
    config = greeter_sendkey Return

and the script it sends the event to:


LOGIN=`who | grep tty7 | /usr/bin/awk '{ print $1 }'`

if [ -z "$1" ];
   echo "usage: greeter_sendkey CMD"
   exit 2

if [ "$LOGIN" ]; 
     echo "$LOGIN is logged into console"

    export XAUTHORITY=/var/run/lightdm/root/:0
    export DISPLAY=:0
    /usr/bin/xdotool key $1

The who command checks to see if anyone is logged into tty7 the local graphical session. If there is no one logged in, assume the greeter is running. As the script needs to interact with the X server, it needs the xauth file. This is the xauth file for ubuntu 12.04

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.