<?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>Refactor the Life &#187; Desktop</title>
	<atom:link href="http://kunxi.org/archives/category/desktop/feed/" rel="self" type="application/rss+xml" />
	<link>http://kunxi.org</link>
	<description>Yet another code monkey blog.</description>
	<lastBuildDate>Wed, 05 Oct 2011 13:00:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Six months in Mac</title>
		<link>http://kunxi.org/archives/2011/10/six-months-in-mac/</link>
		<comments>http://kunxi.org/archives/2011/10/six-months-in-mac/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 06:23:25 +0000</pubDate>
		<dc:creator>bookstack</dc:creator>
				<category><![CDATA[Desktop]]></category>

		<guid isPermaLink="false">http://kunxi.org/?p=467</guid>
		<description><![CDATA[This is my response to Seven Minutes in Ubuntu. I started using Linux as my alternative desktop in 2003. I finally ditched the pre-loaded Windows XP with Gentoo Linux in a new Dell 700M around 2005. I preferred KDE3 over GNOME for its integrated user experience, and the killer application KDEPIM. However, the performance of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This is my response to <a href="http://thomaspark.me/2011/10/seven-minutes-in-ubuntu/" title="Seven Minutes in Ubuntu">Seven Minutes in Ubuntu</a></strong>.</p>
<p>I started using Linux as my alternative desktop in 2003. I finally ditched the pre-loaded Windows XP with <a href="http://kunxi.org/archives/2005/09/howto-gentoo-20051dell-700m/">Gentoo Linux in a new Dell 700M</a> around 2005. I preferred KDE3 over GNOME for its integrated user experience, and the killer application KDEPIM. However, the performance of i855GM kept degrading with the kernel rolling upgrade, and the migration to KDE4 is so painful that I began to explore the lightweight desktop environment, such as <a href="http://www.xfce.org/">Xfce</a>, <a href="http://www.enlightenment.org/">E17</a>, <a href="http://fluxbox.org/">various</a> <a href="http://openbox.org/">boxes</a>. And eventually settled in <a href="http://www.fvwm.org/">FVWM</a> with <a href="http://www.fvwmforums.org/phpBB3/viewtopic.php?f=39&#038;t=203">OSX_Milky theme</a>. It is really fun, and time-consuming to fine-tune the script/configuration for personal preferences.</p>
<p>In Microsoft, I had one dedicated Windows 7 machine for Outlook, two Windows 2008 R2 development boxes, and several Hyper-V VMs running Windows 2003, Vista, Windows 2000 and NT4 for regression testing.</p>
<p>In Skytap, I am using a brand new MacBook Pro, Snow Leopard as other developers. Thanks to the <a href="http://www.asktog.com/columns/075AppleFlatlandPart1.html">apple&#8217;s flatland aesthetic</a>, the transition for a new user is pretty smooth with only few bumps:</p>
<ul>
<li>The fish-eye dock <a href="http://www1.get-e.org/EFL_User_Guide/English/_pages/3.4.html">is</a> <a href="http://awn.wetpaint.com/">no</a> <a href="http://glx-dock.org/">stranger</a>.</li>
<li>So it is with <a href="http://en.wikipedia.org/wiki/Exposé_clone">Exposé</a></li>
<li>The traffic lights in the top-left corner is less informational, but looks pretty.</li>
<li>It is hard to reach the top menu bar, especially when I tried to use the 30&#8242; HP ZR30w as my main monitor.</li>
</ul>
<h1>The Good</h1>
<p>Everything <em>just works</em>. </p>
<p>The desktop environment is well polished, sleek and aesthetic.</p>
<p>Lots of handy tools, like <em>bash</em>, <em>openssh</em>, <em>grep</em>, <em>find</em> are pre-loaded.</p>
<h1>The Bad</h1>
<p>I am really frustrated by the window management in Mac: when you click the docked icon or use the application switcher(which appears when you hit Command-Tab), the <em>whole group</em> of applications are brought into the the front while I just want to switch back to <em>the last window</em> I am working on. You have to either right click or click-n-hold the docked icon to select the specific window which incurs too many clicks. How about a fan of snapshots when mouse hovers just like Windows 7 does?</p>
<p>I also dislikes the <a href="http://support.apple.com/kb/ht1624">space</a>. I have been using the similar feature called <a href="http://en.wikipedia.org/wiki/Virtual_desktop">virtual desktop</a> comprehensively to declutter my workspace, but I failed to get the space working as expected. The space is supposed to be an <strong>isolated desktop</strong>, if the application instance is not launched in this space, it should not show in the dock or the application switcher, period. The notification from other space may use <em>bouncing dock icon effect</em> or <a href="http://growl.info/">growl</a> to attract your attention.</p>
<p>I can live with the odd behavior of maximize button, but why the window has to be resized from the down right corner? This is particularly tedious if you try to tile and adjust several windows horizontally/vertically.</p>
<p>The default Terminal.app is half-baked. What a shame that it does not support 256 colors capability!</p>
<p>I also miss the Cut/Paste feature in explorer.exe. I have to open multiple Finder windows if I want to move files to various destinations. Using <em>bash</em> seems easier.</p>
<p>The built-in Chinese IME is very primitive, the Microsoft Pinyin IME bundle with Windows 7 is much more useful.</p>
<p><em>.Trashes</em> is very annoying, especially for a USB drive. I once tried to delete some documents to make more rooms in my Kindle, and surprisingly found the free space does not change at all. As I telneted to the Kindle via USBNetwork, I found the hidden .Trashes folder which held every bits I tried to erase. Finder should allow .Trashes to be opt-out.</p>
<h1>Bonus</h1>
<p>Here is the list of most frequent used applications:</p>
<ul>
<li><a href="http://www.iterm2.com">iTerm2</a>, an excellent replacement for stock Terminal.app.</li>
<li>Firefox and Chrome, each runs with a different Google account credential.</li>
<li><a href="http://code.google.com/p/macvim/">MacVim</a>.</li>
<li><a href="http://www.vmware.com/products/fusion/overview.html">VMware Fusion</a>, keeps a Ubuntu Linux handy.</li>
<li><a href="http://www.microsoft.com/mac/remote-desktop-client">Microsoft Remote Desktop Connection</a> and <a href="http://sourceforge.net/projects/cotvnc/">Chichen of VNC</a> for remote access.</li>
<li><a href="http://adium.im/">Adium</a> for MSN and GTalk.</li>
</ul>
<p>No single Mac-exclusive application in the above list.</p>
<h1>Conclusion</h1>
<p>The power of Mac is the synergy of beautifully-crafted hardware and intuitive software. No other PC manufacturers has such fine-grained control on user experience. Linux desktop has a edge on customization, but stumbled upon the lack of hardware support, ramification of user experience(GNOME3 vs KDE4 vs Unity) and unpolished design.</p>
<h1>Update</h1>
<p>Thanks to masklinn&#8217;s comment, window resizing, native 256 colors terminal, cut/paste in Finder have been fixed in Lion.</p>
<div id="crp_related"><h2>Related Posts:</h2><ul><li><a href="http://kunxi.org/archives/2007/05/howto-display-sharp-chinese-in-gentoo-linux/" rel="bookmark">HOWTO display sharp Chinese in Gentoo Linux?</a></li><li><a href="http://kunxi.org/archives/2006/05/desktop-todo-2/" rel="bookmark">TODO List for refactoring the desktop</a></li><li><a href="http://kunxi.org/archives/2011/09/rants-on-windows-8-build/" rel="bookmark">Rants on Windows 8 build</a></li><li><a href="http://kunxi.org/archives/2006/07/overweighted-windows-xp/" rel="bookmark">Overweighted Windows XP</a></li><li><a href="http://kunxi.org/archives/2006/07/ubuntu-606-lts-review/" rel="bookmark">Ubuntu 6.06 LTS Review</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://kunxi.org/archives/2011/10/six-months-in-mac/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Rants on Windows 8 build</title>
		<link>http://kunxi.org/archives/2011/09/rants-on-windows-8-build/</link>
		<comments>http://kunxi.org/archives/2011/09/rants-on-windows-8-build/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 05:58:31 +0000</pubDate>
		<dc:creator>bookstack</dc:creator>
				<category><![CDATA[Desktop]]></category>

		<guid isPermaLink="false">http://kunxi.org/?p=462</guid>
		<description><![CDATA[I was quite impressed by the mockup of Windows 8 in an internal Microsoft presentation around eight months ago. Thanks to Windows team&#8217;s hard work to make the preview version public available, I can rant my thoughts without violating the NDA. Windows 8 is Microsoft&#8217;s answer to the post-pc era: touch takes the central stage; [...]]]></description>
			<content:encoded><![CDATA[<p>I was quite impressed by the mockup of Windows 8 in an internal Microsoft presentation around eight months ago. Thanks to Windows team&#8217;s hard work to make the preview version public available, I can rant my thoughts without violating the NDA.</p>
<p>Windows 8 is Microsoft&#8217;s answer to the post-pc era: touch takes the central stage; the traditional desktop has to wait to be summoned in the backstage. It is a disrupted transition for desktop users to focus more on content consumption than content production. For old school user, Metro is even less useful than <a href="http://www.gnu.org/s/screen/">screen</a>.</p>
<p>Though Metro has achieved global <a href="http://www.idsa.org/idea-2011-best-shows-honored-along-other-special-idea-winners-years-ceremony"> recognition in the design industry</a>, it has not won the hearts of customers. It is really adventurous if not reckless to bet the fate of the corporate major cash cow with such uncertainty.</p>
<p>The Drag-n-Pin in the Metro allow user to optimize screen real estate in finer-granularity than the notification model. This is cool, but not <a href="http://en.wikipedia.org/wiki/Tiling_window_manager">new</a>. According to my bumpy experience with <a href="http://awesome.naquadah.org/">awesome</a> in Arch, It is hard to make tiling windows manager works as expected and it is annoying when it just not works. I look forward to Windows team&#8217;s solution.</p>
<div id="crp_related"><h2>Related Posts:</h2><ul><li><a href="http://kunxi.org/archives/2011/09/small-pond-vs-big-pond/" rel="bookmark">Small pond vs. Big pond</a></li><li><a href="http://kunxi.org/archives/2005/09/gentoowindows-dual-boot/" rel="bookmark">Gentoo/Windows dual boot</a></li><li><a href="http://kunxi.org/archives/2011/10/six-months-in-mac/" rel="bookmark">Six months in Mac</a></li><li><a href="http://kunxi.org/archives/2007/05/zen-is-less-creative-in-software/" rel="bookmark">Zen is less Creative in software</a></li><li><a href="http://kunxi.org/archives/2006/09/grid-evolution-in-ebay/" rel="bookmark">Grid evolution in eBay</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://kunxi.org/archives/2011/09/rants-on-windows-8-build/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Two plugins in one browser just makes trouble</title>
		<link>http://kunxi.org/archives/2008/07/two-plugins-in-one-browser-just-makes-trouble/</link>
		<comments>http://kunxi.org/archives/2008/07/two-plugins-in-one-browser-just-makes-trouble/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 07:09:30 +0000</pubDate>
		<dc:creator>bookstack</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.kunxi.org/?p=263</guid>
		<description><![CDATA[Today one website I usually visit requires me to upgrade the Adobe Flash player, and in fact, I just did recently n the emerge world. From the output of the Firefox about:plugins output, I seems to have more than one Flash player installed: It is a little bit overkill to launch strace as Firefox considerately [...]]]></description>
			<content:encoded><![CDATA[<p>Today one website I usually visit requires me to upgrade the Adobe Flash player, and in fact, I just did recently n the <em>emerge world</em>. From the output of the Firefox <em>about:plugins </em>output, I seems to have more than one Flash player installed:<br />
<img src="/files/two-plugins-in-one-browser-just-makes-trouble/two-plugins.png" alt="Two Flash plugins installed in Firefox" /></p>
<p>It is a little bit overkill to launch <em>strace</em> as Firefox considerately leaves the option to expose the full path by enabling <strong>plugin.expose_full_path</strong> in <em>about:config</em>, this is the screenshot after netscape-flash-9.0.124.0 is un-emerged:<br />
<img src="/files/two-plugins-in-one-browser-just-makes-trouble/one-plugin.png" alt="One Flash plugin installed in Firefox with full path exposed" /></p>
<p>Seems I did manually install the flash-7.0r63 in the home directory that overrides the system-wide Flash plugin. Once it is removed, and 9.0.124.0 is re-emerged, everything works.</p>
<p>BTW, if you happen to be a Flash developer, and would need to install multiple versions of Flash player, it is may be worthy taking a look at <a href="https://addons.mozilla.org/en-US/firefox/addon/5044">Flash Switcher</a> as well.</p>
<div id="crp_related"><h2>Related Posts:</h2><ul><li><a href="http://kunxi.org/archives/2006/07/is-google-browser-sync-plugin-a-troublemaker/" rel="bookmark">Is Google Browser Sync Plugin a troublemaker?</a></li><li><a href="http://kunxi.org/archives/2006/07/can-you-handle-svg/" rel="bookmark">Can you handle SVG?</a></li><li><a href="http://kunxi.org/archives/2008/08/ubiquity-lowering-the-threashold-for-web-mashup/" rel="bookmark">Ubiquity - Lowering the threshold for Web mashup</a></li><li><a href="http://kunxi.org/archives/2007/04/meet-mr-dtrace-part-4/" rel="bookmark">Meet Mr. DTrace - Part 4</a></li><li><a href="http://kunxi.org/archives/2007/05/optimize-wordpress-in-three-steps/" rel="bookmark">Optimize WordPress in 5 steps</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://kunxi.org/archives/2008/07/two-plugins-in-one-browser-just-makes-trouble/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Is MobileMe the ONE?</title>
		<link>http://kunxi.org/archives/2008/06/is-mobileme-the-one/</link>
		<comments>http://kunxi.org/archives/2008/06/is-mobileme-the-one/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 08:19:05 +0000</pubDate>
		<dc:creator>bookstack</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobileme]]></category>

		<guid isPermaLink="false">http://www.kunxi.org/?p=262</guid>
		<description><![CDATA[The 3G iPhone and the accompanied MobileMe service introduced in WWDC 2008 stirred the buzz in the blogosphere as ever. The MobileMe tries to solve the long-lasting synchronization problem, which Microsoft have not figured out a panacea for both enterprise market and mass customers. Apple&#8217;s answer seems like an intuitive and elegant solution in the [...]]]></description>
			<content:encoded><![CDATA[<p>The 3G iPhone and the accompanied MobileMe service introduced in WWDC 2008 stirred the buzz in the blogosphere as ever.  <img src="/files/mobileme-logo.jpg" alt="MobileMe logo" align="right" /> The MobileMe tries to solve the long-lasting synchronization problem, which Microsoft <a href="http://www.secretgeek.net/sync_live.asp">have not figured out a panacea</a> for both enterprise market and mass customers. Apple&#8217;s answer seems like an intuitive and elegant solution in the first impression, and we may wonder, is MobileMe the <strong>ONE</strong>?</p>
<p>I really doubt it, based on some common sense and reasonable guess as the service is not available so far, please correct me in your comment if I am wrong.</p>
<p><strong>Push model may not cross the enterprise boundary</strong><br />
Push mail has been very successful in the enterprise world, but why there are no such things like push document, push worksheet? The instantaneous synchronization is just purely wasted in most cases, even not that inviting in the Corp net which is powered by Gigabit ethernet, let alone the consumers are using much slower <em>high speed</em> internet or <em>3G</em> wireless connection.</p>
<p><strong>There is no silver bullet to resolve conflicts</strong><br />
MobileMe supports family pack, so it is possible that one file is edited in different computers. The conflict has to be resolved however fast the synchronization is. We also need to track the version number because it is hard to tell which copy is the latest without network time synchronization, so ultimately MobileMe would be a version control system. But according to my personal experience, there is no more intuitive way to resolve the conflict than three-way diff. But this is less user-friendly  and not an available option if you are working with images or videos.</p>
<p><strong>Accessibility and Interoperability</strong><br />
These are not big issues for die hard Apple fans. I believe Bonjour would automatically configure the firewall and all made-by-Apple applications would talk to MobileMe without any problem. No idea whether Apple would release the protocol document, like Microsoft did recently, to encourage 3rd party interoperability. </p>
<p>I personally prefer SSH, RSync and SVN( maybe Mercury later), periodically back up to my friends in a different zip code for extra safety.</p>
<div id="crp_related"><h2>Related Posts:</h2><ul><li><a href="http://kunxi.org/archives/2006/10/when-palm-meets-linux/" rel="bookmark">When Palm meets Linux</a></li><li><a href="http://kunxi.org/archives/2006/05/time-machine-on-the-go/" rel="bookmark">Time Machine on the Go</a></li><li><a href="http://kunxi.org/archives/2008/04/aiderss-relieves-the-pain-fails-to-cure/" rel="bookmark">AideRSS relieves the pain, fails to cure</a></li><li><a href="http://kunxi.org/archives/2006/05/addicted-to-mac/" rel="bookmark">Addicted to Mac ?</a></li><li><a href="http://kunxi.org/archives/2006/03/i-am-computer-killer/" rel="bookmark">I am a "Computer Killer"</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://kunxi.org/archives/2008/06/is-mobileme-the-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ID3 tag for programmers</title>
		<link>http://kunxi.org/archives/2008/02/id3-tag-for-programmers/</link>
		<comments>http://kunxi.org/archives/2008/02/id3-tag-for-programmers/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 07:45:39 +0000</pubDate>
		<dc:creator>bookstack</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[id3]]></category>

		<guid isPermaLink="false">http://www.kunxi.org/archives/2008/02/id3-tag-for-programmers/</guid>
		<description><![CDATA[If you feel unease to do anything in a command line, or you have no idea about what regular expression is, please stop; I am quite sure this recipe is just not your cup of tea. eyeD3util is a small, yet powerful IMHO, package that handles nasty ID3 tags that GUI may not offer. As [...]]]></description>
			<content:encoded><![CDATA[<p>If you feel unease to do anything in a command line, or you have no idea about what <em>regular expression</em> is, please stop; I am quite sure this recipe is just not your cup of tea.  </p>
<p><a href="http://static.kunxi.org/id3-tag-for-programmers/eyeD3util.tar.gz">eyeD3util</a> is a small, yet powerful IMHO, package that handles nasty ID3 tags that GUI may not offer. As the name suggests, it is based upon <a href="http://eyed3.nicfit.net/">eyeD3</a>, thanks to Travis&#8217; great work. There are three apps targeting different etches:</p>
<p><strong>eyeD3conv.py</strong><br />
eyeD3conv.py convert the ill-encoded tag, and convert them to Unicode. Check <a href="http://www.kunxi.org/archives/2007/11/howto-convert-chinese-mp3-for-id3-v23-standard/">this</a> for a full story. Though never tested other than Chinese GB2312, theoretically, it can handle the tag encoded in non-latin1 locale. Please leave a comment if you have a success story.</p>
<p><strong>eyeD3ffn.py</strong><br />
What if no tag attached like Hanes? Well, if we could get the essential information, the track number and name, we may add other meta data using <em>eyeD3</em>. This script parses the filename via the regular expression to get all available meta data you need, for example:</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">eyeD3ffn.py <span class="st0">&quot;(?P&lt;n&gt;.*) &#8211; (?P&lt;t&gt;.*)\.mp3&quot;</span> <span class="st0">&quot;02 &#8211; 祝我幸福.mp3&quot;</span><br />
Apply ID3 v2.3 tag to 02 &#8211; 祝我幸福.mp3<br />
setTrackNum: &nbsp;<span class="br0">&#91;</span><span class="st_h">&#8217;02&#8242;</span>, None<span class="br0">&#93;</span><br />
setTitle: &nbsp;祝我幸福</div>
</div>
<p><strong>eyeD3validate.py</strong><br />
To be a perfectionist, I would rather check whether the MP3 file includes all essential information required: title, artist, album, track number, year of publish and genre. This script just did the minimum, nothing less, nothing more. </p>
<p>Comments? Feedbacks?</p>
<div id="crp_related"><h2>Related Posts:</h2><ul><li><a href="http://kunxi.org/archives/2007/11/howto-convert-chinese-mp3-for-id3-v23-standard/" rel="bookmark">HOWTO convert Chinese MP3 for ID3 v2.3 standard</a></li><li><a href="http://kunxi.org/archives/2008/01/yet-another-locale-problem/" rel="bookmark">Yet another locale problem</a></li><li><a href="http://kunxi.org/archives/2008/10/wys-is-not-always-wyg-in-pythonre/" rel="bookmark">WYS is not always WYG in python.re</a></li><li><a href="http://kunxi.org/archives/2007/06/howto-display-chinese-in-creative-zenmicro-using-amarok/" rel="bookmark">HOWTO display Chinese in Creative ZenMicro using Amarok</a></li><li><a href="http://kunxi.org/archives/2006/07/tip-translate-fortran-array-to-c/" rel="bookmark">TIP: translate FORTRAN array to C</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://kunxi.org/archives/2008/02/id3-tag-for-programmers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Migrate to MTP</title>
		<link>http://kunxi.org/archives/2007/12/migrate-to-mtp/</link>
		<comments>http://kunxi.org/archives/2007/12/migrate-to-mtp/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 23:37:16 +0000</pubDate>
		<dc:creator>bookstack</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[mtp]]></category>

		<guid isPermaLink="false">http://www.kunxi.org/archives/2007/12/migrate-to-mtp/</guid>
		<description><![CDATA[About nine months ago, I tried to embrace MTP since Creative Lab does not support their own proprietorial protocol(libnjb is the open source implementation) in Windows Vista, and I was really frustrated by the lame upgrade support. Here is a chance for me to get a 2nd generation Zune which is powered by MTP. Although [...]]]></description>
			<content:encoded><![CDATA[<p>About nine months ago, I tried to embrace MTP since Creative Lab does not support their own proprietorial protocol(<a href="http://libnjb.sourceforge.net/">libnjb</a> is the open source implementation) in Windows Vista, and  I was <a href="http://www.kunxi.org/archives/2007/05/zen-is-less-creative-in-software/">really frustrated</a> by the lame upgrade support.</p>
<p>Here is a chance for me to get a 2nd generation Zune which is powered by MTP. Although libmtp is still in <a href="http://libmtp.sourceforge.net/index.php?page=compatibility">very early stage</a> to bridge the gap, we could predict its future from <a href="http://libmtp.sourceforge.net/index.php?page=history">the history</a>.</p>
<p>Amarok supports MTP if the USE flag <em>mtp</em> is enabled. However, the latest stable version 1.4.7-r2 has a bug when transfer file with CJK characters. The bug happens when interfacing with libmtp:</p>
<div class="codesnip-container" >
<div class="cpp codesnip" style="font-family:monospace;"><span class="kw4">int</span> ret <span class="sy1">=</span> LIBMTP_Send_Track_From_File<span class="br0">&#40;</span><br />
<span class="sy2">-</span> &nbsp; &nbsp; &nbsp; &nbsp;m_device, bundle.<span class="me1">url</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">path</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">latin1</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, trackmeta,<br />
<span class="sy2">+</span> &nbsp; &nbsp; &nbsp; &nbsp;m_device, bundle.<span class="me1">url</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">path</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">local8Bit</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, trackmeta,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;progressCallback, <span class="kw3">this</span>, parent_id<br />
&nbsp; &nbsp; &nbsp;<span class="br0">&#41;</span><span class="sy4">;</span></div>
</div>
<p>The bug is fixed in SVN (<a href="https://bugs.kde.org/show_bug.cgi?id=139722">ticket</a>),  but if we take non-utf8-locale users into account, for example, <a href="http://www.magiclinux.org/">MagicLinux</a> takes GB2312 as the default locale, <em>local8Bit</em> may have more flexibility than hard-coded <em>utf8</em>, and it also worked in the UTF8 environment.  </p>
<p>Here is the <a href="http://static.kunxi.org/migrate-to-mtp/amarok-1.4.7-mtp.patch">patch</a> , and as usual, an <a href="http://static.kunxi.org/migrate-to-mtp/amarok-1.4.7-r3.ebuild">ebuild</a> for Gentoo users (<a href="http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds">manual</a>).</p>
<div id="crp_related"><h2>Related Posts:</h2><ul><li><a href="http://kunxi.org/archives/2007/07/small-fix-for-libnjb-to-transfer-chinese-tags/" rel="bookmark">Small fix for libnjb to transfer Chinese tags</a></li><li><a href="http://kunxi.org/archives/2007/06/howto-display-chinese-in-creative-zenmicro-using-amarok/" rel="bookmark">HOWTO display Chinese in Creative ZenMicro using Amarok</a></li><li><a href="http://kunxi.org/archives/2007/11/howto-convert-chinese-mp3-for-id3-v23-standard/" rel="bookmark">HOWTO convert Chinese MP3 for ID3 v2.3 standard</a></li><li><a href="http://kunxi.org/archives/2007/05/zen-is-less-creative-in-software/" rel="bookmark">Zen is less Creative in software</a></li><li><a href="http://kunxi.org/archives/2007/02/make-it-work/" rel="bookmark">Make it work</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://kunxi.org/archives/2007/12/migrate-to-mtp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small fix for libnjb to transfer Chinese tags</title>
		<link>http://kunxi.org/archives/2007/07/small-fix-for-libnjb-to-transfer-chinese-tags/</link>
		<comments>http://kunxi.org/archives/2007/07/small-fix-for-libnjb-to-transfer-chinese-tags/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 04:10:41 +0000</pubDate>
		<dc:creator>bookstack</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Gentoo]]></category>

		<guid isPermaLink="false">http://www.kunxi.org/archives/2007/07/small-fix-for-libnjb-to-transfer-chinese-tags/</guid>
		<description><![CDATA[I once mentioned that some Chinese characters are missing in Creative ZenMirco when using Amarok + libnjb. I checked the libnjb-2.4.4 source code and found that the text codec conversion from UTF-8/ISO8859-1 to UCS2 big-endian is home-brew instead of the standard libiconv, maybe the libiconv is overkill since only three codecs are really needed. According [...]]]></description>
			<content:encoded><![CDATA[<p>I once mentioned that <a href="http://www.kunxi.org/archives/2007/06/howto-display-chinese-in-creative-zenmicro-using-amarok/">some Chinese characters are missing in Creative ZenMirco when using Amarok + libnjb</a>. I checked the libnjb-2.4.4 source code and found that the text codec conversion from UTF-8/ISO8859-1 to UCS2 big-endian is home-brew instead of the standard libiconv, maybe the libiconv is overkill since only three codecs are really needed. According to the specification of <a href="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8</a></p>
<blockquote><table class="solid">
<tbody>
<tr>
<td>U-00000000 â€“ U-0000007F:
</td>
<td>0<i>xxxxxxx</i>
</td>
</tr>
<tr>
<td>U-00000080 â€“ U-000007FF:
</td>
<td>110<i>xxxxx</i> 10<i>xxxxxx</i>
</td>
</tr>
<tr>
<td>U-00000800 â€“ U-0000FFFF:
</td>
<td>1110<i>xxxx</i> 10<i>xxxxxx</i> 10<i>xxxxxx</i>
</td>
</tr>
<tr>
<td>U-00010000 â€“ U-001FFFFF:
</td>
<td>11110<i>xxx</i> 10<i>xxxxxx</i> 10<i>xxxxxx</i> 10<i>xxxxxx</i>
</td>
</tr>
<tr>
<td>U-00200000 â€“ U-03FFFFFF:
</td>
<td>111110<i>xx</i> 10<i>xxxxxx</i> 10<i>xxxxxx</i> 10<i>xxxxxx</i><br />
10<i>xxxxxx</i>
</td>
</tr>
<tr>
<td>U-04000000 â€“ U-7FFFFFFF:
</td>
<td>1111110<i>x</i> 10<i>xxxxxx</i> 10<i>xxxxxx</i> 10<i>xxxxxx</i><br />
10<i>xxxxxx</i> 10<i>xxxxxx</i>
</td>
</tr>
</tbody>
</table>
</blockquote>
<p>while the libnjb developers made a small mistake, so all 0x80xx characters are categorized as abnormal.</p>
<div class="codesnip-container" >
<div class="c codesnip" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span>numbytes <span class="sy0">==</span> 2 <span class="sy0">&amp;&amp;</span> str<span class="br0">&#91;</span>i<span class="sy0">+</span>1<span class="br0">&#93;</span> <span class="sy0">&gt;</span> 0&#215;80<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8230; &#8230;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="kw1">if</span> <span class="br0">&#40;</span>numbytes <span class="sy0">==</span> 3 <span class="sy0">&amp;&amp;</span> str<span class="br0">&#91;</span>i<span class="sy0">+</span>1<span class="br0">&#93;</span> <span class="sy0">&gt;</span> 0&#215;80 <span class="sy0">&amp;&amp;</span> str<span class="br0">&#91;</span>i<span class="sy0">+</span>2<span class="br0">&#93;</span> <span class="sy0">&gt;</span> 0&#215;80<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8230; &#8230;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/* Abnormal string character, just skip */</span></div>
</div>
<p>Here is a <a href="http://static.kunxi.org/small-fix-for-libnjb-to-transfer-chinese-tags/unicode.patch">patch</a> against libnjb-2.2.4, you may adapt it to libnjb-2.2.5 as well. For Gentoo users&#8217; convenience, here is the <a href="http://static.kunxi.org/small-fix-for-libnjb-to-transfer-chinese-tags/libnjb-2.2.4-r1.ebuild">ebuild</a>.</p>
<p>I am just curious why this bug has been here for such a long time.  How many Chinese Linux/BSD users take UTF-8 as the locale, transfer music to Creative ZenMicro? Are these three factors are really small that make this almost never gonna happen?</p>
<div id="crp_related"><h2>Related Posts:</h2><ul><li><a href="http://kunxi.org/archives/2007/06/howto-display-chinese-in-creative-zenmicro-using-amarok/" rel="bookmark">HOWTO display Chinese in Creative ZenMicro using Amarok</a></li><li><a href="http://kunxi.org/archives/2007/12/migrate-to-mtp/" rel="bookmark">Migrate to MTP</a></li><li><a href="http://kunxi.org/archives/2007/05/zen-is-less-creative-in-software/" rel="bookmark">Zen is less Creative in software</a></li><li><a href="http://kunxi.org/archives/2007/11/howto-convert-chinese-mp3-for-id3-v23-standard/" rel="bookmark">HOWTO convert Chinese MP3 for ID3 v2.3 standard</a></li><li><a href="http://kunxi.org/archives/2007/05/howto-display-sharp-chinese-in-gentoo-linux/" rel="bookmark">HOWTO display sharp Chinese in Gentoo Linux?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://kunxi.org/archives/2007/07/small-fix-for-libnjb-to-transfer-chinese-tags/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

