Archive for November, 2010

How to configure Euro sign symbol to show whenever key combination is pressed on Debian Linux

Tuesday, November 30th, 2010

Enable Euro Sign on Linux

Today I realized that I have no standard way to make the Euro sign on my Linux.
I’m a using a normal notebook qwerty keyboard on my Thinkpad and a Debian Linux.
For Microsoft Windows there are plenty of keyboard combinations to make the Euro sign to appear on the screen.

In Windows;
1. On UK Keyboard the euro sign shows when

AltGr (Right Alt Button) + 5

is pressed.
2. On US keyboard the euro sign is invoked via keyboard combination;

AltGr (Right Alt) + 5

3. On all kind of keyboards in Windows the Euro sign is visualized by ;
holding Alt and typing 0128 :

However in my GNOME on Linux the universal way to insert the euro sign by holding alt with 0128 did not worked out.

I’ve found plenty of things related to how the euro sign could be produced on Linux, most of the info I found however didn’t gave me a clue how can I achieve this simple task.

At that time I’ve found on a forum on the net, that in Gnome the euro sign producing can be configured via GNOME’s Control Panel

So to assign a keyboard configuration which will be able to produce the euro sign;

1. Go to Gnome’s Keyboard settings


System -> Preferences -> Keyboard

2. In the Keyboard Preferences Window choose


Layouts -> Options

3. In the Keyboard Layouts Options choose


Adding Euro Sign to certain keys
under this menu tick the
E

Next Choose the Key to choose 3rd level

Therein select;


Right Alt

That’s it now you can produce / type the euro sign by simply pressing the AltGr (Right Alt) + e

I’m quite happy that day by day settings up & configurations related to the GUI on Linux are becoming easier.

Cheers 🙂

The Social Network Movie Review (A biased documentary about How facebook came to existance)

Monday, November 29th, 2010

The Social Network Moview review

I’ve recently watched the The Social Network Movie . It’s a new movie that just came out this October and it’s an attempt to make a show business version of how facebook came to existence
The main actor in the movie is playing in the role of the actual creator of facebook.comMarc Zuckerberg

The movie includes a lot of young actors as the whole facebook itself was started by a lot of young and innovative people who were looking to innovation and quick cash.

The main movie actor who is playing as facebook’s founder Marc Zuckenberg is shown as a very angry boy in the in between the age of 18 and 20.
This guy has a serious addiction to clubs and clubs belonging (social networks).
However because of his social status it’s quite hard for him to be part of any venerated club nearby Harvard University where he is a student in the sphere of IT at this time.
The guy is quite anti-social and is presented as a very notorious high intelligent hacker, who has the magical ability to hack and get information from various sources just in seconds.
For me as an IT guy it was quite funny to see how much biased this part of the movie is.

The main movie starts with a relation Marc Zuckenberg is already in where his girlfriend decides to leave him because of his anti-social and agressive behaviour as well as well as because of his lack of social skills.
Marc Zuckenberg is presented here as constantly being in run for something looking to do something imporant and as a hard blogger.
He somehow manages to bring up a very simple in website to mock his ex-girlfriend that just left him.

The site after being advertised via some spam techniques, quickly spreads around the Harvard students and even to external web users of the internal Harvard network and eventually overloads the harvard network.

By this silly thing Marc Zuckenberg does attract thousands of internet users to acess his silly website and thus realizes the great potential he has in building websites which might bring him profit.
Two twin brothers who are of a wealthy family happen to also stumble upon Marc’s girlfriend mocking website and gets interested by Marc’s ability to attract many visitors with his website.
At this present moment they also are working on an idea about a social network aiming to connect all internet users at harvard.

They contact him and he starts working for the guys, he takes a look at what they have written as a programming code so far and decides not to help them with their website but starts a project similar to theirs and rewrittes it from scratch, whilst he constantly postpones his e-mail answers to the brothers as well as doesn’t much care about their project anymore.

In order to start his new internet project thefacebook which is aiming to bring together young university males who are looking to have a sex for a night with girlfriend.
Everything starts like a little. Next to that Marc Zuckenberg starts getting attending different clubs like for instance Jewish communities and does contact a richer friend of him and requests him to have some money for webserver with Apache in order to be able to handle more connections on his website.

The guy who he contacts is called Eduardo Saverin and he studies business and is a old fellow of Marc.
Eduardo finds the necessary money and they launch the thefacebook website. The site starts quickly expanding in terms of users and the twin brothers who had the plan for a website similar to facebook in order to connect harvard students gets really pissed off and eventually laters gets things to court.

