私はこのリモコンを持っていますが、Ubuntuとmythtvで動作するように設定したいと思います。
これは、Ubuntu10.04でGyrationMedia CenterRemoteを機能させるためのハウツーです。私は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"
リブート
ジャンプポイント:
カスタムスクリプト:
MythFrontend緑色のMCEボタンが押されると、閉じて停止します。
Mythfrontendを開始および停止するためのGreenMCEボタンを作成するスクリプトを作成しました
ファイルの権限を実行可能ファイルに変更します。
Sudo chmod 4755 /usr/local/bin/mce.start.sh
キーイベント102の.evrouterrcを編集して、次のようにします。 (最後に変更に注意してください)
"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
これは、上記のスクリプトの単純な置き換えです。複数のメディアクライアントがインストールされている場合は、それらを切り替えることができます。以下のコードでは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