Ubuntu media center?

Karl Hegbloom hegbloom at pdx.edu
Thu Jun 22 20:19:38 UTC 2006


I'm not using a Mac Mini, but do have a media center setup using Ubuntu.
I've got the Hauppauge PVR-500 MCE TV tuner card and the Microsoft IR
remote control.  I got best results by downloading the most recent
sources of MythTV from ftp.nerim.net using "apt-get source mythtv", and
with a Subversion checkout of the ivtv-0.6.  The debian packaged
ivtv-source did not work as well for me.  The newer MythTV works better
with MySQL 5.0.

When compiling the MythTV sources, I used the 'dpkg-checkbuilddeps'
command to find out what I needed to have installed for the compilation.
It turns out there's one unavailable package that is something to do
with ieee1394 support, and that it builds fine without that.  I modified
the debian/rules to change the configure options to add:

 ifeq "$(DEB_BUILD_ARCH)" "amd64"
	CONFIGURE_OPTS += --arch=athlon64 --enable-proc-opt --enable-xvmc --enable-xvmc-vld --enable-xvmc-pro
 ...

so that everything is compiled for the Athlon 64, hopefully making it a
little quicker for transcoding and so forth.

For the remote control, I found a .lircrc on-line by searching.  I
placed it in ~mythtv/.mythtv/lircrc and made a symlink from that to
~mythtv/.lircrc so that it works for both MythTV and for 'irxevent' and
'irexec'.  I used the lirc-0.8.0-5 source from Debian to get that
working.

I've added the 'mythtv' user to the GDM menu, and set it's password to
"tv".  I can now choose "Switch User" from the logout dialog, and open a
second X server, log in as mythtv, and watch shows.  It uses the Gnome
session, and in session properties startup programs, I've added
'irxevent' and 'irexec' to support the remote control.

Attached is the .lircrc I'm presently using.  Hope this helps someone
and that it remains locatable in the email list archive for others to
enjoy.  Giving credit where credit is due, I found it first here:

http://www.netreveal.com/ddalton/2006/04/htpc_remote_on_fedora_core_4_o.html

-- 
Karl Hegbloom <hegbloom at pdx.edu>
-------------- next part --------------
# lircrc.mceusb

###################
#
#  IRExec
#
###################
begin
    prog = irexec
    button = Power
    repeat = 3
    config = mythfrontend
    #config = /home/mythtv/bin/mythstart.sh
    #config = Key Alt-Escape CurrentWindow
end

begin
    prog = irxevent
    button = Power
    repeat = 3
    config = Key Alt-Escape CurrentWindow
end

###################
#
#  MythTV
#
###################
begin
    prog = mythtv
    button = One
    config = 1
end

begin
    prog = mythtv
    button = Two
    config = 2
end

begin
    prog = mythtv
    button = Three
    config = 3
end

begin
    prog = mythtv
    button = Four
    config = 4
end

begin
    prog = mythtv
    button = Five
    config = 5
end

begin
    prog = mythtv
    button = Six
    config = 6
end

begin
    prog = mythtv
    button = Seven
    config = 7
end

begin
    prog = mythtv
    button = Eight
    config = 8
end

begin
    prog = mythtv
    button = Nine
    config = 9
end

begin
    prog = mythtv
    button = Zero
    config = 0
end

begin
    prog = mythtv
    button = Back
    config = Esc
end

begin
    prog = mythtv
    button = Guide
    config = M
end

begin
    prog = mythtv
    button = More
    config = I
end

begin
    prog = mythtv
    button = VolDown
    repeat = 1
    config = F10
end

begin
    prog = mythtv
    button = VolUp
    repeat = 1
    config = F11
end

begin
    prog = mythtv
    button = ChanUp
    repeat = 3
    config = Up
end

begin
    prog = mythtv
    button = ChanDown
    repeat = 3
    config = Down
end

begin
    prog = mythtv
    button = Up
    repeat = 3
    config = Up
end

begin
    prog = mythtv
    button = Down
    repeat = 3
    config = Down
end

begin
    prog = mythtv
    button = Left
    repeat = 3
    config = Left
end

begin
    prog = mythtv
    button = Right
    repeat = 3
    config = Right
end

begin
    prog = mythtv
    button = Play
    config = Return
end

begin
    prog = mythtv
    button = OK
    config = Return
end

begin
    prog = mythtv
    button = Enter
    config = Return
end

begin
    prog = mythtv
    button = Mute
    config = F9
end

begin
    prog = mythtv
    button = Rewind
    config = <
end

begin
    prog = mythtv
    button = Forward
    config = >
end

begin
  prog = mythtv
  button = Record
  config = R
