Archive for March, 2011

Granting regular system user with permissions to restart system services (/etc/init.d/ daemons) on Debian Linux via sudo

Friday, March 25th, 2011

If you’re a system administrator, you have certainly have faced the task to allow a regular system user without system root permissions to be able to restart some of the system services, every now and then.
This case is very often encountered, if you have to work with a group of programmers who need to restart certain daemon services either that directly are related to some of your programmers.

An example case would be a java programmer/s, who runs code on a tomcat or resin server. Another possible scenario which I just encountered is a php programmer, who needs to experiment with nginx rewrite rules.

Another scenario, where you have to grant access to stop, start or restart functions of some init scripts like let’s say /etc/init.d/mysql or /etc/init.d/apache would be if you have to work in a team with other system administrators or some unix tech support guy (second system admin) etc.

The cases in which you might need to enpower an otherwise regular user BSD/Linux system account with extra administrator (root) permissions are multiple, however what is important is how you can do this when suddenly you need to complete this task.

There are quite a lot of things written on the topic and I remember that the first time I had to add a regular Linux system accounts to have an extra permissions only tosome system binaries was a real pain in the ass.
It took me a lot of searching online reading forums and asking in irc.freenode.net until I got the solution, but thanksfully finally I got it.
Therefore I found it might be interesting to my readers to find out how this trivial but very helpful task can be achieved on Linux and BSD and possibly other UNIX server or desktop installs.

The key to the whole set task resides in the is in the handy Linux tool Sudo that I believe every system administrator out there is aware of.
Even the sudo tool debian package description indicates that it’s the exact tool one needs to allow certain user to execute commands as root. Here is sudo’s description:

Sudo (superuser do) allows a system
administrator to give certain users (or
groups of users) the ability to run some
(or all) commands as root or another user
while logging the commands and arguments.

Using sudo to complete the set task, on a first glimpse looks really complex, however it appears to achieve allowing a regular user to execute as root is pretty simple.

To give you an idea how you can achieve the task I’ll give a simple scenario.
Let’s assume you need to add the Linux system users with login names: ivan and testuser to be able to restart your Apache,MySQL and Nginx servers via the services respective init scripts.

Here is how to achieve it:

1. First you need to have the sudo package installed

debian:~# apt-get install sudo

If you already have the package then simply skip step 1 and proceed further.

2. Edit /etc/sudoers with your favourite text editor and find the text

root ALL=(ALL) ALL

3. After the text insert the code:

Cmnd_Alias APACHE = /etc/init.d/apache2
User_Alias APACHEUSERS = ivan, testuser
APACHEUSERS ALL = NOPASSWD : APACHE

Cmnd_Alias MYSQL = /etc/init.d/mysql
User_Alias NGINXUSERS = ivan, testuser
MYSQLUSERS ALL = NOPASSWD : NGINX

Cmnd_Alias NGINX = /etc/init.d/nginx
User_Alias NGINXUSERS = soccerfame, hipo
NGINXUSERS ALL = NOPASSWD : NGINX

That’s all now the normal system users with non-root permissions ivan and testuser will be allowed to restart your Debian Linux Apache, MySQL and Nginx services.

4. Now let’s test your if your users can properly restart the 3 services with the testuser

debian:~# su testuser
testuser@debian:~$ id
uid=1001(testuser) gid=1001(testuser) groups=1001(testuser)

testuser@debian:~$ sudo /etc/init.d/nginx restart
Restarting nginx: nginx.
testuser@debian:~$ sudo /etc/init.d/apache2 restart
Restarting web server: apache2 … waiting .
testuser@debian:~$ sudo /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..

As you can see in the above commands execution output now my testuser which is a non-root user is able to use some of my services which require administrator permissions.

Now if you need to add some more services which require root permissions, simply place some more code in the /etc/sudoers let’s assume you need to put the example service which binary is to be found in /usr/sbin/example , you will have to place in your /etc/sudoers

Cmnd_Alias EXAMPLE = /usr/sbin/example
User_Alias EXAMPLEXUSERS = ivan, testuser
MYSQLUSERS ALL = NOPASSWD : EXAMPLE

The Annunciation of Christ’s conceive to The Blessed Theotokos (The Mother of God)

Friday, March 25th, 2011

