Wednesday, July 1, 2009

Mozilla Firefox 3.5 released

Yeah. You've heard it. The latest firefox has been released. It supports the new HTML elements such as audio and video tags. It also supports Ogg Vorbis and Ogg Theora natively and speed improvements. I haven't experience it myself though because I'm waiting for it to be in Mandriva Cooker's repositories and it will be there soon. You guys can download it from Mozilla's mirror if you don't want to wait.

Release notes can be read here.
Download latest firefox here.

Wednesday, June 24, 2009

Getting IP address from computer name using samba

If you know the name of a computer from your network and want to know the IP address of it using samba (if you're using Linux or UNIX-based OS), issue this command:

nmblookup -I computername

Have fun!

Wednesday, June 10, 2009

Permanently redirect your client to https using apache webserver

If your webserver has no problem with https service, this is a working solution that I found to permanently redirect your visitors (clients) to https port of your webserver. I found many solutions but this one worked for me as I tested it. Why permanent secure connection? This is really important for applications that need higher security to protect your data. For more info on this topic please google. :)

These 3 lines are needed to put in /etc/httpd/conf/httpd.conf :

RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

Where to put them? Search Directory directive in httpd.conf. Below is sample from httpd.conf
on Mandriva.


# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.

Options -Indexes FollowSymLinks MultiViews

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit Indexes

AllowOverride None

# Controls who can get stuff from this server.
Order allow,deny
Allow from all



After putting those 3 lines:


RewriteEngine On
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.

Options -Indexes FollowSymLinks MultiViews

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit Indexes

AllowOverride None

# Controls who can get stuff from this server.
Order allow,deny
Allow from all
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]



So now test it. Should be ok. If not, check the log and troubleshoot.

That's the whole ball of wax.

Thursday, May 28, 2009

Handling tif image produced by MS Office Document Scanning

I scanned a paper using MS Office Document Scanning (on Windows XP) and the output was a tiff image file. Using file command, I could see the file type as below:

image.tif: TIFF image data, little-endian

As usual, I wanted to open it with a image editing software like gimp or imagemagick or krita or even with document viewer like okular but to no avail. The error produced by GIMP was: unsupported layout, No RGBA loader. The error produced by Krita was: Cannot create storage. I tried convert a utility packaged with imagemagick to convert the image to jpg :

[zamri@triniton KINGSTON]# convert image.tif -quality 90 kpd.jpg

I got this error:
convert: image.tif: unknown field with tag 512 (0x200) encountered. `TIFFReadDirectory' @ tiff.c/TIFFWarnings/525.
convert: image.tif: unknown field with tag 513 (0x201) encountered. `TIFFReadDirectory' @ tiff.c/TIFFWarnings/525.
convert: image: unknown field with tag 514 (0x202) encountered. `TIFFReadDirectory' @ tiff.c/TIFFWarnings/525.
convert: image.tif: unknown field with tag 37677 (0x932d) encountered. `TIFFReadDirectory' @ tiff.c/TIFFWarnings/525.
convert: image.tif: unknown field with tag 37678 (0x932e) encountered. `TIFFReadDirectory' @ tiff.c/TIFFWarnings/525.
convert: image.tif: unknown field with tag 37680 (0x9330) encountered. `TIFFReadDirectory' @ tiff.c/TIFFWarnings/525.
convert: compression not supported `image.tif' @ tiff.c/ReadTIFFImage/811.
convert: missing an image filename `kpd.jpg' @ convert.c/ConvertImageCommand/2776.

So I searched the internet and I found the solution on this website. I installed foremost by issuing this command: urpmi foremost. Luckily Mandriva has this utility in its repositories. Then I issued this command:

foremost -i image.tif -o image

The first argument -i is the input file and second arg -o is for the dir where we want to extract the content of the image. It appeared that the tif file was compressed and contained many files including the jpg file that of interest to me. The output of above command was a directory (folder) named image. In the directory,I got:

audit.txt jpg/ ole/

In directory jpg, I got :

00000000.jpg 00000703.jpg