Eduardo tries to look for some extra sponsorship because with the expand of the website more and more money are needed for the website to continue it’s existence but canno find anybody.
Then in the movie the Napstor creator and ex-napster CEO by accident sees thefacebook website and realies the great potential behind this website.

He meets Eduardo and Marc and does attract Marc’s interest, though Eduardo strongly dislikes him.
Later on in the movie Marc does some tricky moves in which he does lie with some documents and makes Eduardo sign up a documents which let Marc become the company CEO and leaves Eduardo with a very small amount of company shares lik 0.*%

Marc does this as he is advised by Napster’s founder. Eduardo and Napster’s founder found some new investors and thefacebook continues it’s expanding march until they got a new office and they even reach the 1 000 000 users!
The company in the meantime is renamed to facebook Inc.

After a while Napster’s founder who already becomes a co-founder of facebook does gets caught by the cops because of some drugs and other terrible stuff prohibited by governmental law.
Marc is eventually very lonely the movie ends up telling the story who gets what out of the whole mess.

Quickly reviewing The Social Network movie I had to say that as an IT movie it’s not that interesting and it’s bias is quite high. So it was interesting in general because it somehow relates to computers.
And in the movie they talk about PHP, Linux, Apache, Perl, Emacs etc. but apart from that it’s completely fictionous.

How to workaround (fix) hibernate “PM: Cannot find swap device, try swapon -a” GNOME issues on Debian testing/unstable Linux

Sunday, November 28th, 2010

I can’t remember precisely but after one of the updates I did through apt-get update && apt-get upgrade or through aptitude update && aptitude upgrade. My Gnome hibernate function has suddenly stopped working on my Thinkpad R61 notebook.
The exact kernel I currently run on my linux desktop is:

Linux noah 2.6.32-5-amd64 #1 SMP Sat Oct 30 14:18:21 UTC 2010 x86_64 GNU/Linux

My Debian linux version is:

hipo@noah:~/Desktop/blog-topics$ cat /etc/issue
Debian GNU/Linux squeeze/sid n l

This hibernation issue is pretty annoying since I’m so used to the hibernate that I practically use it instead of shutdown all the time.
I’m used to shutdown or restart my pc every couple of days or whenever the machine freezes up completely and a hard restart is necessary.
Therefore the hibernate is a crucial function for me to use on daily basis
That is the case especially when I use my computer at school, whether I had to move from a place to place and start and stop my thinkpad notebook quite regularly.

After one of the last updates as I said, whenever I tried to hibernate my computer it didn’t worked out.
Everytime I pressed the fn + f12 to get the pc to hibernation I was unpleasently surprised by the message:

PM: Cannot find swap device, try swapon -a.

It took me a while until I found something that relates to the problem, but eventually I found out on the ubuntuforums some discussions about guys who has experienced the same shitty hibernation issue as me.
The exact forum thread which helped me can be red here

As it was described in the thread one probable reason for the issue was in the /etc/initramfs-tools/conf.d/resume file.

The solution from the forum suggested that the /etc/initramfs-tools/conf.d/resume file contains a wrong UUID identifier for the swap partition in fstab.

On a purpose some time ago during the updates of my Debian unstable distro I did removed completely the UUID identifier and prefered to use the good old and more readable way of directly placing the /dev/sda / /dev/hda etc. partitions.
That is why my /etc/fstab’s UUID prefixes to my partitions were completely commented in my /etc/fstab

Anyways as I suspected something could be wrong with the /etc/initramfs-toold/conf.d/resume after I checking the file I realized that some of the updates has messed it up wrongly including an RESUME= file value to be equal to

#RESUME='UUID=8e0901b1-d569-45b2-902d-e159b104e330'

As I haven’t used the UUID at all it should have contained:

RESUME=/dev/sda7 anf in my case it should have been sda7 because sda7 is my swap partition, however on other machines this could vary.

Changing this and testing my machine hibernation in GNOME produced the same error;

The ubuntu forum thread helped me to understand that actually using the hibernate in Gnome does execute the /usr/sbin/pm-hibernate shell script.

Furthermore I tried modifying this script to fix the shitty PM: Cannot find swap device, try swapon -a. but with zero success in …

As I already knew my /usr/sbin/hibernate shell script when invoked from my text console was properly hibernating my notebook and instead of simply using the menu;