The Annunciation of Christ's conceive to the Blessed Virgin Mary icon

Today we fete the Annunciation of Christ's conceive of Virgin Mary in the Bulgarian Orthodox Church. The Annunciation is one of the 12 great Orthodox Christian feasts in memoriam of the living the death and the resurrection of our Lord Jesus Christ and the Blessed Mother of God (Virgin Mary).

The Annunciation feast is being celebrated in the realm of all Orthodox Christian Churches (nation-wide).

The date on which the feast is celebrated in the bulgarian orthodox church is different every single year and depends on the Great Lent's yearly schedule according to the (Julian Calendar, Revised Julian Calendar and Gregorian Calendar).

On this date we do commemorate the announcement by the Archangel Gabriel to Vigin Mary that she would become the mother of our Lord Jesus Christ!

Here is what we read in the Bible in the Gospel of Luke about the Archangel's going to the Theotokos and Virgin mary's immeasurable humbleness:

26 In the sixth month of Elizabeth's pregnancy, God sent the angel Gabriel to Nazareth, a town in Galilee,
27 to a virgin pledged to be married to a man named Joseph, a descendant of David. The virgin's name was Mary.
28 The angel went to her and said, Greetings, you who are highly favored! The Lord is with you.
29 Mary was greatly troubled at his words and wondered what kind of greeting this might be.
30 But the angel said to her, Do not be afraid, Mary; you have found favor with God.
31 You will conceive and give birth to a son, and you are to call him Jesus.
32 He will be great and will be called the Son of the Most High. The Lord God will give him the throne of his father David,
33 and he will reign over Jacob's descendants forever; his kingdom will never end.
34 How will this be, Mary asked the angel, since I am a virgin?
35 The angel answered, The Holy Spirit will come on you, and the power of the Most High will overshadow you. So the holy one to be born will be called[b] the Son of God.
36 Even Elizabeth your relative is going to have a child in her old age, and she who was said to be unable to conceive is in her sixth month.
37 For no word from God will ever fail.
38 I am the Lord's servant, Mary answered. May your word to me be fulfilled. Then the angel left her.

The living of the blessed mother of God (our shroud and hope) from it's early days is distinguished from the Church's tradition as extremely rightous.
At the time of this great God's mercy on us the sinners, mother mary is already engaged for the widowed elder Joseph.

Simply speaking the Annunciation is the first salvation light shed by the all merciful God on us.

Mother Mary believed the Angel's words and humbly answered "May your word to me be fulfilled.", – she believed the Archangel's words.

It's interesting fact that the Archangel's name Gabriel meanining from Jewish is (God-Man), which is another prophecy for the nature which our Lord and saviour Jesus Christ will possess.

Feast-of-Annunciation-tbe-good-news-of-Christs-birth-are-told-to-theTheotokos

The feast of the Annunciation is one of the two days during the fasting time before Eastern (The Resurrection of Christ), when we the Church members (churh layman and clergy) are allowed to eat Fish food

An interesting fact about the Annunciation feast day is that the Divine Liturgy of the Annunciation is the only celebration of the Eucharistic liturgy of Saint John Chrysostom allowed on a weekday of Great Lent.

The Annunciation is called Euangelismos (Evangelism) in Greek, literally meaning "spreading the Good News".

The Annunciation is the day of the "good news" as on that day the salvation of mankind by has been initiated by Christ's incarnation.

Here is the Hymn sang by church singer (The Troparion):

Troparion
Today is the beginning of our salvation,
The revelation of the eternal mystery!
The Son of God becomes the Son of the Virgin
As Gabriel announces the coming of Grace.
Together with him let us cry to the Theotokos:
Rejoice, O Full of Grace,
The Lord is with You!

O Victorious Leader of Triumphant Hosts!
We, your servants, delivered from evil, sing our grateful thanks to you, O Theotokos!
As you possess invincible might, set us free from every calamity
So that we may sing: Rejoice, O unwedded Bride!

Kontakion
Today is the prelude of joy for the universe!
Let us anticipate the feast and celebrate with exultation:
Gabriel is on his way to announce the glad tidings to the Virgin;
He is ready to cry out in fear and wonder:
Rejoice, O Full of Grace, the Lord is with You!

Kontakion