The file named 00000000.jpg was the image file type jpeg that can be opened with any image viewer. The other one was the thumbnail.

Friday, May 15, 2009

Mounting Mac OS X partition from Linux

My friend asked me to save his data on a Mac OS X partition since his machine couldn't boot properly into Mac OS X GUI mode. So I booted the machine with Ubuntu 5.04 Live CD. I know it was an old version but who cares as long as it supports hfsplus filesystem used by Mac OS X.

So I mounted one of the partitions where he saved his work with this:

sudo mount -t hfsplus /dev/hda5 /mnt (for Ubuntu)

(If you are using other distro and logged in as root, just omit the sudo from above command.)

where /dev/hda5 is the partition and /mnt is the mount point.

From now, insert usb drive and copy file to it. After this, he can wipe out all partitions and/or reinstall Mac OS X.

Thursday, May 14, 2009

KDE 4.3 Beta 1 released for testing

KDE.org announced the release of KDE 4.3 Beta 1 for testing. This is the first review of the 3rd iteration of KDE 4 desktop.

Some highlights of this beta release are:
1.Integration of PolicyKit and Geolocation services
2.More usable Run command pop-up (press alt+F2 to activate)
3. Many new and improved add-ons for plasma
4. Many bugfixes and improvements across all applications and more integration of features coming with the KDE 4 platform
5. New tree mode in System Settings

and many more. For a complete list of changes, you can browse subversion log.

Reference
http://kde.org/announcements/announce-4.3-beta1.php

Thursday, April 30, 2009

Mandriva Linux 2009 Spring released

Mandriva has announced the launch of the final version of Mandriva Linux 2009 Spring (codename Pauillac). This new version comes with a host of improvements and changes, as always. Fun fact: this is the first release reported to us by Anne Nicolas instead of Adam Williamson. For those that keep score.

The Mandriva Linux 2009 Spring comes in the flavour of your choice, KDE, GNOME or LXDE, in more than 70 languages. There's the Free edition (100% open source software) in 2 DVDs for 32 and 64 architecture and the One edition (installable live CD, available in KDE and GNOME versions). Major updates includes KDE 4.2.2, GNOME 2.26, Xorg server 1.6, Linux kernel 2.6.29, Xfce 4.6, Qt Creator 1, Tcl/Tk 8.6, syslinux 3.75, and much more.

Mandriva Linux 2009 Spring comes with an improvement in boot time. The tools of Mandriva Control Center have also been optimised. Network center now supports advanced network configuration together with additional pre-configured Internet providers, integration with new network devices and support for different wireless regulatory domains. msev, the Mandriva security framework, has been also redesigned.

The ext4 file system is now supported in the stable version and proposed during installation. Last update of syslinux comes with the HDT module (Hardware Detection Tool), which brings you a way to detect all your hardware before booting your system.

You can take the 2009 Spring tour, read the Release notes and Errata, and of course, download.

Source

Tuesday, April 28, 2009

Firefox 3.0.10 fixes critical vulnerability


The Mozilla developers have announced the release of version 3.0.10 of their open source Firefox web browser. The security and stability release addresses a critical security vulnerability introduced in Firefox 3.0.9.

The vulnerability is a regression which in some cases caused frequent crashes. Users running the HTML Validator add-on were particularly affected, although other users also experienced the crashes. The problem was due to memory corruption, similar to problems identified as security vulnerabilities in the past.

More details about the release can be found in the release notes. Firefox 3.0.10 is available to download, or Firefox users can use the Firefox update service by selecting Help, then Check For Updates.

Source

Saturday, April 25, 2009

Testing Red Alert 2 with wine

I had unsuccessful attempt to run (old) Red Alert 2 game with sound using wine 1.x.x. After ignoring to test it for a few months due to my busy work, yesterday I decided to try it again. It worked. My wine version is 1.1.17. My Red Alert 2 is Yuri's Revenge with no-cd patch. Below is how I set wine to make sound works. The graphics setting is just an additional setting to set virtual destop to make the game runs in a window (and not in full screen as default).

Audio Setting
Run winecfg to change audio setting for wine.


