Sunday, November 29, 2009

Switching to Opensuse



1 upgrade of OpenSuse 11.1 and 2 installations of 11.2


In the last 3.5 years I used Gentoo Linux as the operating system of choice for my personal computer. Apart from Gentoo, I had also done and maintained an ubuntu installation, for use in another personal computer. Eventualy, I got tired of gentoo compilations, and ubuntu sadly collapsed under its own weight. Time to try something new, I say...

In June 2009 (five months ago), I installed OpenSuse 11.1 on a HP EliteBook 8730w. The installation was smooth even though I diverted from default options and

  1. installed from an external CD drive,
  2. installed on two disks, one for the OS and one for home, swap and tmp
  3. the home, swap and tmp partitions were encrypted.
When OpenSuse 11.2 was released this November, I upgraded the 11.1 installation, by using the upgrade instructions from the openSuse wiki. The upgrade was a success, with nothing breaking along the process.

At the beginning of November, I installed OpenSuse 11.2 RC1 on a Fujitsu Siemens Amilo V2020 Pro. This time I stayed with default options in all of the installation steps. Again everything went smoothly, all hardware was detected (I havent tried the modem though) and I had a running system in little time. When 11.2 was released, I updated. No problems here either.

In the last week of November I installed OpenSuse 11.2 on an Acer Asprire1 654ZWLMi. The installation steps went smoothly. However, when the time for the first boot came, where the installation's configuration takes place, the X server failed to start. The cause was the ATI graphics card. I quickly found others with this problem in the OpenSuse forum, in this thread: OpenSuse 11.2 Black Screen. A combination of the suggestions on the thread solved the problem for me. The XServer was "hot-wired" to work with the ATI card and driver: "sax2 -r -m 0=ati". The installation continued from were it left over, without any other shortcomings.

It seems that OpenSuse 11.2 installs quite well on a variety of configurations.

OpenSuse also performs very well for my needs. It offers good administration tools (zypper, YAST) and quality technical information on the wiki and the forums. Still though I consider technical articles in the Gentto wikis and forums superior.

Saturday, October 03, 2009

Contact info on a QR Code

Bar codes containing any kind of information seem to pop up everywhere these days. They get a big boost from mobile devices which support bar code scanner applications like zxing. The format most commonly used is QR Code.

The future of this idea seems promising (quoting):

For example, Wikipedia displays their QR code on the Wikipedia site. I could also see QR codes as a potential business card replacement. You are at a business meeting, you whip out your mobile and the other party does as well. You "scan" her barcode displayed on the mobile and now you have all of her contact information and not only is it stored in your mobile, but it’s now on your desktop in your contact manager. Imagine the possibilities for dating!
 A QR Code containing my personal mail address and this blog's URL appear on the sidebar. Also, I have created different versions containing my business contact information. To generate the images I used the QR Code Generator from the ZXing Project.

Saturday, August 22, 2009

Creating a shared library on various platforms

When applications get bigger and code needs to be shared among different applications, then shared libraries sound like a great idea. To get this done, a multi platform compilation sprint race begins.

Shared libraries are libraries that are loaded by programs when they start. When a shared library is installed properly, all programs that start afterwards automatically use the new shared library. It's actually much more flexible and sophisticated than this, because ... [read more]
The library had to be compiled for Linux, Windows, Mac OS X, AIX, HP-UX, Sun OS and Solaris. Internet search engines along with compiler man pages are the best tools for the job. By looking around, I found the following links useful:

Linux:
AIX:
Mac OS X:
Sun OS, Solaris
HP-UX:
Creation of the shared lib was done for a mid-sized project. The library's build process was based on gmake for Unix and gmake and nmake on Windows. The main application's build system also needed adjustments to use the new library. This is also described in the links above.

Saturday, August 01, 2009

30 days with HTC magic: apps I installed

