Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have this remote, and I would like to set it up so it's working with Ubuntu and mythtv.

enter image description here

share|improve this question

1 Answer 1

up vote 0 down vote accepted

This is a How To on getting the Gyration Media Center Remote working in Ubuntu 10.04. I have had this remote since 2007, and fell in love with it. The remote is a gyro mouse and media center remote all in one. In order to get this working you have to use a program called Evrouter.

Orginal Information for getting this remote to work was gathered in this thread. http://ubuntuforums.org/showthread.php?t=479897

Write Up:

Open up a terminal window.

Download EVRouter for your architecture:

i386

cd ~
wget http://debian.bedroomlan.org/debian/pool/main/e/evrouter/evrouter_0.4_i386.deb
amd64

AMD64

cd ~
wget http://debian.bedroomlan.org/debian/pool/main/e/evrouter/evrouter_0.4_amd64.deb

Install EVRouter:

i386

sudo dpkg -i evrouter_0.4_i386.deb

amd64

sudo dpkg -i evrouter_0.4_amd64.deb

Create Configuration file:

Code:

cd ~
touch .evrouterrc
nano .evrouterrc

Paste the below text.

Code:

#   Stop
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/166 "fill this in!"

#   Record
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/167 "XKey/R"

#   Pause
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/167 "XKey/P"

#   Play
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/207 "XKey/P"

#   Rewind
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/168 "XKey/Left"

#   Fast Forward
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/208 "XKey/Right"

#   Skip Back
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/165 "XKey/Home"

#   Skip Forward
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/163 "XKey/End"

#   Guide 
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/362 "XKey/M"

#   Up
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/103 "fill this in!"

#   Left
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/105 "fill this in!"

#   Right
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/106 "fill this in!"

#   Down
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/108 "fill this in!"

#   Back
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/158 "fill this in!"

#   Info
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/130 "XKey/I"

#   OK/Enter
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/28 "fill this in!"

#   Volume Up
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/115 "XKey/F11"

#   Volume Down
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/114 "XKey/F10"

#   Channel Up
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/402 "XKey/Up"

#   Channel Down
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/403 "XKey/Down"

#   Mute
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/113 "XKey/F9"

#   1
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/2 "fill this in!"
# 
#   2
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/3 "fill this in!"
# 
#   3
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/4 "fill this in!"
# 
#   4
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/5 "fill this in!"
# 
#   5
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/6 "fill this in!"
# 
#   6
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/7 "fill this in!"
# 
#   7
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/8 "fill this in!"
# 
#   8
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/9 "fill this in!"
# 
#   9
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/10 "fill this in!"
# 
#   0
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/11 "fill this in!"
# 
#   *
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/42 "fill this in!"
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/9 "fill this in!"
# 
#   #
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/42 "fill this in!"
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/4 "fill this in!"

#   Clear
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/1 "fill this in!"
# 
#   Left Click
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/272 "fill this in!"
# 
#   Right Click
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/273 "fill this in!"

#   Live TV
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/377 "XKey/C"

#   Windows
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/102 "XKey/Alt_L+Control_L+BackSpace"

#   Pictures
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/226 "fill this in!"
# 
#   Music
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/391 "fill this in!"
# 
#   Video
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/393 "fill this in!"

#   DVD Menu
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/410 "XKey/O"

Create start file.

cd /usr/local/bin
sudo touch evrouter_start.sh
sudo nano evrouter_start.sh
sudo chmod 4777 evrouter_start.sh

Paste the below into the file.

xhost +local:root
killall evrouter
rm /tmp/.evrouter* #removes a previous lock file
/usr/bin/evrouter /dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse /dev/input/by-id/usb-Gyration_Gyr
ation_RF_Technology_Receiver-event-kbd &

Create autostart file.

cd ~
cd .config/autostart
touch evrouter.desktop
nano evrouter.desktop
chmod 4777 evrouter.desktop

Paste the below text.

[Desktop Entry]
Name=Evrouter
Comment=
GenericName=Evrouter Process
Exec=/usr/local/bin/evrouter_start.sh
Type=Application
Encoding=UTF-8
Icon=
Categories=GNOME;Application;AudioVideo;Audio;Video
X-AppInstall-Package=Evrouter

Get event ID: Run

ls -l /dev/input/by-id/

Above command should return information like below.

demonbob@sys-mythtv:/etc/udev/rules.d$ ls -l /dev/input/by-id/
total 0
lrwxrwxrwx 1 root root 9 2010-08-25 23:44 usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd -> ../event3
lrwxrwxrwx 1 root root 9 2010-08-25 23:44 usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse -> ../event4
lrwxrwxrwx 1 root root 9 2010-08-25 23:44 usb-Gyration_Gyration_RF_Technology_Receiver-mouse -> ../mouse1
Write down the event# associate with usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd and usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse. In my case this is 3 and 4.

Create udev rules file.

cd /etc/udev/rules.d
sudo touch 10-local.rules
sudo nano 10-local.rules

Paste the below into terminal. Replace the event[#,#] with your corresponding numbers. Change the owner to the your user account

KERNEL=="event[3,4]", OWNER="YOUR_USERNAME"

Reboot

Extras

Jump Points:

Custom Scripts:

MythFrontend Close and Stop when green MCE button is pressed.

I wrote a script to make the Green MCE button to start and stop mythfrontend

  1. Download the attachement labeled mce.start.sh
  2. copy the file to /usr/local/bin/
  3. Change the premissions of the file to executable.

    sudo chmod 4755 /usr/local/bin/mce.start.sh
    
  4. Edit your .evrouterrc for key event 102 and make it look like so. (Notice the change at the end)

    "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/102 "Shell/mce.start.sh &"

Mythfrontend swith to boxee

This is a simple replacement for the above script for if you have multiple media clients installed you can switch between them. In the code below i use boxee, but it can be modified for any combinations of applications.

Code:

if [ "$(pidof mythfrontend.real)" ] && [ "$(pidof Boxee)" ]
then
    killall mythfrontend.real
    killall Boxee


elif [ "$(pidof mythfrontend.real)" ]
then
    killall mythfrontend.real
    exec /opt/boxee/run-boxee-desktop

elif [ "$(pidof Boxee)" ]
then

    killall Boxee
else

    exec mythfrontend

fi

References

share|improve this answer

Your Answer

 
discard

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.