<?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>Brad Conte &#187; Computers &amp; Tech</title>
	<atom:link href="http://bradconte.com/category/tech/feed" rel="self" type="application/rss+xml" />
	<link>http://bradconte.com</link>
	<description>Why know the ordinary when you can understand the extraordinary?</description>
	<lastBuildDate>Wed, 16 May 2012 16:58:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>A Letter to My Congressmen Regarding SOPA and PIPA</title>
		<link>http://bradconte.com/congressmen-letter-regarding-sopa-pipa.html</link>
		<comments>http://bradconte.com/congressmen-letter-regarding-sopa-pipa.html#comments</comments>
		<pubDate>Wed, 18 Jan 2012 21:45:16 +0000</pubDate>
		<dc:creator>Brad Conte</dc:creator>
				<category><![CDATA[Computers & Tech]]></category>

		<guid isPermaLink="false">http://bradconte.com/?p=348</guid>
		<description><![CDATA[I wrote my three congressmen today to voice my opposition to a well-known pair of bills called SOPA and PIPA that are under consideration by the United States House of Representatives and Senate (respectively). These bills were drafted with strong support from the multimedia industry and they bring a very heavy hand into the legal [...]]]></description>
			<content:encoded><![CDATA[I wrote my three congressmen today to voice my opposition to a well-known pair of bills called SOPA and PIPA that are under consideration by the United States House of Representatives and Senate (respectively). These bills were drafted with strong support from the multimedia industry and they bring a very heavy hand into the legal realm of copyright enforcement and are very unpopular with Internet-based companies and most Internet users in general. As I write this, many websites are in the middle of a day-long <a href="http://sopastrike.com">self-imposed</a> <a href="http://www.theverge.com/2012/1/18/2715300/sopa-blackout-wikipedia-reddit-mozilla-google-protest">blackout</a> in protest.
<br /></br >

I strongly oppose these bills. I do sympathize with the fact that multimedia companies have their legal and moral rights that are violated by mass-piracy, but these bills take far too drastic action to protect the multimedia sector. I won&#8217;t re-iterate the <a href="http://blog.reddit.com/2012/01/technical-examination-of-sopa-and.html">reasons</a> <a href="http://www.guardian.co.uk/commentisfree/cifamerica/2012/jan/17/stop-sopa-or-web-will-go-dark">why</a> <a href="http://www.readwriteweb.com/enterprise/2012/01/what-i-wish-wikipedia-and-othe.php">these</a> <a href="http://www.eff.org/sites/default/files/One-Page-SOPA_0.pdf">bills</a> <a href="http://vimeo.com/31100268">are</a> <a href="http://americancencorship.org">bad</a>, even in spite of recent <a href="http://www.wired.com/threatlevel/2012/01/dns-sopa-provision/">tamer modifications</a>.
<br /></br >

So I wrote my three congressmen today to voice my opposition. I&#8217;d like to share the letter publicly, as a wider proclamation of my position on this issue and hopefully as an aid for anyone writing their congressmen on a political issue. It&#8217;s not a master-piece, but I thought it might be helpful. I&#8217;ll explain some of the reasoning and structure below. Here it is:
<br /></br >

<div class="quote">To the Honorable [insert congressman's full name],
<br /></br >

I would like to add my voice of support to the millions of people who oppose [SOPA/PIPA].
<br /></br >

I am sympathetic to the motivation of the bill. I understand that multimedia companies have proper motivation to protect their intellectual property. I support their moral and legal rights to own their content.
<br /></br >

However, I do not believe that their efforts to protect their property should be at the expense of humanity&#8217;s convenience and technological development. We the people do not exist to listen to music, we listen to music while we live our lives. Similarly, technology does not exist to play music, it exists to enable us to do what we want, some of which is to listen to music. Legislation like [SOPA/PIPA] takes a multimedia-centered viewpoint of the universe, assuming that we should hinder productivity and change the dynamics of an entire industry just to protect the convenience of one sector of that industry.
<br /></br >

The multimedia industry has a history of resisting technological development due to their reluctance to change business models. They tried to legally combat cassette tapes, video tapes, and CDs under the pretense of fighting piracy that would hurt them. Yet those very mediums enabled them to distribute their content in better, more widely-reaching ways than before. They resist change, yet change and progress is what technology, and humanity itself, is about. Every sector of an industry faces critical changes over time, and while it can be difficult for them to adjust they should not seek legal aid pass their difficulties onto us, the common citizen. This is a capitalist society, the multimedia sector needs to adjust, not be pampered. 
<br /></br >

My request, congressman, is that your position be to protect the progress of the general public. I support the multimedia sector&#8217;s desire to protect its content &#8211; once again, I sympathize with their motivation &#8211; but not at the expense of all our development. Their history and the current [SOPA/PIPA] legislation show that they are not seeking to provide us with multimedia enjoyment while we live our lives, they prefer to limit our lives to fit their existing business models.
<br /></br >

Thank you for your time. For what it&#8217;s worth, I voted for you. To protect me.
<br /></br >

&#8211;Brad Conte</div>
<br />

Some thoughts on this letter, in no particular order:
<br />

<ul>
<li>I used SOPA <i>or</i> PIPA where appropriate for the recipient. One bill is in one house, the other bill in the other house. Writing a blanket statement like &#8220;SOPA and PIPA&#8221;, or worse yet just the popular one &#8220;SOPA&#8221;, sounds more like a form letter. Who wants to get a letter that mentioning a bill that they can&#8217;t even vote on?</li>

<li>I wanted to paint a big picture perspective. 1) I gave a very quick history of similar actions in the industry and their outcomes. 2) I noted that the multimedia industry is just a sub-sector of the larger industry that this bill effects. 3) I remembered international concerns; the U.S. is the country most impacted immediately, but this likely has implications for the whole world, hence I slipped in the word &#8220;humanity&#8221; a couple times. The goal wasn&#8217;t to be dramatic, but to always remind them of how wide-reaching the implication would be. The overall point was that this was far too invasive an action to protect one specific sector.</li>

<li>As a general rule for opinions and debates, you should always separate general intent from specific implementation and you should separate analysis of the consequences from debate over what the consequences are. If you want to get your point across to someone, decide which perspective you&#8217;re arguing and make it clear, too many conversations are completely wasted due to a missing of the minds on those simple topics and jumping confusingly between perspectives. In my letter, I opposed this implementation of copyright and laid out the consequences for what happened. If the congressmen doesn&#8217;t agree that the assessments that I asserted, that&#8217;s the subject for a separate, much longer e-mail. I would suggest that it&#8217;s best to go for lots of detail or very little, because few things are as weak as an argument that uses just a few details strewn out.</i>

<li>It&#8217;s easy to read &#8211; about 370 words and about 2/3 of a page when printed, so easily readable in a few minutes. There are 5 paragraphs (the closing line isn&#8217;t really a paragraph), but only 3 have the bulk of the content; it looks very digestible at a quick glance. And that&#8217;s all you need to give a summary of a position. This makes it also easily skim-able: a) while each paragraph is unique, you could omit any one and get the majority of the argument, b) you could read the first sentence of each paragraph and still get the message (that&#8217;s actually a good rule in general), and c) you could read the first and last paragraphs and understand it. Given the popularity of this topic, it&#8217;s likely that if the congressman is reading my letter, it is just one of hundreds on the same topic.</li>

<li>I emphasized that my position didn&#8217;t spell doom and gloom for the opposition. In fact, I trivialized their position as simply being for &#8220;convenience&#8221;. It isn&#8217;t the annihilation of multimedia companies it&#8217;s simply them finding and adjusting to a new business model, just like they&#8217;ve done several times in the past. It&#8217;s important to know what&#8217;s at stake in a situation like this, and I wanted to contrast humanity&#8217;s technological stifling against their convenient business model. (In retrospect, trivializing it as &#8220;convenience&#8221; was a pretty strong statement to make without supporting evidence, maybe it should&#8217;ve been a little tamer.)</li>

<li>Similar to the above, the secondary focus of the letter was on priorities. &#8220;We the people&#8221; are not befitted in general by this bill. I said and hinted at that a couple of times.</li>