Its been 30 days with HTC magic. I have installed the following apps, all from the Market:

  • AK Notepad
  • AndNav2
  • Any Cut
  • Astrid Task/Todo list
  • Barcode Scanner
  • CompareEverywhere
  • Compass
  • Connectot
  • File Browser
  • GPS Status
  • Greek Input Method
  • My Maps Editor
  • My Tracks
  • Netcounter
  • Places Directory
  • Shazam
  • Text-To-Speech Library - needed by AndNav2
  • Voice Recorder

Saturday, July 25, 2009

EliteBook 8730w - OpenSuse 11.1 - Multimedia keys

To have the volume multimedia keys to work on OpenSuse 11.1 and the elitebook 8730w, you will need to configure the keys with xmodmap:

put in ~/.Xmodpap:

keycode 176=XF86AudioRaiseVolume
keycode 174=XF86AudioLowerVolume
put in .kde4/Autostart/Xmodmap-autoload:
#!/bin/sh
xmodmap ~/.Xmodmap
issue:
chmod +x .kde4/Autostart/Xmodmap-autoload
You may need to check the location of your KDE Autostart directory. This can be found in System Setttings>Personal>About me.

Sunday, July 19, 2009

femio - A python reader for Finite Element Models

femio is an application that allows you to read a Finite Element Model in one of the supported formats and provide tools and functions on the model's contents. Also, it provides the required functionality to allow the user to create tools and manipulate data. Such tools are: model statistics, model image view (screen shot), keyword removal or substitution, etc.

You can see the projects home page here: femio

Femio is based on an older project of mine: abq2img. Recently, I had the need of converting an ABAQUS input model containing *PARAMETER keywords. I used the abq2img codebase and with minimal work, I was able to achieve my goal. Based on that success, I decided to revive the project and extend its functionality and capabilities to over FEM formats.

Its main advantage is that it provides the low level parsing for FE models. This allows the user to manipulate model data while not having to parse the file and provide support for keywords. Thus creating model previews in PNG format is quite easy:


Sunday, May 24, 2009

(wireless) Kodak picture frame w820 and Linux.


2 days ago I bought a KODAK EASYSHARE W820 Wireless Digital Frame. I intended of using it to stream media from my Linux computer, preferably using its wireless capabilities. The disappointing thing is that the manufacturer only provides software for Windows.

Connection to the internet is quite easy and straight forward. Just follow the instructions in the documentation. When connected, the frame automatically checks for firmware updates and prompts to install them. I upgraded smoothly, and all of my following impressions are based on the latest firmware available: 2008.10.28.

So, I am going through the process of finding the frame's capability to interact with Linux. It seems that three methods are available: USB connectivity, RSS feeds and UPnP support. Frame settings can be reached from the touch interface and through its web UI.

USB connectivity: The frame connects to the computer with a USB cable and is automatically identified as a flash drive. Normal file operations can be performed to transfer images and videos to the internal memory.

RSS feeds: The frame connects to various RSS feeds, most notably Flikr. It also has the capability of logging into a Flickr account. Also, custom URL feeds can be accessed. The configuration of the RSS connectivity is achieved through the frames web UI. You can find the frame's IP by accessing the frame's settings from its built in touch UI.

UPnP support: The frame has a UPnP client built in. However, this is not mentioned anywhere in the documentation that accompanies the product and few references exist in the Internet. I installed mediatomb, a UPnP server, on my laptop. Then through the Network Setting on the frame, connection to my laptop was enstablished and I could access my media, both images and video.

What I find missing from connectivity options it the ability to copy media files directly from the PC, through the wireless interface, to the frame's internal memory. Also, the possibility to change any of its settings through the web interface would be greatly desired.

Tuesday, April 28, 2009

Fake road sign advertisement

Creating fake road signs is fun and quite popular on the internet. I gave it a go and I found out it is not that difficult to create one using standard tools (ex. gimp). Here is the result of my first attempt:


An advertisement of papitsa's blog.

