<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>G-Loaded Journal &#187; Tips</title>
	<atom:link href="http://www.g-loaded.eu/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.g-loaded.eu</link>
	<description>An open-source software and technology related journal</description>
	<lastBuildDate>Thu, 02 Sep 2010 17:01:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
		<item>
		<title>Howto: Run VMWare on a Physical Windows Partition</title>
		<link>http://www.g-loaded.eu/2007/11/05/howto-run-vmware-on-a-physical-windows-partition/</link>
		<comments>http://www.g-loaded.eu/2007/11/05/howto-run-vmware-on-a-physical-windows-partition/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 06:31:17 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/11/05/howto-run-vmware-on-a-physical-windows-partition/</guid>
		<description><![CDATA[Although I do not intend to run VMWare directly on a physical partition containing Windows any time soon, a recent discussion on a greek linux users group about the implications of such an experiment made me write a post about an article I stumbled upon today. The article author notes: VMWare is an incredibly useful [...]]]></description>
			<content:encoded><![CDATA[<p>Although I do not intend to run <a href="http://vmware.com/">VMWare</a> directly on a physical partition containing Windows any time soon, a recent discussion on a greek linux users group about the implications of such an experiment made me write a post about an article I stumbled upon today. The article author notes:</p>
<blockquote><p>
VMWare is an incredibly useful piece of software. Problem is, it feels like it&#8217;s perched on the tip of an eggshell. Any change to its environment tends to cause it to fall over, isolating all your data in the VM until you can find the time to get it working again. It&#8217;s not fun to trust important data to such a brittle environment.
</p></blockquote>
<p>Apart from the concern about the stability of the environment that hosts the guest operating system I can think of 1 or 2 more reasons why someone would want to run VMWare on a pre-existing installation of Windows on a physical volume. The first would be &#8220;<em>convenience</em>&#8221; and the other would be just &#8220;<em>fun</em>&#8220;.</p>
<p><a href="http://news.u32.net/articles/2006/07/18/running-vmware-on-a-physical-partition/">Read the entire article &raquo;</a></p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/11/05/howto-run-vmware-on-a-physical-windows-partition/">Howto: Run VMWare on a Physical Windows Partition</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2010/03/29/partition-misalignment-slows-4096-byte-sector-hard-drives/" rel="bookmark">Partition Misalignment Slows Down 4096-Byte Sector Hard Disks</a></li>
<li><a href="http://www.g-loaded.eu/2009/12/18/high-cpu-usage-centos-guest-virtualbox-vmware/" rel="bookmark">High CPU usage while running CentOS as guest on Virtualbox or VMware</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/05/ldap-howto/" rel="bookmark">LDAP HOWTO</a></li>
<li><a href="http://www.g-loaded.eu/2007/02/21/chroot-environment-howto/" rel="bookmark">chroot Environment Howto</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/06/partition-images-with-partimage-and-partimaged/" rel="bookmark">Partition images with Partimage and Partimaged</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/11/05/howto-run-vmware-on-a-physical-windows-partition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Backslashes inside pre HTML tags in WordPress</title>
		<link>http://www.g-loaded.eu/2007/11/04/backslashes-inside-pre-html-tags-in-wordpress/</link>
		<comments>http://www.g-loaded.eu/2007/11/04/backslashes-inside-pre-html-tags-in-wordpress/#comments</comments>
		<pubDate>Sun, 04 Nov 2007 11:33:38 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Maintenance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[Resolved]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/11/04/backslashes-inside-pre-html-tags-in-wordpress/</guid>
		<description><![CDATA[Today, I noticed that it is no longer required to escape the backslash (\), known as the &#8220;escape character&#8221; on *nix systems, inside the pre HTML tag in order not to be removed by WordPress&#8217; HTML filters. This bug has lived long enough to be considered as a WordPress feature, but the devs have suddenly [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I noticed that it is no longer required to <em>escape the backslash</em> (<code>\</code>), known as the &#8220;<em>escape character</em>&#8221; on *nix systems, inside the <strong>pre HTML tag</strong> in order <strong>not to be</strong> removed by WordPress&#8217; HTML filters. This bug has lived long enough to be considered as a WordPress feature, but the devs have suddenly decided to address it. So, no more pain when using the <em>escape character</em> inside pre tags. Good!! But, what happens to the code that has already been published with escaped backslashes? WordPress is one of those free software projects which leave some really difficult homework to their users from time to time. So, here follows my solution.<br />
<span id="more-456"></span><br />
After you have upgraded to the latest WordPress version, 2.3.1 at the time of writing, create a <strong>dump</strong> of your WordPress database:</p>
<pre class="console">mysqldump -u wpuser -p --opt --databases mywpdb > mywpdb.sql</pre>
<p>After the database has been dumped, those backslash pairs in your posts&#8217; data would appear as four (4) backslashes in the MySQL database dump. This is because this file contains the <strong>raw strings</strong> of your data.</p>
<p>To get an idea about what a <em>raw string</em> is, launch the <strong>python interpreter</strong> and test the following:</p>
<pre class="console">
>>> "string with escaped backslash \\"
'string with escaped backslash \\'
>>> r"raw string with escaped backslash \\"
'raw string with escaped backslash \\\\'
</pre>
<p><strong>All the above python-thing is not required</strong> at all, but it is good to know what really happens. As you can see, the escaped backslash is represented by <strong>four backslashes</strong> in the raw string and this is how it has been written by mysqldump in the <code>mywpdb.sql</code> file.</p>
<p>All you have to do in order to <strong>repair</strong> all that code, while leaving all non-escaped backslashes in place, is to use a good text-stream editor, like <strong>sed</strong> in the way presented below.</p>
<p>Assuming that you have kept a <strong>backup of the dump</strong>, use sed to repair it <strong>in-place</strong>:</p>
<pre class="console">
sed -i 's/\\\\/\\/g' mywpdb.sql
</pre>
<p>You can now <strong>import</strong> the repaired dump back into the MySQL server and replace your data with the corrected one.</p>
<pre class="console">mysql -u wpuser -p mywpdb &lt; mywpdb.sql</pre>
<p>Your previously escaped backslashes should now appear as single backslashes in your posts, but displayed correctly by WordPress.</p>
<p>I haven&#8217;t noticed any problems after performing the above operation. It might not work for you though. Use at your own risk.</p>
<p>If I miss anything, please let me know.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/11/04/backslashes-inside-pre-html-tags-in-wordpress/">Backslashes inside pre HTML tags in WordPress</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2008/03/31/how-to-fix-the-wordpress-databases-character-set-issue/" rel="bookmark">How to fix the WordPress database&#8217;s character-set issue</a></li>
<li><a href="http://www.g-loaded.eu/2006/05/05/modifying-your-name-in-the-wordpress-comments/" rel="bookmark">Modifying Your Name In The WordPress Comments</a></li>
<li><a href="http://www.g-loaded.eu/2006/01/05/add-meta-tags-wordpress-plugin/" rel="bookmark">Add-Meta-Tags WordPress Plugin</a></li>
<li><a href="http://www.g-loaded.eu/2007/09/27/add-meta-tags-and-wordpress-23/" rel="bookmark">Add-Meta-Tags and WordPress 2.3</a></li>
<li><a href="http://www.g-loaded.eu/2007/07/10/wordpress-221-bugs/" rel="bookmark">WordPress 2.2.1 bugs</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/11/04/backslashes-inside-pre-html-tags-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>File and Directory diff in color in Midnight Commander</title>
		<link>http://www.g-loaded.eu/2007/08/06/file-and-directory-diff-in-color-in-midnight-commander/</link>
		<comments>http://www.g-loaded.eu/2007/08/06/file-and-directory-diff-in-color-in-midnight-commander/#comments</comments>
		<pubDate>Mon, 06 Aug 2007 15:51:07 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/08/06/file-and-directory-diff-in-color-in-midnight-commander/</guid>
		<description><![CDATA[Midnight Commander (MC) is a lean, but powerful, two-panel file manager that, admittedly, promotes productivity while working from a console. Among other features, it implements a user menu with pre-defined actions that can be performed on the selected files or directories. This menu can be further customized by the user on a directory-, user- or [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ibiblio.org/mc/">Midnight Commander</a> (MC) is a lean, but powerful, two-panel file manager that, admittedly, promotes productivity while working from a console. Among other features, it implements a <strong>user menu</strong> with pre-defined actions that can be performed on the selected files or directories. This menu can be further customized by the user on a directory-, user- or system-basis. While searching for ready-made actions for <abbr title="Midnight Commander">MC</abbr>&#8216;s user menu, I came across an excellent set, which adds the ability to display the differences (diff output) between two versions of a file or directory in color.<br />
<span id="more-435"></span></p>
<h4>Add the necessary code</h4>
<p>The code that needs to be added to the user menu is the following:</p>
<pre class="codesnp">
+ t r &#038; ! t t
d       Diff against file of same name in other directory
        if [ "%d" = "%D" ]; then
          echo "The two directores must be different"
          exit 1
        fi
        if [ -f %D/%f ]; then        # if two of them, then
          diff -up %f %D/%f | sed -e 's/\(^-.*\)/\x1b[1;31m\1\x1b[0m/g' \
                                  -e 's/\(^\+.*\)/\x1b[1;32m\1\x1b[0m/g' \
                                  -e 's/\(^@.*\)/\x1b[36m\1\x1b[0m/g' | less -R
        else
          echo %f: No copy in %D/%f
        fi

D       Diff current directory against other directory
        if [ "%d" = "%D" ]; then
          echo "The two directores must be different"
          exit 1
        fi
        diff -up %d %D | sed -e 's/\(^-.*\)/\x1b[1;31m\1\x1b[0m/g' \
                             -e 's/\(^\+.*\)/\x1b[1;32m\1\x1b[0m/g' \
                             -e 's/\(^@.*\)/\x1b[36m\1\x1b[0m/g' | less -R
        fi
</pre>
<p>The code snippet is a contribution by <cite>James Ogley</cite> to this <a href="http://en.opensuse.org/Midnight_Commander/Tips">OpenSUSE wiki page</a> about Midnight Commander and is released under the <a href="http://www.gnu.org/licenses/fdl.txt">GFDL 1.2 license</a>.</p>
<p>Here are the instructions on how to add this code to the user menu:</p>
<ol>
<li>Having launched Midnight Commander, press <strong>F9</strong></li>
<li>Go to the <strong>Command menu</strong> and hit the <strong>Edit menu file</strong></li>
<li>MC lets you customize the user menu for the current directory [<code>Local</code>], current user [<code>Home</code>] or make the modification system-wide. You will need to be <em>root</em> to change the latter. Most probably the <strong>Home</strong> choice is what you need.</li>
<li>You can now paste the code block between two other user-defined commands.</li>
</ol>
<h4>How to use these actions</h4>
<p>In order to show the differences between two versions of the same file, browse to the directories that contain each version, so that the directory in <em>panel A</em> contains the <em>A version</em> of <code>some.file</code> and the directory in <em>panel B</em> contains the <em>B version</em> of <code>some.file</code>. Then press <strong>F2</strong> and lowercase <strong>d</strong>.</p>
<p>In order to show the differences between the contents of the directories in the two panels, just press <strong>F2</strong> and then uppercase <strong>D</strong>.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/08/06/file-and-directory-diff-in-color-in-midnight-commander/">File and Directory diff in color in Midnight Commander</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2006/09/10/spec-file-directory/" rel="bookmark">SPEC File Directory</a></li>
<li><a href="http://www.g-loaded.eu/2007/07/28/send-a-text-file-as-sms-with-a-sony-ericsson-mobile/" rel="bookmark">Send a text file as SMS with a Sony-Ericsson mobile</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/06/meld/" rel="bookmark">Meld&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2005/10/01/another-way-to-create-a-text-file/" rel="bookmark">Another way to create a text file</a></li>
<li><a href="http://www.g-loaded.eu/2008/12/09/making-a-directory-writable-by-the-webserver/" rel="bookmark">Making a directory writable by the webserver</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/08/06/file-and-directory-diff-in-color-in-midnight-commander/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>When it comes to error messages&#8230;</title>
		<link>http://www.g-loaded.eu/2007/07/29/when-it-comes-to-error-messages/</link>
		<comments>http://www.g-loaded.eu/2007/07/29/when-it-comes-to-error-messages/#comments</comments>
		<pubDate>Sat, 28 Jul 2007 23:00:42 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/07/29/when-it-comes-to-error-messages/</guid>
		<description><![CDATA[This post is both a tip about vsftpd&#8216;s configuration and an example of what an error message should not look like. If you use vsftpd&#8217;s user_config_dir directive in order to set a directory that will hold configuration files for per-user customized server options, be warned that, if one of those files contains a directive whose [...]]]></description>
			<content:encoded><![CDATA[<p>This post is both a tip about <a href="http://vsftpd.beasts.org/">vsftpd</a>&#8216;s configuration and an example of what an error message <strong>should not</strong> look like.</p>
<p>If you use vsftpd&#8217;s <code>user_config_dir</code> directive in order to set a directory that will hold configuration files for per-user customized server options, be warned that, if one of those files contains a directive whose value is a path that does not exist &#8211; for example a mistyped custom <code>local_root</code> -, you will not be able to connect to the FTP service with any user account. Finding the cause of the problem is going to be very difficult as there is no sign about errors in the log files, even if you have set their detail to the maximum.</p>
<p>Moreover, if you use an FTP client like gftp, be prepared for error messages like the following:</p>
<blockquote><p>
Error: Could not read from socket: Success
</p></blockquote>
<p>Yeah, a successful error message at last!</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/07/29/when-it-comes-to-error-messages/">When it comes to error messages&#8230;</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2007/03/05/organizing-mailing-list-messages-with-evolution/" rel="bookmark">Organizing Mailing List messages with Evolution</a></li>
<li><a href="http://www.g-loaded.eu/2010/03/28/script-apache-error-report/" rel="bookmark">Script for Apache Error Report</a></li>
<li><a href="http://www.g-loaded.eu/2007/02/25/error-when-using-old-runbin-installers-under-linux/" rel="bookmark">Error when using old run/bin installers under Linux</a></li>
<li><a href="http://www.g-loaded.eu/2007/02/01/dircproxy-irc-proxy/" rel="bookmark">dircproxy IRC Proxy</a></li>
<li><a href="http://www.g-loaded.eu/2009/10/05/strange-mod_dav_svn-error/" rel="bookmark">Strange mod_dav_svn error</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/07/29/when-it-comes-to-error-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Send a text file as SMS with a Sony-Ericsson mobile</title>
		<link>http://www.g-loaded.eu/2007/07/28/send-a-text-file-as-sms-with-a-sony-ericsson-mobile/</link>
		<comments>http://www.g-loaded.eu/2007/07/28/send-a-text-file-as-sms-with-a-sony-ericsson-mobile/#comments</comments>
		<pubDate>Sat, 28 Jul 2007 20:14:31 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mobiles]]></category>
		<category><![CDATA[K320i]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[Resolved]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/07/28/send-a-text-file-as-sms-with-a-sony-ericsson-mobile/</guid>
		<description><![CDATA[I thought that sending a text file as a text message through the GSM network&#8217;s short message service would be a trivial task either it was performed from within the phone&#8217;s operating system or from a computer that runs a flavour of Linux. Once again, I have been badly misled. In 2007, this task still [...]]]></description>
			<content:encoded><![CDATA[<p>I thought that sending a text file as a text message through the GSM network&#8217;s short message service would be a trivial task either it was performed from within the phone&#8217;s operating system or from a computer that runs a flavour of Linux. Once again, I have been badly misled. In 2007, this task still remains a glorious achievement that requires great effort and fantasy in order to be accomplished.<br />
<span id="more-429"></span><br />
It&#8217;s hard to believe that the engineers over at the Sony-Ericsson labs have not taken into account the fact that the phone&#8217;s operating system should give the user the opportunity to send the contents of a text file as a <strong>text</strong> message. I tend to believe that this lack of features is actually <em>on-purpose</em> and has its roots in the company&#8217;s marketing department. There is no other logical explanation.</p>
<p>Anyhow, the phone&#8217;s internal web browser is the default viewer for plain text files, but this browser will never let you either copy the text in order to paste it in the sms editor or send the file that is being viewed as a text message directly. On the other hand, the phone&#8217;s OS will not let you send the file&#8217;s contents as text directly either.</p>
<p>&#8230;and when things like this happen, it is time for some monkey stuff. I tried to send the contents of the file as SMS through the phone by using two programs, <a href="http://www.gnokii.org/">gnokii</a> and <a href="http://www.gammu.org/">gammu</a>, from my fedora desktop. The phone is a <a href="http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/">Sony-Ericsson K320i</a>. I should state from the beginning that nothing worked.</p>
<h4>gnokii &#038; gammu</h4>
<p>The bluetooth service (<code>hcid</code>) has been configured properly and the device pairing between the usb dongle and the phone has been accomplished succesfully. Here follow a couple of examples of what I have tried with <code>gnokii</code> and <code>gammu</code>. These are provided for informational purposes only, as <strong>nothing worked out</strong>. Also, note that the configuration files contain only the absolutely required options in order to work with the phone over the <strong>bluetooth interface</strong>.</p>
<p><code>XX:XX:XX:XX:XX:XX</code> represents the phone&#8217;s hardware address. Also, <code>channel 2</code> is used as the <strong>rfcomm</strong> channel, as the phone&#8217;s serial port service &#8220;<em>listens</em>&#8221; on that channel (see the detailed <a href="http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/">K320i services</a> over the bluetooth interface).</p>
<p>The <strong>gnokii</strong> configuration file: <code>/etc/gnokiirc</code></p>
<pre class="codesnp">
[global]
port = XX:XX:XX:XX:XX:XX
model = AT
connection = bluetooth
rfcomm_channel = 2
</pre>
<p>A failed attempt to send the sms directly:</p>
<pre class="console">
$ echo "test" | gnokii --sendsms +306911111111 -r
GNOKII Version 0.6.14
SMS Send failed (The specified memory is full.)
</pre>
<p>No, the memory is not full. You make a mistake!</p>
<p>The <strong>gammu</strong> configuration file: <code>/etc/gammurc</code></p>
<pre class="codesnp">
[gammu]
port = XX:XX:XX:XX:XX:XX
connection = blueat
</pre>
<p>In this example, I will try to save the SMS to an SMS specific folder on the phone. But first, in order to get information about those folders, I issue the command:</p>
<pre class="console">
$ gammu --getsmsfolders
1. "                         Inbox", SIM memory, Inbox folder
2. "                        Outbox", SIM memory, Outbox folder
3. "                         Inbox", phone memory, Inbox folder
4. "                        Outbox", phone memory, Outbox folder
</pre>
<p>Then I try to store the message on the phone:</p>
<pre class="console">
$ echo "test" | gammu --savesms TEXT -folder 4
Saving SMS 1/1
Unknown error.
</pre>
<p>Ladies and gentlemen&#8230; the error is unknown! Unknown error in sight!</p>
<h4>Original Monkey Stuff</h4>
<p>Having wasted enough time for a single SMS, I started thinking of other ways to get the job done. I noticed that the phone&#8217;s OS would let me send calendar <strong>appointments</strong>, <strong>tasks</strong> and <strong>notes</strong> as a text message. So, all I had to do was to save the contents of the text file as one of the aforementioned types of data on the phone.</p>
<p>Although, gnokii and gammu support management of those data types, I did not even try to use either of them.</p>
<p>Instead, I <strong>created a task</strong> in <a href="http://www.gnome.org/projects/evolution/">Evolution</a>, <strong>pasted</strong> the text file contents in the <strong>task descrtiption field</strong> and then used <a href="http://www.opensync.org/">multisync</a> (at least this works) in order to <strong>transfer</strong> the task to the phone. Finally, I sent the task as a text message from the phone&#8217;s interface.</p>
<p>I wonder who will give me my wasted time back&#8230;</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/07/28/send-a-text-file-as-sms-with-a-sony-ericsson-mobile/">Send a text file as SMS with a Sony-Ericsson mobile</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/" rel="bookmark">Sony Ericsson K320i &#8211; Advanced Feature List</a></li>
<li><a href="http://www.g-loaded.eu/2005/10/01/another-way-to-create-a-text-file/" rel="bookmark">Another way to create a text file</a></li>
<li><a href="http://www.g-loaded.eu/2007/08/06/file-and-directory-diff-in-color-in-midnight-commander/" rel="bookmark">File and Directory diff in color in Midnight Commander</a></li>
<li><a href="http://www.g-loaded.eu/2006/09/10/spec-file-directory/" rel="bookmark">SPEC File Directory</a></li>
<li><a href="http://www.g-loaded.eu/2008/02/25/size-text-with-em-in-your-css-explained-with-example/" rel="bookmark">Size text with em in your CSS &#8211; Explained with example</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/07/28/send-a-text-file-as-sms-with-a-sony-ericsson-mobile/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Hard disk upgrade on an old motherboard</title>
		<link>http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/</link>
		<comments>http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 20:51:28 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Resolved]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/</guid>
		<description><![CDATA[Hardware either works or does not work. Two pieces of hardware are either compatible or icompatible. This is the rule. However, when the incompatibility-gap between the two pieces of hardware is small, there is almost always a way to make these two pieces work together as if they were fully compatible. This generally involves the [...]]]></description>
			<content:encoded><![CDATA[<p>Hardware either works or does not work. Two pieces of hardware are either compatible or icompatible. This is the rule. However, when the <em>incompatibility-gap</em> between the two pieces of hardware is small, there is almost always a way to make these two pieces work together as if they were fully compatible. This generally involves the use of one of the various types of adapters or converters. But, it may happen that the adapter is not 100% compatible with the rest of the hardware! So, what comes next in such cases? An adapter for the adapter maybe? Fortunately, in my case it was a small piece of software that came to the rescue and saved my day.<br />
<span id="more-428"></span></p>
<h4>The issue</h4>
<p>Last weekend, I decided to replace the two 10-year-old <strong>Quantum</strong> hard disks, which have heroicly powered my home server for the last years, with a newer <strong>Serial ATA</strong> hard drive. The goal was to buy more drives and build a <strong>RAID 5</strong> environment, if all went well with the first HDD. The motherboard is an old QDI Brilliant 1s (440BX chipset) board using the &#8220;<em>latest</em>&#8221; beta BIOS. Serial ATA controllers are not on this mobo&#8217;s feature list, so I bought a Serial ATA controller <strong>PCI</strong> card &#8211; Sunix SATA2100 &#8211; together with the drive. I should mention that I bought both items from a local retailer. The controller&#8217;s package had a <strong>penguin</strong> on it, so I thought that the linux kernel would have no problems working with the controller&#8217;s chipset. I was badly misled! The card&#8217;s chipset, <code>INITIO INI1622</code>, is not supported by the kernel.</p>
<p>So, I had that card replaced for another SATA controller from eQuip. I don&#8217;t really remember the model, as I returned this card as quickly as possible, because it was not compatible with the motherboard&#8217;s <strong>PCI specification</strong> and the pc froze while on the &#8220;<code>Verifying DMI pool data...</code>&#8221; boot stage. Apart from that, the card&#8217;s chipset (by <code>Silicon Image</code>) was recognized properly by the linux kernel &#8211; I had it checked on another machine.</p>
<p>So, I had to return that card too. The retailer did not sell any other brands, but would not refund me either! So, I decided to buy an <strong>IDE ATA 133 controller</strong> instead. This was a Sunix card, but there was no clear information on the box about which model was inside. On the back, there were two small pictures of the 4700 (yellow board &#8211;  <code>iTE 8212F</code> chipset) and the 3710 (green board &#8211; <code>sil0680</code> chipset) models. On the front, there was a big picture of the 4700 model. Anyone who would have seen the box would bet that the included card was the 4700. But to my surprise, the card that was inside the box was neither 4700 nor 3710, but the 3700 model which carried the <code>sil0680</code> chipset. This was a dissapointment as the 4700&#8242;s <code>iTE</code> chipset is better, but the important thing for me at that moment was that the card was working correctly under Linux. After this incident with the card&#8217;s package, I guess the best practice before buying a product from Sunix is to verify the package contents before you give away your money. Apart from the misleading box, I&#8217;d say that the card is of good quality and that it will definitely work with your old motherboards.</p>
<p>Although I had decided to settle with the IDE ATA 133 controller and use it with a Western Digital ATA 133 compatible HDD on the old machine, I still had the SATA hard disk from my initial purchase. I decided to use that disk on another pc, but still needed a PCI SATA controller. Fortunately, the second PC&#8217;s motherboard was not that old, so the only problem I had to face was if the controller&#8217;s chipset was supported by the Linux kernel. Of course, I wouldn&#8217;t buy such a card from the initial retailer again, so I went to a Media Market store and purchased a CN-033 SATA 2-port PCI card by Sitecom (chipset by Silicon Image &#8211; too lazy to check its exact model right now). It works flawlessly with the Linux kernel and the overall quality of the card and of the included cables was by far better than the quality of the cards by Sunix or eQuip. Of course I tried this card on the old motherboard too, but it would not go past the &#8220;Verifying DMI pool data &#8230;&#8221; stage either.</p>
<h4>Hardcore Games with Hardware</h4>
<p>So, the IDE ATA 133 PCI Controller from Sunix was supported by the kernel and everything seemed all right, but there were still some serious incompatibility issues with the QDI BX440 motherboard that needed to be addressed before I would be able to install Fedora 7 on the new hard disk. In short:</p>
<ol>
<li>The QDI motherboard could not boot from any hard disk connected on the <strong>PCI</strong> controller.</li>
<li>It was required that a hard disk was connected to the <strong>onboard</strong> IDE channel, otherwise the pc froze at the f&#8217;n &#8220;<code>Verifying DMI pool data ...</code>&#8221; stage, like it happened with the other cards.</li>
<li>Even if there was a hard disk connected to the onboard IDE controller, the motherboard could not boot from the CD-ROM drive if another hard disk was connected to the PCI IDE controller.</li>
<li>The hard disk which I intended to use on that machine would not work if it was connected to the onboard IDE controllers. It seems that the ATA 133 HDD had difficulties working on an old ATA 33-only channel.</li>
</ol>
<p>Under such complicated conditions, the only way to install a Linux distribution on a hard disk of newer technology than my old Quantums, was to:</p>
<ol>
<li>Disconnect the Western Digital hard disk from the PCI controller and leave an old Quantum HDD on the onboard IDE channel.</li>
<li>Adjust the boot device sequence, so that the mobo boots from the CDROM device.</li>
<li>Install Linux on the old HDD.</li>
<li>Power-off and connect the newer HDD on the PCI controller.</li>
<li>Move the Linux installation from the old HDD to the new one.</li>
</ol>
<p>The move of the Linux installation would be possible by following the steps of a tutorial like the &#8220;<a href="http://tldp.org/HOWTO/Hard-Disk-Upgrade/">Hard-Disk Upgrade HOWTO</a>&#8220;, if old-school partitions were used, or, in the case of LVM partitions, the move could be easily performed with the following procedure:</p>
<ol>
<li>Having connected the new HDD, I would initialize the free space as a physical volume, so it could be used in an LVM setup.</li>
<li>Then I&#8217;d add this new physical volume to the existing Volume Group, eg: vgextend volume_group /dev/sdb</li>
<li>Finally, I would use the <strong>pvmove</strong> utility in order to move the data from the old physical volume (on the Quantum HDD) to the new physical volume (WD HDD), eg: <code>pvmove sda sdb</code></li>
</ol>
<p>One may think of other ways too, but these will do. For those of you who do not feel very comfortable with moving your installation around, read on&#8230;</p>
<h4>Smart Boot Manager</h4>
<p>One may wonder why I didn&#8217;t use <a href="http://sourceforge.net/projects/btmgr/">Smart Boot Manager</a>, which can boot the machine from any connected device, instead of doing all of this monkey stuff.</p>
<p>The reason is simple. The smart-boot-manager image, which is available from the project&#8217;s website, does not work for me. I tried to boot that image in <strong>qemu</strong> without success. On the other hand, smart-boot-manager images are all over the web, but&#8230; would you ever write an image, which has been downloaded from <em>Mr.Unknown</em>&#8216;s home page, to your server&#8217;s hard disk Master Boot Record? I would <strong>never</strong> do that, even if I had to do twice as much monkey stuff as I have described above!</p>
<p>Fortunately, I soon found out that a smart-boot-manager image is included in a source that I can <strong>fully trust</strong>; in the <a href="http://www.ubuntu.com/">Ubuntu</a> ISO image, under the <code>install</code> directory, you will find: <code>sbm.bin</code></p>
<p>This worked <strong>OK</strong> under QEMU:</p>
<pre class="console"># qemu -m 64 sbm.bin</pre>
<p>So, after all this, here is what I did in order to install Fedora 7 directly on the new hard disk, which was connected to the PCI IDE controller.</p>
<ol>
<li>First, I removed the HDD from the PCI controller and left only the HDD on the onboard IDE controller.</li>
<li>I set the boot sequence so that it boots from the cdrom.</li>
<li>I used the Ubuntu CD in order to get to a console.</li>
<li>I wrote the smart boot manager image to the Quantum hard-disk with: dd if=sbm.bin of=/dev/hda</li>
<li>Powered-off the system and connected the new HDD to the PCI controller.</li>
<li>I adjusted the boot sequence so to boot from the HDD on the onboard controller.</li>
<li>Put the Fedora Rescue CD in the CDROM drive.</li>
<li>Reboot the machine. At the Smart-Boot-Manager menu, I selected the CDROM option.</li>
<li>IU performed a network installation and used 100MB of the HDD on the onboard controller for the <code>/boot</code> partition and the new disk for the rest of the system partitions using <strong>LVM</strong>.</li>
</ol>
<p>Hardware manufacturers have managed to transform me to a monkey for a couple of days. I have wasted time and money and I still cannot decide about who I am supposed to blame for this mess.</p>
<p>PS: It seems that the good old Quantum HDDs will stay on duty ;)</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/">Hard disk upgrade on an old motherboard</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2009/01/04/always-use-a-block-device-label-or-its-uuid-in-fstab/" rel="bookmark">Always use a block device label or its UUID in fstab</a></li>
<li><a href="http://www.g-loaded.eu/2007/05/11/smart-bookmarks-in-epiphany/" rel="bookmark">Smart Bookmarks in Epiphany</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/16/the-worst-thing/" rel="bookmark">The worst thing&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/18/udev/" rel="bookmark">UDEV</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/30/change-the-console-resolution/" rel="bookmark">Change the console resolution</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/07/25/hard-disk-upgrade-on-an-old-motherboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>A CSS trap for comment spambots</title>
		<link>http://www.g-loaded.eu/2007/07/10/a-css-trap-for-comment-spambots/</link>
		<comments>http://www.g-loaded.eu/2007/07/10/a-css-trap-for-comment-spambots/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 13:05:07 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/07/10/a-css-trap-for-comment-spambots/</guid>
		<description><![CDATA[Kudos to the person who thought about this! This article describes how you can prevent comment spam with CSS. I am not sure how well this performs, but it sure looks like a decent solution. I would like to test if it would perform better than my trick of dynamically changing the form field names [...]]]></description>
			<content:encoded><![CDATA[<p>Kudos to the person who thought about this! This <a href="http://www.modernbluedesign.com/web-design-blog/fighting-spam-with-css/">article</a> describes how you can prevent comment spam with CSS. I am not sure how well this performs, but it sure looks like a decent solution. I would like to test if it would perform better than my trick of dynamically changing the form field names with Javascript, which I use in the <a href="http://www.g-loaded.eu/2006/04/02/comment-policy-wordpress-plugin/">comment-policy</a> plugin for WordPress, but I guess I&#8217;ll leave this for some other time, as I currently try to move as far away from WordPress comments and trackbacks as possible.</p>
<p>From the article:</p>
<blockquote><p>
It can be very frustrating when you have a form on your site which has a good and useful purpose, but almost becomes obsolete because of relentless spamming. I had this problem a few months ago with my old site, and was thus forced to find a solution that was light-weight, easy to implement, and most importantly was effective. I decided to turn toward my friend CSS to help me out.
</p></blockquote>
<p>An example can be found <a href="http://www.modernbluedesign.com/web-design-blog/case-studies/css-spam-fighter/">here</a>.</p>
<p>Keep in mind that implementations like the ones mentioned above cannot stop trackback/pingback spam.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/07/10/a-css-trap-for-comment-spambots/">A CSS trap for comment spambots</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2007/02/08/evil-fighting-wordpress-plugins/" rel="bookmark">Evil-Fighting WordPress Plugins</a></li>
<li><a href="http://www.g-loaded.eu/2006/04/02/comment-policy-wordpress-plugin/" rel="bookmark">Comment-Policy WordPress Plugin</a></li>
<li><a href="http://www.g-loaded.eu/2006/10/07/comment-policy-wp-plugin-updated-to-v03/" rel="bookmark">Comment-Policy WP plugin updated to v0.3</a></li>
<li><a href="http://www.g-loaded.eu/2007/04/25/bbpress-for-wordpress/" rel="bookmark">bbPress for WordPress</a></li>
<li><a href="http://www.g-loaded.eu/2006/05/05/modifying-your-name-in-the-wordpress-comments/" rel="bookmark">Modifying Your Name In The WordPress Comments</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/07/10/a-css-trap-for-comment-spambots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Watch Videos in ASCII Art</title>
		<link>http://www.g-loaded.eu/2007/07/01/watch-videos-in-ascii-art/</link>
		<comments>http://www.g-loaded.eu/2007/07/01/watch-videos-in-ascii-art/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 22:09:08 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/07/01/watch-videos-in-ascii-art/</guid>
		<description><![CDATA[This is an interesting article by O&#8217;Reilly Hacks, which provides tips on how to watch a video stream in ASCII art. From the article: Good ASCII art can take time and talent to look just right, but you can skip through that effort with AAlib, a library devoted to converting any image into an ASCII [...]]]></description>
			<content:encoded><![CDATA[<p>This is an interesting article by O&#8217;Reilly Hacks, which provides tips on how to watch a video stream in <a href="http://en.wikipedia.org/wiki/ASCII_art">ASCII art</a>. From the article:</p>
<blockquote><p>
Good ASCII art can take time and talent to look just right, but you can skip through that effort with AAlib, a library devoted to converting any image into an ASCII art equivalent. Since a movie is basically a system of moving images, MPlayer has added support for AAlib as a video output option. This means that each frame in the movie is converted to an ASCII equivalent and displayed on the screen.</p></blockquote>
<p>Software that is used to accomplish the task includes <a href="http://www.mplayerhq.hu/">MPlayer</a> multimedia player built with support for the <a href="http://aa-project.sourceforge.net/aalib/">ASCII art library</a> (<code>aalib</code>) and the <a href="http://libcaca.zoy.org/">color ASCII art library</a> (<code>libcaca</code>).</p>
<p><a href="http://www.oreilly.com/pub/h/4441">Read the full article here</a></p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/07/01/watch-videos-in-ascii-art/">Watch Videos in ASCII Art</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2007/02/24/creative-commons-v30-licenses-launched/" rel="bookmark">Creative Commons v3.0 Licenses Launched</a></li>
<li><a href="http://www.g-loaded.eu/2006/10/05/training-videos/" rel="bookmark">Training Videos</a></li>
<li><a href="http://www.g-loaded.eu/2006/11/30/50-monitor-display/" rel="bookmark">50-Monitor Display</a></li>
<li><a href="http://www.g-loaded.eu/2006/05/02/tv-grabbing-on-a-pentium-3/" rel="bookmark">TV Grabbing On A Pentium 3</a></li>
<li><a href="http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/" rel="bookmark">Screenshot of a menu under GNOME: ROUND 2</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/07/01/watch-videos-in-ascii-art/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Blanking a rewritable CD/DVD in GNOME</title>
		<link>http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/</link>
		<comments>http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/#comments</comments>
		<pubDate>Tue, 15 May 2007 14:02:07 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Resolved]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/</guid>
		<description><![CDATA[Chances are that your removable media preferences in GNOME are set in a way so that CDs get mounted automatically. There is a usability bug that comes into play whenever you try to blank an already written rewritable CD or DVD with Gnomebaker or directly with the command-line tool (cdrecord). An error message that the [...]]]></description>
			<content:encoded><![CDATA[<p>Chances are that your removable media preferences in GNOME are set in a way so that CDs get mounted automatically. There is a usability bug that comes into play whenever you try to blank an already written rewritable CD or DVD with <strong>Gnomebaker</strong> or directly with the command-line tool (<strong>cdrecord</strong>). An error message that the volume is already mounted is displayed and the operation cannot continue. Unmounting the volume <strong>as a user</strong> is not possible because, nowadays, <code>/etc/fstab</code> does not contain any entries about the mounted CDs/DVDs like it used to.<br />
<span id="more-399"></span><br />
So, in order to blank that rewritable CD, you have to do <strong>one of the following</strong>:</p>
<p><strong>-1-</strong> Eject the medium, set your &#8220;<em>removable media preferences</em>&#8221; in a way so that CDs do not get mounted automatically, and then load the medium into the drive again and continue on with blanking it.</p>
<p><strong>-2-</strong> Use <strong>su</strong> or <strong>sudo</strong> to unmount the medium. Although this is the most common solution to such issues, I think that root access should not be required in order to accomplish everyday tasks of such simplicity.</p>
<p><strong>-3-</strong> The third way involves using the utility <strong>gnome-mount</strong>. I found out about this today, while, from the nautilus interface, I was unable to directly unmount the volume <strong>as a user</strong> without ejecting it. The syntax is very simple. Assuming that <code>/dev/hdc</code> is your writer, then issue the following command as a user:</p>
<pre class="console">$ gnome-mount --unmount -d /dev/hdc</pre>
<p>The volume gets unmounted, but the CD still remains loaded into the drive. If there is another way to perform this task through a graphical interface, I&#8217;d appreciate it if you dropped me a line.</p>
<p><strong>-4-</strong> Yes, there is always an extra option :) Use <a href="http://perso.orange.fr/bonfire/">brasero</a> (ex bonfire). This is yet another desktop CD/DVD burning application, but it is smart enough to unmount the written rewritable medium before trying to blank it! And it is good when applications are a bit smart ;)</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/">Blanking a rewritable CD/DVD in GNOME</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2005/11/10/packet-writing-on-cdrw-and-dvdrw-media/" rel="bookmark">Packet Writing on CDRW and DVDRW media</a></li>
<li><a href="http://www.g-loaded.eu/2008/12/08/creative-pc-cam-750-on-fedora-10/" rel="bookmark">Creative PC-CAM 750 on Fedora 10</a></li>
<li><a href="http://www.g-loaded.eu/2006/10/06/turning-off-window-animations-in-gnome/" rel="bookmark">Turning off window animations in GNOME</a></li>
<li><a href="http://www.g-loaded.eu/2005/09/09/gnome-212-is-out-but/" rel="bookmark">GNOME 2.12 is out, but&#8230;</a></li>
<li><a href="http://www.g-loaded.eu/2007/03/15/screenshot-of-a-menu-under-gnome-round-2/" rel="bookmark">Screenshot of a menu under GNOME: ROUND 2</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/05/15/blanking-a-rewritable-cddvd-in-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Sony Ericsson K320i &#8211; Advanced Feature List</title>
		<link>http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/</link>
		<comments>http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/#comments</comments>
		<pubDate>Fri, 11 May 2007 18:11:54 +0000</pubDate>
		<dc:creator>George Notaras</dc:creator>
				<category><![CDATA[Mobiles]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[K320i]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/</guid>
		<description><![CDATA[Mobile phones have never been one of my interests, but lately I decided to spend some more time exploring their capabilities. This includes phone maintenance, data management, data synchronization, networking etc. I do not own any expensive cellular phones (this is a matter of principal). Currently, I use an old Siemens S45 and a Sony-Ericsson [...]]]></description>
			<content:encoded><![CDATA[<p>Mobile phones have never been one of my interests, but lately I decided to spend some more time exploring their capabilities. This includes phone maintenance, data management, data synchronization, networking etc. I do not own any expensive cellular phones (this is a matter of principal). Currently, I use an old Siemens S45 and a Sony-Ericsson K320i. The S45 is not being manufactured any more and the K320 is a rather cheap one, but as you will notice, it has all the necessary features to keep me busy. This post, although it outlines the K320i advanced features, it also shows how to retrieve such information from your phone.<br />
<span id="more-392"></span><br />
I won&#8217;t go into much detail about the features of the Siemens S45. It&#8217;s an old phone with limited capabilities. What worths mentioning is that the phone&#8217;s flash memory can be mounted by using the <a href="http://chaos.allsiemens.com/siefs/">SieFS</a> filesystem, which is a filesystem in userspace (works through <a href="http://fuse.sourceforge.net/">FUSE</a>).</p>
<h4>The K320i Features</h4>
<p>For the regular feature listing, please visit the manufacturer&#8217;s website.</p>
<p>What I will describe here is how to get a list of the phone capabilities that are available over the USB and the Bluetooth interfaces under the Linux operating system.</p>
<p><strong>This post is being written in a very fast pace. I&#8217;ll add much more detail when I have enough free time.</strong></p>
<h4>Preparation</h4>
<ol>
<li>Connect the phone to the computer using the USB cable.</li>
<li>Connect a Bluetooth USB dongle that works with your distro to your computer.</li>
<li>Turn on Bluetooth on the phone.</li>
</ol>
<h4>Over the USB Interface</h4>
<p>Once the phone has been connected to the computer with the USB cable, two device nodes, <code>/dev/ttyACM0</code> and <code>/dev/ttyACM1</code>, should be created. Unless you have adjusted the permissions on these devices so you can manage them from a regular user account, use root to browse the phone capabilities over the USB interface:</p>
<pre class="console">
# obexftp -t /dev/ttyACM0 -X
</pre>
<pre class="codesnp">
Connecting...failed: connect
Still trying to connect
Connecting...done
Receiving "(null)"...&lt; ?xml version="1.0" encoding="UTF-8"?&gt;
&lt; !DOCTYPE Capability SYSTEM "obex-capability.dtd"&gt;
&lt;!--
 XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB
--&gt;
&lt;capability Version="1.0"&gt;&lt;general&gt;&lt;manufacturer&gt;Sony Ericsson&lt;/manufacturer&gt;
&lt;model&gt;K320i&lt;/model&gt;
&lt;sn&gt;XXXXXXXXXXXXXXXXXX&lt;/sn&gt;
&lt;sw Version="XXXXXXXXXXXXXXX" Date="XXXXXXXXXXXX"/&gt;
&lt;language&gt;EN&lt;/language&gt;
&lt;memory&gt;&lt;memtype&gt;DEV&lt;/memtype&gt;
&lt;location&gt;/&lt;/location&gt;
&lt;/memory&gt;
&lt;/general&gt;
&lt;service&gt;&lt;name&gt;Folder-Browsing&lt;/name&gt;
&lt;uuid&gt;XXXXXXXX-XXXXXX-XXXX-XXXXX-XXXXXXXXXXXX&lt;/uuid&gt;
&lt;version&gt;1.0&lt;/version&gt;
&lt;object&gt;&lt;type&gt;x-obex/folder-listing&lt;/type&gt;
&lt;/object&gt;
&lt;ext&gt;&lt;xnam&gt;Pictures&lt;/xnam&gt;
&lt;xval&gt;Folder=/Pictures&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Camera Pictures&lt;/xnam&gt;
&lt;xval&gt;Folder=/Picturesimage/camera_semc/100MSDCF&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Videos&lt;/xnam&gt;
&lt;xval&gt;Folder=/Videos&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Cam. Video Clips&lt;/xnam&gt;
&lt;xval&gt;Folder=/Videos/camera&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Sounds&lt;/xnam&gt;
&lt;xval&gt;Folder=/Sounds&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Ringtones&lt;/xnam&gt;
&lt;xval&gt;Folder=/Sounds/ringtones&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;VideoDJ&lt;/xnam&gt;
&lt;xval&gt;Folder=/Sounds/videodj&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Themes&lt;/xnam&gt;
&lt;xval&gt;Folder=/Themes&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;ext&gt;&lt;xnam&gt;Others&lt;/xnam&gt;
&lt;xval&gt;Folder=/Other&lt;/xval&gt;
&lt;xval&gt;MemType=DEV&lt;/xval&gt;
&lt;/ext&gt;
&lt;/service&gt;
&lt;/capability&gt;
done
Disconnecting...done
</pre>
<p>The phone&#8217;s serial number and some other info has been replaced by Xs.</p>
<p>As you can clearly see, there is nothing to get excited about over the USB interface. It seems that by using the openobex utilities over the USB interface all I can do is transfer files etc.</p>
<h4>Over the Bluetooth Interface</h4>
<p>Here you will use two utilities, <strong>hcitool</strong> and <strong>sdptool</strong>. Both are part of the <strong>bluez-utils</strong> package in Fedora.</p>
<p>First, scan for your device, so to get its hardware address (replaced by Xs here):</p>
<pre class="console">
# hcitool scan
Scanning ...
        XX:XX:XX:XX:XX:XX       GNOT
</pre>
<p>Then browse the available phone services that are available over the bluetooth interface:</p>
<pre class="console">
# sdptool browse XX:XX:XX:XX:XX:XX
</pre>
<pre class="codesnp">
Browsing XX:XX:XX:XX:XX:XX ...
Service Description: Sony Ericsson K320
Service RecHandle: 0x10000
Service Class ID List:
  "PnP Information" (0x1200)

Service Name: Dial-up Networking
Service RecHandle: 0x10001
Service Class ID List:
  "Dialup Networking" (0x1103)
  "Generic Networking" (0x1201)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100

Service Name: Serial Port
Service RecHandle: 0x10002
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2

Service Name: HF Voice Gateway
Service RecHandle: 0x10003
Service Class ID List:
  "Handfree Audio Gateway" (0x111f)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 3
Profile Descriptor List:
  "Handsfree" (0x111e)
    Version: 0x0101

Service Name: HS Voice Gateway
Service RecHandle: 0x10004
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 4
Profile Descriptor List:
  "Headset" (0x1108)
    Version: 0x0100

Service Name: OBEX Object Push
Service RecHandle: 0x10005
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 5
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100

Service Name: OBEX File Transfer
Service RecHandle: 0x10006
Service Class ID List:
  "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 6
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX File Transfer" (0x1106)
    Version: 0x0100

Service Name: OBEX SyncML Client
Service RecHandle: 0x10007
Service Class ID List:
  UUID 128: XXXXXXXx-xXXXXXXXXXXXXXX-XXXXXXX-XXXXXXx
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 7
  "OBEX" (0x0008)

Service Name: OBEX IrMC Sync Server
Service RecHandle: 0x10008
Service Class ID List:
  "IrMC Sync" (0x1104)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 8
  "OBEX" (0x0008)
Profile Descriptor List:
  "IrMC Sync" (0x1104)
    Version: 0x0100

Service Name: NAP service
Service Description: NAP description
Service RecHandle: 0x10009
Service Class ID List:
  "Network Access Point" (0x1116)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 15
  "BNEP" (0x000f)
    Version: 0x0100
    SEQ8: 0 6 dd
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Network Access Point" (0x1116)
    Version: 0x0100

Service Name: Mouse &#038; Keyboard
Service Description: Remote Control
Service Provider: Sony Ericsson
Service RecHandle: 0x1000a
Service Class ID List:
  "Human Interface Device" (0x1124)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 17
  "HIDP" (0x0011)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Human Interface Device" (0x1124)
    Version: 0x0100
</pre>
<p>Please note, that it is still possible to retrieve this list by using obexftp:</p>
<pre class="console"># obexftp -b XX:XX:XX:XX:XX:XX -X</pre>
<p>But, I prefer <code>sdptool</code>&#8216;s output.</p>
<p>Now this is becoming interesting! As you can see, over the BT interface the phone can be used as a modem, one can connect to its serial interface and execute AT commands, transfer files to and from the phone, synchronize the data with the data on the computer (IrMC and SyncML), it can act as a Network Access Point (NAP) or can be used as remote control.</p>
<p>Actually, what I did not manage to do is to establish a working network connection between the mobile phone and the computer (over the BNEP interface). All other things seem to work fine.</p>
<p>I&#8217;ll publish separate articles about how to accomplish all these tasks and I&#8217;ll also look for any info about how to create a Personal Area Network (PAN) between the phone and the computer. What seems to be the problem is how to trigger the phone so that it gets an IP address from the LAN&#8217;s DHCP server. Anyway, I don&#8217;t have enough time for this right now, but it is in my TODO list.</p>
<div class="cc-block"><em><a href="http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/">Sony Ericsson K320i &#8211; Advanced Feature List</a></em>, unless otherwise expressly stated, is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>. Terms and conditions beyond the scope of this license may be available at <a href="http://www.g-loaded.eu/about/disclaimer-and-license/">www.g-loaded.eu</a>.</div>


<h4>Related Articles</h4>

<ul><li><a href="http://www.g-loaded.eu/2007/07/28/send-a-text-file-as-sms-with-a-sony-ericsson-mobile/" rel="bookmark">Send a text file as SMS with a Sony-Ericsson mobile</a></li>
<li><a href="http://www.g-loaded.eu/2007/08/20/mailing-list-manager/" rel="bookmark">Mailing List Manager</a></li>
<li><a href="http://www.g-loaded.eu/2005/11/10/add-files-to-totem-playing-list-from-nautilus/" rel="bookmark">Add files to Totem playing list from Nautilus</a></li>
<li><a href="http://www.g-loaded.eu/2009/05/07/drupal-tip-list-a-nodes-taxonomy-terms-inside-a-block/" rel="bookmark">Drupal Tip: List a node&#8217;s taxonomy terms inside a Block</a></li>
<li><a href="http://www.g-loaded.eu/2007/03/05/organizing-mailing-list-messages-with-evolution/" rel="bookmark">Organizing Mailing List messages with Evolution</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.g-loaded.eu/2007/05/11/sony-ericsson-k320i-advanced-feature-list/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>