You are the beginning of salvation for all of us on earth, Virgin Mother of God.
For the great Archangel Gabriel, God's minister,
Was sent from heaven to stand before you to bring you joy:
Therefore, we all cry to you: Rejoice, O unwedded Bride.

Let us all be glad and give thanks to The Holy Trinity for his great mercy and ask the Blessed Theotokos to pray his Son and our God Jesus Christ to save us and grant us eternal life in heaven.

Oh Mother of God, Most Blessed of all eartly creatures pray your Son and our Lord to have mercy on us the sinners!

How to remove “Comments Closed” to appear on your home and pages on WordPress blog / Removing “Comments Closed” message to appear in wordpress

Thursday, March 24th, 2011

I’m currently configuring one wordpress based installation to serve as a mini website for old fashined furniture.

By so far I was able to close the comments on the wordpress Pages but still face huge difficulties with making the wordpress installation to looes it’s blog a like, look and feel and look a bit like a normal website.

The major issue I faced was with removing the irritating message Comments Closed which was appearing right after my post on my Home configured wordpress page.

It took me some readings online and some experimentation until I got the solution, to make the life easier of other people who face the Comments Closed can’t remove issue here is how I scraped the message out:

1. Go to your wordpress install directory and look for the wp-content/themes directory inside it select the theme which you have selected as a default for your wordpress via the admin page.
I assume you’re using the default template and thus switch to the directory wp-content/themes/default , e.g.:

wp-host:~# cd /var/www/wordpress/wp-content/themes/default 2. Inside the theme directory look up all your files for records like:

Comments Closed

wp-host:/var/www/wordpress/wp-content/themes/default:~# grep -rli 'Comments Closed' *
archive.php
de_DE.mo
es_ES.mo
fr_FR.mo
index.php
it_IT.mo
page.php
ru_RU.mo
search.php
single.php

As you can see in the output there are few php files which seems to include the Comments Closed text inside them, therefore our files of interest which needs modifications are: archive.php, index.php, page.php, search.php and single.php

3. Open up each of the aforementioned php files and look in each one of them for:

comments_popup_link([ some code ]);

When you stumble on the comments_popup_link function one line before the function opening php code with <php starts insert the code:

<?php if('open' == $post-<comment_status) : ?>

At the end of the <?php comments_popup_link([ some code ]);?> code on the next line fill in the code:

<?php endif;?>

4. Do the step 3 for all your found php files which include the comments_popup_link function.That’s it now your “Comments Closed” message will disappear all your wordpress posts and the wordpress install would start looking more like a website.

DOOM 1, DOOM 2, DOOM 3 game wad files for download / Playing Doom on Debian Linux via FreeDoom open source doom engine

Thursday, March 24th, 2011

Doom 2 game screenshot

Every now and then as an ex-gamer I do remember the good glorious times of the DooM oldschool 3d shooter game.

As a Linux user I do have the option to play Doom 1 and Doom 2 straight using the GPLed version of the game called FreeDoom

FreeDoom comes with a custom wad file called freedoom.wad which is a considerably good remake of the doom game, but still I don't find so funny and bringing memories as the original game.

Thus in order to experience the original doom game play, levels and sound on my Linux, I need to use the original doom wad files

The DooM original wad files are already an abandonware and nowdays it's a bit hard to be found. Still the wad files for the games are available for download on some major torrent trackers like piratebay but it takes time to find them therefore I decided to publicly share the Doom 1, Doom 2 and Doom 3 wad files to be easier for me to later put and play them on Linux and BSD operating systems, on the other hand I do think this files might be useful for many other oldschool DooM fans out there.

Here are the files for download:

1. Download doom 1, doom 2 and doom 3 wad files + extra of plutonia wad and tnt wad rar archive

2. Download Doom1.wad file
3. Download Doom2.wad file
4. Download Doom3.wad file

(Note that this is not original Doom3.wad – For free, its custom doom wad for prboom engine!!!)
5. Download Doom Plutonia.wad
6. Download Doom Tnt.wad

On my Debian Linux with the freedoom package in order to play the Doom1 or Doom2 wad files it's necessary to download and place the doom1.wad or doom2.wad files into the directory /usr/share/games/doom

It's important that the WAD files names does not contain capital letters (e.g. the files need to be placed with file names doom1.wad and doom2.wad)

