如何使 Gyration Media Center 通用遥控器 (GYR3101CA) 工作?

如何使 Gyration Media Center 通用遥控器 (GYR3101CA) 工作?

我有这个遥控器,我想设置它以便它可以与 Ubuntu 和 mythtv 一起使用。

在此处输入图片描述

答案1

这是如何在 Ubuntu 10.04 中让 Gyration 媒体中心遥控器正常工作的指南。我从 2007 年起就拥有这个遥控器,并且爱上了它。这个遥控器集陀螺仪鼠标和媒体中心遥控器于一体。要让它工作,您必须使用一个名为 Evrouter 的程序。

有关使此遥控器工作的原始信息已收集在此线程中。http://ubuntuforums.org/showthread.php?t=479897

写上去:

打开一个终端窗口。

下载适合您的架构的 EVRouter:

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

安装 EVRouter:

i386

sudo dpkg -i evrouter_0.4_i386.deb

amd64

sudo dpkg -i evrouter_0.4_amd64.deb

创建配置文件:

代码:

cd ~
touch .evrouterrc
nano .evrouterrc

粘贴以下文本。

代码:

#   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"

创建启动文件。

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

将以下内容粘贴到文件中。

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 &

创建自动启动文件。

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

粘贴以下文本。

[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

获取事件 ID:运行

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

上述命令应该返回如下信息。

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.

创建 udev 规则文件。

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

将以下内容粘贴到终端。将事件[#,#]替换为相应的数字。将所有者更改为您的用户帐户

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

重启

更多

跳跃点:

自定义脚本:

当按下绿色 MCE 按钮时,MythFrontend 关闭并停止。

我写了一个脚本来制作绿色 MCE 按钮来启动和停止 mythfrontend

  1. 下载标签为 mce.start.sh 的附件
  2. 将文件复制到 /usr/local/bin/
  3. 将文件的权限更改为可执行。

    sudo chmod 4755 /usr/local/bin/mce.start.sh
    
  4. 编辑 .evrouterrc 以处理关键事件 102,并使其看起来像这样。(注意最后的变化)

    “Gyration Gyration RF 技术接收器” “/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse” none key/102 “Shell/mce.start.sh &”

Mythfrontend 切换到 boxee

这是上述脚本的简单替代,如果您安装了多个媒体客户端,则可以在它们之间切换。在下面的代码中,我使用了 boxee,但它可以针对任何应用程序组合进行修改。

代码:

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

参考

相关内容