end

begin
   prog = mythtv
   button = Stop
   config = O
end

begin
    prog = mythtv
    button = Pause
    config = P
end

# Use for backwards commercial skip
begin
   prog = mythtv
   button = Replay
   config = Q
end

# Use for forward commercial skip
begin
   prog = mythtv
   button = Skip
   config = Z
end

### The following keys need to be mapped before they can be used
### (I mapped mine using MythWeb)
begin
   prog = mythtv
   button = LiveTV
   config = !
end

begin
   prog = mythtv
   button = Videos
   config = ^
end

begin
   prog = mythtv
   button = Pictures
   config = &
end

begin
   prog = mythtv
   button = Music
   config = $
end

begin
   prog = mythtv
   button = TV
   config = @
end

begin
   prog = mythtv
   button = DVD
   config = (
end

begin
   prog = mythtv
   button = Home
   config = )
end

###################
#
#  MPlayer
#
###################
begin
   prog = mplayer
   button = Back
   config = quit
end

begin
   prog = mplayer
   button = More
   config = osd
end

begin
   prog = mplayer
   button = Replay
   config = seek -10
   repeat = 1
end

begin
   prog = mplayer
   button = Skip
   config = seek +10
   repeat = 1
end

begin
   prog = mplayer
   button = Rewind
   config = seek -60
   repeat = 1
end

begin
   prog = mplayer
   button = Forward
   config = seek +60
   repeat = 1
end

begin
    prog = mplayer
    button = Pause
    config = pause
end

begin
   prog = mplayer
   button = VolUp
   config = volume +1
   repeat = 1
end

begin
   prog = mplayer
   button = VolDown
   config = volume -1
   repeat = 1
end

begin
   prog=mplayer
   button=Mute
   config=mute
end

###################
#
#  XINE
#
###################
##
# xine key bindings.
# Automatically generated by xine-ui version 0.9.23.
##

# start playback
begin
        button = Play
        prog   = xine
        repeat = 0
        config = Play
end

# playback pause toggle
begin
        button = Pause
        prog   = xine
        repeat = 0
        config = Pause
end

# stop playback
begin
        button = Stop
        prog   = xine
        repeat = 0
        config = Stop
end

# take a snapshot
begin
        button = Record
        prog   = xine
        repeat = 0
        config = Snapshot
end

# set position to -60 seconds in current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SeekRelative-60
end

# set position to +60 seconds in current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SeekRelative+60
end

# set position to -30 seconds in current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SeekRelative-30
end

# set position to +30 seconds in current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SeekRelative+30
end

# set position to -15 seconds in current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SeekRelative-15
end

# set position to +15 seconds in current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SeekRelative+15
end

# set position to -7 seconds in current stream
begin
        button = Rewind
        prog   = xine
        repeat = 2
        config = SeekRelative-7
end

# set position to +7 seconds in current stream
begin
        button = Forward
        prog   = xine
        repeat = 2
        config = SeekRelative+7
end

# set position to beginning of current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition0%
end

# set position to 1027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition10%
end

# set position to 2027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition20%
end

# set position to 3027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition30%
end

# set position to 4027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition40%
end

# set position to 5027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition50%
end

# set position to 6027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition60%
end

# set position to 7027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition70%
end

# set position to 8027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition80%
end

# set position to 9027777754410f current stream
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SetPosition90%
end

# increment playback speed
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SpeedFaster
end

# decrement playback speed
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SpeedSlower
end

# reset playback speed
begin
        button = xxxxx
        prog   = xine
        repeat = 0
        config = SpeedReset
end

# increment audio volume
begin
        button = VolUp
        prog   = xine
        repeat = 1
        config = Volume+
end

# decrement audio volume
begin
        button = VolDown
        prog   = xine
        repeat = 1
        config = Volume-
end

# audio muting toggle
begin
        button = Mute
        prog   = xine
        repeat = 0
        config = Mute
end

# select next sub picture (subtitle) channel
#begin
#       button = xxxxx
#       prog   = xine
#       repeat = 0
#       config = SpuNext
#end

# select previous sub picture (subtitle) channel
#begin
#       button = xxxxx
#       prog   = xine
#       repeat = 0
#       config = SpuPrior
#end

# cycle aspect ratio values
begin
        #button = Videos
	button = Home
        prog   = xine
        repeat = 0
        config = ToggleAspectRatio
end

# jump to media Menu
begin
        button = DVD
        prog   = xine
        repeat = 0
        config = Menu
end

# jump to Title Menu
#begin
#       button = Menu
#       prog   = xine
#       repeat = 0
#       config = TitleMenu
#end