Click on the Audio tab. Make sure PulseAudio (recent wine support PulseAudio driver) and OSS driver checked and in DirectSound section make sure Hardware Acceleration is set to Emulation. And then click OK button to save the settings.

Graphics Settings
Click on Graphics tab and check Emulate a virtual desktop setting and set Desktop size to 800 x 600 or 1024 x 768.

Now it's ready to be run. See screenshots below.




Monday, April 13, 2009

postfix can't connect to MySQL

I got this error in syslog when postfix was trying to connect to MySQL:

Apr 13 17:34:53 webmail postfix/smtpd[6726]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Apr 13 17:34:53 webmail postfix/smtpd[6726]: NOQUEUE: reject: RCPT from rv-out-0506.google.com[209.85.198.233]: 451 4.3.0 : Temporary lookup failure; from= to= proto=ESMTP helo=

I got a reference to MySQL database in my main.cf which triggered the error:

local_recipient_maps = mysql:/etc/postfix/sql-recipients.cf

From the error it was obvious postfix couldn't connect to MySQL. Email from outside wouldn't be received properly by dbmail. I checked MySQL service and it was running and I could log into MySQL manually. I found a solution after googling a bit. The cause was in file /etc/postfix/master.cf. I got smtp service of postfix to run chroot'ed (see y below).

#service type private unpriv chroot wakeup maxproc command + args
smtp inet n - y - - smtpd

So I changed the line to:

#service type private unpriv chroot wakeup maxproc command + args
smtp inet n - n - - smtpd


Voila!. It worked. See log below:

Apr 13 18:03:02 webmail postfix/smtpd[7039]: connect from rv-out-0506.google.com[209.85.198.239]
Apr 13 18:03:03 webmail sqlgrey: grey: domain awl match: updating 209.85.198(209.85.198.239), gmail.com
Apr 13 18:03:03 webmail postfix/smtpd[7039]: B3246A3075: client=rv-out-0506.google.com[209.85.198.239]
Apr 13 18:03:04 webmail postfix/cleanup[7042]: B3246A3075: message-id=<23c8d5620904130314j7f4c619di57c7d8c0d217ed62@mail.gmail.com>
Apr 13 18:03:04 webmail postfix/qmgr[7033]: B3246A3075: from=, size=2277, nrcpt=1 (queue active)
Apr 13 18:03:05 webmail postfix/smtpd[7046]: connect from webmail.myfakedomain.net[127.0.0.1]
Apr 13 18:03:05 webmail postfix/smtpd[7046]: 26BBFA3076: client=rv-out-0506.google.com[209.85.198.239]
Apr 13 18:03:05 webmail postfix/cleanup[7042]: 26BBFA3076: message-id=<23c8d5620904130314j7f4c619di57c7d8c0d217ed62@mail.gmail.com>
Apr 13 18:03:05 webmail postfix/qmgr[7033]: 26BBFA3076: from=, size=2751, nrcpt=1 (queue active)
Apr 13 18:03:05 webmail postfix/smtpd[7046]: disconnect from webmail.myfakedomain.net[127.0.0.1]
Apr 13 18:03:05 webmail dbmail/lmtpd[20480]: Message:[serverchild] serverchild.c,PerformChildTask(+349): incoming connection from [127.0.0.1] by pid [20480]
Apr 13 18:03:05 webmail postfix/lmtp[7043]: B3246A3075: to=, relay=127.0.0.1[127.0.0.1]:10025, delay=2, delays=0.96/0.01/0/1, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=01032-05, from MTA([127.0.0.1]:10026): 250 2.0.0 Ok: queued as 26BBFA3076)
Apr 13 18:03:05 webmail postfix/qmgr[7033]: B3246A3075: removed

Wednesday, April 8, 2009

CUPS: Unable to open device and permission denied

I use CUPS for my printer system and I got this error:

Unable
to open device "
hal:///org/freedesktop/Hal/devices/usb_device_3f0_217_00SGKGB09615_if0_printer_noserial": Permission denied

How to solve this problem? The settings of the printer was correct and was just a permission problem. Googling a bit, I found this site.