The FreeDoom port package in Debian Lenny and Squeeze is available to be installed easily through apt like so:

debian:~# apt-get install prboom freedoom

To start up the doom2 game, issue the command:

debian:~# prboom

prboom also allows you to select a custom .wad file you want to play, for a custom wad file you can invoke the command:

debian:~# prboom -file yourwadfilename


UPDATE: A bonus you might seriously Enjoy, if you happen to be DooM 2 game fan / addict is an Awesome MIDIS Soundtrack by Bobby Prince you can download it song by song in midi format here or if you prefer download the whole doom 2 Bobby Prince midi songs archive
Enjoy the nice oldschool game 😉

Check out Jude The Obscure – an oldschool friends cool Indyrock Band

Wednesday, March 23rd, 2011

An oldschool friends band had released their band Jude The ObScure website
I know Nikola (the drummer) of the band for quite some time and had a deep old friendship from the old times.
Back in the day he was creating music (writting music) in a band called Solitute – an old bulgarian band from the late years of last century (year 1998-2003), in that past years I was still in my youth and it was quite an inspiring thing to be on a concert in Dobrich’s Youth House (Mladezhki Dom), some concerts were also organized in city schools and even sometimes in the city center.

Jude the Obscure ‘s band guitarist (Milen) is also a good friend from the past he even was schoolmate in the same study class as I was.
I remember Milen has this profound attraction to guitars since he was maybe 12 years old. Nikola is playing the drums also from around his thirteens.

Now just a year about I’ve heard that still Nikola and Milen are making music together in a band which has quickly changed a couple of band names.
Nikola and Milen had a number of recorded songs by so far and they currently play together in the band with the artistic name Jude The Obscure .

The genre of their music (Indyrock) is quite an unusual like the band and is quickly increasing the number of fans in the underground scene.

I’m very pleased by the nice songs they have bundled together, presently the website offers for direct play 6 of their recorded band songs.
Two of the band songs comes also with a nice videos you can watch straight from my blog below:

Jude The Obscure – Make us proud

Jude the Obscure – Live in Sofia Oct 2010

What is even better is that the produced music by Jude the Obscure is available freely under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License, which means we can freely distribute the songs without any copyright breaches 😉

I hope the band will very soon put together an album I can enjoy 🙂

How to install nginx webserver from source on Debian Linux / Install Latest Nginx on Debian

Wednesday, March 23rd, 2011

Nginx install server logo
If you're running a large website consisting of a mixture of php scripts, images and html. You probably have noticed that using just one Apache server to serve all the content is not that efficient