<li>The tone is unemotional, yet a little grave. It&#8217;s a serious subject but it won&#8217;t kill my grandmother, so there&#8217;s no need to sound like it would.</li>

<li>The closing line (&#8220;&#8230;I voted for you. To protect me.&#8221;) might come off a bit snarky, but it conveys a strong and valid point. Congressmen are put in place by &#8220;the people&#8221; and those people are who will lose (and lose very badly) should the legislation pass. Obviously there are times where a congressmen needs to put aside the individual or short-term benefits of each person for the big picture, but I wanted to remind them that my hope is that their voice will do its best to echo mine. If I would be screaming in opposition to it, that should count for something. I didn&#8217;t make any threats (ie, &#8220;I won&#8217;t vote for you if you don&#8217;t oppose this&#8221;), I just reminded them of established fact. And, for what it&#8217;s worth, I did actually vote for them. (I shouldn&#8217;t have to point that out, but it&#8217;s an easy statement to lie about and I&#8217;ve seen it done elsewhere.)</li>
</ul>
<br />

Hopefully the letters will do some good. I&#8217;m sure that some of you can do better.]]></content:encoded>
			<wfw:commentRss>http://bradconte.com/congressmen-letter-regarding-sopa-pipa.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirect input and output for an existing process on Linux</title>
		<link>http://bradconte.com/redirect-input-output-for-existing-process-on-linux.html</link>
		<comments>http://bradconte.com/redirect-input-output-for-existing-process-on-linux.html#comments</comments>
		<pubDate>Tue, 01 Mar 2011 23:51:17 +0000</pubDate>
		<dc:creator>Brad Conte</dc:creator>
				<category><![CDATA[Computers & Tech]]></category>

		<guid isPermaLink="false">http://bradconte.com/?p=291</guid>
		<description><![CDATA[Redirecting input and output of an executable is a standard and trivial practice in Linux operations. When launching a process, the user can trivially redirect the output of the process away from stdout via the &#8220;&#62;&#8221; operator and can redirect input away from stdin using the &#8220;&#60;&#8221; operator. But that only works if stdin or [...]]]></description>
			<content:encoded><![CDATA[Redirecting input and output of an executable is a standard and trivial practice in Linux operations. When launching a process, the user can trivially redirect the output of the process away from stdout via the &#8220;&gt;&#8221; operator and can redirect input away from stdin using the &#8220;&lt;&#8221; operator.
<br /></br />

But that only works if stdin or stdout are switching before the process is launched. What if we have a pre-existing process that we would like to change a file handles for, but we would like to avoid restarting the process? For example, say you have a cron script execute &#8220;sudo my_command&#8221; from an environment where you can&#8217;t provide input (perhaps you meant to use gksudo instead). You might be able to kill the sudo process, but perhaps when sudo exits the script will proceed with undesirable results. You could kill the script too, but assume that you very badly don&#8217;t want to abort the script in a semi-completed state. (Obviously a well-written script shouldn&#8217;t have this sort of behavior, but the assumption is that we are in an unusual situation.) The ideal solution would be to redirect input into the hanging sudo process allowing it to succeed and your script to continue. Another example would be if you needed to redirect the output of an existing process to a file on 
<br /></br />

Thankfully, we can perform redirection on existing processes by explicitly manipulating the existing file descriptors. The method for doing so is fairly straight forward:
<ol>
	<li>Determine which file descriptor you need to change.</li>
	<li>Attach to the target process via gdb.</li>
	<li>Create a file (to redirect output) or named pipe (to redirect input).</li>
	<li>Use gdb to point the desired file descriptor to the file or pipe.</li>
	<li>If applicable, send the necessary content through the pipe.</li>
</ol>

In terminal A, find the PID of the process, call it &#8220;TARGET_PID&#8221;. First, list the target&#8217;s existing file descriptors:
<div class="code">$ ls -l /proc/TARGET_PID/fd/</div>
When we are done we will double check this list to ensure we made the changes we wanted to.
<br /></br />

Now you need to determine which file descriptor (hereon &#8220;FD&#8221;) you want to change. Remember, we can only manipulate existing FDs, not add new ones. (For those who don&#8217;t know: FD 0 is stdin (standard input), FD 1 is stdout (standard output), FD 2 is stderr (standard error output). These are the the base FDs that every process will have, your target process may or may not have more.) Examples:
<ul>
	<li>To change the input for a typical terminal program you likely need to to change stdin.</li>
	<li>To change output file X to a different file Y, you need to find which FD on the list is linked to X.</li>
	<li>For sudo, to change the input that accepts the user password you actually need to change FD 4, which should point to /dev/tty or something similar.</li>
 </ul>
We&#8217;ll call the the FD number that you want to change &#8220;TARGET_FD&#8221;.
<br /></br />

For using a named pipe: First create the pipe using
<div class="code">$ mkfifo /my/file/name</div>
We&#8217;ll call this path TARGET_FILE. Then provide input to the pipe, or else gdb will not be able to open it in a later step. Provide the content by, for example, &#8220;echo MyContent > TARGET_FILE&#8221; from a separate terminal or as a backgrounded process. &#8220;MyContent&#8221; should be the content you want to send the process.
<br /></br />

For using a normal file: Create an output file called TARGET_FILE.
<br /></br />

Attach gdb to the process:
<div class="code">$ gdb -p TARGET_PID</div>

Within gdb, close the file descriptor using the &#8220;close()&#8221; system call:
<div class="code">(gdb) p close(TARGET_FD)
$1 = 0</div>
The right-hand side of the output is the return value of the call we just executed. A value of 0 means that all went well.
<br /></br />

Now create a FD using the &#8220;open()&#8221; system call. This must be done after &#8220;close()&#8221;, because file descriptors are issued sequentially from the lowest unused non-negative integer and we are making use of the fact that once we delete TARGET_FD it is now the lowest unused file descriptor, so the next one created will use the same number.
<div class="code">(gdb) p open(&#8220;TARGET_FILE&#8221;,0600)
$2 = TARGET_FD</div>
If the right-hand side number is equal to TARGET_FD, that means we just successfully created an FD and it got the same FD that we just closed, which is perfect. Remember, if you are using a named pipe, this step may (will?) hang if there is no output going into the named pipe.
<br /></br />

Now quit gdb:
<div class="code">(gdb) q</div>
At this point, you should be done. If you are redirecting output, the redirection should be under way. If you are redirecting input, the first input should be consumed from the pipe and you can continue to provide input as necessary by sending it into the pipe; when you are done simply delete the pipe using &#8220;rm&#8221;.
<br /></br />

We can verify hat we were successful by checking the target process&#8217;s FDs. Run &#8220;ls -l /proc/TARGET_PID/fd/&#8221; again and compare the output against the output from the first time. If all went well then TARGET_FD should be changed to point at TARGET_FILE.]]></content:encoded>
			<wfw:commentRss>http://bradconte.com/redirect-input-output-for-existing-process-on-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FoxyProxy, Firefox 3.5, and DNS Leaking</title>
		<link>http://bradconte.com/foxyproxy-firefox-dns-leaking.html</link>
		<comments>http://bradconte.com/foxyproxy-firefox-dns-leaking.html#comments</comments>
		<pubDate>Sat, 14 Nov 2009 04:18:30 +0000</pubDate>
		<dc:creator>Brad Conte</dc:creator>
				<category><![CDATA[Computers & Tech]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://bradconte.com/?p=207</guid>
		<description><![CDATA[[Update: Jan. 24, 2010] The DNS leaking problem described in this article applied to FoxyProxy v2.14. On Jan. 12, FoxyProxy v2.17 fixed the problem. FoxyProxy is a popular Firefox extension that enables users to, setup, easily manage, and quickly switch between multiple proxy configurations. One of the most common uses of a proxy server is [...]]]></description>
			<content:encoded><![CDATA[<b>[Update: Jan. 24, 2010]</b> The DNS leaking problem described in this article applied to FoxyProxy v2.14. On Jan. 12, FoxyProxy <a href="http://foxyproxy.mozdev.org/releasenotes.html">v2.17</a> <a href="http://foxyproxy.mozdev.org/drupal/content/217-dns-leakage">fixed the problem</a>.
<br /><br />
<div class="hr-dotted"></div>
<br />
<a href="http://foxyproxy.mozdev.org">FoxyProxy</a> is a popular <a href="http://firefox.com">Firefox</a> extension that enables users to, setup, easily manage, and quickly switch between multiple proxy configurations. One of the most common uses of a proxy server is for security/privacy. By establishing an encrypted connection (usually via SSH) with a proxy server on a trusted network, you can have your web traffic go through an encrypted &#8220;pipe&#8221; to that server and have that server send and receive web requests on your behalf, relaying data to and from you only through that pipe. By doing this you eliminate the risk that someone on your current network could see your HTTP traffic. Maybe you don&#8217;t trust other clients on the network, maybe you don&#8217;t trust the gateway, it doesn&#8217;t matter &#8212; your HTTP(S) traffic is encrypted and shielded from prying eyes. (Readers unfamiliar with the concept of using HTTP proxies through SSH tunnels are encouraged to research the matter, there are many well-written tutorials available.)
<br /><br />

There are many other popular uses of proxy servers, but the application of encrypted web traffic is of concern in this case for the following reason: A key problem that arises when using web proxy servers is the issue of handling DNS requests. DNS does not go through the HTTP protocol, so even if HTTP is being forwarded to a proxy the DNS requests may not be. If DNS requests are sent out over the network like normal then eavesdroppers can still read them. So although the actual traffic may be encrypted, the DNS queries behave normally and may cause the same problems that using an encrypted tunnel was designed to avoid in the first place. A situation in which HTTP traffic is encrypted but DNS is not is referred to as &#8220;DNS leaking&#8221;. When using a proxy for the benefit of security or privacy, DNS leaking may be just as bad as non-encrypted traffic.
<br /><br />

Solving the DNS leaking problem is simple. One type of proxy, SOCKS5, can forward DNS requests as well as HTTP(S) data. A user simply needs to tell their browser to use the SOCKS5 proxy for both HTTP(S) and DNS and then both will be routed through the encrypted stream, allowing the user to surf the web with greatly strengthened security and privacy.
<br /><br />

However, Firefox users who use FoxyProxy at the moment will encounter a problem when using DNS forwarding to a SOCKS5 proxy. When using FoxyProxy, DNS leaking occurs even when it is configured not to, which has made many users very upset. Initially many people thought the problem was with Firefox 3.5, but others confirmed it was only present with FoxyProxy installed. Unfortunately, however, not everyone is convinced that this is FoxyProxy-related behavior and I have not found anyone who has presented a solution yet. I plan to do both.
<br /><br />

This is the basic setup for my tests:
<br /><br />

<ul>
<li> I set up an SSH server. </li>
<li> I established an SSH connection and used the built-in SOCKS5 functionality of the SSH server daemon:
<div class="code">$ ssh username@myserver -D localhost:8080</div>
(For the non-SSH inclined: This command forwarded all traffic my client sends to itself on port 8080 through the SSH connection to the SSH server, which then acts as a SOCKS5 proxy and sends the data on to the destination.)</li>
<li> I used Wireshark to monitor all packets, specifically DNS requests, sent or received my network&#8217;s interface. Note that DNS requests tunneled over the SSH connection to the SOCKS5 proxy are <i>not</i> visible to the packet sniffer. </li>
<li> I monitored my Firefox configuration in <b>about:config</b>. (All network proxy-related settings are under the filter <b>network.proxy</b>.) </li>
<li> I used Firefox v3.5.5 and FoxyProxy v2.14. </li>
</ul>
<br />

Using this I was able to monitor all DNS requests while I experimented with Firefox and FoxyProxy using a SOCKS5 proxy. I did a base test with no proxy configuration, a test using Firefox&#8217;s included proxy management, and a test using Foxyproxy for proxy management.
<br /><br />


<div class="section-title">Using no proxy</div>

Starting with a default configuration (SSH SOCKS connection established but no proxy settings configured to use it) I visited several websites such as google.com, yahoo.com, and schneier.com. This was the simple base test.
<br /><br />

I checked <a href="http://showmyip.com">showmyip.com</a> to get my IP address.
<br /><br />

The relevant about:config settings:
<div class="code">network.proxy.socks               &#8220;&#8221;
network.proxy.socks_port          0
network.proxy.socks_remote_dns    false
network.proxy.type                0
</div>

Via Wireshark I watched as the websites generated normal DNS requests over the standard network.
<br /><br />


<div class="section-title">Using Firefox to configure proxy settings</div>

I restarted Firefox to avoid any cached DNS entries. Then, without FoxyProxy installed, I setup my SOCKS5 proxy. (Note that FoxyProxy replaces the standard Firefox proxy editor, so it is impossible to not use FoxyProxy when it is installed.)
<br /><br />

Under Firefox&#8217;s Preferences/Tools (depending on your operating system) I went to the &#8220;Advanced&#8221; tab, &#8220;Network&#8221; sub-tab, and opened &#8220;Settings&#8221;. I chose &#8220;Manual proxy configuration&#8221; and entered &#8220;localhost&#8221; for the SOCKS Host and &#8220;8080&#8243; for the port.
<br /><br />

Unfortunately, Firefox v3.5 does not support a GUI method of enabling DNS SOCKS5 proxying, so I had to manually go to about:config and enable it by setting <b>network.proxy.socks_remote_dns</b> to &#8220;true&#8221;.
<br /><br />

I checked showmyip.com to ensure that my IP address displayed as coming from the server and not my client. It did show as coming from the server, so Firefox was using the proxy.
<br /><br />

The final about:config settings were:
<div class="code">network.proxy.socks               localhost
network.proxy.socks_port          8080
network.proxy.socks_remote_dns    true
network.proxy.type                1
</div>

I visited the same websites. Via Wireshark, I did <b>not</b> see any DNS requests sent over the standard network. Firefox channeled both the HTTP and DNS data through the SSH tunnel perfectly.
<br /><br />


<div class="section-title">Using FoxyProxy to configure proxy settings</div>

I reset all the about:config settings back to their defaults. Then I installed <a href="https://addons.mozilla.org/en-US/firefox/addon/2464">FoxyProxy Standard</a> v2.14. I went to FoxyProxy&#8217;s options and, under the &#8220;Proxies&#8221; tab, created a new proxy entry whch I named &#8220;SSH SOCKS5&#8243;. I set it to connect to &#8220;localhost&#8221; on port 8080. As well, I check-marked the &#8220;SOCKS proxy?&#8221; box and selected &#8220;SOCKS v5&#8243;. I went to the &#8220;Global Options&#8221; tab and checked the box &#8220;Use SOCKS proxy for DNS lookups&#8221;. To let this take effect, I had to restart Firefox.
<br /><br />

When Firefox had restarted, I went to the Tools > FoxyProxy menu and selected to &#8220;Use proxy SSH SOCKS5 for all URLS&#8221;. I checked <b>showmyip.com</b> to ensure that my IP address displayed as coming from the server and not my client. It did show as coming from the server, so Firefox was using the proxy.
<br /><br />

I checked about:config:
<div class="code">network.proxy.socks               &#8220;&#8221;
network.proxy.socks_port          0
network.proxy.socks_remote_dns    false
network.proxy.type                0
</div>

The configuration was the same as the default, so apparently FoxyProxy does not adjust about:config to do its work. 
<br /><br />

Watching the DNS requests via Wireshark, I watched as <b>all</b> the website visits generated DNS requests over the normal network. Complete and thorough DNS leaking. And I would like to emphasize that I had selected &#8220;Use SOCKS proxy for DNS lookups&#8221;, which is FoxyProxy&#8217;s option to address the DNS leaking issue.
<br /><br />


<div class="section-title">Fixing DNS leaking</div>

There was no question about it, FoxyProxy caused the DNS leaking in my test. I wanted to solve the problem so I fiddled with about:config.
<br /><br />

In about:config I manually set <b>network.proxy.type</b> to 1. I verified my IP address was from the server via showmyip.com.
<br /><br />

The new about:config:
<div class="code">network.proxy.socks               
network.proxy.socks_port          0
network.proxy.socks_remote_dns    false
network.proxy.type                1
</div>

I watched for DNS requests again via Wireshark. I saw <b>none</b>. It seemed that just manually setting <b>network.proxy.type</b> to 1 fixed the FoxyProxy DNS leaking problem.
<br /><br />

I also tried other about:config settings, such as manually changing <b>network.proxy.socks_remote_dns</b> to &#8220;true&#8221;, but that didn&#8217;t work. The above was the only change in about:config that I found that fixed the problem.
<br /><br />

<div class="section-title">Summary</div>

I repeated the results above three times in different orders on different computers on both Linux and Windows to ensure I made no configuration mistakes and to ensure that the behavior was consistent and cross-platform. All the tests yielded the same results. Here is the final summary:
<br /><br />

<ul>
<li> Firefox v3.5 does not suffer from DNS leaking by itself. </li>
<li> DNS leaking occurs when FoxyProxy is managing the proxies. </li>
<li> FoxyProxy does not suffer from DNS leaking when <b>network.proxy.type</b> is manually set to 1. </li>
</ul>
<br />

It is obvious that FoxyProxy does not adjust about:config in order to configure proxy settings, but I do not know why. Many Firefox extensions adjust about:config in order to accomplish their goals and I know of no reason they should not. It&#8217;s possible that FoxyProxy has not had a need to do so before, but in light of this serious problem that may need to change. The quickest/simplest solution for FoxyProxy may to set <b>network.proxy.type</b> to 1 if the currently enabled proxy is SOCKS5 and if the global options for FoxyProxy (or the about:config for Firefox) are set to enable DNS forwarding.
<br /><br />

However, although this seems to indicate that FoxyProxy has made a mistake, I don&#8217;t know that FoxyProxy is the party at fault. Clearly FoxyProxy does not have to alter about:config in order to change the other proxy settings, so why must <b>network.proxy.type</b> be set in about:config in order for DNS forwarding to work? Note that <b>network.proxy.type</b> isn&#8217;t related to DNS forwarding, it just specifies which type of proxy is enabled. For all I know someone implemented a hack in Firefox that checks about:config when it shouldn&#8217;t. Of course, I don&#8217;t know that and I don&#8217;t know if this is expected behavior from Firefox or not. It could be that FoxyProxy isn&#8217;t setting whatever hidden configuration for DNS forwarding that exists on the same plane as the other invisible proxy settings it uses. Or maybe FoxyProxy is relying on an unreliable hack in order to avoid changing about:config. I don&#8217;t know about any of that. What I do know is that Firefox by itself does not have this DNS leaking problem, FoxyProxy does, and a simple solution exists. 
<br /><br />

Again, I am certainly not the first person to note this problem, but a) I have seen many people blame Firefox for this bug, and b) I have not yet seen anyone else mention the solution that I noted above.
<br /><br />

I leave it to someone with more time and knowledge about these software projects to determine which project should have which bug report filed. This needs to be fixed permanently.]]></content:encoded>
			<wfw:commentRss>http://bradconte.com/foxyproxy-firefox-dns-leaking.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three Tips for the Linux Terminal</title>
		<link>http://bradconte.com/three-tips-for-the-linux-terminal.html</link>
		<comments>http://bradconte.com/three-tips-for-the-linux-terminal.html#comments</comments>
		<pubDate>Sun, 11 Jan 2009 10:11:47 +0000</pubDate>
		<dc:creator>Brad Conte</dc:creator>
				<category><![CDATA[Computers & Tech]]></category>

		<guid isPermaLink="false">http://bradconte.com/?p=79</guid>
		<description><![CDATA[The power of Linux lies in the tools it uses. If you spend a lot of time in a terminal, you likely value anything that makes using it smoother. Here are a few tips to help make the terminal experience as smooth as possible. These tips are all shell-independent. Change directories with the directory stack [...]]]></description>
			<content:encoded><![CDATA[The power of Linux lies in the tools it uses. If you spend a lot of time in a terminal, you likely value anything that makes using it smoother. Here are a few tips to help make the terminal experience as smooth as possible. These tips are all shell-independent.
<br/><br/>

<ul>
<li><div class="section-title">Change directories with the directory stack</div>

The Bash shell (as well as others, like Zsh) have a built-in &#8220;back&#8221; feature for navigating directories. The built-in &#8220;pushd&#8221; command will put your current working path at the top of a shell-maintained stack and allow you to change to another directory. To go back to the saved path you can use &#8220;popd&#8221;. 
<br/><br/>

Example:
<div class="code">user@host : /some/long/path/you/don&#8217;t/want/to/retype$ pushd /some/other/path/
/some/long/path/you/don&#8217;t/want/to/retype
user@host : /some/other/path/$
[do stuff]
user@host : /some/other/path/$ popd
/some/big/long/directory/you/don&#8217;t/want/to/retype
user@host : /some/long/path/you/don&#8217;t/want/to/retype$
</div>

Since &#8220;pushd&#8221; stores the directories in a stack, you can push multiple directories onto the stack and later pop them off in the reverse order you pushed them. It&#8217;s basically the standard &#8220;cd&#8221; only with a &#8220;back&#8221; feature. Speaking of which, the command &#8220;$ cd -&#8221; will always take you back to the previous directory you were in.

<br/><br/></li>

<li><div class="section-title">Interact with the X clipboard</div>

Before I discovered &#8220;xclip&#8221;, one of the most annoying things about being in a terminal was my lack of access to the X clipboard. Most shells (all the ones I&#8217;ve come across) have a simple means of pasting text into the terminal, but not all have an elegant means of getting text out of the terminal. Yes, highlight-and-middle-click is often an option, but it&#8217;s a) not always feasible, and b) not always convenient. Remember, this is the terminal, you don&#8217;t necessarily want to be using your mouse. &#8220;xclip&#8221; removes the annoyance of using the X clipboard.
<br/><br/>

xclip can read and store to the clipboard from the standard input. As well, it can output the current contents of the clipboard. Since xclip can manipulate multiple clipboard buffers, the argument &#8220;-selection c&#8221; must be used to select the standard X clipboard. The &#8220;-i&#8221; and &#8220;-o&#8221; arguments tell xclip whether you are inputting or outputting clipboard contents, respectively.
<br/><br/>

Example:
<div class="code">$ pwd
/some/long/path/you/don&#8217;t/want/to/retype
$ ls /some/path | xclip -selection c -i
</div>

You may now paste (standard Ctrl-v, or right-click -> paste) the directory listing where ever you choose. Another example:

<div class="code">xclip -selection c -o | cat >> /some/file
</div>

This will concatenate the contents of the clipboard to &#8220;/some/file&#8221;.
<br/><br/>

If you only use yourself using xclip to manage the X clipboard, you might want to consider aliasing &#8220;xclip&#8221; to &#8220;xclip -selection c&#8221; to make it simpler to type. Or you could take it one step further and alias &#8220;xcopy&#8221; to &#8220;xclip -selection c -i&#8221; and &#8220;xpaste&#8221; to &#8220;xclip -selection c -o&#8221;, or something similar.

<br/><br/></li>

<li><div class="section-title">Use &#8220;head&#8221; and &#8220;tail&#8221; more powerfully</div>

You probably know how to use &#8220;head&#8221; to extract the first N lines from a file and &#8220;tail&#8221; to extract the last N lines of a file. While this is useful, it&#8217;s often just as useful to extract the <i>complement</i> of those selections, namely, everything except the first N lines or everything except the last N lines.
<br/><br/>

Thankfully, &#8220;head&#8221; and &#8220;tail&#8221; are powerful enough to accommodate those needs. &#8220;head&#8221; allows you to extract either a finite quantity of text from the top or everything but a finite quantity of text from the bottom, and &#8220;tail&#8221; allows you to extract a finite quantity of text from the bottom or everything but a finite quantity of text from the top. 
<br/><br/>

&bull; head -n N &#8212; by default outputs the first N lines. Using -N outputs all but the last N lines.
<br/><br/>

&bull; tail -n N &#8212; by default outputs the last N lines. Using +N outputs lines starting on the Nth.
<br/><br/>

Example:
<div class="code">/tmp $ cat example
1
2
3
4
5
/tmp $ head -n 2 example
1
2
/tmp $ tail -n 2 example
4
5
/tmp $ head -n -2 example
1
2
3
/tmp $ tail -n +3 example
3
4
5
</div>

Note that tail&#8217;s complement mode requires you to specify the first line number to include in the output. Thus if you want all but the top N lines, actually specify N+1.
</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://bradconte.com/three-tips-for-the-linux-terminal.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Path Hashing</title>
		<link>http://bradconte.com/bash-path-hashing.html</link>
		<comments>http://bradconte.com/bash-path-hashing.html#comments</comments>
		<pubDate>Fri, 05 Sep 2008 22:41:29 +0000</pubDate>
		<dc:creator>Brad Conte</dc:creator>
				<category><![CDATA[Computers & Tech]]></category>

		<guid isPermaLink="false">http://bradconte.com/?p=63</guid>
		<description><![CDATA[Bash is a Unix shell of many features. One of those features, which is both useful and potentially annoying, is the path hash table. The environment variable we are probably most familiar with is PATH &#8212; it contains all the paths that should be searched when we specify an executable to run. Bash starts with [...]]]></description>
			<content:encoded><![CDATA[Bash is a Unix shell of many features. One of those features, which is both useful and potentially annoying, is the path hash table. 
<br /><br />

The environment variable we are probably most familiar with is PATH &#8212; it contains all the paths that should be searched when we specify an executable to run. Bash starts with the first path specified in PATH and looks to see if there is an executable present, if there is not it checks the second directory, and so on until it either finds an executable with the specified name or it runs out of paths to search.
<br /><br />

The path of an executable practically never changes. &#8220;ls&#8221; is always in the same place, as is &#8220;cat&#8221;, and every other executable you might have. Thus, to save time, the first time Bash executes an executable it saves the path it finds the executable in, this way Bash can avoid searching for the executable again. The first time you execute &#8220;ls&#8221;, Bash has to search for it. The second through bajillionth times you execute it, Bash will just look up the full path from the table &#8212; much more efficient. It is important to note that every instance of bash maintains its own path hash table &#8212; thus if you have multiple terminals open they will not share path tables.
<br /><br />

However, if the actual desired path of an executable changes, problems can arise. By default, Bash will not look for an executable again. If an executable changes paths, Bash will not find it. If an executable is duplicated to a new path, Bash will execute the original executable even if the new one is in a path of higher priority (namely, listed first in PATH). As can be imagined, this can cause quite a headache in these rare scenarios if one is unfamiliar with Bash path hashing. If you create a script, execute it, then edit it and copy it somewhere else (say from your personal &#8220;bin&#8221; to a global &#8220;bin&#8221;), the old version will still execute. If you simply move an executable between paths, bash will not find the new executable despite the fact that it seemingly should. Observe the following example, in which I create &#8220;myscript&#8221; in my home bin, run it, copy it to a global bin, run &#8220;myscript&#8221; again, and execute the one in my home bin again.
<br /><br />

<center>
<img src="/files/images/articles/bash_path_hash.png" height="713" width="502" alt="Example of Bash storing the full path of a script and not recognizing a new one." title="Bash path hash table example" /><br />
<small>(This image can suffice stand-alone &#8212; feel free to redistribute it.)</small>
</center>
<br />

Thankfully, however, the hash table is easily manipulated &#8212; by the builtin shell command &#8220;hash&#8221; no less. There are four switches that are likely of the most interest to you: 
<ul>
<li> &#8220;-d [name]&#8221; will delete a specific entry from the table </li>
<li> &#8220;-r&#8221; will remove all entries from the table </li>
<li> &#8220;-t [name]&#8221; will list the save path for the given executable name </li>
<li> &#8220;-l&#8221; will list all existing executable -> path entries in the table </li>
</ul>
Using this tool you can view existing hashes and remove old stale ones as you see fit. To solve an out-of-date path hash problem, simple removing it will suffice. The next time the command is run the path hash will be re-updated. For more details, I refer you to the following key excerpts from the Bash man page:

<div class="code">       If the name is neither a shell function nor a builtin, and contains  no
       slashes,  bash  searches  each element of the PATH for a directory con-
       taining an executable file by that name.  Bash uses  a  hash  table  to
       remember  the  full pathnames of executable files (see hash under SHELL
       BUILTIN COMMANDS below).  A full search of the directories in  PATH  is
       performed  only  if the command is not found in the hash table.  If the
       search is unsuccessful, the shell prints an error message  and  returns
       an exit status of 127.

[...]

       hash [-lr] [-p filename] [-dt] [name]
              For  each  name, the full file name of the command is determined
              by searching the directories in $PATH and remembered.  If the -p
              option is supplied, no path search is performed, and filename is
              used as the full file name of the command.  The -r option causes
              the  shell  to  forget  all remembered locations.  The -d option
              causes the shell to forget the remembered location of each name.
              If  the  -t  option is supplied, the full pathname to which each
              name corresponds is printed.  If  multiple  name  arguments  are
              supplied  with  -t,  the  name is printed before the hashed full
              pathname.  The -l option causes output to be displayed in a for-
              mat  that may be reused as input.  If no arguments are given, or
              if only -l is supplied, information about remembered commands is
              printed.   The  return status is true unless a name is not found
              or an invalid option is supplied.</div>]]></content:encoded>
			<wfw:commentRss>http://bradconte.com/bash-path-hashing.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Review a Linux Distribution</title>
		<link>http://bradconte.com/how-to-review-a-linux-distro.html</link>
		<comments>http://bradconte.com/how-to-review-a-linux-distro.html#comments</comments>
		<pubDate>Thu, 17 Jul 2008 01:54:47 +0000</pubDate>
		<dc:creator>Brad Conte</dc:creator>
				<category><![CDATA[Computers & Tech]]></category>

		<guid isPermaLink="false">http://bradconte.com/?p=61</guid>
		<description><![CDATA[The GNU/Linux project has begot the most versatile operating system ever. It&#8217;s free, open source and designed to be modified and built upon by its users. The heart of the Linux philosophy is the concept of choice. Linux is about providing its users with the freedom to choose what they want to do and how [...]]]></description>
			<content:encoded><![CDATA[The GNU/Linux project has begot the most versatile operating system ever. It&#8217;s free, open source and designed to be modified and built upon by its users. The heart of the Linux philosophy is the concept of choice. Linux is about providing its users with the freedom to choose what they want to do and how they want to do it. Because both Linux and the software developed for it is so versatile, there exist 
<a href="http://www.linux.org/dist/list.html">hundreds</a> of 
<a href="http://en.wikipedia.org/wiki/List_of_Linux_distributions">Linux</a> 
<a href="http://distrowatch.com/table.php?distribution=">distributions</a>, each one being nothing more than a different collection of software and configurations running on top of the Linux kernel.
<br /><br />

Because of the number of Linux distributions and the degree to which their styles/configurations can vary, a given user usually has the ability to choose a distribution closely suited to their specific needs. To aid the ever-prevalent distro-seeker, many Linux users have sought to provide written reviews of various Linux distros. Unfortunately, many reviews fall short. With the increasing population of Linux users, and the increasing number of Linux distributions, there has been a notable increase in unhelpful reviews.
<br /><br />

Which leads to the point of this article, namely, how to review a Linux distro. The idea of reviewing a Linux distro is to inform the reader as to how the specific Linux distro in question is different from the other Linux distros. To do this, a reviewer must provide an analysis of the software and configurations that set the disto in question apart from other distros, putting solid emphasis on the big differences, less emphasis on the minor differences, and no attention to the things that are inherent in all Linux distributions. (If you are writing to inform the writer about Linux, you should do that instead, rather than pretend you are reviewing any specific distro.) This basic principle holds for almost any review of any product. For example, movie reviews tell you why one movie, a four-star action flick, is different than another movie, a two-star romantic comedy. The movie reviewer doesn&#8217;t spend time explaining the concepts of cut-scenes and character development, it merely explains the aspects of a movie that make it unique.
<br /><br />

This article is aimed at the potential Linux distro review writer. It is split into two main sections: things one should review, and things one should not review. Most of the points have sample topics for that point, some of the points and sample topics are more advanced/technical, some are less so. No good review must cover every point and sample topic in this article, this is just a broad list of good ideas. Suit your information for the knowledge level of your target audience.
<br /><br />


<div class="hr-dotted" /></div>

Here&#8217;s a list of things that make for a <b>good</b> review. This is not an exhaustive list, but it covers a lot of ground.

<ul class="list-thickpad">
<li><div class="section-title">Philosophy</div>
Every Linux distro has a philosophy, namely, a statement of purpose and a set of guidelines for development that support that purpose. &#8220;Linux for human beings,&#8221; &#8220;KISS,&#8221; &#8220;Free, robust, stable,&#8221; &#8220;Design for control,&#8221; are some philosophies that describe various distros. Anyone using a distro with one of those philosophies would instantly recognize it.
<br /><br />

This topic is not optional, you must state the distro&#8217;s philosophy and exemplify it throughout your review. Consequentially, it is probably the best place to start your distro review, as what you write thereafter should exemplify the philosophy. Remember, your goal is to show how the distro is unique, and it is the philosophy that dictates why the distro unique. All criticisms or negative points against the distro should be held in light of the distro&#8217;s philosophy. Is the distro complicated? That might be worth mentioning, but if the distro strives to put user control first and simplicity is of no concern then complexity is not a short-coming of the distro but rather a side-effect of its philosophy. Rather than criticizing a distro for being too complex, instead note that it is designed for experts. Many reviews fail to evaluate a distro for what it is and criticize a distro for lacking things it does not strive to have.
<br /><br />

As boring as it may seem, a quick history of the foundations of the distro might prove very informative. Understanding why a distro was created in the first place can say a lot about what its like today and where it might be tomorrow.
<br /><br />

Sample topics:
<ul>
<li> Who is the distro&#8217;s intended audience? The newbie, the guru, the average home user, the developer, the server administrator?
<li> Does the distro tend to value stability or bleeding edge software? (See later points.)
<li> Is the distro designed for users who like to control everything?
<li> What is the history of the development of the distro? Why was it created?
<li> How robust is a base from-disk install of the distro? (See later points.)
</ul>
</li>


<li><div class="section-title">The parent distro</div>
If the distro in question is itself based on another distro (many are) you should mention the parent distro and how this spin-off/child distro differs from its parent. Some parent-child relationships are distant, some are close. Some spin-off distros maintain their own package repositories and make their own configuration decisions, some are nothing more than the parent distro with a different default window manager and a few extra pre-installed packages. Telling the reader what the parent distro is and how closely the child is related to it is extremely informative for those either familiar with the parent or who will seek to become familiar with the parent.
</li>


<li><div class="section-title">The package manager</div>
The package manager is the heart of a Linux distro. It is how the user most intimately adds to and subtracts from his system. The package manager is arguably the most important and unique component of a distro. Even though most package managers offer the same rudimentary functions, you should review the package manager. And the word &#8220;review&#8221; does not imply that you should confirm that there are indeed commands for installing and removing packages. You need to provide enough information that it&#8217;s clear how the package manager feels to the user. Explain what sets the package manager apart from other package managers. Different distributions make it easier/harder to eliminate orphaned packages or check dependency information, and many have different ideas of what security precautions to take.
<br /><br />

Sample topics:
<ul>
<li> Does the package manager have a GUI?
<li> How easy is it to upgrade all the packages in the system?
<li> Does it provide clear output informing the user what its doing?
<li> What level of security is offered? Package authenticity verification? SSL downloads?
<li> Does it ever require that the user perform manual tasks to complete a package installation/integration into the system? (Ie, removing certain configuration files or backups.)
<li> How is the package database stored? How easily human-readable is it? How easily backup-able is it?
<li> How many tools are a part of the package manager? How many are necessary for day-to-day use?
<li> How easy is it to perform a system upgrade?
</ul>
</li>


<li><div class="section-title">Support/Documentation</div>
The level of support and/or documentation available for a distro will likely be one of the most significant influences in a user&#8217;s experience with a distro. 
<br /><br />

The interactive support offered by a forum (and the archived support offered by its search function) can be priceless as a user gets started with a distro and has questions as they encounter Linux phenomena they are not familiar with. A wiki can help the user through the install and/or basic system setup, setup common software, configure it the way they want, and fix common bugs. The absence of a wiki can mean many hours of Googling for decentralized information and exasperation, leading to unfixed problems and a poorer user experience. A documentation tree (somewhat rare outside of behemoth distros) can help a user dig deeply into the distro and modify/fix it if they are so inclined.
<br /><br />

Sample topics:
<ul>
<li> Does the distro have an official forum? How large is it?
<li> Does the distro have a wiki? How expansive is it? Does it cover the configuration of sudo? What are some of the more obscure articles it has?
<li> Does the distro have developer-written/contributed documentation?
</ul>
</li>


<li><div class="section-title">The Packages</div>
While the package manager controls the addition/removal of packages to/from the system, it would be foolish to overlook reviewing the packages themselves. The packages will be composed of compressed archives, arraigned with file hierarchy and package metadata that handles dependency checking, integrity verification, and the like.
<br /><br />

It is arguable that the layout of the filesystem be included in this topic. Many distros have their own ideas about how the filesystem should be laid out. If the distro has any peculiarities or quirks to how it uses the filesystem tree, its usually related to the compilation destination of packages.
<br /><br />

Sample topics: 
<ul>
<li> What type of packaging standard does the system use? How easy is it for a user to create their own packages? (Some users like to assemble their own software and use the package manager to mange their installation. See point on compiling from source below.)
<li> Is package downgrading supported?
<li> How quickly are packages updated when their official upstream versions are updated? (Don&#8217;t be to picky here: Are we talking about weeks or months?)
<li> Continuing from the Philosophy point and the above sample topic, does the distro lean towards being bleeding edge or being stable? (This has been mentioned twice. Hint.)
<li> Do the developers do extensive modification of the original packages (security patches, extra functionality), or are they provided vanilla as-is? (For example, Debian developers tend to modify packages as they see fit, Arch Linux developers only apply very common patches occasionally.)
<li> How are the packages compiled by default? (For example, with or without debug information?)
<li> How is Gnome/KDE split up? How many packages compose a full Gnome/KDE suit? (For example: Is Kolour Paint an individual package, or only available as part of the larger KDE Graphics package?)
<li> Are there any filesystem layout quirks, additions, or reservations? (For example, is /usr/local ever used by packages or is it reserved for the user? Is Firefox installed into /var?)
</ul>
</li>


<li><div class="section-title">Support for compiling from source</div>
The package manager&#8217;s job is (usually) only to manage pre-compiled packages. But some users like to manually compile some packages from source, such as to apply custom patches to a program or to get speed by optimizing the program for their specific machine. Many users don&#8217;t compile much (if any) from source, but the Linux philosophy is deeply rooted in the distribution and manual compilation of source code, and there are many who like/need to do so. How an operating system lets the user compile/managed compiled programs is important to how the operating system works. Those who rely on it will find their experience very dependent on how manual compilation is handled.
<br /><br />

If there exist any distro-specific methods for handling the compilation of both supported (packages in the repositories) and/or un-supported (packages not in the repositories) software, it should definitely be included in a review. If the distro has any form of a ports-like system, a review without mention of it is by default incomplete.
<br /><br />

And do not ever, ever waste space explaining that you can do &#8220;./configure &#038;&#038; make &#038;&#038; make install&#8221;, that you can use &#8220;checkinstall&#8221;, or that you can use the &#8220;install&#8221; program itself &#8212; every distro has those, they aren&#8217;t worth mentioning in the slightest.
<br /><br />

Sample topics: 
<ul>
<li> Do there exist any specific tools for the system that aid the user in compiling programs from source?
<li> How are users supposed to recompile the kernel? Is initramfs or initrd used?
<li> If a user does manually compile a program/package, how easily can it be managed by the package manager? (This has been mentioned twice. Hint.)
<li> How is the presence of different kernel versions handled?
<li> Is there risk of having the manually-compiled program conflict with the packages managed by the package manager, or is there a way to keep manually installed non-package programs separate?
</ul>
</li>


<li><div class="section-title">Release system</div>
Distros have different styles of updating the end-users installed distro to be the most current version. Some distros have a new, fully-updated version released every 6 months. Some just release all package upgrades on-the-fly and have no concept of different versions. The way the distro handles version releases is significant to the end-user, as usually full version upgrades mean that the developers reserve the right to move stuff around and/or reconfigure things in a noticeable way if they want to, and push those changes through in the next major release. It also means that developers reserve the right to stop providing package upgrades for a given version, resulting in obligatory periodic upgrades.
<br /><br />

Sample topics:
<ul>
<li> What factors decide the version releases (if there are any)? 
<li> How big are the changes between releases?
<li> How often are the releases? 
<li> How long is there support for old releases?
<li> Does evidence seem to suggest that performing a version upgrade is smooth, or is the user better off performing a clean install of the new version?
</ul>
</li>


<li><div class="section-title">Startup style</div>
Summarizing how a distro manages startup scripts/daemons is easy: All you have to do is say whether the distro uses System V or BSD-style init scripts. Users unfamiliar with these concepts can look them up.
<br /><br />

How the operating system uses run-levels is a more complex subject, yet a more interesting on. Fewer users will care about this level of detail but more advanced users might be able to intuit more about the nature of a distro from it.
</li>


<li><div class="section-title">Robustness of a default install</div>
Distros vary in what software they provide for a from-disk installation. Some have more, some have less. Some have roughly equal quantities but the theme of the offered software is completely different.
<br /><br />

After you install the distro, how much work must be done to get the system up and running with a graphical desktop and a decent collection of tools? What kind of packages are installed, and what aren&#8217;t?
<br /><br />

Sample topics: 
<ul>
<li> Is a default display manager installed or offered? (Which one?)
<li> Does the distro rely heavily on sources from the servers, or can you obtain multiple CD/DVDs for a more robust from-disk install?
<li> Does the default install include tools for compiling? (GCC, make, etc.)
<li> Does the default install offer Apache for install?
<li> What are some of the most specific/obscure programs install/offered by the installer? (For example, if a distro provides Compiz and OpenOffice.org straight from disk, that implies the sort of other packages that are installed.)
</ul>
</li>
</ul>

The above topics cover a lot of ground. Obviously not every detail need be included in a good review, but many of these points are very critical to how the distro works and failure to address a significant number of them will result in an incomplete review of the distro. If there seem to be too many points to address, remember that you&#8217;re writing a technical review, not a grand work of fiction. Wordiness can usually be eliminated. If you know what you&#8217;re talking about and put some thought into what you write, you can cram a lot of information into three sentences.
<br /><br />

One key to remember is that that not all of the information may seem important to you, the author of the review, but it is what separates one distribution from another. Obviously the information has to be appropriate for the audience you are writing for; that is a decision faced by every technical writer.
<br /><br />

If you feel unable to address many of these topics in your review then you probably have no business reviewing the distro and are not as familiar with it as you should be. Many people want to pop in a CD, install the distro, play with it for 40 minutes, and then write a review about it. Unless you did your research beforehand and you made <i>very</i> good use of those 40 minutes, you&#8217;re not qualified to offer a review. Spend your time learning more about the distro rather than writing about what you do know.
<br /><br />


<div class="hr-dotted" /></div>

Now a list of things you should <b>not</b> review.

<ul class="list-thickpad">
<li><div class="section-title">Plug-n-play drivers</div>
Do not ever review a distro by saying &#8220;I plugged my external wireless card X and it did(n&#8217;t) work&#8221;. This is the lamest review you can provide, and is my pet peeve to boot. First of all, and apparently this will come as a shock to some, almost all distros use the same drivers. Support for hardware is pretty much universal, the same drivers that manage your hardware in one distro probably manage it in most other distros, and this only becomes more true over time. Comparing hardware support between distros is basically pointless. It&#8217;s even more pointless when your analysis consists of just one generic external wireless card. If it didn&#8217;t work, odds are you didn&#8217;t set something up correctly.
<br /><br />

Second, the comparison you <i>can</i> make between distros is in how they <i>manage</i> drivers. Some distros have special programs to help the user manage and install drivers. Some distros have lots of automatic scripts set up to help ensure the user never has to manually touch their xorg.conf file, some distros demand the user get involved with the xorg.conf file.
<br /><br />

Driver management is a valid comparison point, but generic &#8220;I tried wireless device X and PCI device Y&#8221; tests are basically worthless. &#8220;Here&#8217;s how easy/hard it is to install Nvidia&#8217;s video driver (module version or userland version, take your pick), here&#8217;s a short summary of what is expected of you to do so, and here&#8217;s what was done automatically by tools&#8221;, by contrast, is very informative information.
<br /><br />

Note that it is obviously acceptable to review the quantity of drivers provided by a distro if they seem to have a noticeable shortage/abundance of them, but most distros will have about the same drivers. Don&#8217;t mention driver quantity unless its very noticeable.
</li>


<li><div class="section-title">Five minute quirks</div>
At various times, some distros have what you might call &#8220;five minute quirks&#8221;, namely, one or two little problems that often need to be ironed out of a fresh install of the system and are easily solvable by a user with Linux skills that the distro is oriented towards. Sometimes an environment variable needs to be set, sometimes a file needs to be configured, etc. These are bugs not unique to anyone&#8217;s specific install of the distro, but rather a very large (if not the entire) user base. One of the developers mis-configured something before release, or some default setting doesn&#8217;t work with the majority of hardware, or something like that.
<br /><br />

Do not write about these little five minute hiccups in your review. They do not count, they only last five minutes and will likely be fixed in one of the upcoming releases anyway. (See the next point.) Usually the distro&#8217;s forum and/or wiki has an easily accessible guide to tell you how to fix the quirks and after a day of usage, the user will not remember it. At absolute most you should say that &#8220;minor quirks exist&#8221; and say where/how the site addresses these issues. This could be part of your review of the distro&#8217;s documentation. Any quirks you fix within five minutes of attempting to do so should not be mentioned. Their fix in the next release will out-date your review.
<br /><br />

What&#8217;s more, do not write about the stability of a distro based on its five-minute hiccups. Nothing says &#8220;I didn&#8217;t do any actual research about this distro&#8221; like a stability evaluation based on the initial five-minute quirks the distro had as of some arbitrary date.
</li>


<li><div class="section-title">Unrelated/temporary bugs</div>
Do not write about temporary bugs. If the bug is the type that will be fixed within four months, don&#8217;t use it as basis for your evaluation of the distro&#8217;s stability. This point bears repeating: Whatever you do, do not base your assessment of a distro&#8217;s stability on little quirks that will be gone in a couple months. If your readers wanted to read an inane bug listing, they&#8217;d browse bugzilla.org.
<br /><br />

On that note, do <b>not</b> assess the distro, in any way, based on bugs that are not specific to the distro itself. If the developers of a software package X make a mistake, don&#8217;t blame the developers of the Linux distro in question, it&#8217;s outside of their control, not their fault, and not their responsibility. It&#8217;s irrelevant to your review, so ignore it. If distro X has a bug but distro Y does not, it is possibly that distro Y did not push the new version of the software and thus does not have the buggy version &#8212; you can use this to exemplify how &#8220;bleeding edge&#8221; the distro is. Or its possible that distro Y manually patched the software &#8212; you can use this to exemplify how the developers do(n&#8217;t) manually patch packages.
<br /><br />

You can obviously cite the presence of bugs in your analysis of the stability operating system, but don&#8217;t focus on petty bugs. Instead, focus on the release/testing cycle of packages, the speed of security fixes, and <i>frequency</i> of distro-specific bugs. If this means that you actually have to spend some time using a distro and learning about it before you evaluate its stability, cry me a river. If you aren&#8217;t willing to do that, don&#8217;t comment on it&#8217;s stability because you don&#8217;t know anything useful about it.
</li>


<li><div class="section-title">Artwork</div>
No one cares what the default desktop color theme of the distro is. Or the default desktop wallpaper. Or whatever. This is my other distro-review pet peeve. As shocking as this may sound, every desktop environment and window manager in the entire universe, throughout every civilization, all of time, and every dimension, can have its color theme changed. If a user doesn&#8217;t like the default wallpaper, they will change it. If they don&#8217;t like the default Gnome color theme, they will change it. Defaults are irrelevant.
<br /><br />

Don&#8217;t mention the quantity of community artwork, in the sense of backgrounds and color themes. This is directly proportional to the number of users the distro has and is thus redundant information. And, realistically, nobody cares about it, because most of them will choose whatever distro-neutral artwork they prefer anyway. Users routinely become attached to a certain color theme and will take it with them from distro to distro.
</li>


<li><div class="section-title">Installation Process</div>
This is not a terribly important point, but I&#8217;m not a fan of reviewing the installation process of a distro. Most installers, even text-based ones, guide the user through the installation very clearly. Sure a text interface may look a bit daunting to some, but if one just reads the instructions, one can usually just click-through (or, tab-enter-through) the installation with relative ease.
<br /><br />

This item might warrant a quick mention, perhaps tying into the distro&#8217;s philosophy (ie, in analyzing whether the distro is oriented towards casual or power users), but unless the installation process is exceptionally complicated or buggy don&#8217;t devote much space to it. It&#8217;s a one-time experience by the user, and a determined user won&#8217;t change their opinion on whether to install it based on the installation graphics.
</li>
</ul>


Remember, your goal, as a reviewer, is simple: Review things from the perspective of the average user you are writing for. Don&#8217;t go into pain-staking detail unless you&#8217;re aiming to provide an in-depth guide, minor details/quirks are often best left for their own special article and are of interest to few readers. Don&#8217;t waste time on things that were (likely) very unique to your experience, because almost no one else cares.
<br /><br />

Even though this article was somewhat long, your distro review doesn&#8217;t have to be. (If it is very long, it&#8217;s probably more of a guide than a review. Keep manuals as manuals, and reviews as reviews.) If you have an actual depth of information to convey, you can say a lot by using well-crafted sentences.]]></content:encoded>
			<wfw:commentRss>http://bradconte.com/how-to-review-a-linux-distro.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Simple Partitioning Tip</title>
		<link>http://bradconte.com/partitioning_for_backup.html</link>
		<comments>http://bradconte.com/partitioning_for_backup.html#comments</comments>
		<pubDate>Tue, 26 Jun 2007 07:57:02 +0000</pubDate>
		<dc:creator>Brad Conte</dc:creator>
				<category><![CDATA[Computers & Tech]]></category>

		<guid isPermaLink="false">http://test.b-con.us/tech/partitioning-tip</guid>
		<description><![CDATA[Deciding how to partition a hard drive is not necessarily a simple task. Depending on what you want to do with it, your partitioning scheme may vary greatly. For those with specific needs I put forward a practical tip: Make all your operating system partitions the exact same size. I&#8217;ve learned the value of this [...]]]></description>
			<content:encoded><![CDATA[Deciding how to partition a hard drive is not necessarily a simple task. Depending on what you want to do with it, your partitioning scheme may vary greatly. For those with specific needs I put forward a practical tip: Make all your operating system partitions the exact same size. I&#8217;ve learned the value of this several times over in situations that called for experimentation/backup with/for an operating system.
<br /><br />

I will use the *nix tools <a href="http://linux.die.net/man/8/fdisk">fdisk</a> (the Windows version of fdisk will not suffice) and <a href="http://en.wikipedia.org/wiki/Dd_%28Unix%29">dd</a>, and consequentially assume that the reader has minimal *nix experience and access to some form of a *nix like system. Linux live CDs are adequate, as will (I believe) OSX. The *nix system will be used to perform the delicate initial partitioning and the partition clones thereafter.
<br /><br />

I always dual-boot Windows and Linux, keep a third partition around for experimenting with other operating systems, and have a fourth partition blank. All four of these partitions are the exact same size, which offers me flexibility in moving them around. The biggest advantage is that it allows me to perform a byte-for-byte clone any one partition onto a second partition, perform whatever perverse thing I&#8217;m experimenting with on the first partition, and then restore it if something goes wrong. Or I can just boot straight to the new copy of the partition I cloned. Somewhat time consuming, but simple and error-proof.
<br /><br />

I know this concept may strike some as a waste of time and space, but it&#8217;s not inefficient as it may sound. Cloning a 20GB partition can be done over lunch and, like many others, I have a hard disk exclusively devoted to operating systems, no one of which needs more than 25GB.
<br /><br />

There are several reasons why you might want to backup an entire partition. The need to do so for a *nix system is less pronounced, because the flexibility of *nix systems lets you do a file-level copy between partitions without adverse effects. But doing a byte-for-byte direct copy isn&#8217;t much longer than a file-based copy, and removes any of the file-based copy complications. As well, Windows systems are attached to their partitions and if they are copied on the file level to a new file system they will not work, so doing a byte-by-byte image of a Windows system is almost a must for backup purposes.
<br /><br />

The problem, though, is that if you rely on a partition manager like the default Windows manager or GParted (which is the default partition manager in the Ubuntu installation process) to create your partitions for you, as odd as it may seem, you aren&#8217;t guaranteed to get partitions the exact size you specified. I don&#8217;t know the details, but creating two 20GB partitions does not guarantee you of getting two partitions of the same size. Thus when you go back to try and clone one partition to another you may discover that the destination partition is, say, 8MB smaller than the source partition, and there will be hell to pay.
<br /><br />

<div class="section-title">Creating Precisely-Sized Partitions</div
<ul>
<li>
Open the disk to partition with fisk:
<div class="code"># fdisk /dev/sda</div>
Use the &#8220;p&#8221; command to get a printout of my current table. If the disk is new, the printout should be empty.
</li>

<li>
Determine how large you wish the partitions to be. Create a new partition and choose the starting first sector (use the default if you are creating them sequentially). Then select the last sector by using the +XG to indicate that the last sector should be X gigabytes worth of sectors after the first. This should work with both primary and extended partitions, with one exception noted below.
</li>

<li>
<b>Exception:</b> There is a special partition that requires a non-default starting sector. The first partition within an extended partition will start in the same cylinder as the extended partition marker, and thus share some space with said marker and <em>not</em> be the exact size specified. To correct this, create the first &#8220;inner&#8221; extended partition one sector after the beginning of the &#8220;outer&#8221; extended partition. This will result in a few bytes of wasted space, but if both partitions start on the same sector then size of the final partition will be slightly too small.
</li>
</ul>
<br />

<div class="section-title">Copying Partitions</div>
<ul>
<li> Decide which partition will be the source and which will be the destination. Use dd to copy from the source to the destination:

<div class="code"># dd if=/dev/sda2 of=/dev/sda4 bs=8M </div>

A key parameter here is the &#8220;bs&#8221; option, which tells dd how many bytes to read and write each time. Read/write operations to disks are relatively slow and have significant overhead so you want to make each read/write operation worth your computer&#8217;s time. I&#8217;ve found 8MB to be about the most efficient block size to use for each read and write. If you fail to specify a value then the default of 512 bytes will be used, this can make the process take on the order of 100 times longer to finish.
</li>
</ul>

Obviously, copying partitions also applies to copying entire disks if the disks are the exact same size. This can be used make manual backups of entire drives.]]></content:encoded>
			<wfw:commentRss>http://bradconte.com/partitioning_for_backup.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