Saturday, April 18, 2009

Blogger Tag Cloud Widget

I wanted to have a Tab Cloud in my blog. However, blogger provides only the Label widget which gives only a list of the blog's labels.

I found this blog entry , which produced something very similar to what I wanted. I modified it so that:

  • it is more to my taste
  • allows for further development and easier modifications.

You can see the resulting Tag Cloud on this blog (collumn on the right) and also in http://www.papitsa.gr/

The installation instructions can be found in the original post.




<b:widget id='Label1' locked='false' title='Tags' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content' style='text-align: center;'>
<script type='text/javascript'>
/*
Simple Blogger Tag Cloud Widget
by Raymond May Jr.
http://www.compender.com
Released to the Public Domain
Modified by Michalis Giannakidis :
o) tune parameters to my likes
o) modifications to allow more flexibility in formatting of tags and
allow further development.
*/
//Variables:
var max = 130; //max css size (in percent)
var min = 70; //min css size (...)
var showCount = 1; // show counts? 1 for yes
var minCount = 1; // what is the minimum count for a Tag to be shown? 1 for all.

//Begin code:
var range = max - min;

function labelObj() {}

//Build label Array
var lb = new Array();

var most = 1;
<b:loop values='data:labels' var='label'>
var item = new labelObj();
item.label = (&quot;<data:label.name/>&quot;);
item.url = (&quot;<data:label.url/>&quot;);
item.count = (&quot;<data:label.count/>&quot;);
lb.push(item);

if ( most &lt; &quot;<data:label.count/>&quot; ) {
most = (&quot;<data:label.count/>&quot;);
}
</b:loop>


//Labels sort, ignore case
function sortLabels(a, b) {

aa = a.label.toLowerCase();
bb = b.label.toLowerCase();
if ( aa &lt; bb ) {
return -1;
} else if ( aa &gt; bb ) {
return 1;
} else {
return 0;
}
}
lb.sort(sortLabels);


//Begin HTML output
for (x in lb) {
if(x != &quot;peek&quot; &amp;&amp; x != &quot;forEach&quot;
&amp;&amp; lb[x].count &gt;= minCount){

//Calculate textSize
var textSize = min + Math.floor((lb[x].count/most) * range);
//Show counts?
if(showCount == 1) {
var count = &quot;(&quot; + lb[x].count + &quot;)&quot;;
}else{
var count = &quot;&quot;;
}
//Output
document.write(&quot;<span style='font-size:&quot; + textSize +
&quot;%'><a href='&quot; + lb[x].url + &quot;'>&quot; + lb[x].label +
count + &quot;</a></span> &quot; );
}

}
</script>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>

Thursday, March 05, 2009

Determining the age of a Linux installation.


Have you ever been curious of how old your current Linux installation is?

Three indirect ways of finding this out follow:

  1. Retrieve info from the filesystem (ext2-ext3 only).

    Provided your installation has an ext[23] filesystem,
    run as root:
    dumpe2fs -h <device> |grep "Filesystem created"
    Usually, at least the boot partition is of this type.

  2. Investigate the dates of files in the root directory.

    Run the command
    ls -lu /
    This will show you the access times of the contents of the root directory. In most cases directories like /bin should be unmodified since their creation during the system install process.

  3. Investigate system log files.

    All Linux systems keep log files. They place them in the same directory, usually in /var/log/. Pick a log, like syslog or wtmp, and look the first lines of the file. A date of the log entry will be available. Note though, that most distributions rotate and compress log files periodically. In this case, you need to look up this information in the oldest log archive. Also, old log archives may be automatically deleted, so finding the installation log messages is impossible in this case.
The age of my current Gentoo installation is 3 years 9 months:

dumpe2fs -h /dev/hda2|grep
"Filesystem created"
dumpe2fs 1.39 (29-May-2006)

Filesystem created: Thu Jun 9 16:09:37 2005