System -> Shut Down -> Hibernate

Or via simply pressing the Fn + F12 hibernate shortcut I had everytime to switch to text console and from there, after logging in with the root account to issue the command;

noah:~# /usr/sbin/hibernate

This kind of complicating to this simple task of hibernation was quite un-user friendly. After some more desperate attempts to modify and fix up the pm-hibernate in order to make the script to detect my already mounted swap partition I finally gave it up with the script.

Another thing that I thought might be necessary to get rid of the message after edidting the /etc/init-ramfs-tools/resume script and setting the RESUME variable inside it to the proper one was:

noah:~# /usr/sbin/update-initramfs

This worked neither, so I was quite angry but still hoping that somehow I’ll be able to come up with some kind of work around to the hibernate issue.

Alas thanks God after a bit of thinking over the problem I was able to come with a very simple workaround I thought; “Well if the pm-hibernate is novoked via hibernate in Gnome and it’s not working but the /usr/sbin/hibernate is working, then I’ll just make the pm-hibernate to execute the /usr/sbin/hibernate instead of the /usr/sbin/pm-hibernate.

Guess what it worked like a charm 🙂

All I had to do to get rid of the very annoying error:

PM: Cannot find swap device, try swapon -a.

came up to issuing the following two simple lines in my gnome-terminal;

debian:~# mv /usr/sbin/pm-hibernate /usr/sbin/pm-hibernate.old
debian:~# ln -sf /usr/sbin/hibernate /usr/sbin/pm-hibernate

I know this kind of workaround to the hibernation Debian issue could be just temporary and probably after the next update of my hibernate Debian testing/unstable package it will stop working again, however it works at least for now .

Now my GNOME hibernate functions works again on my Debian powered Thinkpad and I’m happily hibernating it all the time again.
I hope this post will help up to somebody experiencing the same issues on his Debian, Ubuntu or any other Debian based distribution!

Set current day time in Linux to BIOS hardware clock

Saturday, November 27th, 2010

Strangely enough my date showed one hour earlier than the local time that is actually here in Holland.
I don’t understand why this happened but obviously the hardware clock of my BIOS has been turned back with one hour.

To fix the situation I’ve used the hwclock – query and set the hardware clock (RTC) command.

It took me a while until I remember how exactly I did it before but after a quick consult with the manul I came up with the right option to Set the Hardware Clock to the current System Time on my Debian Linux.

Here is the command which set the hardware clock to the current system time for me;

debian:~# hwclock --systohc

Cheers 🙂

How to show all sub-directories beloging to a directory with find in Linux

Saturday, November 27th, 2010

I’ve recently had to write a shell script for which I was required to list all the subdirectories that belongs to a certain directory to do so I had to execute the following simple command line;

find . -type d -ls|awk '{ print $11 }'

Before executing the above linux find command you will need to go to the directory in which you’d like to list all the subdirectories.

cd /some/directory/

Now the list of all sub-directories will appear. This command is very useful if it’s combined with a for bash cycle in my script I used the sub-directories find with the following for bash loop;

for f in $(find . -type d -ls|awk '{ print $11 }'); do
# place here something to do with each of the element of the subdirectory list
done

In my case I used it to download some pictures from a remote website to which I had no access but had the general structure of it, so within the loop I used the wget to fetch my missing pictures after extracting the pictures names from the mysql database.
Still the usage of the above loop and find command can be combined and probably be useful for many other admin tasks to achieve.

“named: the working directory is not writable” message on FreeBSD

Friday, November 26th, 2010

Recently I’ve noticed in my FreeBSD router in /var/log/messages the following messages;

Nov 25 15:23:47 pcfreak named[11339]: starting BIND 9.4.3-P2 -t /var/named -u bind
Nov 25 15:23:47 pcfreak named[11339]: command channel listening on 127.0.0.1#953
Nov 25 15:23:47 pcfreak named[11339]: command channel listening on ::1#953
Nov 25 15:23:47 pcfreak named[11339]: the working directory is not writable

My first reaction was that the BIND server is not working so I checked to resolve a couple of the domains which I’ve addedto my slave named server.

It appears each of the domains were resolving perfectly fine. However when I tried to resolve from the Internet I found it quite strangebecause I couldn’t resolve.

After a quick look up on the Internet about the same Issue I came to the following thread in freebsd.forums.org where the same problem was explained and an explanation on how to fix the error is explained there.

