Posts tagged: Mythbuntu

Configuring LIRC Button Presses (repeat and delay)

This post covers the LIRC button press configuration options found in an LIRC config file in mythbuntu. The LIRC config files are found in the .lirc directory in your home directory (/home/yourname/.lirc/ or ~/.lirc/ ).

An LIRC control configuration file has several options that are available when a button is pressed to control how that button is interpreted and translated into a key press. Here is a brief explanation of the options.

Here is an example of a key press configuration (taken from /home/yourname/.lirc/mythtv):

begin
remote = mceusb
prog = mythtv
button = Down
config = Down
repeat = 2
delay = 1
end

Ok lets break this down and explain how it works:

begin
remote = mceusb
# this is the id for the remote that this configuration belongs too

prog = mythtv
# this is the name of the executable of the program that this configuration triggers in

button = Down
# this is the id for the button that when pressed on the remote fires this event

config = Down
# this is the action that is fired when the button is pressed
# the config option can either be a X windows key press event
# or a shell command like “xmacro-wrap SaveState”

repeat = 3
# use the repeat command for buttons that you want to be able to
# just hold down and they keep repeating the command every ‘n’ cycles.
# In this example the command will be issued every 3 cycles
# which for the mceusb remote is about once every second.
# if you set repeat = 0 the command will be sent only once even if you
# hold the button down.

delay = 0
# the delay config option can be used in conjunction with the repeat command to
# to tweak the speed that the button presses are accepted
# a delay of 1 delays the repeat by one cycle set the delay to 0 to disable it.
end

There are some other options available but these are the most common options used with mythtv. for more information google wiki LIRC Configuration.

Hopefully this is the last LIRC post for mythbuntu even though there is more you can do hopefully this will give enough info to be deadly and come up with creative uses for LIRC in mythbuntu!

Mupen64plus with LIRC for mythbuntu 9.04

Instructions for compiling and installing mupen64plus with support your remote control in 64 bit mythbuntu.

Step 1 Install Development Packages

Install the following packages using the synaptec package manager:

  • sdlmame
  • liblircclient
  • liblircclient-dev
  • libqt4
  • libqt4-dev
  • libxtst
  • libxtst-dev
  • libsamplerate
  • libsdl1.2-dev
  • libsdl-ttf2.0-0
  • libsdl-ttf2.0-dev
  • g++

Step 2 Installing mupen64plus

Download the latest source for mupen64plus to your Desktop:

http://mupen64plus.googlecode.com/files/Mupen64Plus-1-5-src.tar.gz

Open up a console and run the following commands:

cd Desktop
tar xzf Mupen64Plus-1-5-src.tar.gz
cd Mupen64Plus-1-5-src
make LIRC=1 all
sudo make install
cd /usr/local/bin
sudo chmod 4755 mupen64plus

Step 3 Configure The Buttons on Your Remote:

run the following command from console (note the ~ is a linux alias for your home directory):

nano ~/.lirc/mupen64plus

# Add the following Lines to the file .lirc/mupen64plus
# replace mceusb with the name of your remote
# you can find the name or your remote by checking any of the files in your .lirc/ directory

# start .lirc/mupen64plus
begin
remote = mceusb
prog = mupen64plus
button = Stop
config = quit
repeat = 0
delay = 0
end
begin
remote = mceusb
prog = mupen64plus
button = Power
config = quit
repeat = 0
delay = 0
end
begin
remote = mceusb
prog = mupen64plus
button = Pause
config = pause
repeat = 0
delay = 0
end
begin
remote = mceusb
prog = mupen64plus
button = Play
config = pause
repeat = 0
delay = 0
end
begin
remote = mceusb
prog = mupen64plus
button = VolDown
config = vol-
repeat = 0
delay = 0
end
begin
remote = mceusb
prog = mupen64plus
button = VolUp
config = vol+
repeat = 0
delay = 0
end
begin
remote = mceusb
prog = mupen64plus
button = Home
config = fullscreen
repeat = 0
delay = 0
end
# end .lirc/mupen64plus
# save the file and exit nano

Run the following command from console:

nano ~/.lircrc

# add the fololowing line to the end of .lircrc

include ~/.lirc/mupen64plus

# save the file and exit nano

Step 4 Configuring Mupen64plus

Run the following command from console and use the gui to setup and configure controllers video settings etc.:

sudo mupen64plus

for best results use the Glide plugin for video not sure why this is best but it sems to work for most games!

Step 5 Configuring Mythbuntu Game Settings

  1. Start up the Myth Frontend Interface.
  2. Select Utilities / Setup -> Setup -> Media Settings -> Game Settings -> Game Players.
  3. Command: mupen64plus –nogui –fullscreen

Rock out with your frock out using mupen64plus!

Mounting NTFS Drive in Mythbuntu

1) Run fdisk to determine the Drive Partition:

sudo fdisk -l

2) Create the Mount Point:

Sudo mkdir /media/<mount point>

3) Edit the /etc/fstab File:

sudo nano /etc/fstab

4) Insert the following into the /etc/fstab file:

/dev/<your partition> /media/<mount point> ntfs-3g defaults,locale=en_US.utf8 0 0

Notes:
<your partition> -> Determined in Step 1
<mount point> -> Determined in Step 2