Monday, October 17, 2011

Changing konqueror web browser's engine to WebKit

Konqueror is a native KDE web browser and it uses KHTML as the rendering engine. Fortunately, the smart developers of Konqueror has made it possible to change not only the interface but also the engine that renders the webpage we visit and so far only webkit is supported. We hope many more in the future. or maybe not. :)

What is Webkit?
Webkit engine is derived from KDE's KHTML engine and contains many enhancements that made it better than its mother. It has been used for Apple's Safari and Google's Chrome web browsers.

For Mandriva 2011 users, to be able to change the engine to Webkit is by installing the engine package. It's called webkitkde. (for other distro, the package name might be a bit different) You might have installed it. Install it using this command:

urpmi webkitkde

Now open Konqueror (or restart if it is open) and go to Settings --> Configure Konqueror --> General --> Default web browser engine. You should have 2 options in there. KHTML and WebKit. Screenshot below.

*UPDATE:
For KDE 4.10.x, for Mageia, the package name is kwebkitpart. So,

urpmi kwebkitpart


That's all there is to it. You should now enjoy browsing the web using WebKit engine.

Tuesday, August 30, 2011

Mandriva 2011 codenamed Hydrogen is out

I just copy this as announced on Mandriva blog:

Hooray! As promised earlier, we are happy to announce that Mandriva 2011 is out. You can download ISO images from here.

When downloading an iso-image, perhaps you will want to read the Release Notes.

We prepared a small manual of how to upgrade to the new release for users of the Mandriva Desktop 2010.2.

If you have never tried Mandriva, take a look at the Mandriva 2011 Tour.

Happy upgrading :)


Monday, August 22, 2011

Merging video files

Recently I downloaded 2 video files which is actually a video file splitted into two for faster upload by the uploader. To merge them on Linux, we can use the command cat like this:

cat video1.mkv video2.mkv >> video.mkv

And it took seconds to complete merging. Now I can watch the video in 1 file.

Have fun!.

Sunday, June 19, 2011

Testing bloggeroid


This post is for testing purposes only. Please <<ignore>> it.

posted with Bloggeroid


Saturday, June 4, 2011

Mageia 1 is out!


A distribution forked from Mandriva, Mageia, released its important milestone, Mageia 1 stable. Read the Changelog here to get an insight of this release after 9 months it was born.


Thursday, May 26, 2011

My Mandriva desktop

Sorry for not posting anything for a rather long time. I have been using Mandriva Cooker 2011 for about 2 months now since I bought my new ASUS laptop from someone with half the current market price. :) With RPM5, ROSA, and many exciting features of KDE 4 in Cooker, I didn't want to miss the chance to test and have fun with them.

Here is the screenshots of my desktop with urpmi and 3D effects in action.


Please click on the image to see bigger picture.

Friday, April 8, 2011

Load balance 2 WAN links BASH script

BASH script to load balance 2 WAN links.

#!/bin/bash
#
# bal_local Load-balance internet connection over two local links
#
# Version: 1.0.0 - Fri, Sep 26, 2008
#
# Author: Niels Horn
#

# Set devices:
DEV1=${1-eth0} # default eth0
DEV2=${2-ppp0} # default ppp0

# Get IP addresses of our devices:
ip1=`ifconfig $DEV1 | grep inet | awk '{ print $2 }' | awk -F: '{ print $2 }'`
ip2=`ifconfig $DEV2 | grep inet | awk '{ print $2 }' | awk -F: '{ print $2 }'`

# Get default gateway for our devices:
gw1=`route -n | grep $DEV1 | grep '^0.0.0.0' | awk '{ print $2 }'`
gw2=`route -n | grep $DEV2 | grep '^0.0.0.0' | awk '{ print $2 }'`

echo "$DEV1: IP=$ip1 GW=$gw1"
echo "$DEV2: IP=$ip2 GW=$gw2"

### Definition of routes ###

# Check if tables exists, if not -> create them:
if [ -z "`cat /etc/iproute2/rt_tables | grep '^251'`" ] ; then
echo "251 rt_dev1" >> /etc/iproute2/rt_tables
fi
if [ -z "`cat /etc/iproute2/rt_tables | grep '^252'`" ] ; then
echo "252 rt_dev2" >> /etc/iproute2/rt_tables
fi

# Define routing tables:
ip route add default via $gw1 table rt_dev1
ip route add default via $gw2 table rt_dev2

# Create rules:
ip rule add from $ip1 table rt_dev1
ip rule add from $ip2 table rt_dev2

