<?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>NewInstance &#187; Software</title>
	<atom:link href="http://en.newinstance.it/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://en.newinstance.it</link>
	<description>Welcome to the official blog of Luigi R. Viggiano. Beware of imitations.</description>
	<lastBuildDate>Mon, 09 Jan 2012 20:29:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using VMWare to run Windows in a Sandbox</title>
		<link>http://en.newinstance.it/2011/07/01/using-vmware-to-run-windows-in-a-sandbox/</link>
		<comments>http://en.newinstance.it/2011/07/01/using-vmware-to-run-windows-in-a-sandbox/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 10:12:17 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Lifehacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[sandbox]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/?p=1098</guid>
		<description><![CDATA[Being a Unix user (Linux/OSX) I need sometime to run some Windows utility in a Virtual Machine. But I don&#8217;t want to break the virtual machine, installing and uninstalling things, or accidentally, or by the wast hordes of viruses and malwares that infestate Windows. So, here I found how to do it: How to discard [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->Being a Unix user (Linux/OSX) I need sometime to run some Windows utility in a Virtual Machine. But I don&#8217;t want to break the virtual machine, installing and uninstalling things, or accidentally, or by the wast hordes of viruses and malwares that infestate Windows. </p>
<p>So, here I found how to do it: <a href="http://communities.vmware.com/message/722101">How to discard changes in VMWare player?</a></p>
<p><b>Q:</b> Running a virtual machine, how can I ensure that the changes gets discarded after I close it?</p>
<p><b>A:</b> Shutdown the VM cleanly. Edit the vmx and add this line if the VM uses a scsi-disk</p>
<pre>
scsi0:0.mode = "independent-nonpersistent"
</pre>
<p>or this if the VM uses an IDE-disk</p>
<pre>
ide0:0.mode = "independent-nonpersistent"
</pre>
<p>Alternatively, use this two lines:</p>
<pre>
snapshot.action = "autoRevert"
snapshot.disabled = "TRUE"
</pre>
<p>Several ways lead to Rome.  Both ways should work, but don&#8217;t mix them.
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2006/07/05/free-virtualization-for-windows-with-qemu/" rel="bookmark" class="crp_title">Free Virtualization for Windows with Qemu</a></li>
<li><a href="http://en.newinstance.it/2008/03/04/ubuntu-710-on-lenovo-t61/" rel="bookmark" class="crp_title">Ubuntu 7.10 on Lenovo T61</a></li>
<li><a href="http://en.newinstance.it/2009/08/28/linux-ram-disks/" rel="bookmark" class="crp_title">Linux RAM Disks</a></li>
<li><a href="http://en.newinstance.it/2011/02/27/how-to-create-a-statically-linked-version-of-git-binaries/" rel="bookmark" class="crp_title">How to create a statically linked version of git binaries</a></li>
<li><a href="http://en.newinstance.it/2009/11/26/karmic-and-luks-usb-drive-encryption-made-almost-easy/" rel="bookmark" class="crp_title">Karmic and Luks: USB drive encryption made (almost) easy</a></li>
</ul>
</div>
<div class="shr-publisher-1098"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F07%2F01%2Fusing-vmware-to-run-windows-in-a-sandbox%2F' data-shr_title='Using+VMWare+to+run+Windows+in+a+Sandbox'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F07%2F01%2Fusing-vmware-to-run-windows-in-a-sandbox%2F' data-shr_title='Using+VMWare+to+run+Windows+in+a+Sandbox'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F07%2F01%2Fusing-vmware-to-run-windows-in-a-sandbox%2F' data-shr_title='Using+VMWare+to+run+Windows+in+a+Sandbox'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2011/07/01/using-vmware-to-run-windows-in-a-sandbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fan Control for MacBook</title>
		<link>http://en.newinstance.it/2011/05/25/fan-control-for-macbook/</link>
		<comments>http://en.newinstance.it/2011/05/25/fan-control-for-macbook/#comments</comments>
		<pubDate>Tue, 24 May 2011 23:00:52 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/?p=1011</guid>
		<description><![CDATA[If you are an objective MacBook user you may think that those laptops tend to overheat. In case, you may give FanControl a try. If you are an Apple Fan, then it&#8217;s just correct that your keyboard is on fire. Related Posts: Superdrive not working anymore Spam defeated Sharing keyboard and mouse on multiple computers [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->If you are an objective MacBook user you may think that those laptops tend to overheat. In case, you may give <a href="http://www.lobotomo.com/products/FanControl/">FanControl</a> a try. If you are an Apple Fan, then it&#8217;s just correct that your keyboard is on fire.</p>
<p><a href="http://en.newinstance.it/wp-content/uploads/2011/05/FanControlScreenshot.png"><img src="http://en.newinstance.it/wp-content/uploads/2011/05/FanControlScreenshot.png" alt="FanControl Screenshot" title="FanControlScreenshot" width="748" height="395" class="alignnone size-full wp-image-1012" /></a>
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2011/08/25/superdrive-not-working-anymore/" rel="bookmark" class="crp_title">Superdrive not working anymore</a></li>
<li><a href="http://en.newinstance.it/2011/07/29/spam-defeated/" rel="bookmark" class="crp_title">Spam defeated</a></li>
<li><a href="http://en.newinstance.it/2010/05/03/sharing-keyboard-and-mouse-on-multiple-computers/" rel="bookmark" class="crp_title">Sharing keyboard and mouse on multiple computers</a></li>
<li><a href="http://en.newinstance.it/2011/02/10/eclipse-save-actions/" rel="bookmark" class="crp_title">Eclipse Save Actions</a></li>
<li><a href="http://en.newinstance.it/2008/10/01/time-to-buy-a-new-laptop/" rel="bookmark" class="crp_title">Time to buy a new laptop</a></li>
</ul>
</div>
<div class="shr-publisher-1011"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F05%2F25%2Ffan-control-for-macbook%2F' data-shr_title='Fan+Control+for+MacBook'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F05%2F25%2Ffan-control-for-macbook%2F' data-shr_title='Fan+Control+for+MacBook'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F05%2F25%2Ffan-control-for-macbook%2F' data-shr_title='Fan+Control+for+MacBook'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2011/05/25/fan-control-for-macbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppStore, Playstation Store and the forced language</title>
		<link>http://en.newinstance.it/2011/01/13/appstore-playstation-store-and-the-forced-language/</link>
		<comments>http://en.newinstance.it/2011/01/13/appstore-playstation-store-and-the-forced-language/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 13:03:34 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[appstore]]></category>
		<category><![CDATA[playstation]]></category>
		<category><![CDATA[playstation network]]></category>
		<category><![CDATA[playstation store]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[sony]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/?p=934</guid>
		<description><![CDATA[Dear Apple, dear Sony, dear stupid "international" company willing to sell me stuff through internet... the fact that, in this period of my life, I am living in Germany and I own a German credit card, doesn't mean that I can perfectly understand German. So why there is no way to change the language in [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->Dear Apple, dear Sony, dear stupid "international" company willing to sell me stuff through internet...</p>
<p>the fact that, in this period of my life, I am living in Germany and I own a German credit card, doesn't mean that I can perfectly understand German. So why there is no way to change the language in your store applications to English or Italian?<br />
It's so difficult to understand?</p>
<p>I bought my Mac in Germany and I requested an international keyboard. And I also use English on my laptop, because even if I am Italian native speaker, I prefer to use English on my computer. And... I was doing the same when I was living in Italy and Switzerland. The same question may be posed to the laptop sellers: why, if I buy a laptop in Germany I have to stick to local Windows language and keyboard layout? What is so difficult to understand in the fact that users may like to choose the language to use for programs and hardware they buy?</p>
<p>How am I supposed to buy anything from a website which doesn't speak my language? Even living in Germany I can use my internet banking in English: does this sounds strange to your company? In which century are you guys living? May I expect that an internet service speaks a second language despite <em>where</em> I live, or from <em>where</em> I pay?</p>
<p>Thanks.
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2008/10/14/how-to-save-70-euro-booking-your-flight-with-lufthansa/" rel="bookmark" class="crp_title">How to save 70 euro booking your flight with Lufthansa</a></li>
<li><a href="http://en.newinstance.it/2007/08/06/in-needing-of-dictionaries-for-reading-blogs/" rel="bookmark" class="crp_title">In needing of dictionaries for reading blogs</a></li>
<li><a href="http://en.newinstance.it/2008/06/18/a-calculator-at-the-command-line/" rel="bookmark" class="crp_title">A calculator at the command line</a></li>
<li><a href="http://en.newinstance.it/2005/06/16/joel-on-software-book/" rel="bookmark" class="crp_title">Joel on Software Book</a></li>
<li><a href="http://en.newinstance.it/2010/10/03/working-in-zurich/" rel="bookmark" class="crp_title">Working in Zürich</a></li>
</ul>
</div>
<div class="shr-publisher-934"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F01%2F13%2Fappstore-playstation-store-and-the-forced-language%2F' data-shr_title='AppStore%2C+Playstation+Store+and+the+forced+language'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F01%2F13%2Fappstore-playstation-store-and-the-forced-language%2F' data-shr_title='AppStore%2C+Playstation+Store+and+the+forced+language'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2011%2F01%2F13%2Fappstore-playstation-store-and-the-forced-language%2F' data-shr_title='AppStore%2C+Playstation+Store+and+the+forced+language'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2011/01/13/appstore-playstation-store-and-the-forced-language/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Top 3 things to do to make better software</title>
		<link>http://en.newinstance.it/2010/04/16/top-3-things-to-do-to-make-better-software/</link>
		<comments>http://en.newinstance.it/2010/04/16/top-3-things-to-do-to-make-better-software/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 13:25:19 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Life, universe and everything]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Error Handling]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Practices]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Top Down]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/2010/04/16/top-3-things-to-do-to-make-better-software/</guid>
		<description><![CDATA[Some time ago, I've answered to a job interview question which was sounding more or less like: «suppose you have 20 minutes to talk to an audience of junior developers about what have been the lessons you learned from your software development experience, and resume that in three points, about what a good developer shall [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->Some time ago, I've answered to a job interview question which was sounding more or less like: «suppose you have 20 minutes to talk to an audience of junior developers about what have been the lessons you learned from your software development experience, and resume that in three points, about what a good developer shall do. What would be your advices?»</p>
<h3>Thinking top-down</h3>
<p>First, when you write your code don't start from the implementation, but start from the client code. Today it is popular to speak about Test Driven Development, and how writing test code first (which is client code), drives you to a better design. In the same way you can write your back-end services starting from the front-end, from how the user interacts with the UI, and letting the implementation details to be driven from it. The internal design should emerge from the use cases, not viceversa. So, testing software early not only drives to more reliable applications but, same importantly, also leads to much better code: easier to understand, to extend and maintain. It is not a detail: in the software industry the code is your product! <br/><br />
I appreciate more a developer who writes code which is easy to follow, rather than developers who can easily understand messy code. Messy code comes from the bottom-up approach. The ability to deal with messy code, comes from the habit to write and deal with it. Real good developers are the one who developed a fine sense of the code smell. A good developer do not write code unless it is strictly necessary, and this is much easier if you start from the abstract idea.<br/><br />
Imagining the "model" at first means to predict what you are gonna need. It brings in constraints, and require you to take decisions, which will likely reveal to be wrong later.<br />
I learned this when I started to work in eclipse. In eclipse you use a variable (which doesn't exist yet!) in your method, eclipse underscore it in red to say that there is a compilation error, then you do a "<a href="http://www.vogella.de/articles/Eclipse/article.html#tips_quickfix">quick fix</a>" and let the IDE to declare the variable for you. You call a method which do not yet exist, and let the IDE to implement the stub. This reverses your way to think. You will never write a useless method or variable again (at least this risk will be drastically reduced, and with some discipline you can easier keep things clean).<br/><br />
Instead of thinking before on the the details, you can focus on your business and write code which explain <em>what</em> your method is doing. And only <em>after</em> you will write the code specifying <em>how</em> to perform the functionality.<br />
Starting focusing on a more abstract level helps making better applications <em>for the users</em>, and the code quality will also benefit. </p>
<p>For the notice, Wikipedia says that <a href="http://en.wikipedia.org/wiki/Top-down_and_bottom-up_design">"bottom-up programming approach which is common in object-oriented languages such as C++ or Java"</a>. <a href="http://it.wikipedia.org/wiki/Discussione:Progettazione_top-down_e_bottom-up">I agree</a> with the guy who is defining this a «<a href="http://en.wikipedia.org/wiki/Talk:Top-down_and_bottom-up_design#Complete_Utter_Bull_Dung">complete utter bull dung</a>». </p>
<h3>Writing readable code</h3>
<p>Try to keep your code speaking, let the code be self explanatory, it's not that difficult... if you find yourself writing much <a href="http://www.c2.com/cgi/wiki?ToNeedComments">comments</a> to explain what an algorithm is doing, probably it means that your code is not readable. Comment in source code is documentation for developers; but the code itself, if it is understandable by another developer, is the best documentation. Avoid putting logs everywhere: it makes the code confuse, and difficult to maintain (how many times code changes and logs do not reflect anymore what's happening?). Put log statement in the strategic points: logging is a part of your application and also that should be carefully designed and thought as a feature. Don't put "debugging" everywhere, logging != debugging. Debug with your IDE, and write tests; it's hardly the case when you can understand what went wrong just from trace logs. <br/><br />
Once the code is written, it is going to be read dozen of times, and this is why it is so important that code is easy to read. Personally I prefer code which is understandable and performs well, over code which is messy and (maybe) perform super-fast. Most of the time messy "optimized" code is slower than simpler and more straightforward code.</p>
<h3>Handling properly error/exceptional conditions</h3>
<p>It looks like this is one of the hardest things to learn from software developers. And it's the source of many bugs. It's simple as that: catch the exception you can manage, and let the other pass through. Avoid "catching-and-rethrowing", avoid exception swallowing, and other amenity: there are plenty of articles about things you'd better never do. This one is quite comprehensive: <a href="http://today.java.net/article/2006/04/04/exception-handling-antipatterns">Exception Handling Antipatterns</a>. Make sure your software not only works well when everything goes fine, but also give the proper messages when something bad happens. This will also reduce the need to dig in log files just to discover that "a server is down" (when your application could just nicely tell that to the user, or inform the administrators!), and reduce the habit to have so much code for debug log statements. <br/><br />
Writing code in TDD also helps with this. Finally try to think <strong>"what could go wrong? and how my software will react?"</strong> before saying you've completed your tasks. Remember how do you feel when you get a cryptic blue screen, and how Windows gained the name to be a very buggy OS.<br/><br />
Don't become a bluescreen  author. </p>
<h3>Conclusions</h3>
<p>I don't know if this is a good answer to the question. But it reflects quite well some of the things I feel very important when I write my code, and that's why I decided to write about this topic here.<br />
And no, the interviewer didn't hire me :)
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2008/10/20/loc-lines-of-code/" rel="bookmark" class="crp_title">LOC (Lines Of Code)</a></li>
<li><a href="http://en.newinstance.it/2008/10/26/shall-configuration-be-bound-to-the-underlying-of-your-application/" rel="bookmark" class="crp_title">Shall configuration be bound to the underlying of your application?</a></li>
<li><a href="http://en.newinstance.it/2006/10/30/the-difference-between-libraries-and-frameworks/" rel="bookmark" class="crp_title">The difference between Libraries and Frameworks</a></li>
<li><a href="http://en.newinstance.it/2010/04/09/how-gwt-is-useful-in-place-of-javascript-and-css/" rel="bookmark" class="crp_title">How GWT is useful in place of  Javascript and CSS?</a></li>
<li><a href="http://en.newinstance.it/2008/10/28/online-free-book-getting-real/" rel="bookmark" class="crp_title">Online Free Book: Getting Real</a></li>
</ul>
</div>
<div class="shr-publisher-411"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2010%2F04%2F16%2Ftop-3-things-to-do-to-make-better-software%2F' data-shr_title='Top+3+things+to+do+to+make+better+software'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2010%2F04%2F16%2Ftop-3-things-to-do-to-make-better-software%2F' data-shr_title='Top+3+things+to+do+to+make+better+software'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2010%2F04%2F16%2Ftop-3-things-to-do-to-make-better-software%2F' data-shr_title='Top+3+things+to+do+to+make+better+software'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2010/04/16/top-3-things-to-do-to-make-better-software/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Ipod touch with Linux</title>
		<link>http://en.newinstance.it/2009/12/03/ipod-touch-with-linux/</link>
		<comments>http://en.newinstance.it/2009/12/03/ipod-touch-with-linux/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 12:11:58 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/2009/12/03/ipod-touch-with-linux/</guid>
		<description><![CDATA[Yesterday night I tried to connect the iPod to Linux. I tried some programs but none was working decently; but the good news is that you don't really need any special program "made for iPod" to do this. For the guys who do not know about iTunes and iPod/iPhone foolishnesses, the problem is that when [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->Yesterday night I tried to connect the iPod to Linux. I tried some programs but none was working decently; but the good news is that you don't really need any special program "made for iPod" to do this. </p>
<p>For the guys who do not know about iTunes and iPod/iPhone foolishnesses, the problem is that when connecting trough USB they are not exposing the filesystem as usb disk. The second problem is how iTunes memorizes files: they get renamed in 4 char lenght filenames under a 3 char lenght folder... so you have files like: </p>
<pre>
iTunes_Control/Music/F26/UBFF.mp3
iTunes_Control/Music/F26/UEBM.mp3
iTunes_Control/Music/F26/UIPQ.mp3
iTunes_Control/Music/F26/UWCJ.mp3
iTunes_Control/Music/F26/WGOH.m4a
</pre>
<p>As result of this, if you have songs belonging to different authors and coming from different albums, but you was keeping in the same folder to listen together... you can't specify to iTunes to play a folder as a playlist, because folder and filenames gets chaotically "reorganized" when imported in iTunes. iTunes, then uses id3 tags to expose views to the user, grouping by author or album title, etc.</p>
<p>To connect to iPod filesystem with Linux, you need to <a href="http://en.wikipedia.org/wiki/Jailbreak_%28iPhone_OS%29">jailbreak</a> the iPhone or the iPod touch, and have OpenSSH running on it. It is not very difficult, but, afaik it's the only way to access remotely to the iPod filesystem, through network (wifi).</p>
<p>Once done that, you need to mount the filesystem using ssh protocol; this can be done with sshfs, which is the ssh protocol support for <a href="http://fuse.sourceforge.net/">FUSE</a> (Filesystem in USEr space) which allows you to mount several type of local or remote filesystem without needing root privileges.</p>
<pre>
$ sudo apt-get install sshfs
</pre>
<p>Then I created a folder under my ~/Music folder where to mount my iPod media</p>
<pre>
$ mkdir ~/Music/iPod
</pre>
<p>At last I made a bash script to mount and unmount the iPod media to the folder I just created. This is the content:</p>
<pre class="brush: bash">
#! /bin/bash

case "$1" in
mount)
        echo -n foobar | sshfs root@Luigi-R-Viggianos-iPod.local:/private/var/mobile/Media/ ~/Music/iPod -o password_stdin
	;;

umount)
        fusermount -u -z ~/Music/iPod
	;;

*)
	echo "Usage: `basename $0` {mount|umount}"
	exit 1
	;;
esac
</pre>
<p>In the above script "foobar" is the password to use to ssh-connect as root on my ipod. Unfortunately I did not succeed in using public key authentication, even modifying the sshd configuration on the ipod, I do not know why... So I had to specify the password in the script.<br />
The Luigi-R-Viggianos-iPod.local is the hostname used by my iPod. Alternatively you can use the ip address, but when you change network you will need to update the script; the hostname usually gets recognized in different WIFIs and mapped to corresponding ip address.</p>
<p>To get the ip address of the iPod connected to WIFI, there are some programs downloadable on the apple store, one is called, with much of fantasy, "IP Address". To know the hostname of the ipod, just connect to it through ssh, and you will see that displayed on the bash prompt line, in my case: "Luigi-R-Viggianos-iPod:~ root#", unfortunately apples likes to have weird unix system on their devices so you don't have basic commands like 'hostname' or files like /etc/hostname to check... did I already said that I hate OSX...? </p>
<p>At this point what I do is just running the script:</p>
<pre>
$ ipod mount
or
$ ipod umount
</pre>
<p>to mount or unmount the iPod to ~/Music/iPod folder. The iPod needs to be attached to a power source, the laptop trough usb or to a docking station, otherwise it will disable the WIFI connection when it goes on stand by; but the file access is fully wireless.</p>
<p>To play files, you need to launch Amarok or Rhytmbox and import the folder ~/Music/iPod. I use Rhytmbox and it indexes the folder. When the folder is mounted I can see the music on my iPod, and when it is not, the music just disappears.</p>
<p>If you want to export an album of MP3 files from the iPod, you just need to select files from Rhytmbox and drag and drop into Nautilus (filesystem browser). But you will have the weird names for the MP3 files set by iTunes. To batch rename the files you can install and use id3ren, which lets you to customize (-template option) how the filename should be renamed (using album title, song title, author, etc):</p>
<pre>
$ sudo apt-get install id3ren
$ id3ren -template='%a - %t - %s.mp3' *
</pre>
<p>If you like to backup the music on your iPod just use rsync or cp. But I don't know how to import new songs in the weird filesystem-format used by iTunes... For this, possibly the easiest solution is to use iTunes on Windows or OSX using VMWare, until Apple does not decide to release <a href="http://www.petitiononline.com/itmslin/petition.html">iTunes on Linux</a>. </p>
<p>Have fun.
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2009/08/28/linux-ram-disks/" rel="bookmark" class="crp_title">Linux RAM Disks</a></li>
<li><a href="http://en.newinstance.it/2007/08/09/multiple-ip-on-a-single-network-interface/" rel="bookmark" class="crp_title">Multiple IP on a single network interface</a></li>
<li><a href="http://en.newinstance.it/2010/01/08/3g-usb-stick-on-ubuntu/" rel="bookmark" class="crp_title">3G USB Stick on Ubuntu</a></li>
<li><a href="http://en.newinstance.it/2009/11/26/karmic-and-luks-usb-drive-encryption-made-almost-easy/" rel="bookmark" class="crp_title">Karmic and Luks: USB drive encryption made (almost) easy</a></li>
<li><a href="http://en.newinstance.it/2009/09/03/macbook-international-keyboard-and-linux/" rel="bookmark" class="crp_title">MacBook International Keyboard and Linux</a></li>
</ul>
</div>
<div class="shr-publisher-400"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F12%2F03%2Fipod-touch-with-linux%2F' data-shr_title='Ipod+touch+with+Linux'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F12%2F03%2Fipod-touch-with-linux%2F' data-shr_title='Ipod+touch+with+Linux'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F12%2F03%2Fipod-touch-with-linux%2F' data-shr_title='Ipod+touch+with+Linux'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2009/12/03/ipod-touch-with-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Skype 2.1.0.47 beta released, and  amd64 packages available!</title>
		<link>http://en.newinstance.it/2009/08/31/skype-21047-beta-released-and-amd64-packages-available/</link>
		<comments>http://en.newinstance.it/2009/08/31/skype-21047-beta-released-and-amd64-packages-available/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 21:15:09 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/2009/08/31/skype-21047-beta-released-and-amd64-packages-available/</guid>
		<description><![CDATA[Since the 24th of August a new beta of Skype is available. Some little look and feel changes, contact groups support, nothing really new, except for the native 64bit support. And I hope it will be more stable. Download it from here: http://www.skype.com/download/skype/linux/ I updated it because the old 32bit version recently is very unstable [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->Since the 24th of August a new beta of Skype is available.</p>
<p>Some little look and feel changes, contact groups support, nothing really new, except for the native 64bit support. And I hope it will be more stable.</p>
<p>Download it from here: <a href="http://www.skype.com/download/skype/linux/">http://www.skype.com/download/skype/linux/</a></p>
<p>I updated it because the old 32bit version recently is very unstable on my system. Maybe due to some library and kernel update from Ubuntu. </p>
<p>After the update you'll need to reconfigure sound settings. And you know how tricky is it on Linux... but with some luck was quite easy on my macbook pro 5.1 running ubuntu: select "HDA NVidia, ALC885 Analog Front speakers (front:CARD=NVidia, DEV=0)" as device for everything, and if you have a system like mine it <em>could</em> work :) . Good luck!
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2008/03/04/ubuntu-710-on-lenovo-t61/" rel="bookmark" class="crp_title">Ubuntu 7.10 on Lenovo T61</a></li>
<li><a href="http://en.newinstance.it/2006/06/24/gtalk-jabber-and-other-im-protocols/" rel="bookmark" class="crp_title">GTalk, Jabber and other IM protocols</a></li>
<li><a href="http://en.newinstance.it/2009/11/20/suspendresume-problem-in-ubuntu-karmic-910-running-on-macbook-pro-51/" rel="bookmark" class="crp_title">Suspend/Resume problem in Ubuntu Karmic 9.10 running on MacBook Pro 5.1</a></li>
<li><a href="http://en.newinstance.it/2005/12/23/ubuntu-on-my-laptop/" rel="bookmark" class="crp_title">Ubuntu on my laptop</a></li>
<li><a href="http://en.newinstance.it/2008/11/01/the-intrepid-ibex-on-dell-inspiron-8600/" rel="bookmark" class="crp_title">The Intrepid Ibex on Dell Inspiron 8600</a></li>
</ul>
</div>
<div class="shr-publisher-384"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F08%2F31%2Fskype-21047-beta-released-and-amd64-packages-available%2F' data-shr_title='Skype+2.1.0.47+beta+released%2C+and++amd64+packages+available%21'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F08%2F31%2Fskype-21047-beta-released-and-amd64-packages-available%2F' data-shr_title='Skype+2.1.0.47+beta+released%2C+and++amd64+packages+available%21'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F08%2F31%2Fskype-21047-beta-released-and-amd64-packages-available%2F' data-shr_title='Skype+2.1.0.47+beta+released%2C+and++amd64+packages+available%21'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2009/08/31/skype-21047-beta-released-and-amd64-packages-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Tutorial: Ubuntu 9.04, Apache with SSL, Subversion over HTTP / HTTPs, and Trac</title>
		<link>http://en.newinstance.it/2009/08/27/tutorial-ubuntu-904-apache-with-ssl-subversion-over-http-https-and-trac/</link>
		<comments>http://en.newinstance.it/2009/08/27/tutorial-ubuntu-904-apache-with-ssl-subversion-over-http-https-and-trac/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 01:25:54 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/2009/08/27/tutorial-ubuntu-904-apache-with-ssl-subversion-over-http-https-and-trac/</guid>
		<description><![CDATA[This tutorial will guide you through installation of Apache, HTTPS, Subversion and Trac, in order to have an (almost) complete development environment for your team. This article is divided in following steps 1. Installing Subversion 2. Installing Apache 3. Configuring Apache with SSL 4. Configuring Subversion with Apache (and SSL) 5. Installing Trac You may [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->This tutorial will guide you through installation of Apache, HTTPS, Subversion and Trac, in order to have an (almost) complete development environment for your team.</p>
<p>This article is divided in following steps </p>
<p>1. Installing Subversion<br />
2. Installing Apache<br />
3. Configuring Apache with SSL<br />
4. Configuring Subversion with Apache (and SSL)<br />
5. Installing Trac</p>
<p>You may choose for example to see how to install Apache and SSL, or having Apache plus subversion without Trac.<br />
Steps are voluntary isolated, and will require more operations than, for instance, issuing an &quot;apt-get install trac&quot; that will download and install all the packages in one step; but this will hopefully allow the readers to choose picking one section and forget about unneeded  components.<br />
I'll not explain what Subversion is, or what SSL is, etc. Ask google, for this info: I just say that for your software project you may need a server with those tools ready for your team.</p>
<h3>Requirements</h3>
<p> You need Ubuntu 9.04, in my case I used the &quot;server edition&quot; 64bit, while installing I used the minimal server mode pressing F4 to have a system as lighter as possible. But possibly this tutorial should be valid for Debian and previous Ubuntu version; but I have not verified that: if you do, post a comment to report your experience.</p>
<h3>Preparation</h3>
<p> After installing your server you have to ensure that apt system is up to date with available software on the repositories.  Type the following command:</p>
<pre>$ sudo apt-get update</pre>
<p>upgrading installed packages may be a good idea to do now:</p>
<pre>$ sudo apt-get upgrade</pre>
<p>Answer Yes if asked to download and install the upgrades.</p>
<h3>1. Installing Subversion</h3>
<p> From the command line type the command:</p>
<pre>$ sudo apt-get install subversion</pre>
<p>If everything went fine you should able to verify the Subversion version installed with following command:</p>
<pre>$ svn --version
svn, version 1.5.4 (r33841)
   compiled Aug  7 2009, 02:02:06

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme</pre>
<p>For now, let's stop here: how to create the Subversion repository, configure the users etc. Will be explained later in conjunction with Apache2 configuration. Maybe I'll write something on how to deal with svnserve, svnadmin, and user access control, in another article. </p>
<p>Later we will see how to create a repository, configure it with apache and HTTP basic authentication.</p>
<h3>2. Installing Apache</h3>
<p> To install apache 2 type the command:</p>
<pre>$ sudo apt-get install apache2</pre>
<p>When finished you should be able to connect with the browser at http://localhost and see the message &quot;It works!&quot;. Or you may verify that at the command line installing and using curl:</p>
<pre>$ sudo apt-get install curl
$ curl http://localhost
&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;</pre>
<h3>3. Configuring Apache with SSL</h3>
<p> Now we want to configure apache to run HTTPs.<br />
Following command will enable ssl Apache2 module with a2enmod (cryptic name for &quot;Apache2 enable module&quot;:</p>
<pre>$ sudo a2enmod ssl</pre>
<p>The previous command will suggest you to restart apache to let it to reload the configuration; ignore that message for now.</p>
<p>We need to enable the HTTPS port (443). Edit /etc/apache2/ports.conf and ensure that port 443 is defined as follows:</p>
<pre>$ sudo vi /etc/apache2/ports.conf</pre>
<pre># If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

&lt;IfModule mod_ssl.c&gt;
    # SSL name based virtual hosts are not yet supported, therefore no
    # NameVirtualHost statement here
    NameVirtualHost *:443
    Listen 443
&lt;/IfModule&gt;</pre>
<p>I added the clause NameVirtualHost *:443 in the for SSL; this is not strictly necessary but it will be useful later if you want to have a VirtualHost for trac and other development services.</p>
<p>Now we need to configure the SSL site. Fortunately we have already the configuration file for that, we just need to enable it with a2ensite (cryptic name for &quot;apache2 enable site&quot;)</p>
<pre>$ sudo a2ensite default-ssl</pre>
<p>Again, the above command will suggest to reload apache configuration to activate the changes. This time the suggestion is almost right. As we made several changes I prefer to restart apache with following command:</p>
<pre>$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                                                              apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName</pre>
<p>If everything went fine you should see the above warning. You can ignore it, unless you want to configure the ServerName for your server. But this is out of scope, so do a search on Google, or consult an Apache expert.</p>
<p>So, if everything went fine, now we should be able to connect to our server through SSL.<br />
You can use firefox or curl, as before, but this time the URL will be https://localhost </p>
<pre>$ curl -k https://localhost
&lt;html&gt;&lt;body&gt;&lt;h1&gt;It works!&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;</pre>
<p>the -k option is to ignore certification validation. Also firefox will complain that our certificate is invalid, but you can add it to exceptions and it will nomore bug you with those messages.</p>
<p>If everything went fine, now we should have Apache2, HTTP and HTTPs ready. </p>
<h3>4. Configuring Subversion with Apache (and SSL)</h3>
<p> First of all, we need to install the Subversion modules for Apache2.</p>
<pre>$ sudo apt-get install libapache2-svn</pre>
<p>They will be enabled by default. So you don't need to run a2enmod.</p>
<p>We only need to configure a repository. Let' say our project is called 'myproject'.</p>
<p>First of all, let's decide where our svn repositories will be created. I like /var/local/svn :</p>
<pre>$ sudo mkdir /var/local/svn</pre>
<p>Then let's create the repository using following procedure:</p>
<pre>$ sudo mkdir /var/local/svn/myproject
$ sudo chown www-data:www-data /var/local/svn/myproject
$ sudo -u www-data svnadmin create /var/local/svn/myproject</pre>
<p>Above commands will ensure that the user www-data (which is the apache user) can fully access the repository for reading and updating it.</p>
<p>We need to configure the repository in Apache. Edit /etc/apache2/mods-available/dav_svn.conf using:</p>
<pre>$ sudo vi /etc/apache2/mods-available/dav_svn.conf</pre>
<p>And add a section like the following one:</p>
<pre>&lt;Location /svn/myproject&gt;
  DAV svn
  SVNPath /var/local/svn/myproject
  AuthType Basic
  AuthName &quot;My Project Subversion Repository&quot;
  AuthUserFile /etc/subversion/myproject.passwd
  &lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;
    Require valid-user
  &lt;/LimitExcept&gt;
&lt;/Location&gt;</pre>
<p>In the above file we indicated that, at the location svn our repository should respond. And for updating the repository we want a valid user. As per above configuration anonymous consultation is allowed; but you can disable it commenting with a leading '#' the lines &lt;LimitExcept ... and &lt;/LimitExcept&gt; or just removing them as in following example:</p>
<pre>&lt;Location /svn/myproject&gt;
  DAV svn
  SVNPath /var/local/svn/myproject
  AuthType Basic
  AuthName &quot;My Project Subversion Repository&quot;
  AuthUserFile /etc/subversion/myproject.passwd
  #&lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;
    Require valid-user
  #&lt;/LimitExcept&gt;
&lt;/Location&gt;</pre>
<p>The above configuration indicates to Apache that even for consulting the repository we want a valid user.<br />
But valid users need a password, and in fact we indicated a password file for our repository called /etc/subversion/myproject.passwd. So let's create a password file with a couple of users:</p>
<pre>$ sudo htpasswd -c /etc/subversion/myproject.passwd luigi
$ sudo htpasswd /etc/subversion/myproject.passwd mario</pre>
<p>The -c option indicates that the password file should be created as new; and it is only necessary for the first user. Be aware of the fact that -c overwrites the existing password file without asking anything. Personally I think this is a quite stupid behavior, but that's the way it is.</p>
<p>Now we should be ready.</p>
<p>Let's reload apache configuration to make the changes effective:</p>
<pre>$ sudo /etc/init.d/apache2 reload</pre>
<p>and let's test with the browser that our svn repository is now accessible through HTTP and HTTPs at following urls:</p>
<p>http://localhost/svn/myproject/</p>
<p>https://localhost/svn/myproject/</p>
<p>We can also use curl to verify it is working:</p>
<pre>$ curl http://username:password@localhost/svn/myproject/
&lt;html&gt;&lt;head&gt;&lt;title&gt;myproject - Revision 0: /&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
 &lt;h2&gt;myproject - Revision 0: /&lt;/h2&gt;
 &lt;ul&gt;
 &lt;/ul&gt;
 &lt;hr noshade&gt;&lt;em&gt;Powered by &lt;a href=&quot;http://subversion.tigris.org/&quot;&gt;Subversion&lt;/a&gt; version 1.5.4 (r33841).&lt;/em&gt;
&lt;/body&gt;&lt;/html&gt;</pre>
<pre>$ curl -k https://username:password@localhost/svn/myproject/
&lt;html&gt;&lt;head&gt;&lt;title&gt;myproject - Revision 0: /&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
 &lt;h2&gt;myproject - Revision 0: /&lt;/h2&gt;
 &lt;ul&gt;
 &lt;/ul&gt;
 &lt;hr noshade&gt;&lt;em&gt;Powered by &lt;a href=&quot;http://subversion.tigris.org/&quot;&gt;Subversion&lt;/a&gt; version 1.5.4 (r33841).&lt;/em&gt;
&lt;/body&gt;&lt;/html&gt;</pre>
<p>Now we can also download our project using svn</p>
<pre>$ svn co https://localhost/svn/myproject myproject --username luigi</pre>
<p>"luigi" is obviously my username, substitute it with yours.<br />
The first time it will prompt for accepting the SSL certificate, answer to accept it permanently (p). Then it will optionally ask you for the password, type it.<br />
We can also test that modifying the remote repository is working with:</p>
<pre>$ svn mkdir -m &quot;created the trunk for the project&quot; https://localhost/svn/myproject/trunk --username luigi</pre>
<p>It will answer: Committed revision 1.  If so, we've done.</p>
<h3>5. Installing Trac</h3>
<p>To install trac files and required dependencies, type the following command:</p>
<pre>
$ sudo apt-get install trac
$ sudo apt-get install libapache2-mod-python
</pre>
<p>Let's create the directories for trac web folder:</p>
<pre>
$ sudo mkdir /var/local/trac
$ sudo chown www-data:www-data /var/local/trac
</pre>
<p>edit Apache configuration file for one of your enabled sites (in this example I modify the default http one, but you can choose to put trac on HTTPS modifying default-ssl) </p>
<pre>
$ sudo vi /etc/apache2/sites-enabled/000-default
</pre>
<p>and add the following lines at the end of the file, before the &lt;/VirtualHost&gt; tag:</p>
<pre>
        &lt;Location /projects&gt;
                SetHandler mod_python
                PythonInterpreter main_interpreter
                PythonHandler trac.web.modpython_frontend
                PythonOption TracEnvParentDir /var/local/trac
                PythonOption TracUriRoot /projects
                PythonOption PYTHON_EGG_CACHE /tmp
        &lt;/Location&gt;

        # use the following for one authorization for all projects
        # (names containing &quot;-&quot; are not detected):
        &lt;LocationMatch &quot;/projects/[[:alnum:]]+/login&quot;&gt;
            AuthType Basic
            AuthName &quot;trac&quot;
            AuthUserFile /etc/trac/trac.passwd
            Require valid-user
        &lt;/LocationMatch&gt;
</pre>
<p>Create a password file for trac users (if you want you can reuse or link the passwd file used for subversion  repositories)</p>
<pre>
$ sudo htpasswd -c /etc/trac/trac.passwd luigi
$ sudo htpasswd  /etc/trac/trac.passwd mario
... continue this way for all your users.
</pre>
<p>Create the trac environment for your project:</p>
<pre>
$ sudo -u www-data trac-admin /var/local/trac/myproject initenv
</pre>
<p>It will ask you some questions related to your project. Here's my answers in blue</p>
<pre>
Project Name [My Project]&gt; <span style="color:blue">My Project</span>
Database connection string [sqlite:db/trac.db]&gt; <span style="color:blue">[Just press Enter to accept the default]</span>
Repository type [svn]&gt;  <span style="color:blue">[Just press Enter to accept the default]</span>
Path to repository [/path/to/repos]&gt; <span style="color:blue">/var/local/svn/myproject</span>
</pre>
<p>Now let's restart apache:</p>
<pre>
$ sudo /etc/init.d/apache2 restart
</pre>
<p>Check that trac works properly connecting the browser to http://localhost/projects or use curl to verify that the url is responding properly as we did before. This url should display a link to &quot;My Project&quot;, click on it and you should see the project home page. Clicking on login the browser should ask you to provide username and password as recently defined with htpasswd command.</p>
<p>Last thing to do: add yourself as administrator for Trac. This will enable the Admin menu and allow to do much of the administration operations from the web, that you could also do at the command line with trac-admin tool.<br />
Execute the following command:</p>
<pre>
$ sudo -u www-data trac-admin /var/local/trac/myproject permission add luigi TRAC_ADMIN
</pre>
<p>This will make the username 'luigi' administrator for the project.</p>
<p>You can tune additional configuration settings in Trac to enable email notification, change the project logo, etc. Everything you need to know is on Trac <a href="http://trac.edgewall.org/wiki/TracGuide">website</a>. For the configuration check here: <a href="http://trac.edgewall.org/wiki/TracIni">http://trac.edgewall.org/wiki/TracIni</a></p>
<p>Hope everything went fine. Enjoy your development!
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2009/05/13/making-eclipse-javahl-working-recompiling-subversion-from-the-sources/" rel="bookmark" class="crp_title">Making Eclipse JavaHL working, recompiling Subversion from the sources</a></li>
<li><a href="http://en.newinstance.it/2010/08/03/maven-local-repository-modules/" rel="bookmark" class="crp_title">Maven Local Repository Modules</a></li>
<li><a href="http://en.newinstance.it/2005/06/11/automatic-proxy-switching/" rel="bookmark" class="crp_title">Automatic Proxy Switching</a></li>
<li><a href="http://en.newinstance.it/2008/06/17/maven-class-orgapachemavenartifactrepositoryartifactrepository-cannot-be-instantiated/" rel="bookmark" class="crp_title">Maven: Class  &#8216;org.apache.maven.artifact.repository.ArtifactRepository&#8217; cannot be   instantiated</a></li>
<li><a href="http://en.newinstance.it/2009/03/05/ant-macrodefs/" rel="bookmark" class="crp_title">Ant macrodefs</a></li>
</ul>
</div>
<div class="shr-publisher-381"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F08%2F27%2Ftutorial-ubuntu-904-apache-with-ssl-subversion-over-http-https-and-trac%2F' data-shr_title='Install+Tutorial%3A+Ubuntu+9.04%2C+Apache+with+SSL%2C+Subversion+over+HTTP+%2F+HTTPs%2C+and+Trac'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F08%2F27%2Ftutorial-ubuntu-904-apache-with-ssl-subversion-over-http-https-and-trac%2F' data-shr_title='Install+Tutorial%3A+Ubuntu+9.04%2C+Apache+with+SSL%2C+Subversion+over+HTTP+%2F+HTTPs%2C+and+Trac'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F08%2F27%2Ftutorial-ubuntu-904-apache-with-ssl-subversion-over-http-https-and-trac%2F' data-shr_title='Install+Tutorial%3A+Ubuntu+9.04%2C+Apache+with+SSL%2C+Subversion+over+HTTP+%2F+HTTPs%2C+and+Trac'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2009/08/27/tutorial-ubuntu-904-apache-with-ssl-subversion-over-http-https-and-trac/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>Best comments in source code</title>
		<link>http://en.newinstance.it/2009/04/24/best-comments-in-source-code/</link>
		<comments>http://en.newinstance.it/2009/04/24/best-comments-in-source-code/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 14:42:02 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Life, universe and everything]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/2009/04/24/best-comments-in-source-code/</guid>
		<description><![CDATA[Found this nice thread on StackOverflow: What is the best comment in source code you have ever encountered? A fun read. I'm trying hard to keep myself to post some snippet; fortunately I've not enough reputation on StackOverflow to post answers :) Related Posts: Give color to your code! Do we really need assertions? LOC [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->Found this nice thread on StackOverflow:</p>
<p><a href="http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered">What is the best comment in source code you have ever encountered?</a></p>
<p>A fun read. I'm trying hard to keep myself to post some snippet; fortunately I've not enough reputation on StackOverflow to post answers :)</p>
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2006/12/02/give-color-to-your-code/" rel="bookmark" class="crp_title">Give color to your code!</a></li>
<li><a href="http://en.newinstance.it/2005/07/13/do-we-really-need-assertions/" rel="bookmark" class="crp_title">Do we really need assertions?</a></li>
<li><a href="http://en.newinstance.it/2008/10/20/loc-lines-of-code/" rel="bookmark" class="crp_title">LOC (Lines Of Code)</a></li>
<li><a href="http://en.newinstance.it/2006/08/16/cool-tool-windows-live-writer/" rel="bookmark" class="crp_title">Cool tool: Windows Live Writer</a></li>
<li><a href="http://en.newinstance.it/2011/07/29/spam-defeated/" rel="bookmark" class="crp_title">Spam defeated</a></li>
</ul>
</div>
<div class="shr-publisher-370"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F04%2F24%2Fbest-comments-in-source-code%2F' data-shr_title='Best+comments+in+source+code'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F04%2F24%2Fbest-comments-in-source-code%2F' data-shr_title='Best+comments+in+source+code'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F04%2F24%2Fbest-comments-in-source-code%2F' data-shr_title='Best+comments+in+source+code'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2009/04/24/best-comments-in-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple MightyMouse: don&#8217;t buy it.</title>
		<link>http://en.newinstance.it/2009/03/12/apple-mightymouse-dont-buy-it/</link>
		<comments>http://en.newinstance.it/2009/03/12/apple-mightymouse-dont-buy-it/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 03:45:20 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/2009/03/12/apple-mightymouse-dont-buy-it/</guid>
		<description><![CDATA[Two Saturdays ago, I bought the Wireless Apple Mightymouse. Very nice looking, but I find it much harder to use than the MacBook's touchpad. Basically the problem is the acceleration, there's no way to set it up without external utility: usboverdrive, steermouse, about $20 each. While you can adjust mouse acceleration in any decent OS, [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->Two Saturdays ago, I bought the Wireless Apple Mightymouse. Very nice looking, but I find it much harder to use than the MacBook's touchpad. Basically the problem is the acceleration, there's no way to set it up without external utility: <a href="http://www.usboverdrive.com">usboverdrive</a>, <a href="http://plentycom.jp/en/steermouse/">steermouse</a>, about $20 each. While you can adjust mouse acceleration in any decent OS, it seems that on Macs - like in low-cost flights - you pay every basic additional feature.<br />
The touchpad of my MacBook is the best experience I've ever had with a touchpad, the MightyMouse experience is the worst experience with a mouse; this acceleration issue makes it very hard to use and very imprecise. Awful.<br />
Simply, don't buy it and save 70 euro. </p>
<p>Noticeable good things: the trackball, the easiness to setup the Bluetooth connectivity. The rest, is totally crap. Also, I read of people complaining that after a while the trackball gets dirty and stops working. And it's very hard to clean up and restore it working. Uhm...</p>
<p>One thing to add, just to relief those thinking that I'm getting an anti-apple guy<sup><a href="#note-1-apple">1</a></sup>: I also don't like the "paste" function binded to the middle-mouse click on Linux. I often get accidental pastes in source code for that "feature". And, of course, there's not an easy way to disable it: as far as I understood the only way is to trick on Xorg configuration. But... the good thing is that Linux evolves, and this will probably be fixed before or later (and it should be the time!!!); it seems to me that OSX is bound to legacy usability errors that they call "features", and they never go forward on those points. Think different: I'm trying but thinking wrong is not pleasant.<br />
I cannot see the time when Ubuntu will be working fine on new MacBooks hardware.</p>
<p><a name="note-1-apple"><sup>1</sup></a> Apple's hardware is cool, it's the software that sucks!
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2011/08/25/superdrive-not-working-anymore/" rel="bookmark" class="crp_title">Superdrive not working anymore</a></li>
<li><a href="http://en.newinstance.it/2008/03/04/ubuntu-710-on-lenovo-t61/" rel="bookmark" class="crp_title">Ubuntu 7.10 on Lenovo T61</a></li>
<li><a href="http://en.newinstance.it/2008/11/01/the-intrepid-ibex-on-dell-inspiron-8600/" rel="bookmark" class="crp_title">The Intrepid Ibex on Dell Inspiron 8600</a></li>
<li><a href="http://en.newinstance.it/2009/02/03/some-things-i-dont-like-about-my-mac/" rel="bookmark" class="crp_title">Some things I don&#8217;t like about my Mac</a></li>
<li><a href="http://en.newinstance.it/2009/09/01/mighty-mouse-reverse-horizontal-scrolling-workaround-on-ubuntu-linux-904/" rel="bookmark" class="crp_title">Mighty Mouse: reverse horizontal scrolling workaround on Ubuntu Linux 9.04</a></li>
</ul>
</div>
<div class="shr-publisher-356"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F03%2F12%2Fapple-mightymouse-dont-buy-it%2F' data-shr_title='Apple+MightyMouse%3A+don%27t+buy+it.'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F03%2F12%2Fapple-mightymouse-dont-buy-it%2F' data-shr_title='Apple+MightyMouse%3A+don%27t+buy+it.'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F03%2F12%2Fapple-mightymouse-dont-buy-it%2F' data-shr_title='Apple+MightyMouse%3A+don%27t+buy+it.'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2009/03/12/apple-mightymouse-dont-buy-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tomboy on Mac (and Windows)</title>
		<link>http://en.newinstance.it/2009/01/29/tomboy-on-mac-and-windows/</link>
		<comments>http://en.newinstance.it/2009/01/29/tomboy-on-mac-and-windows/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 05:15:56 +0000</pubDate>
		<dc:creator>Luigi</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Lifehacks]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://en.newinstance.it/2009/01/29/tomboy-on-mac-and-windows/</guid>
		<description><![CDATA[Finally Tomboy is available on Mac! It's the best note taking application I've ever seen. Give it a try. Update: latest version: Mono 2.2 Tomboy 0.13.4 Related Posts: Gnome Panel Freezes Font size problem with Gnome using Motif applications Ganymede and Subversive, finally got installed and working Cool tool: Windows Live Writer How to save [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic -->Finally <a href="http://projects.gnome.org/tomboy/">Tomboy</a> is available on Mac!</p>
<p><a href="http://automorphic.blogspot.com/2008/10/tomboy-preview-for-windows-and-mac.html"><img src="http://2.bp.blogspot.com/_brJXLM5a6qM/SPxYY_l0HcI/AAAAAAAADvc/izkTcE0t7KE/s400/tomboy-mac-dock-small.png" alt="Tomboy on mac" /><br />
</a></p>
<p>It's the best note taking application I've ever seen. <a href="http://automorphic.blogspot.com/2008/10/tomboy-preview-for-windows-and-mac.html">Give it a try</a>.</p>
<p>Update: latest version:<br />
<a href="http://ftp.novell.com/pub/mono/archive/2.2/macos-10-universal/5/">Mono 2.2</a><br />
<a href="http://ftp.gnome.org/pub/GNOME/binaries/mac/tomboy/0.13/">Tomboy 0.13.4</a>
<div id="crp_related">
<h4>Related Posts:</h4>
<ul>
<li><a href="http://en.newinstance.it/2008/05/23/gnome-panel-freezes/" rel="bookmark" class="crp_title">Gnome Panel Freezes</a></li>
<li><a href="http://en.newinstance.it/2006/02/01/font-size-problem-with-gnome-using-motif-applications/" rel="bookmark" class="crp_title">Font size problem with Gnome using Motif applications</a></li>
<li><a href="http://en.newinstance.it/2008/09/03/ganymede-and-subversive-finally-got-installed-and-working/" rel="bookmark" class="crp_title">Ganymede and Subversive, finally got installed and working</a></li>
<li><a href="http://en.newinstance.it/2006/08/16/cool-tool-windows-live-writer/" rel="bookmark" class="crp_title">Cool tool: Windows Live Writer</a></li>
<li><a href="http://en.newinstance.it/2008/10/14/how-to-save-70-euro-booking-your-flight-with-lufthansa/" rel="bookmark" class="crp_title">How to save 70 euro booking your flight with Lufthansa</a></li>
</ul>
</div>
<div class="shr-publisher-349"></div>
<p><!-- Start Shareaholic LikeButtonSetBottom Automatic -->
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F01%2F29%2Ftomboy-on-mac-and-windows%2F' data-shr_title='Tomboy+on+Mac+%28and+Windows%29'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F01%2F29%2Ftomboy-on-mac-and-windows%2F' data-shr_title='Tomboy+on+Mac+%28and+Windows%29'></a><a class='shareaholic-tweetbutton' data-shr_count='none' data-shr_href='http%3A%2F%2Fen.newinstance.it%2F2009%2F01%2F29%2Ftomboy-on-mac-and-windows%2F' data-shr_title='Tomboy+on+Mac+%28and+Windows%29'></a></div>
<div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div>
<p><!-- End Shareaholic LikeButtonSetBottom Automatic --></p>
]]></content:encoded>
			<wfw:commentRss>http://en.newinstance.it/2009/01/29/tomboy-on-mac-and-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

