<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Daniel Ferbers Technical Tavern</title>
	<atom:link href="http://techtavern.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://techtavern.wordpress.com</link>
	<description>Lets have some drink and discuss a bit about Linux, Eclipse and Computer Programming.</description>
	<lastBuildDate>Thu, 10 Dec 2009 18:01:45 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='techtavern.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/5a1a2eb5f19da877c6d6dabd9f87452b?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Daniel Ferbers Technical Tavern</title>
		<link>http://techtavern.wordpress.com</link>
	</image>
			<item>
		<title>Printing java logger configuration</title>
		<link>http://techtavern.wordpress.com/2009/12/10/printing-java-logger-configuration/</link>
		<comments>http://techtavern.wordpress.com/2009/12/10/printing-java-logger-configuration/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 18:01:45 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=208</guid>
		<description><![CDATA[I have been wondering for some time how to print out a list with details how loggers were configured.
In order to work, one requires to create at least one logger instance of each logger that shall be listed.
I will provide further details in future.

public void print(PrintStream out) {
	out.println(&#34;Configuração de log: &#34;);
	LogManager logManager = LogManager.getLogManager();
	Enumeration&#60;String&#62; loggerNames [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=208&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have been wondering for some time how to print out a list with details how loggers were configured.<br />
In order to work, one requires to create at least one logger instance of each logger that shall be listed.<br />
I will provide further details in future.</p>
<pre class="brush: java;">
public void print(PrintStream out) {
	out.println(&quot;Configuração de log: &quot;);
	LogManager logManager = LogManager.getLogManager();
	Enumeration&lt;String&gt; loggerNames = logManager.getLoggerNames();
	Set&lt;String&gt; names = new TreeSet&lt;String&gt;();
	Set&lt;Handler&gt; handlerSet = new HashSet&lt;Handler&gt;();
	while (loggerNames.hasMoreElements()) {
		String name = loggerNames.nextElement();
		names.add(name);
	}
	for (String name : names) {
		Logger logger = logManager.getLogger(name);
		String nome = logger.getName();
		if (nome.length() == 0) nome = &quot;&lt;root&gt;&quot;;
//		boolean inheritedLevel = false;
		Level level = logger.getLevel();
//		boolean inheritedHandler = false;
		Handler[] handlers = logger.getHandlers();

		Logger parentLevelLogger = null;
		if (level == null) {
			parentLevelLogger = logger.getParent();
			while (parentLevelLogger != null &amp;&amp; level == null) {
				Level parentLevel = parentLevelLogger.getLevel();
				if (parentLevel != null) {
					level = parentLevel;
				} else {
					parentLevelLogger = parentLevelLogger.getParent();
				}
			}
		}
		Logger parentHandlerLogger = null;
		if (handlers == null) {
			parentHandlerLogger = logger.getParent();
			while (parentHandlerLogger != null &amp;&amp; handlers == null) {
				Handler[] parentHandlers = parentHandlerLogger.getHandlers();
				if (parentHandlers != null) {
					handlers = parentHandlers;
				} else {
					parentHandlerLogger = parentHandlerLogger.getParent();
				}
			}
		}
		String nivel = &quot;?&quot;;
		if (level != null) nivel = level.getName();
		if (parentLevelLogger != null) {
			if (parentLevelLogger.getName().length() == 0)
				nivel = &quot;&lt;root&gt;:&quot;+nivel;
			else
				nivel = parentLevelLogger.getName()+&quot;:&quot;+nivel;
		}
		String lista = &quot;?&quot;;
		if (handlers != null) {
			List&lt;Handler&gt; list = Arrays.asList(handlers);
			if (list.size() == 0) {
				lista = &quot;&quot;;
			} else {
				lista = null;
				for (Handler handler : list) {
					if (lista == null) lista = handler.getClass().getName();
					else lista += &quot;, &quot; + handler.getClass().getSimpleName();
				}
			}
		}
		if (parentHandlerLogger != null) {
			if (parentHandlerLogger.getName().length() == 0)
				nivel = &quot;&lt;root&gt;:&quot;+lista;
			else
				nivel = parentHandlerLogger.getName()+&quot;:&quot;+lista;
		}
		out.format(&quot; - %s (%s): %s\n&quot;, nome, nivel, lista);
	}
	for (Handler handler : handlerSet) {
		String nome = handler.getClass().getSimpleName();
		String nivel = handler.getLevel().getName();
		out.format(&quot; - %s (%s)\n&quot;, nome, nivel);
	}
}
</pre>
Posted in Java  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/208/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/208/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/208/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=208&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2009/12/10/printing-java-logger-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 9.04: Skype issues</title>
		<link>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-skype-issues/</link>
		<comments>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-skype-issues/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 04:47:55 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[planetLTC]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=202</guid>
		<description><![CDATA[This article addresses an issue similar to another that I have already adressed for Ubuntu 8.04: How to correctly configure Skype on Ubuntu 9.04.
First, I assume that Skype was installed from midibuntu.org repositories.
Issue 1: Speakers do not work.
The first required configuration change is setting Skype to use Pulse Audio Support instead of default (ALSA) sound [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=202&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>This article addresses an issue similar <a href="http://techtavern.wordpress.com/2009/03/18/skype-on-ubuntu-810-microphone-and-internal-speaker-issues/">to another that I have already adressed for Ubuntu 8.04</a>: How to correctly configure Skype on Ubuntu 9.04.</em></p>
<p>First, I assume that Skype was installed from midibuntu.org repositories.</p>
<p><strong>Issue 1: Speakers do not work.</strong></p>
<p>The first required configuration change is setting Skype to use Pulse Audio Support instead of default (ALSA) sound drivers. Go to Skype-&gt;Options-&gt;Audio Devices. Select “pulse” for all audio devices.</p>
<p>I also recommend to disable an option like “Allow Skype to automatically adjust mixer levels&#8221; for this first moment. While this option was enabled, I have experienced Skype undoing the correct configuration and turning off my microphone volume before each call . After you manage to have Skype working fine, then you may enable this option again to see if Skype continues working fine :-)</p>
<p><strong>Issue 2: Voice gets delayed or cut.</strong></p>
<p>There is a known issue where Skype overloads CPU while the microphone records from the Pulse Audio Support. Voice gets heavily delayed (eg. more than 60 seconds). You need to switch the microphone device to another but not “pulse” nor “alsa”. Try selecting the entry that describes your microphone hardware. You may need to take several tries until you find out the device that really maps to your microphone. Fortunately, you can play around during a test call, if you always press the “apply” button. On my desktop, the correct option is called &#8220;Intel ICH5 (hw:ICH5,0)&#8221;.</p>
Posted in Linux, planetLTC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=202&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-skype-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 9.04: Microphone issues</title>
		<link>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-microphone-issues/</link>
		<comments>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-microphone-issues/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 03:43:52 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[planetLTC]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=196</guid>
		<description><![CDATA[Continuing the discussion of audio configuration issues on Ubuntu 9.04&#8230;
If you are using Skype, please also read my next article that discusses Skype on Ubuntu 9.04.
I suggest testing the microphone with the &#8220;Sound Recorder&#8221; that is found in the &#8220;Applications&#8221;-&#62;&#8221;Sound and Video&#8221; menu of the top bar on the Ubuntu desktop. Ensure that &#8220;voice, lossless [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=196&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>Continuing the discussion of audio configuration issues on Ubuntu 9.04&#8230;</em></p>
<p>If you are using Skype, please also read my next article that discusses Skype on Ubuntu 9.04.</p>
<p>I suggest testing the microphone with the &#8220;Sound Recorder&#8221; that is found in the &#8220;Applications&#8221;-&gt;&#8221;Sound and Video&#8221; menu of the top bar on the Ubuntu desktop. Ensure that &#8220;voice, lossless (.wav)&#8221; (may vary according to your language) is selected. Click on &#8220;Record&#8221; and talk to the microphone. The &#8220;Level&#8221; bar should increase as you talk louder. Click on &#8220;Stop&#8221; and &#8220;Play&#8221; to hear if your voice was recorded sucessfully.</p>
<p><strong>Issue 3: Microphone does not work</strong></p>
<p>Solution: Enable the microphone capture. Right-click the volume icon on the left of the top bar on the Ubuntu desktop and select &#8220;Mixer&#8221; or &#8220;Volume Control&#8221; (may vary on according to your language). The mixer dialog opens. Click on &#8220;Preferences&#8221; to open the preferences dialog, enable &#8220;Microphone&#8221; and &#8220;Microphone Capture&#8221; and click on &#8220;Close&#8221; to return back. Move the &#8220;Microphone&#8221; slide up, ensure button underneath the slide is not &#8220;muted&#8221;. On the &#8220;Switches&#8221; tab, enable &#8220;&#8221;Microphone Capture&#8221;.</p>
<p><strong>Issue 4: </strong><strong>Microphone i</strong><strong>s too quiet<br />
</strong></p>
<p>Solution: Raise capture volume. Back to the mixer dialog, click on &#8220;Preferences&#8221; to open the preferences dialog, enable &#8220;Capture&#8221; and click on &#8220;Close&#8221; to return back. On the &#8220;Recording&#8221; tab, move the &#8220;Capture&#8221; slide up, ensure button underneath the slide is not &#8220;muted&#8221;.</p>
<p><strong>Issue 5: Is still too quiet<br />
</strong></p>
<p>Solution: Enable the microphone boost. Back to the mixer dialog, click on &#8220;Preferences&#8221; to open the preferences dialog, enable &#8220;Mic boost +20dB&#8221; and click on &#8220;Close&#8221; to return back. On the &#8220;Switches&#8221; tab, enable &#8220;Mic boost +20dB&#8221;. If microphone becomes too lound or too noisy, just disable this option again.</p>
Posted in Linux, planetLTC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=196&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-microphone-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 9.04: External and internal speaker issues &#8211; part 2</title>
		<link>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-external-and-internal-speaker-issues-part-2/</link>
		<comments>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-external-and-internal-speaker-issues-part-2/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 03:10:57 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[planetLTC]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=193</guid>
		<description><![CDATA[If you run Ubuntu 9.04 and your desktop or laptop is featured with both internal speaker and TRS jacks for external speakers, then you might face some issues that sound is played on both. I have written some articles where I propose some very simple solutions and you may try them and choose the one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=193&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>If you run Ubuntu 9.04 and your desktop or laptop is featured with both internal speaker and TRS jacks for external speakers, then you might face some issues that sound is played on both. I have written some articles where I propose some very simple solutions and you may try them and choose the one you like most.</em></p>
<p><strong>Issue 2: Connecting the headset does not turn off internal speaker.</strong></p>
<p>Try to connect/remove a headset from the external jack and observe if your internal speaker becomes automatically muted. If not, then some more configuration is required.</p>
<p>Solution 1: Previously, <a href="http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-external-and-internal-speaker-issues/">I explained how to display the &#8220;Master mono&#8221; and &#8220;Headset&#8221; slide bars</a>. Slide down the &#8220;Master Mono&#8221; and click on the &#8220;Mute&#8221; button underneath this bar. This will completely disable the internal speaker (until you un-mute it again and raise its volume slide bar).</p>
<p>Solution 2: Right-click the volume icon on the left of the top bar on the Ubuntu desktop and select &#8220;Mixer&#8221; or &#8220;Volume Control&#8221; (may vary on according to your language). The mixer dialog opens. Click on &#8220;Preferences&#8221;. Enable &#8220;Headphone Jack Sense&#8221; (eventually you will need to scroll down the list to see this option). Click on &#8220;Close&#8221;. The previous mixer dialog should now display a &#8220;Switches&#8221; tab. Click to open it and you will see the &#8220;Headphone Jack Sense&#8221; switch. Whenever you want the internal speaker to mute automatically when an external speaker is connected, just enable it.</p>
<p>Actually, I use to enable it once and leave it enabled forever&#8230;</p>
Posted in Linux, planetLTC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=193&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-external-and-internal-speaker-issues-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 9.04: External and internal speaker issues</title>
		<link>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-external-and-internal-speaker-issues/</link>
		<comments>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-external-and-internal-speaker-issues/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 02:56:12 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[planetLTC]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=190</guid>
		<description><![CDATA[If you run Ubuntu 9.04 and your desktop or laptop is featured with both internal speaker and TRS jacks for external speakers, then you might face some issues that sound is played on both. I have written some articles where I propose some very simple solutions and you may try them and choose the one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=190&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>If you run Ubuntu 9.04 and your desktop or laptop is featured with both internal speaker and TRS jacks for external speakers, then you might face some issues that sound is played on both. I have written some articles where I propose some very simple solutions and you may try them and choose the one you like most.</em></p>
<p>Of course, I discarded any inappropriate solutions that were proposed in several forums: editing mysterious configuration files,recompiling the kernel and unplugging the internal speaker from the motherboard.</p>
<p>There are much simpler approaches. First, let play some of your favorite songs to observe if the proposed changes really reflect the audio configuration.</p>
<p><strong>Issue 1: Does master volume really work?</strong></p>
<p>Click on the volume icon that uses to be placed on the right of the top bar on your Ubuntu desktop. Slide the bar and observe if music gets more or less louder. If nothing happens, then there will no common control for both internal and external speakers, unfortunately.</p>
<p>Solution: Right-click the volume icon and select &#8220;Preferences&#8221;. Ensure that the first line display the option that contains &#8220;Alsa Mixer&#8221;. Then select &#8220;Master mono&#8221; or &#8220;Headset&#8221;. Now the slide bar will control the volume of your internal or external speaker. <em>It will control only one of them, but not both. It is not ideal, but less inconvenient than controlling nothing. </em>If you now a better solution, please leave me a note.</p>
<p>Right-click the volume icon and select &#8220;Mixer&#8221; or &#8220;Volume Control&#8221; (may vary on according to your language). The mixer dialog opens. Click on &#8220;Preferences&#8221;. Disable &#8220;Master&#8221;. The master volume slide bar will disappear. Ensure that &#8220;Headset&#8221; and &#8220;Master mono&#8221; is enabled. Now you might control the volume of both internal and external speaker independently through the mixer dialog. <em>Just note that if your have an external speaker connected to the external jack, then the slide bar for &#8220;Headset&#8221; is actually changing volume of your speaker.</em></p>
Posted in Linux, planetLTC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=190&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2009/08/08/ubuntu-9-04-external-and-internal-speaker-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
		<item>
		<title>How to correclty calculate days between two days</title>
		<link>http://techtavern.wordpress.com/2009/04/13/how-to-correclty-calculate-days-between-two-days/</link>
		<comments>http://techtavern.wordpress.com/2009/04/13/how-to-correclty-calculate-days-between-two-days/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 21:44:53 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=97</guid>
		<description><![CDATA[The standard Java API has no solution to calculate the period between two days, although this is a common request for someone who is doing calendar arithmetic.
Googling around, the are many people who expose their own solutions (see some of them 1, 2, 3, 4).  All them suggest getting difference between the two dates, measured [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=97&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The standard Java API has no solution to calculate the period between two days, although this is a common request for someone who is doing calendar arithmetic.</p>
<p>Googling around, the are many people who expose their own solutions (see some of them <a href="www.rgagnon.com/javadetails/java-0097.html">1</a>, <a href="http://www.java-tips.org/java-se-tips/java.util/compute-days-between-2-dates.html">2</a>, <a href="http://www.roseindia.net/java/java-get-example/number-days-between.shtml">3</a>, <a href="http://www.faqs.org/qa/qa-10170.html">4</a>).  All them suggest getting difference between the two dates, measured in number of milliseconds, and divide by 1000 * 60 * 60 * 24 (that means, the number of milliseconds in a day typical day).</p>
<p>However, are these results really reliable? I think not. All those that I have read did not yet consider correctly both daylight savings time changes and leap years.</p>
<p>And looking at the forums, I found many people arguing about their solutions, nevertheless, I suspect that all them are wrong.</p>
<p>Fortunately, one may resort on <a title="Joda Time Source Forge page" href="http://joda-time.sourceforge.net" target="_blank">Joda Time</a>,  small and reliable Java package that replaces the Java date and time API and provides tools for all calendar arithmetic. I really recommend getting to know with this package.</p>
<p>Calculating the number of days between two days becomes as simple as (<a title="Joda Time FAQ" href="http://joda-time.sourceforge.net/faq.htm" target="_blank">see more</a>):</p>
<pre>  Days d = Days.daysBetween(startDate, endDate);
  int days = d.getDays();</pre>
<p>And all calendar details and pitfalls are correctly handled by Joda Time. Much metter than relaying on self-, handmade solutions that one cannot easily guarantee to be correct for all situations.</p>
Posted in Java  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=97&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2009/04/13/how-to-correclty-calculate-days-between-two-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
		<item>
		<title>Regex that matches path, filename and extension</title>
		<link>http://techtavern.wordpress.com/2009/04/06/regex-that-matches-path-filename-and-extension/</link>
		<comments>http://techtavern.wordpress.com/2009/04/06/regex-that-matches-path-filename-and-extension/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 21:08:07 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[planetLTC]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=92</guid>
		<description><![CDATA[I was looking for a regular expression for Python capable to match a string containing a valid path, filename and extension. Finally, I discovered following solution:
^(.*/)?(?:$&#124;(.+?)(?:(\.[^.]*$)&#124;$))
Let me explain how I got this regular expression. Fortunately, Scott Carpenter has written an excellent article about a regular expression to match a filename with extension. Matching the filename [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=92&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was looking for a regular expression for Python capable to match a string containing a valid path, filename and extension. Finally, I discovered following solution:</p>
<pre>^(.*/)?(?:$|(.+?)(?:(\.[^.]*$)|$))</pre>
<p>Let me explain how I got this regular expression. Fortunately, <a title="Moving to Freedom" href="http://www.movingtofreedom.org/" target="_blank">Scott Carpenter</a> has written an excellent <a title="Regex Walk-Through: Match filename base and extension" href="http://www.movingtofreedom.org/2008/04/01/regex-match-filename-base-and-extension/" target="_blank">article </a>about a regular expression to match a filename with extension. Matching the filename extension is not trivial for all possible situations.</p>
<p><span id="more-92"></span>He proposes a very simple, but elegant solution to recognize a filename with extension based on regular expression.</p>
<pre>(.+?)(\.[^.]*$|$)</pre>
<p>Following his advices, I worked out a more comprehensive regular expression that is also capable to match filenames with path.</p>
<p>First, I decided to add <code>^</code> at the beggining of the regular expression, to ensure that the string is matches from the beginning. However, depending how you match the string, this might not be necessary.</p>
<p>On Scott&#8217;s regex, a parentheses group is used to match the extension, that might be solely the end of line and result in an empty string. Personally, I prefer getting None instead of an empty string to signal that the extension does not exist in the matched string.</p>
<p>I changed tha pattern to match the extension with a non-grouping parentheses <code>(?:</code>&#8230;<code>)</code>. The grouping parentheses is used only to delimit the pattern that recognizes the extension <code>\.[^.]*$</code>, as below:</p>
<pre>^(.+?)(?:(\.[^.]*$)|$)</pre>
<p>Then, I added another group at the beginning of the pattern, to match the path, assuming <code>/</code> as path separator. The grouping is <code>(.*/)?</code>, that consumes all characters until the last <code>/</code>. The group is optional, since the string might not contain any path information.</p>
<p>The resulting regular expression is:</p>
<pre>^(.*/)?(?:$|(.+?)(?:(\.[^.]*$)|$))</pre>
Posted in planetLTC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=92&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2009/04/06/regex-that-matches-path-filename-and-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
		<item>
		<title>Skype on Ubuntu 8.10: microphone and internal speaker issues</title>
		<link>http://techtavern.wordpress.com/2009/03/18/skype-on-ubuntu-810-microphone-and-internal-speaker-issues/</link>
		<comments>http://techtavern.wordpress.com/2009/03/18/skype-on-ubuntu-810-microphone-and-internal-speaker-issues/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 04:13:31 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[planetLTC]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=79</guid>
		<description><![CDATA[
It has been a long time since my last post&#8230; Also, it has been some time I managed live without a PC and Internet. Now I have a PC and Internet again and I took the chance to immediately install Linux!

Updated: I also solved the issue of skype consuming 100% cpu during a call.
Although the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=79&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote>
<p style="text-align:center;"><em>It has been a long time since my last post&#8230; Also, it has been some time I managed live without a PC and Internet. Now I have a PC and Internet again and I took the chance to immediately install Linux!</em></p>
</blockquote>
<p><strong>Updated: </strong>I also solved the issue of skype consuming 100% cpu during a call.</p>
<p>Although the <a href="http://ubuntuguide.org/wiki/Ubuntu:Intrepid" target="_blank">Ubuntu Guide</a> has a good description<a href="http://ubuntuguide.org/wiki/Ubuntu:Intrepid#Skype" target="_blank"> how to install Skype on Ubuntu Intrepid</a>, it can be quite challenging to place a call successfully. Shame on Gnome, Pulse Audio and Skype! I had to overcome following issues:</p>
<ul>
<li>No audio on skype, or Skype complaining that sound device does not work.</li>
<li>No microphone input during calls.</li>
<li>Call also audible from the internal speaker (even when headset is connected to the green audio jack).</li>
<li>Skype consuming 100% cpu during the call and Skype delaying audio over 60 seconds!</li>
</ul>
<p>Here is the solution that worked for me.</p>
<p><span id="more-79"></span>First, I set the Skype audio configuration to employ only Pulse Audio support. Ubuntu 8.10 initially only requires  ALSA sound support, but Pulse Audio is installed as dependency for Skype. Therefore, Pulse must be selected as audio device on Skype. Also, you have to get used with Pulse Audio now polluting your audio configurations.</p>
<p>Go to Skype-&gt;Options-&gt;Audio Devices. Select &#8220;pulse&#8221; for all audio devices. Also, I recommend to disable an option like &#8220;adjusting  mixer settings automatically&#8221;, or Skype may present the annoying behavior of turning off your microphone volume on each call.</p>
<p><strong>Update: </strong>Also, if you notice Skype consuming 100% cpu, or that your voice is being heavily delayed (eg. more than 60 seconds), then you will need to switch the microphone device to another but not &#8220;pulse&#8221; nor &#8220;alsa&#8221;. Try selecting the entry that describes your microphone hardware. You may need to take several tries until you find out the device that really maps to your microphone. Fortunately, you can play around during a test call, if you always press the &#8220;apply&#8221; button.</p>
<p><img class="aligncenter size-medium wp-image-80" title="ubuntu-skype-audio-config" src="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-audio-config.png?w=300&#038;h=173" alt="ubuntu-skype-audio-config" width="300" height="173" /></p>
<p style="text-align:center;"><em>(Sorry for the screen-shot, its Portuguese only, but I am sure you will figure it out)</em></p>
<p>Now, double click the volume icon on the top of Ubuntu desktop to open the sound mixer settings. Click on &#8220;Preferences&#8221; and activate the options: &#8220;microphone&#8221;, &#8220;capture&#8221;, &#8220;microphone capture&#8221;, &#8220;mic boost&#8221; and &#8220;microphone jack sense&#8221;.</p>
<p><img class="aligncenter size-medium wp-image-81" title="ubuntu-skype-mixer-preferences-1" src="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-mixer-preferences-1.png?w=214&#038;h=300" alt="ubuntu-skype-mixer-preferences-1" width="214" height="300" /></p>
<p>Then, back to the mixer, on the first tab, enable the microphone (by clicking on the small icon under the volume slider) and pull up the volume slider.</p>
<p><img class="aligncenter size-medium wp-image-82" title="ubuntu-skype-mixer-preferences-2" src="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-mixer-preferences-2.png?w=300&#038;h=205" alt="ubuntu-skype-mixer-preferences-2" width="300" height="205" />Then, on the next tab, enable the capture and pull the slider up.</p>
<p><img class="aligncenter size-medium wp-image-83" title="ubuntu-skype-mixer-preferences-3" src="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-mixer-preferences-3.png?w=300&#038;h=205" alt="ubuntu-skype-mixer-preferences-3" width="300" height="205" />And finally, on the third tab, enable the options, specially the &#8220;microphone capture&#8221; and &#8220;microphone jack sense&#8221;.</p>
<p><img class="aligncenter size-medium wp-image-84" title="ubuntu-skype-mixer-preferences-4" src="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-mixer-preferences-4.png?w=300&#038;h=205" alt="ubuntu-skype-mixer-preferences-4" width="300" height="205" /></p>
<p><strong>Update: </strong>I am not yet sure how far the capture volume and microphone volume interferes how skype gets audio input. Just to be sure, I decided to adjust these settings.</p>
<p>Hope that this simple explanation will help you. Sorry for the non-English screenshots, as soon I have a bit of more free time, I will update them to English . Anyway, let me know if there is some additional and useful advice.</p>
Posted in Linux, planetLTC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=79&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2009/03/18/skype-on-ubuntu-810-microphone-and-internal-speaker-issues/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>

		<media:content url="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-audio-config.png?w=300" medium="image">
			<media:title type="html">ubuntu-skype-audio-config</media:title>
		</media:content>

		<media:content url="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-mixer-preferences-1.png?w=214" medium="image">
			<media:title type="html">ubuntu-skype-mixer-preferences-1</media:title>
		</media:content>

		<media:content url="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-mixer-preferences-2.png?w=300" medium="image">
			<media:title type="html">ubuntu-skype-mixer-preferences-2</media:title>
		</media:content>

		<media:content url="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-mixer-preferences-3.png?w=300" medium="image">
			<media:title type="html">ubuntu-skype-mixer-preferences-3</media:title>
		</media:content>

		<media:content url="http://techtavern.files.wordpress.com/2009/03/ubuntu-skype-mixer-preferences-4.png?w=300" medium="image">
			<media:title type="html">ubuntu-skype-mixer-preferences-4</media:title>
		</media:content>
	</item>
		<item>
		<title>Resume scp/rsync file transfer</title>
		<link>http://techtavern.wordpress.com/2008/11/19/resume-scprsync-file-transfer/</link>
		<comments>http://techtavern.wordpress.com/2008/11/19/resume-scprsync-file-transfer/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 17:28:00 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[planetLTC]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=75</guid>
		<description><![CDATA[This is very basic Linux knowledge, but the question has arised too often and I decided to document it.
Problem:
Transfer (or upload/download) a large tree of files and directories from one machine to another using a ssh connection, and being able to resume/continue if the operation is interrupted.
Solution:
Until now, I believe that the best solution is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=75&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is very basic Linux knowledge, but the question has arised too often and I decided to document it.</p>
<p><strong>Problem:</strong></p>
<p>Transfer (or upload/download) a large tree of files and directories from one machine to another using a ssh connection, and being able to resume/continue if the operation is interrupted.</p>
<p><strong>Solution:</strong></p>
<p>Until now, I believe that the best solution is using rsync over ssh, since rsync has a feature to resume interrupted file transfer, even when an entire tree of directories is involved.</p>
<p><strong>Command line:</strong></p>
<p>rsync -vrPtz -e ssh host:/remote_path/* /local_path/</p>
<p><strong>Explained:</strong></p>
<p>-e ssh rsync will use ssh client instead of rsh<br />
-z compress file transfer<br />
-t preserve time (other attributes as owner or permissions are also possible)<br />
-P <span style="text-decoration:underline;">resume incomplete file transfer</span><br />
-r recursive into subdirectories<br />
-v verbose</p>
Posted in Linux, planetLTC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=75&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2008/11/19/resume-scprsync-file-transfer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
		<item>
		<title>About Trilead SSH open source project</title>
		<link>http://techtavern.wordpress.com/2008/11/13/about-trilead-ssh-open-source-project/</link>
		<comments>http://techtavern.wordpress.com/2008/11/13/about-trilead-ssh-open-source-project/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 19:30:49 +0000</pubDate>
		<dc:creator>Daniel Ferber</dc:creator>
				<category><![CDATA[planetLTC]]></category>

		<guid isPermaLink="false">http://techtavern.wordpress.com/?p=72</guid>
		<description><![CDATA[Some time ago I have written an article about the JSch open source project. However, I soon lost all my motivation when I faced, again, the code complexity required for JSch just to start a execution session, a file copy or a port forwarding with JSch. Nevertheless the completely misunderstood authentication API for JSch let me [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=72&subd=techtavern&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some time ago <a href="http://techtavern.wordpress.com/2008/09/30/about-jsch-open-source-project/">I have written an article</a> about the <a href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fwww.jcraft.com%2Fjsch%2F&amp;ei=wJ7hSIqHMYSGgwS-zp3eAw&amp;usg=AFQjCNFEETFDy_PvFq6a3L_sqnj_u5o-ZQ&amp;sig2=d5zFilMy_7as3IRg1RdEYA" target="_blank">JSch</a> open source project. However, I soon lost all my motivation when I faced, again, the code complexity required for JSch just to start a execution session, a file copy or a port forwarding with JSch. Nevertheless the completely misunderstood authentication API for JSch let me to a mood even worse. I started looking for alternatives and fortunately I found <a href="http://www.trilead.com/Products/Trilead_SSH_for_Java/" target="_blank">Trilead SSH</a>, a pure Java implementation of SSH, available with the BSD license.</p>
<p>I have not yet tested Trilead SSH extensively to state that it provides a stable and complete SSH implementation. But results were very promising. Unfortunately, I have not much information about performance of data transfer with Trilead SSH.</p>
<p>I think that the major advantage of Trilead SSH is its very simple and intuitive API, directly targeted to tasks that shall be solved for someone that is using SSH. Everything is made very easy: execute a command, do port forwarding, transfer files. All complexity is done behind the scenes and a single method call uses to be enough. There is no need to care about SSH details as it was required for JSch.</p>
<p>In special, I liked the Trilead SSH API resposible for authentication that is very straightforward and matches very well the steps to log into the remote host. Even better, I was able to implement my own logic to respond to authentication failure exactly to the application needs. In this situation Trilead SSH is simplier and more flexible that JSch.</p>
<p>As a drawback, it is not possible to have low level access to the SSH protocol. However, this seems to be a very improbable requirement.</p>
<p>Depite of the simple API, Trilead SSH claims to implement all major ssh features:<span><span><span> sessions (remote command execution and shell access), X11 forwarding, local and remote port forwarding, local stream forwarding, SCP and SFTP. Many options are available for authentication methods and cipher types.</span></span></span></p>
<p><span><span><span>The API is very well documented and includes examples and advices, what is very rare on a typical javadoc. </span></span></span></p>
<p><strong><span><span><span>Conclusion</span></span></span></strong></p>
<p><span><span><span>Replacing JSch by </span></span></span>Trilead SSH has been a good choice, although I have not yet evidences for better performance nor stability. But the code become considerable simpler and shorted. And development time was reduces many times.<span><span><span> </span></span></span></p>
Posted in planetLTC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techtavern.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techtavern.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techtavern.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techtavern.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techtavern.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techtavern.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techtavern.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techtavern.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techtavern.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techtavern.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techtavern.wordpress.com&blog=4201236&post=72&subd=techtavern&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techtavern.wordpress.com/2008/11/13/about-trilead-ssh-open-source-project/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Daniel</media:title>
		</media:content>
	</item>
	</channel>
</rss>