# jump to Root Menu
#begin
#       button = xxxxx
#       prog   = xine
#       repeat = 0
#       config = RootMenu
#end

# jump to Subpicture Menu
#begin
#       button = xxxxx
#       prog   = xine
#       repeat = 0
#       config = SubpictureMenu
#end

# jump to Audio Menu
#begin
#       button = Music
#       prog   = xine
#       repeat = 0
#       config = AudioMenu
#end

# jump to Angle Menu
#begin
#       button = TV
#       prog   = xine
#       repeat = 0
#       config = AngleMenu
#end

# jump to Part Menu
#begin
#       button = xxxxx
#       prog   = xine
#       repeat = 0
#       config = PartMenu
#end

# menu navigate up
begin
        button = Up
        prog   = xine
        repeat = 0
        config = EventUp
end

# menu navigate down
begin
        button = Down
        prog   = xine
        repeat = 0
        config = EventDown
end

# menu navigate left
begin
        button = Left
        prog   = xine
        repeat = 0
        config = EventLeft
end

# menu navigate right
begin
        button = Right
        prog   = xine
        repeat = 0
        config = EventRight
end

# menu select
begin
        button = OK
        prog   = xine
        repeat = 0
        config = EventSelect
end

# jump to next chapter
begin
        button = Skip
        prog   = xine
        repeat = 0
        config = EventNext
end

# jump to previous chapter
begin
        button = Replay
        prog   = xine
        repeat = 0
        config = EventPrior
end

# select next angle
#begin
#       button = TV
#       prog   = xine
#       repeat = 0
#       config = EventAngleNext
#end

# select previous angle
#begin
#       button = xxxxx
#       prog   = xine
#       repeat = 0
#       config = EventAnglePrior
#end

# display stream information using OSD
begin
        button = More
        prog   = xine
        repeat = 0
        config = OSDStreamInfos
end

# enter key binding editor
#begin
#       button = xxxxx
#       prog   = xine
#       repeat = 0
#       config = KeyBindingEditor
#end

# enter the number 0
begin
        button = Zero
        prog   = xine
        repeat = 0
        config = Number0
end

# enter the number 1
begin
        button = One
        prog   = xine
        repeat = 0
        config = Number1
end

# enter the number 2
begin
        button = Two
        prog   = xine
        repeat = 0
        config = Number2
end

# enter the number 3
begin
        button = Three
        prog   = xine
        repeat = 0
        config = Number3
end

# enter the number 4
begin
        button = Four
        prog   = xine
        repeat = 0
        config = Number4
end

# enter the number 5
begin
        button = Five
        prog   = xine
        repeat = 0
        config = Number5
end

# enter the number 6
begin
        button = Six
        prog   = xine
        repeat = 0
        config = Number6
end

# enter the number 7
begin
        button = Seven
        prog   = xine
        repeat = 0
        config = Number7
end

# enter the number 8
begin
        button = Eight
        prog   = xine
        repeat = 0
        config = Number8
end

# enter the number 9
begin
        button = Nine
        prog   = xine
        repeat = 0
        config = Number9
end

# add 10 to the next entered number
begin
        button = Ten
        prog   = xine
        repeat = 0
        config = Number10add
end

# quit the program
begin
        button = Power
        prog   = xine
        repeat = 0
        config = Quit
end

# select Audio mode
begin
        prog = xine
        button = Music
        repeat = 0
        mode = Audio
end

# select Subtitle mode
begin
        prog = xine
        button = Pictures
        repeat = 0
        mode = Subtitle
end

# select Angle mode
begin
        prog = xine
        button = TV
        repeat = 0
        mode = Angle
end

begin Audio

        # select next audio channel
        begin
                button = ChanUp
                prog   = xine
                repeat = 0
                config = AudioChannelNext
        end

        # select previous audio channel
        begin
                button = ChanDown
                prog   = xine
                repeat = 0
                config = AudioChannelPrior
        end

end Audio

begin Subtitle

        # select next sub picture (subtitle) channel
        begin
                button = ChanUp
                prog   = xine
                repeat = 0
                config = SpuNext
        end

        # select previous sub picture (subtitle) channel
        begin
                button = ChanDown
                prog   = xine
                repeat = 0
                config = SpuPrior
        end

end Subtitle

begin Angle

        # select next angle
        begin
                button = ChanUp
                prog   = xine
                repeat = 0
                config = EventAngleNext
        end

        # select previous angle
        begin
                button = ChanDown
                prog   = xine
                repeat = 0
                config = EventAnglePrior
        end

end Angle

##
# End of xine key bindings.
##


More information about the ubuntu-users mailing list