<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Linux</title>
  <subtitle>Articles about the Linux operating system.</subtitle>
  <link rel="alternate" type="text/html" href="http://samat.org/topic/linux.html"/>
  <link rel="self" type="application/atom+xml" href="http://samat.org/taxonomy/term/1/atom/feed"/>
  <id>http://samat.org/taxonomy/term/1/atom/feed</id>
  <updated>2007-12-25T14:00:39-07:00</updated>
  <entry>
    <title>Adobe releases pre-release Flash 10 for 64-bit Linux</title>
    <link rel="alternate" type="text/html" href="http://samat.org/weblog/20081117-adobe-releases-pre-release-flash-10-64-bit-linux.html" />
    <id>http://samat.org/weblog/20081117-adobe-releases-pre-release-flash-10-64-bit-linux.html</id>
    <published>2008-11-17T05:23:44-07:00</published>
    <updated>2008-11-26T14:42:29-07:00</updated>
    <author>
      <name>Samat Jain</name>
    </author>
    <category term="Corporations" />
    <category term="Linux" />
    <category term="Web link" />
    <summary type="html"><![CDATA[<p>Today, <a href="http://blogs.adobe.com/penguin.swf/2008/11/now_supporting_16_exabytes.html">Adobe released 64-bit Flash for Linux</a>. Finally, I can waste time watching ugly, pixelated Internet video on my 64-bit Linux desktop and laptop, just like all of my 32-bit-confined brothers and sisters on the Internet! (Yes, I know about npviewer---let's not go there.)</p>

<p>What's really interesting is that this is Adobe's first 64-bit release of Flash. That is, Linux users got it first, before users of Windows Vista x64 and and MacOS X. It probably does not mean anything, especially since Adobe has mentioned <a href="http://labs.adobe.com/technologies/flashplayer10/faq.html#flashplayer10FAQ_64-bit03">64-bit flash will be released at the same time across platforms</a>, but you can't help but feel good inside.</p>

<p>Go <a href="http://labs.adobe.com/downloads/flashplayer10.html">download it now</a> and remember to <a href="https://bugs.adobe.com/flashplayer/">report good bugs</a>.</p>

<p><strong>Update:</strong> Some quick notes...</p>

<ul>
<li>The tarball provided on the labs website is not the conventional Adobe Flash installer--it just contains the plugin. To use the plugin, drop the .so file into your ~/.mozilla/plugins/ directory.</li>
<li>Make sure to uninstall your npviewer-powered 32-bit Flash completely (disabling the plugin within Firefox is not enough). I personally uninstalled it from my system to prevent any conflict.</li>
</ul>
    ]]></summary>
  </entry>
  <entry>
    <title>Creating your own personal aspell dictionary</title>
    <link rel="alternate" type="text/html" href="http://samat.org/weblog/20081102-creating-your-own-personal-aspell-dictionary.html" />
    <id>http://samat.org/weblog/20081102-creating-your-own-personal-aspell-dictionary.html</id>
    <published>2008-11-02T16:23:44-07:00</published>
    <updated>2008-11-03T04:41:35-07:00</updated>
    <author>
      <name>Samat Jain</name>
    </author>
    <category term="Article" />
    <category term="Linux" />
    <category term="Software" />
    <summary type="html"><![CDATA[<p>Something that has bothered me forever is that applications that use <a href="http://aspell.net/">GNU aspell</a> for spell checking kept marking my name as a misspelling (I'm looking at you, KMail). Most front-end applications don't provide a way for you to add your own custom words.</p>

<p>Apparently, <a href="http://aspell.net/man-html/Format-of-the-Personal-and-Replacement-Dictionaries.html#Format-of-the-Personal-and-Replacement-Dictionaries">creating your own personal dictionary is ridiculous easy with aspell</a>.</p>

<p>If your language is English, create a file in your home directory called ".aspell.en.pws":</p>

<div class="codeblock"><code>personal_ws-1.1 en 0&lt;br /&gt;Samat&lt;br /&gt;quasirhombicosidodecahedron</code></div>

<p>The first line is a required header. Every subsequent line is a word you want to add to your dictionary. I can't believe I've let this sit for so long. Because it's a nice text file, syncing this file between machines to take your dictionary with you is trivially easy.</p>
    ]]></summary>
  </entry>
  <entry>
    <title>Taking Drupal sites offline via mysql and the command line</title>
    <link rel="alternate" type="text/html" href="http://samat.org/weblog/20081031-taking-drupal-site-offline-mysql-and-command-line.html" />
    <id>http://samat.org/weblog/20081031-taking-drupal-site-offline-mysql-and-command-line.html</id>
    <published>2008-10-31T23:42:10-06:00</published>
    <updated>2008-11-26T14:43:41-07:00</updated>
    <author>
      <name>Samat Jain</name>
    </author>
    <category term="Article" />
    <category term="Bash Shell" />
    <category term="Drupal" />
    <category term="Linux" />
    <summary type="html"><![CDATA[<p>Drupal-powered websites can be put into an "offline mode." This is much better than most alternatives (such as taking the web server offline), especially for search engines, as the message and HTTP status codes given to users and robots alike will tell them to patiently come back later.</p>

<p>I've found that putting the site into offline mode makes database backups go much faster on heavily trafficked sites (which is obvious). However, for a particular site I was working with, this needed to be done in an automated manner, and on a dedicated database server that did not have access to the Drupal installation.</p>

<p>Most people take their Drupal sites offline through Drupal's web-based administration interface. They can also be put offline through the <a href="http://drupal.org/project/drush">Drupal Shell</a>. Neither were suitable for me: the former cannot be automated easily, and the latter requires access to the Drupal installation. Fortunately, Drupal sites can easily be taken offline by setting things in the database, which can easily be done via bash scripts and the command-line MySQL client.</p>

<p>Given your database user is <i>my_db_user</i>, password <i>my_password</i>, and database <i>my_drupal_db</i>, the backup script would look something similar to:</p>

<div class="codeblock"><code>#!/bin/bash&lt;br /&gt;&lt;br /&gt;# Take site offline&lt;br /&gt;mysql --user my_db_user --password=my_password my_drupal_db &amp;lt;&amp;lt; EOF&lt;br /&gt;UPDATE variable SET value=&amp;#039;s:1:&amp;quot;1&amp;quot;;&amp;#039; WHERE name = &amp;#039;site_offline&amp;#039;;&lt;br /&gt;DELETE FROM cache WHERE CID = &amp;#039;variables&amp;#039;;&lt;br /&gt;EOF&lt;br /&gt;&lt;br /&gt;# Do stuff here while the site is offline (e.g. backup)&lt;br /&gt;&lt;br /&gt;# Bring site online&lt;br /&gt;mysql --user my_db_user --password=my_password my_drupal_db &amp;lt;&amp;lt; EOF&lt;br /&gt;UPDATE variable SET value=&amp;#039;s:1:&amp;quot;0&amp;quot;;&amp;#039; WHERE name = &amp;#039;site_offline&amp;#039;;&lt;br /&gt;DELETE FROM cache WHERE CID = &amp;#039;variables&amp;#039;;&lt;br /&gt;EOF</code></div>

<p><strong>Update:</strong> The original version of this article had some problems on some setups with the variables table being cached. I added another SQL statement to make sure this cache is flushed so the site actually reflects its configuration.</p>

<p><strong>Update:</strong> This method really doesn't work that well, and the more I think about it, there isn't a way to get around writing something that interacts with Drupal. I'm working on a script that will be more fool-proof.</p>
    ]]></summary>
  </entry>
  <entry>
    <title>Amarok 2 uses MySQL embedded as a metadata store</title>
    <link rel="alternate" type="text/html" href="http://samat.org/weblog/20081013-amarok-2-uses-mysql-embedded-metadata-store.html" />
    <id>http://samat.org/weblog/20081013-amarok-2-uses-mysql-embedded-metadata-store.html</id>
    <published>2008-10-13T00:16:25-06:00</published>
    <updated>2008-10-13T00:19:42-06:00</updated>
    <author>
      <name>Samat Jain</name>
    </author>
    <category term="KDE" />
    <category term="Linux" />
    <category term="Opinion" />
    <category term="Software" />
    <summary type="html"><![CDATA[<p>There's been a bit of turmoil in the Amarok and KDE communities the past week with Amarok's decision to only support MySQL Embedded in Amarok 2. Jeff Mitchell has written about the <a href="http://amarok.kde.org/blog/archives/812-MySQL-in-Amarok-2-The-Reality.html#extended">Amarok design decisions made</a>.</p>

<p>I'm a little bothered by this, as it forgeos all the "semantic desktop" work that has gone into KDE 4, namely what's provided by the <a href="http://strigi.sourceforge.net/">Strigi</a> and <a href="http://nepomuk.semanticdesktop.org/">Nepomuk</a> libraries. One thing the whole semantic desktop concept entails is that other applications will be able use data another application stored, but without care to what that other application was or how it was stored. For example, I should be able to share the list of all tracks in my music library, how many times I've played tracks, what tracks I think are my favorite, etc across music players. This kind of abstraction is, obviously, good for users, but bad for developers of proprietary software. They don't want you to easily switch between applications that they do not control. Amarok switching to it's own database store is a stab at this kind of desktop interoperability. I've my own thoughts to add, though, that support what the developers are doing...</p>

<p><a href="http://amarok.kde.org/">Amarok</a> is an awesome application. Dare I say, it's a <em>killer</em> application on Linux---on several occasions this past year I've recommended people install Linux just so that they could play with Amarok and see how much better it is compared to what they were using (yes, I'm looking at you, iTunes).</p>

<p>Before Amarok, I used <a href="http://musicpd.org/">Music Player Daemon (mpd)</a>. I stopped using it after a while: the playlist management wasn't very good; it would eat those playlists that I spent a lot of effort to make; the GUIs available at the time were lacking; and it was very slow when working with tens of thousands of songs. Some of this may have changed but I've not been motivated to look back.</p>

<p>Enter Amarok: I switched because the playlist management was so much better. I setup a MySQL server on my workstation to store metadata, as SQLite was much too slow. Amarok backed with MySQL is very fast---I dare others to find a library-based music manager that is faster with the number of songs I've thrown at it.</p>

<p>Balancing desktop interoperability with performance is a delicate balancing act. Interoperability is the hot thing these days---look at how Apple's line of integrated software and hardware continue to sip market share from the Microsoft-powered desktop. But when it comes down to it, performance and other more perceived benefits are going to win out over desktop interoperability. The Amarok developers' decision to go with MySQL embedded is a good one that will hopefully keep people moving to Amarok over proprietary alternatives.</p>
    ]]></summary>
  </entry>
  <entry>
    <title>Speeding up SpamAssassin rule processing on Debian and Ubuntu</title>
    <link rel="alternate" type="text/html" href="http://samat.org/pages/speeding-up-spamassassin-rule-processing-on-debian-and-ubuntu.html" />
    <id>http://samat.org/pages/speeding-up-spamassassin-rule-processing-on-debian-and-ubuntu.html</id>
    <published>2008-10-02T13:01:57-06:00</published>
    <updated>2008-10-09T00:09:58-06:00</updated>
    <author>
      <name>Samat Jain</name>
    </author>
    <category term="Article" />
    <category term="Debian" />
    <category term="E-mail" />
    <category term="Linux" />
    <category term="Ubuntu" />
    <summary type="html"><![CDATA[<p><a href="http://spamassassin.apache.org/">SpamAssassin</a> is one of the most-used spam filtering systems in use today. Unfortunately, because there are so many different ways SpamAssassin can be used, SpamAssassin remains subject to many performance problems. Fortunately, there are several speed-ups and optimizations that can be applied to most SpamAssassin installations to speed up its rule processing, especially on Debian and Ubuntu GNU/Linux-based systems. These instructions can be adopted to other operating systems as well.</p>

<p>This article does not discuss configuring your mail filtering system (i.e. procmail, maildrop). This depends completely on your setup, and more than likely there are plenty of other articles that describe the best way to setup what you want.</p>
    ]]></summary>
  </entry>
  <entry>
    <title>The number one thing Dell customers want... Linux</title>
    <link rel="alternate" type="text/html" href="http://samat.org/weblog/20070219-the-number-one-thing-dell-customers-want-linux.html" />
    <id>http://samat.org/weblog/20070219-the-number-one-thing-dell-customers-want-linux.html</id>
    <published>2007-02-19T19:59:54-07:00</published>
    <updated>2007-02-19T20:03:16-07:00</updated>
    <author>
      <name>Samat Jain</name>
    </author>
    <category term="Corporations" />
    <category term="Linux" />
    <category term="Web link" />
    <summary type="html"><![CDATA[<p><a href="http://www.dellideastorm.com/">Dell Ideastorm</a> is a Dell-run website where users can post and vote (anonymously) for ideas for Dell products. What's the number one thing people want...?</p>

<p><a href="http://www.dellideastorm.com/article/show/61771">People want Linux on their Dell machines</a>. Remember to click the "promote" icon and make your vote count.</p>
    ]]></summary>
  </entry>
  <entry>
    <title>GPG public key signing post-party automation with KMail</title>
    <link rel="alternate" type="text/html" href="http://samat.org/weblog/20070218-gpg-public-key-signing-post-party-automation-with-kmail.html" />
    <id>http://samat.org/weblog/20070218-gpg-public-key-signing-post-party-automation-with-kmail.html</id>
    <published>2007-02-18T20:24:32-07:00</published>
    <updated>2007-12-25T14:00:39-07:00</updated>
    <author>
      <name>Samat Jain</name>
    </author>
    <category term="Article" />
    <category term="Crypto" />
    <category term="KDE" />
    <category term="Linux" />
    <category term="Python" />
    <summary type="html"><![CDATA[<p>This past <a href="https://wiki.ubuntu.com/TheUbucon">Ubucon</a>'s key signing party was my first key signing party. One thing I noticed--signing keys after a <a href="http://en.wikipedia.org/wiki/Key_signing_party">key signing party</a> is a boring repetitive task. Summarized from the <a href="https://wiki.ubuntu.com/KeySigningParty">Ubuntu wiki entry on typical key signing post-party protocol</a>:</p>

<ol>
<li>Retrieve all public keys of key signing party participants, using gpg –-recv-key <keyID></li>
<li>Compare the hardcopy fingerprint from the keysigning party to the fingerprint of the retrieved public keys, using gpg –-fingerprint <keyID></li>
<li>Sign the key, using gpg –-sign <keyID>
Send the signed key back, either by

<ul>
<li>E-mail: export the key, then e-mail it to the key owner, using gpg –-export -a <keyID> | mail -s “Your signed key” user@example.com</li>
<li>Key server: send the key to a public keyserver, using gpg –send-keys <keyID></li>
</ul></li>
</ol>

<p>This is incredibly monotonous—and people have to wonder why <a href="http://en.wikipedia.org/wiki/Web_of_trust">Web of Trust-based encryption</a> is not more popular?</p>

<p>The <a href="http://debaday.debian.net/2007/02/18/signing-party-complete-toolkit-for-efficient-key-signing/">Debian signing-party package</a> provides the utility caff to automate some of this. It's not very friendly to “desktop” users, however:</p>

<ul>
<li>it's a <acronym title="Command Line Interface">CLI</acronym> application</li>
<li>it requires a local <acronym title="Mail Transfer Agent">MTA</acronym> (/usr/sbin/sendmail in particular), or an “open” SMTP server, with no support for authenticated SMTP or SMTP/SSL</li>
<li>the configuration file syntax is Perl and confusing; there are also few examples on the Internet</li>
</ul>

<p>You could add authenticated SMTP or SMTP/SSL support to the script, but having to know how to hack Perl definitely disqualifies caffe from being a desktop-friendly application.</p>

<p>So, I hacked together <a href="/sites/samat.org/files/key-signing-party-batch-process-via-kmail.py.txt">my own key signing party script</a> in Python that would send signed keys back to people via KMail. To use it, create a text file listing all key IDs you wish to sign, one per line. Pipe the contents of this list into the script:</p>

<div class="codeblock"><code>cat list-of-ids.txt | key-signing-party-batch-process-via-kmail.py</code></div>

<p>The script will download each key, ask you to verify the fingerprint, and then sign it. It then will open a KMail composer window, pre-filled with the key owner's e-mail address, a friendly template message (customizable in the script), and attached key. Review each e-mail to make sure it is kosher, and click send. Other than continuing to be a CLI program, I think this is much friendlier--the only manual work done is the creation of list of keys to sign, comparing fingerprints (this could be automated, but it seems in the spirit of the Web of Trust-based systems not to), and clicking send in a familiar desktop e-mail client.</p>

<p>Now for some notes...</p>

<p>It uses the <a href="http://en.wikipedia.org/wiki/DCOP">DCOP automation</a> features of KDE's Kmail to send messages. You could similarly use Evolution and D-Bus, but I don't use Evolution so I can't contribute that bit of functionality. Mozilla's Thunderbird unfortunately does not yet support any kind of automation features (as far as I know, anyway), so you're completely out of luck if you use it.</p>

<p>DCOP with Python is a complete, utter, pain. The easy way to drag-and-drop boiler-plate code with kdcop did not work, as it appears the APIs have changed. A problem with KDE/Python dcopext's module and multiple identically-named-functions sealed the deal for me and I gave up trying to use DCOP with Python, and instead settled for a hack of using the shell instead. I'm looking forward the one Linux desktop <acronym title="Inter-Process Communication">IPC</acronym> protocol to rule them all, <a href="http://en.wikipedia.org/wiki/D-Bus">D-Bus</a>, to debut in KDE4.</p>

<p>My script does not provide all the functionality of caffe. It, for example, does not encrypt the messages and their keys back to their owners. There doesn't appear to be an easy way to do this with KMail and DCOP, so it's a feature that will have to wait.</p>
    ]]></summary>
  </entry>
</feed>