Each Apache child (I assume you're using Apache mpm prefork consumes approximately (20MB), this means that each client connection would consume 20 mb of your server memory.
This as you can imagine is truly a suicide in terms of memory. Each request for a picture, css or simple html file would ask Apache to fork another process and will consume (20mb of extra memory form your server mem capacity)!.

Taking in consideration all this notes and the need for some efficiency here, the administrator should normally think about dividing the processing of the so called static content from the dynamic content served on the server.

Apache is really a nice webserver software but with all the loaded modules to serve dynamic content, for instance php, cgi, python etc., it's becoming not the best solution for handling a (css, javascript, html, flv, avi, mov etc. files).

Even a plain Apache server installation without (libphp, mod_rewrite mod deflate etc.) is still not dealing efficiently enough with the aforementioned static files content

Here comes the question if Apache is not that quick and efficient in serving static files, what then? The answer is caching webserver! By caching the regular static content files, your website visitors will benefit by experiencing shorter webserver responce files in downloading static contents and therefore will generally hasten your website and improve the end user's experience.

There are plenty of caching servers out there, some are a proprietary software and some are free software.

However the three most popular servers out there for static file content serving are:

  • Squid,
  • Varnish
  • Nginx

In this article as you should have already found out by the article title I'll discuss Nginx

You might ask why exactly Nginx and not some of the other twos, well simply cause Squid is too complicated to configure and on the other hand does provide lower performance than Nginx. On the other hand Varnish is also a good solution for static file webserver, but I believe it is not tested enough. However I should mention that my experience with testing varnish on my own home router is quite good by so far.

If you're further interested into varhisn cache I would suggest you checkout www.varhisn-cache.org .

Now as I have said a few words about squid and varhisn let's proceed to the essence of the article and say few words about nginx

Here is a quote describing nginx in a short and good manner directly extracted from nginx.com

nginx [engine x] is a HTTP and reverse proxy server, as well as a mail proxy server written by Igor Sysoev. It has been running for more than five years on many heavily loaded Russian sites including Rambler (RamblerMedia.com). According to Netcraft nginx served or proxied 4.70% busiest sites in April 2010. Here are some of success stories: FastMail.FM, WordPress.com.

By default nginx is available ready to be installed in Debian via apt-get, however sadly enough the version available for install is pretty much outdated as of time of writting the nginx debian version in lenny's deb package repositories is 0.6.32-3+lenny3

This version was release about 2 years ago and is currently completely outdated, therefore I found it is not a good idea to use this old and probably slower release of nginx and I jumped further to install my nginx from source:
Nginx source installation actually is very simple on Linux platforms.

1. As a first step in order to be able to succeed with the install from source make sure your system you have installed the packages:

debian:~# apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev build-essential

2. Secondly download latest nginx source code tarball

Check out on http://nginx.com/download the latest stable release of nginx and further issue the commands below:

debian:~# cd /usr/local/src
debian:/usr/local/src# wget http://nginx.org/download/nginx-0.9.6.tar.gz

3.Unarchive nginx source code

debian:/usr/local/src#tar -zxvvf nginx-0.9.6.tar.gz
...

The nginx server requirements for me wasn't any special so I proceeded and used the nginx ./configure script which is found in nginx-0.9.6

4. Compline nginx server

debian:/usr/local/src# cd nginx-0.9.6
debian:/usr/local/src/nginx-0.9.6# ./configure && make && make install
+ Linux 2.6.26-2-amd64 x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.3.2 (Debian 4.3.2-1.1)
checking for gcc -pipe switch ... found
...
...

The last lines printed by the nginx configure script are actually the major interesting ones for administration purposes the default complation options in my case were:

Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1 library is not used
+ using system zlib library

nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

If you want to setup nginx server to support ssl (https) and for instance install nginx to a different server path you can use some ./configure configuration options, for instance:

./configure –sbin-path=/usr/local/sbin –with-http_ssl_module

Now before you can start the nginx server, you should also set up the nginx init script;

5. Download and set a ready to use script with cmd:

debian:~# cd /etc/init.d
debian:/etc/init.d# wget https://www.pc-freak.net/files/nginx-init-script
debian:/etc/init.d# mv nginx-init-script nginx
debian:/etc/init.d# chmod +x nginx

6. Configure Nginx

Nginx is a really easy and simple server, just like the Russians, Simple but good!
By the way it's interesting to mention nginx has been coded by a Russian, so it's robust and hard as a rock as all the other Russian creations 🙂
Nginx configuration files in a default install as the one in my case are to be found in /usr/local/nginx/conf

In the nginx/conf directory you're about to find the following list of files which concern nginx server configurations:

deiban:/usr/local/nginx:~# ls -1
fastcgi.conf
fastcgi.conf.default
fastcgi_params
fastcgi_params.default
koi-utf
koi-win
mime.types
mime.types.default
nginx.conf
nginx.conf.default
scgi_params
scgi_params.default
uwsgi_params
uwsgi_params.default
win-utf

The .default files are just a copy of the ones without the .default extension and contain the default respective file directives.

In my case I'm not using fastcgi to serve perl or php scripts via nginx so I don't need to configure the fastcgi.conf and fastcgi_params files, the scgi_params and uwsgi_params conf files are actually files which contain nginx configuration directives concerning the use of nginx to process SSI (Server Side Include) scripts and therefore I skip configuring the SSI conf files.
koi-utf and koi-win are two files which usually you don't need to configure and aims the nginx server to support the UTF-8 character encoding and the mime.types conf is a file which has a number of mime types the nginx server will know how to handle.

Therefore after all being said the only file which needs to configured is nginx.conf

7. Edit /usr/local/nginx/conf/nginx.conf

debian:/usr/local/nginx:# vim /usr/local/nginx/conf/nginx.conf

Therein you will find the following default configuration:

#gzip on;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

In the default configuration above you need to modify only the above block of code as follows:

server {
listen 80;
server_name yoursitedomain.com;

#charset koi8-r;

#access_log logs/access.log main;

location / {
root /var/www/yoursitedomain.com/html;
index index.html index.htm;
}

Change the yoursitedomain.com and /var/www/yoursitedomain.com/html with your directory and website destinations.

8. Start nginx server with nginx init script

debian:/usr/local/nginx:# /etc/init.d/nginx start
Starting nginx:

This should bring up the nginx server, if something is miss configured you will notice also some error messages, as you can see in my case in above init script output, thanksfully there are no error messages.
Note that you can also start nginx directly via invoking /usr/local/nginx/sbin/nginx binary

To check if the nginx server has properly started from the command line type:

debian:/usr/local/nginx:~# ps ax|grep -i nginx|grep -v grep
9424 ? Ss 0:00 nginx: master process /usr/local/nginx/sbin/nginx
9425 ? S 0:00 nginx: worker process

Another way to check if the web browser is ready to serve your website file conten,t you can directly access your website by pointing your browser to with http://yoursitedomain.com/, you should get your either your custom index.html file or the default nginx greeting Welcome to nginx

9. Add nginx server to start up during system boot up

debian:/usr/local/nginx:# /usr/sbin/update-rc.d -f nginx defaults

That's all now you have up and running nginx and your static file serving will require you much less system resources, than with Apache.
Hope this article was helpful to somebody, feedback on it is very welcome!

How to add Search field back to Thunderbird / Icedove 3.0 / Missing Search in Thunderbird fix

Tuesday, March 22nd, 2011

After my last package upgrade from Debian Testing/Unstable to Debian Squeeze, my Icedove (e.g. Thunderbird) got also updated.
The new version which substituted the last one is 3.0.11.
Immediately after installation I was offered to migrate the way my Thunderbird looks, whether the new look wasn’t very intuitive to me and therefore I decided to stick back to the old Thunderbird versions interface.
As I’ve closed the Migration Assistant, after selecting to use the old settings, a bit laters I suddenly realized my Thunderbird Search bar has disappeared!

That’s a big shit especially, when I take the fact that I have about 5 mailboxes configured and I do regular searches for some data which I need in my mailboxes.
I did a lot of searching online for a solution to the issue, but it doesn’t helps at all, even I took the time to ask in irc.mozilla.org , #thunderbird but noone there answered my question.

I therefore came to the good old method of try and fail. After a bunch of digging through the Thunderbird menus I accidently found a way to restore back my Search bar field.

Here is how;
As the newer versions of Thunderbird is equipped with The Thunderbird Migration Assistant , the migration assistant provides you with few configurable options which can help you move on your thunderbird interface to the newer look and feel (as I earlier said).
What is interesting here that the so called New Toolbar options when disabled does suddenly also remove the mail client’s Search interface.

Therefore to fix my missing Thunderbird search bar, here is what I did:
1. Click over:

Help -> Migration Assistant
2. From the migration assitant go and click over use new toolbar

Navigation Assistant -> use new toolbar

Now thanks God the Thunderbird Message Search will appear back in Icedove’s toolbar.

Fixing error: “net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_recv” is an unknown key on Debian Linux

Tuesday, March 22nd, 2011

If you’re trying to tune up your:

net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_recv = 30
net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 30
net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait = 30
net.ipv4.netfilter.ip_conntrack_max = 1048576

in /etc/sysctl.conf and you come across the error messages;

"net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_recv" is an unknown key
"net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait" is an unknown key
"net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait" is an unknown key
"net.ipv4.netfilter.ip_conntrack_max" is an unknown key

whether you’re executing:

debian:~# sysctl -p

in order to make the net.ipv4.netfilter.* values to be set as a kernel values to iptables, you need to modify your /etc/modules file and add the nf_conntrack_ftp in it, here is how:

echo 'nf_conntrack_ftp' >> /etc/modules

Now to make the new settings be reloaded issue the command:

debian:~# sysctl -p

Now the values will be properly set and you will see no longer the is an unknown key error messages like so:

net.ipv4.netfilter.ip_conntrack_tcp_timeout_syn_recv = 30
net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 30
net.ipv4.netfilter.ip_conntrack_tcp_timeout_fin_wait = 30
net.ipv4.netfilter.ip_conntrack_max = 1048576

Solving “Cannot redeclare show_subscription_checkbox() (previously declared in .. wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php”

Monday, March 21st, 2011

I’m trying to install subscribe-to-comments wordpress plugin in order to make my users to easily set a tick and receive new emails if somebody replies to their comments in my blog. Pitily downloading and trying to install the subscribe-to-comments wordpress plugin was failing after it’s activation with an error message:

PHP Fatal error: Cannot redeclare show_subscription_checkbox() (previously declared in /var/www/blog/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php:12) in /var/www/blog/wp-content/plugins/subscribe-to-comments.php on line 58"

I did my best to edit the subscribe-to-comments.php to fix up the fatal error but it was no go, so after a bunch of research I’ve found out somebody created a new version of the plugin under the name subscribe-to-comments-reloaded .

I’ve proceeded and gave a try to subscribe-to-comments-reloaded as a substitute to the old broken subscribe-to-comments .

Enabling the subscribe-to-commets-reloaded worked out of the box and the plugin now works perfectly fine and even better is enabling all the functionaity of the subscribe-to-comments
Cheers 🙂

ShareThis a wordpress plugin to easify your blog post sharing on social networks

Monday, March 21st, 2011

For a few days now, I’m looking through my blog and checking how can I improve the way it to be more convenient for my readers.
By so far I’ve been using the Share On Facebook wordpress plugin and custom build twitter button as the only aims to share my blog posts online.

As nowdays people are using more and more diversified networks and facebook adn twitter are not the only social places on the net, I found it would be handy if I have a bit more options for sharing my blog info online.

After a quick google search I stumbled upon a wordpress plugin which was created with the goal of sharing articles to most of the major social networks and websites.

I hope this plugin will have improve my blog’s usability and in the same time allow my readers to easily share the articles which appealed to them.

The plugin in question is called ShareThis and can be straight found in the repository of wordpress extensions on wordpress.org‘s website.

The supported shares by the Share-This plugin are as follows:

1. Share on Facebook
2. Share on Twitter
3. Share on Google Buzz
4. Share on Blogger.com
5. Share in Digg
6. Share in AIM Share
7. Share in Stumbleupon
8. Share on Microsoft Messanger

The Share-This wp plugin is able to place automatically it’s share buttons on the top of your blog posts and pages, it could be also easily customized to look a bit different from what it’s by default.
Here is a screenshot on how the plugin looks after it is installed and configured on a wordpress powered blog;

Share-This WordPress extensions screenshot

The Share-This extensions version which I have gave a try is 4.0.4 and it appeared to work correctly on my wordpress installation ver. 3.1.

Even though officially on the plugin website it’s being stated that the plugin is compatible up to a wordpress ver. 3.0.5 it worked just fine on my 3.1 😉
So it’s a good news for users of the latest wordpress releases that the plugin should work like a charm.

In order to install and configure the plugin I’ve followed literally the plugin installation instructions:

1. Download and unzip the ShareThis extension

linux:/var/www/blog# wget http://downloads.wordpress.org/plugin/share-this.zip
linux:/var/www/blog# cd wp-content/plugins
linux:/var/www/blog/wp-content/plugins# unzip share-this.zip
...

After it’s succesfully extracted, next step is to,

2. Login to your wordpress administration and enable it

From the admin panel go to;

Plugins -> Inactive -> ShareThis

3. Configure the ShareThis plugin before you Activate it

Press the:

Plugins -> Inactive -> ShareThis -> Configuration options are here

Choose your desired plugin options and press the Update ShareThis Options button.

4. Activate the Share-This extensions

Plugins -> Inactive -> ShareThis -> Activate

Whoohoo now your blog installation is equipped with the trendy Share-This buttons and your users will be able easily to share online their favourite posts.
Apart from it’s user usefulness I believe the ShareThis wp button should also be a very good choice in terms of SEO! as it will possibly attract some more users to your blog from the users that might take the step to use the ShareThis button and share on the major social networks.
Having in mind the versatile usefullness of the plugin I think every serious blogger should think about installing and using the nice plugin.

I’m quite curious if the plugin will have effect on my blog attendance, if I’m right my blog’s visitors should leap in the coming weeks.
Let’s wait and see 🙂