<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Schadenfreude &#187; lirc</title>
	<atom:link href="http://www.ralree.com/tag/lirc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Sun, 28 Feb 2010 04:18:37 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SMPlayer, Lirc, and IRExec on Ubuntu Karmic</title>
		<link>http://www.ralree.com/2009/11/07/smplayer-lirc-and-irexec-on-ubuntu-karmic/</link>
		<comments>http://www.ralree.com/2009/11/07/smplayer-lirc-and-irexec-on-ubuntu-karmic/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 03:41:35 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[infrared]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lirc]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[smplayer]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22715</guid>
		<description><![CDATA[I used to use lirc with mplayer to allow my Packard Bell crappy remote to work awesomely, but I have since lost that configuration and switched to smplayer, since it&#8217;s awesome.  Today, I figured out how to control smplayer using similar means.


sudo apt-get install lirc
Make your /etc/lirc/lircrc look like this:


##### GLOBAL #####
begin
  flags = [...]]]></description>
			<content:encoded><![CDATA[<p>I used to use lirc with mplayer to allow my Packard Bell crappy remote to work awesomely, but I have since lost that configuration and switched to smplayer, since it&#8217;s awesome.  Today, I figured out how to control smplayer using similar means.</p>
<p><span id="more-22715"></span></p>
<ul>
<li>sudo apt-get install lirc</li>
<li>Make your <strong>/etc/lirc/lircrc</strong> look like this:</li>
</ul>
<pre><code>
##### GLOBAL #####
begin
  flags = startup_mode
  mode = smplayer
end

begin
  remote = PackBell
  button = Aux1
  mode = smplayer
end

begin
  button = Mute
  prog   = irexec
  repeat = 0
  config = amixer sset 'Master' toggle
end
begin
  button = VolUp
  prog   = irexec
  repeat = 2
  delay = 1
  config = amixer sset 'Master' 1+
end
begin
  button = VolDown
  prog   = irexec
  repeat = 2
  delay = 1
  config = amixer sset 'Master' 1-
end

##### MPLAYER #####
begin smplayer
  begin
      remote = PackBell
      prog = irexec
      button = Down
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action rewind2); fi
      repeat = 3
      delay = 1
  end

  begin
      remote = PackBell
      prog = irexec
      button = Up
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action forward2); fi
      repeat = 3
      delay = 1
  end

  begin
      remote = PackBell
      prog = irexec
      button = Right
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action forward1); fi
      repeat = 3
      delay = 1
  end

  begin
      remote = PackBell
      prog = irexec
      button = Left
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action rewind1); fi
      repeat = 3
      delay = 1
  end

  begin
      remote = PackBell
      prog = irexec
      button = Display
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action fullscreen); fi
      repeat = 0
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = CHUp
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action next_subtitle); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = CHDown
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action next_audio); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = LMB
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action pl_prev); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = RMB
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action pl_next); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = Zero
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action next_aspect); fi
      repeat = 3
      delay = 0
  end

  begin
      remote = PackBell
      prog = irexec
      button = One
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action rewind3); fi
      repeat = 3
      delay = 0
  end
  begin
      remote = PackBell
      prog = irexec
      button = Two
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action play_or_pause); fi
      repeat = 3
      delay = 0
  end
  begin
      remote = PackBell
      prog = irexec
      button = Three
      config = if [ $(ps -eo cmd | grep -c ^smplayer) -eq 1 ]; then (smplayer -send-action forward3); fi
      repeat = 3
      delay = 0
  end
end smplayer
</code></pre>
<ul>
<li>sudo /etc/init.d/lirc restart</li>
<li>You should see the irexec daemon start</li>
<li>Start smplayer and make it play something</li>
<li>Push the AUX1 button on your Packard Bell remote</li>
<li>Now push other buttons.  It should all work.</li>
</ul>
<p>Thanks to all the blog posts and forum conversations that helped me figure all that out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2009/11/07/smplayer-lirc-and-irexec-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.305 seconds -->