Anyways it seems the named[11339]: the working directory is not writable is not a crucial message and it’s just a warning

Thus you can safely ignore the message and continue on. I guess my problems with domains resolving from the Internet are caused because my ISP is filtering some UDP ports or something so I’ll contact them right away and check if this is the problem.

Checking and identifying server bottlenecks caused by hard drive DISK READ / DISK WRITE operations with iotop on Linux

Thursday, November 25th, 2010

As a server system administrator. Every now and then I have an overloading servers, where it is crucial to find the exact reason
for the server overloads / crashes.

In many occasions the top or htop are not enough for me to quickly get a server overload caused by a hard drive i/o operations.

When I got this kind of unusual problems caused by hard drives overheats, the system load avarage numbers increase tremendously. Still I had that cases in which the top shows only a couple of percents of server load and it seems initially like the problem is a kind of mystery.

At that cases I usually check the Hard Disk Drive (HDD) disk I/O operations to determine if, the file read and writes of the server are not exceeding the maximum amount of symultaneous read and writes a hard drive can support, or some kind of hardware problem is not causing a hard drive temperature overheats.

Of course the server hang ups caused by hard disk read or writes slowliness is not news but still it’s something that some administrators does fail to think about or even check and therefore often server access problems appear again and again for quite some time until the problem is identified and resolved.

Thus I wrote this small article to mention about the importance of the Linux System administrator to always have the iostat or sysstat utilities at hand and regularly use them to check the hard drive disk and writes to be sure server overloads doesn’t root at the hard drive read and write opeartions.

This is an absolutely necessary practice especially for busy servers.

My personal experience on the disk caused server slowliness and hangs are that this kind of problems with hard drive overheats more often occurs on servers running either an old hard ATA hard drives, or on Linux machines running Webserver or FTP, Samba etc. in which rapid file transfers from a huge number of clients is being requested or processed.

In that kind of shitty situations, installing and using the iotop will show you statistics about your hard drives Total DISK READ and DISK WRITES and will thus give you a hint if there is a server bottleneck caused by the harddrive.

The iostat is available for Debian package and installing it comes to;


debian:~# apt-get install iotop

Hope this article helps to some lame admin like me out there 🙂

My IKEA Marketing Analysis Project assignment

Wednesday, November 24th, 2010

When I was still studying in the International University College (IUC) also known as VUMK. I and a couple of other guys who used to be my school mates at that time had the assignement to complete a project with Marketing Analysis on the IKEA Company.

I found this project as an interesting learning point and as a good sample on how marketing analysis over a company business can be conducted.
As it might be of an use to some students out there I’ve decided to post the IKEA marketing analysis for free download here in my blog.

Maybe students or even some people aiming at business research can have a benefit of the data to be found in the report, which anyways I no longer need :).

I should say that the report is not too professional it misses some vital parts like Table of Contents (TOC), Sources, Appendix etc. but still I find it is a good example on how one can conduct a marketing analysis.

To download mye IKEA Marketing Analysis project follow the link here

Feedback on the report is very welcome! 🙂

A Roman Catholic Church made of Bones

Tuesday, November 23rd, 2010

I was having a coffee with a friend of mine in the University.Throughout the conversation he mentioned about A Church of Bones located in the Czech republic.
As this triggered my curiousity I wondered what is this, so I checked it on the internet immediately and come up to this Bone Church.

Here is an picture of the place;Roman Catholic Church of Bones it’s a Roman Catholic Bone Chapel (Church)

The Ossuary is said to contain about 40 000 and 70 000 people bone remains, it’s really amazing!
The whole Church is decorated with bones and skeletons in a classical Goth style. This place is an ideal tourist destination for every Gothic Rock / Gothic Metal fan 🙂

It’s so strange the Ossuary / Church of Bones has even a website

The complete story about how the Church came into existence and has evaluated to what it looks like today is found here and is also an interesting one to read.

Seldec Osuary, Church of Bones entrance

I don’t know what to say about the picture above, I find it as a complete abomination to Christianity.It even looks a kind of satanic ..
The more I’m getting to know catholicism,the more I start seeing it’s fallacy.
This is one more example on how much Roman Catholic Church has diverted from the true faith that was kept and tought by the Early Church fathers.
Of course in the Eastern Orthodox churches we have ussuaries but I have never seen such a thing … this is a bit too much.
Anyways apart from the scarines, it’s a really interesting one to see I guess. Here is a video about the Church of Bones I’ve found in youtube;