These steps what I did to solve it:
1. cd /usr/lib/cups/backend
2. chmod 700 hal (previously 755)
3. chmod 700 usb (previously 755)

For step 2 and 3, I found out that you have to change the mod to 700 although the file hal and usb has 'rwx' on them on the 'user' part. The culprit was the 'group' and the 'other' part of the permission. They should be chmod'ed to 0. On my system, the 'group' and 'other' part of both files was 5 (r-x) previously.

I hope this saves some people's time of head scratching.

Wednesday, April 1, 2009

clamav detects conficker

Taken from http://www.clamav.net/2009/01/29/conficker-aka-downadup/

Some of you may have heard of a current major outbreak of a virus known as Downadup that has been reported at http://news.bbc.co.uk/1/hi/technology/7842013.stm and http://news.bbc.co.uk/1/hi/technology/7832652.stm. It has been estimated that move than 9 million PCs are infected across the world.

ClamAV detects Downadup, also known as Conficker, as Worm.Downadup. Once on a system it downloads components that ClamAV detects as members of the Trojan.Downloader- family of signatures.

The virus primarily exploits MS08-067; it can also spread through USB sticks. Since the virus is not spread by email we don’t expect to see much activity in our core user-base, which tends to use ClamAV to scan emails. We are, nevertheless, keeping an eye out for it through freshclam’s statistics gathering system – we are yet to see any obvious spike of activity from it. If we hear anything we’ll let you know.


Saturday, March 14, 2009

Saving date and time to hardware clock manually

If you change date and time in console, the hardware clock may not be updated instantly. There's a script usually find in many distros that save the date and time to hardware clock before the computer off or restart. Some GUI apps changed the hardware clock if you change the software clock. If you want to change the hardware clock manually, here's the command:

hwclock --systohc

and obviously, you have to run it as root.

dbmail and database default character set

I migrated my mailserver to another server recently. I installed dbmail from scratch and restored my database into new mysql server. When I started dbmail to connect to the database server, I found out in syslog (see below) that the dbmail-imapd couldn't connect to the server because of the different character set. It's a FATAL error!. I found out that my old database used latin1 as the default character set and dbmail used utf8 as I defaulted in /etc/dbmail.conf. So I just change the default character set of my dbmail database in MySQL to utf8 (see below). This solved the problem.

In syslog before changing the character set:
Mar 14 13:01:54 webmail.fakedomain.com.my dbmail-imapd[13986]: Error:[sql] dbmysql.c,db_mysql_check_collations(+138): collation mismatch, your MySQL configuration specifies a different charset than the data currently in your DBMail database.
Mar 14 13:01:54 webmail.fakedomain.com.my dbmail-imapd[13986]: FATAL:[server] server.c,StartServer(+129): Unable to connect to database.

To change default character set of a dbmail database:
ALTER DATABASE dbmail DEFAULT CHARACTER SET utf8;

In syslog after changing database default character set:
Mar 15 13:20:29 webmail dbmail/imap4d[14107]: Message:[server] pool.c,child_register(+299): register child [14107]
Mar 15 13:20:29 webmail dbmail/imap4d[14109]: Message:[server] pool.c,child_register(+299): register child [14109]
Mar 15 13:20:29 webmail dbmail/imap4d[14111]: Message:[server] pool.c,child_register(+299): register child [14111]
Mar 15 13:20:29 webmail dbmail/imap4d[14113]: Message:[server] pool.c,child_register(+299): register child [14113]
Mar 15 13:20:29 webmail dbmail/imap4d[14101]: Message:[server] pool.c,scoreboard_state(+590): Scoreboard state:children [4/10], spares [4 (2 - 4)]

Thursday, February 26, 2009

packagekit and Mandriva Cooker

I use Mandriva Cooker. A bleeding edge distro. packagekit is the latest offering from Mandriva for package management. Coupled with KDE's kpackagekit, it integrates nicely with KDE 4. It's still not recommended for general though. The interface is confusing for first time user. Every button can be clicked while the other process running and it crashes often. Please use Mandriva Control Center for it.

Let's see some screenshots of it.