<?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>Yonder thoughts &#187; Linux</title>
	<atom:link href="http://blog.mrfjo.org/category/nerd/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mrfjo.org</link>
	<description>Just another monday morning</description>
	<lastBuildDate>Thu, 29 Apr 2010 18:04:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>How i made Spotify 0.4 play local mp3 files on Linux with Wine</title>
		<link>http://blog.mrfjo.org/2010/04/27/how-i-made-spotify-0-4-play-local-mp3-files-on-linux/</link>
		<comments>http://blog.mrfjo.org/2010/04/27/how-i-made-spotify-0-4-play-local-mp3-files-on-linux/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 19:39:25 +0000</pubDate>
		<dc:creator>espen</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Spotify]]></category>
		<category><![CDATA[c code]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[nerd]]></category>
		<category><![CDATA[nerdy]]></category>
		<category><![CDATA[spotify]]></category>
		<category><![CDATA[spotify 0.4]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://blog.mrfjo.org/?p=46</guid>
		<description><![CDATA[This is a very short, and "simple" explanation  how i made Spotify 0.4 play local MP3 files under Linux with Wine.
I have not tested this elsewhere, and i can not guarantee that everyone has to do the same steps as me.
]]></description>
			<content:encoded><![CDATA[<p>This is a very short, and &#8220;simple&#8221; explanation  how i made Spotify 0.4 play local MP3 files under Linux with Wine.<br />
I have not tested this elsewhere, and i can not guarantee that everyone has to do the same steps as me.</p>
<p>If you want to try my finished file you can download it here: <a href="http://blog.mrfjo.org/winemp3.acm.so">winemp3.acm.so (x86 only)</a><br />
Place it in /usr/lib/wine/ (x86) or /usr/lib32/wine/ (x64).</p>
<p>Or if you need to do things a tad more automatic you can try this script which will do everything automatically for the ones of you on x86: <a href="http://blog.mrfjo.org/winefix.sh">winefix.sh</a></p>
<p>For those of you who want the technical details: continue reading <img src='http://blog.mrfjo.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You should try and skip step 3 if possible, but if Spotify just hangs and max out your CPU you should do step 3.</p>
<p>You can also use an hex editor to change WINE-MPEG3 to LAME-MPEG3 in /usr/lib/wine/winemp3.acm.so to try before doing the, for me, crucial step number three.</p>
<p>Step 1: Download the wine source code.<br />
Step 2: run configure to create the appropriate Makefiles<br />
Step 3: edit dlls/winemp3.acm/mpgl3.c and change the following:<br />
<code><br />
       if (dpos > *ndst) break;<br />
    } while (ret != MPG123_ERR &#038;&#038; ret != MPG123_NEED_MORE);<br />
    *ndst = dpos;<br />
</code></p>
<p>To this:</p>
<p><code><br />
      if (dpos >= *ndst) break;<br />
    } while (ret != MPG123_ERR &#038;&#038; ret != MPG123_NEED_MORE);<br />
    *ndst = dpos;</p>
<p></code></p>
<p>Step4: Change the following:<br />
<code><br />
    add->cFilterTags = 0;<br />
    add->hicon = NULL;<br />
    MultiByteToWideChar( CP_ACP, 0, "WINE-MPEG3", -1,<br />
                         add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) );<br />
</code></p>
<p>To this:<br />
<code><br />
    add->cFilterTags = 0;<br />
    add->hicon = NULL;<br />
    MultiByteToWideChar( CP_ACP, 0, "EFO", -1,<br />
                         add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) );<br />
</code></p>
<p>Step 5: Run make to compile the new codec.<br />
Step 6: copy the codec to /usr/lib/wine/ (ubuntu atleast)<br />
Step 7: Run Spotify and enjoy.</p>
<p>This worked for me, but it is not recommended as i changed some code in the MP3 library in Wine.<br />
If you use Wine with other programs which utilizes the mpeg3 library they might break.</p>
<p><strong>UPDATE 1:</strong> It seems like my hack will give some problems with automatic changing of songs. The codec does not understand that the song is finished, and will just generate noise.</p>
<p><strong>UPDATE 2:</strong> Ok, new fix. This time it does infact end where it should, and continues to the next track. Step 3 is updated. Same with the binary file, and scripts.</p>
<p><strong>UPDATE 3: </strong> Moved around some text in this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mrfjo.org/2010/04/27/how-i-made-spotify-0-4-play-local-mp3-files-on-linux/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Using a Windows Mobile GPS on Linux</title>
		<link>http://blog.mrfjo.org/2009/04/06/using-a-windows-mobile-gps-on-linux/</link>
		<comments>http://blog.mrfjo.org/2009/04/06/using-a-windows-mobile-gps-on-linux/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 12:43:25 +0000</pubDate>
		<dc:creator>espen</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Nerd]]></category>
		<category><![CDATA[cell]]></category>
		<category><![CDATA[Cell Phone]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[htc]]></category>
		<category><![CDATA[kismet]]></category>
		<category><![CDATA[socat]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://blog.mrfjo.org/?p=9</guid>
		<description><![CDATA[How to use a GPS enabled Windows Mobile with a Linux Client.]]></description>
			<content:encoded><![CDATA[<p>For some time now i have been searching for a way to use the GPS on my Windows Mobile HTC Touch Diamond on Linux.</p>
<p>I tried several solutions to make it communicate and send raw NMEA output to the Linux gps-daemon.<br />
Even wrote some small programs to read directly from the raw serial port on the HTC, but that was just crashing.<br />
Then i found <a href="http://users.skynet.be/hofinger/GPS2Blue.html">gps2blue</a> which is a small program running under Windows Mobile and reading raw data from the GPS, and sending the data either over TCP/IP or Bluetooth.<br />
Since my main laptop doesn&#8217;t have Bluetooth i use the TCP/IP options. Here, there are several choices how to connect the phone to your computer. Either by using RNDIS and a USB cable, or WIFI network.<br />
You can even create a AD HOC network on Linux and have the phone and computer communicate where there are no other available WIFI network.</p>
<p>But then again i had the problem of getting gpsd to read that data, since gpsd mainlyread its data from a serial device.<br />
I searched a bit around and found a tool called <em>socat</em><br />
<code>Description: multipurpose relay for bidirectional data transfer<br />
 Socat (for SOcket CAT) establishes two bidirectional byte streams<br />
 and transfers data between them. Data channels may be files, pipes,<br />
 devices (terminal or modem, etc.), or sockets (Unix, IPv4, IPv6, raw,<br />
 UDP, TCP, SSL). It provides forking, logging and tracing, different<br />
 modes for interprocess communication and many more options.<br />
 .<br />
 It can be used, for example, as a TCP relay (one-shot or daemon),<br />
 as an external socksifier, as a shell interface to Unix sockets,<br />
 as an IPv6 relay, as a netcat and rinetd replacement, to redirect<br />
 TCP-oriented programs to a serial line, or to establish a relatively<br />
 secure environment (su and chroot) for running client or server shell<br />
 scripts inside network connections.<br />
</code></p>
<p>So to use this with gps2blue i ran the following command <code>socat tcp4-listen:31873 pty</code> This will create a new device in /dev/pts/.<br />
Atleast with my udev enabled ubuntu.</p>
<p>Then i could fine run gpsd /dev/pts/3 and use what client i wanted.</p>
<p>The same principle also works on Windows, but there you need to use HW VSP instead of socat.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mrfjo.org/2009/04/06/using-a-windows-mobile-gps-on-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