# If we already have a 'nexthop' route, delete it:
if [ ! -z "`ip route show table main | grep 'nexthop'`" ] ; then
ip route del default scope global
fi

# Balance links based on routes:
ip route add default scope global nexthop via $gw1 dev $DEV1 weight 1 nexthop via $gw2 dev $DEV2 weight 1

# Flush cache table:
ip route flush cache

# All done...

To use the script, copy it to /usr/local/bin, make it executable with 'chmod +x' and call it with:
bal_local

Monday, January 31, 2011

Moving your mysql database to another hard disk

Recently, my server's only hard disk was almost full. I bought a new hard disk with bigger size and I decided to just add it as a second hard disk. Since I need to move it to the 2nd hard disk, I need to find a proper way to move the db with minimum downtime. So I googled around and found a solution.

First, I needed to format the 2nd hard disk and I chose xfs as the filesystem. I created 2 partitions using Linux's fdisk for this task. First partition is 10 GB and 2nd one is around 900 GB. That's approximately added up to 1 TB. Then I mounted the 2nd partition in current partition eg /media/hd2 as follows:

mount -t xfs /dev/sdb5 /media/hd2

where /dev/sdb5 is the partition and /media/hd2 is the mounting dir.

Stop mysql db before doing anything:

service mysql stop

Afterthat, I copied the entire db to newly mounted hard disk:

cp -rv /var/lib/mysql /media/hd2

It will take a while if you have huge databases.

Then, change the ownership of the dir to user and group of mysql:

chown -R mysql:mysql /media/hd2/mysql

You need to change the mysql config file in /etc/my.cnf to point to the dir:

[mysqld]
user = mysql
datadir = /media/hd2/mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
pid-file = /var/run/mysqld/mysqld.pid

Now you can restart mysql db:

service mysql start

If there are no errors on startup, you can test by login to your mysql db and do sql query.

You can leave other settings as it is. If this doesn't work and if you use innodb, you may want to change these lines:

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/

Make sure you test your dbs before deleting the old ones. Have fun!

Tuesday, January 18, 2011

The easiest way to 'burn' iso to USB disk.

The easiest way to 'burn' iso to USB disk is by using dd command. Let's say you don't want to burn your newly downloaded iso to CD/DVD but want to use USB disk instead, you can run this command :

dd if=/path/to/file.iso of=/dev/sdb

This assumes your USB disk is /dev/sdb. You can use mount command to check what device your USB disk is using. Now you can install your new distro using USB disk.

Note: You can burn iso this way if the iso is of type hybrid. Read here for more information.

Have fun!

Tuesday, January 4, 2011

/usr/include/linux/netfilter_ipv4.h:53: error: ‘INT_MIN’ was not declared in this scope

This error happened when I was compiling dansguardian 2.10.1.1 with Linux netfilter support.

In file included from ConnectionHandler.cpp:48:
/usr/include/linux/netfilter_ipv4.h:53: error: ‘INT_MIN’ was not declared in this scope
/usr/include/linux/netfilter_ipv4.h:64: error: ‘INT_MAX’ was not declared in this scope
/usr/include/linux/netfilter_ipv4.h:65: error: ‘INT_MAX’ was not declared in this scope
make[2]: *** [dansguardian-ConnectionHandler.o] Error 1

To solve it, you have to edit netfilter_ipv4.h and type #include <limits.h> just below or after other #include lines.

Have fun!.

How to change the plymouth default theme

Plymouth is a graphical boot system that runs very early in the boot process. It provides graphical animation while the boot process happens in the background. Starting from Mandriva 2010 Beta, it replaced splashy to manage boot splash. Many latest distributions now are using plymouth. Since it displays graphical boot login, users usually do not bother to tinker with it.

What is the default theme?
To know the current default theme, run this command without any options:

plymouth-set-default-theme

Changing theme
To change plymouth theme, we have to know what themes are installed. To list them, run (as root):

plymouth-set-default-theme --list

You'll get something like this:

details
fade-in
Mandriva-Free
spinfinity
text

So to change to a particular theme as the default, for example fade-in, run :

plymouth-set-default-theme fade-in --rebuild-initrd

--rebuilt-initrd option is a must or the change won't take effect. You can explore other options by running plymouth-set-default-theme -h

Have fun!

Renew letsencrypt ssl certificate for zimbra 8.8.15

 Letsencrypt certs usually consists of these files: 1. cert.pem 2. chain.pem 3. fullchain.pem 4. privkey.pem I am not going to discuss about...