Archive for the ‘LINUX’ Category

Fedora aMsn – Loading TkCximage failed

Wednesday, January 7th, 2009

System: Fedora 10

Software: aMsn

Problem: After upgrading my server from Fedora 8 to Fedora 10, when I now
start aMsn, I get the following error: “Loading TkCximage failed. This module
is needed to run aMSN. Please compile aMSN first, instructions on how to
compile are located in the file Install.”

Now, the aforementioned “INSTALL” file is very basic and not really that
helpful unless of course you happen to be a LINUX guru OR you use it as a
reference during or after following my solution.

Synopsis: Obviously Google is your friend in these situations and I found lots
of people all with the same error. The problem was that they were using
earlier versions of Fedora, up to version 4 and their fixes did not work. I
also found solutions for different flavours of LINUX – from Debian to
ArchLinux to Ubuntu and Gentoo. I could not find any specific solutions to my
specific situation. So I did what any techie would do and I studied the
various solutions, even trying some of them, put them through the grinder and
eventually created a solution that fixed my specific issue. I hope it helps
other people whether or not they have my exact error.

Solution: Ok, lets get cracking on. To start press any key…. oops no sorry
was daydreaming for a moment. Start by opening a shell and login as root and
then let the fun begin…

$ su -                             # Logs you in as root. You will be prompted for password
$ cd /home/username    # Move to our home directory. Substitute username with
# your own actual login username.
$ yum remove amsn
$ yum remove tcl            # This will remove tcl and tk and other dependencies

# Time to rebuild it – can we fix it? Yes we can!!

$ yum install amsn          # This will re-install tcl and tk and other dependencies.
# Re-installing aMsn is not the important bit here we are
# just doing it to get the relevant tcl and tk dependencies.

# Now some extra packages that should be installed – Remember you get information about
# any package by doing ‘yum info <name>’ and I recommend you do so to read the descriptions
# which should hopefully make it clear why they are needed.

$ yum install tcl-devel
$ yum install tk-devel
$ yum install tcltls
$ yum install imlib
$ yum install imlib-devel

# Now we are going to backup the aMsn directory. Please note that this step
# is entirely optional.

$ mkdir a-bak
$ mv /usr/share/amsn/* a-bak

# Now we need the aMsn source tar ball which you can download and move here any
# way you like. I am going to use WGET because I know the link to the latest
# version at time of writing. The source package is used to build a binary
# for your Linux distribution, Fedora 10 in my case. I’m also going to move
# into my Download directory because that is where I generally store my
# downloads – username is your login username.

$ cd /home/username/Download
$ wget http://prdownloads.sourceforge.net/amsn/amsn-0.97.2.tar.bz2
$ ls -lth amsn*
-rw-r–r– 1 root     root     3.3M 2008-07-25 16:14 amsn-0.97.2.tar.bz2

# As you can see from the listing command our aMsn tarball downloaded just
# fine. We now need to unpack the tarball.

$ tar -xvjf amsn-0.97.2.tar.bz2

# By the way if anyone knows how to extract files, with tar, into the
# current working directory then please let me know. So, we now
# have to move into the newly created amsn-0.97.2 directory.

$ cd amsn-0.97.2

# The installation now consists of three commands. The first step verifies
# your system. It stops if a required package cannot be found. The second
# step builds the application. This step could take 2-10 minutes, depending
# on your system. The final third step installs the actual files.

$ ./configure
$ make
$ make install

Job Done! Start aMsn and enjoy chatting to your mates again.

I scoured the internet for a Fedora 10 specific solution but to no avail.
Maybe mine is the first =;-)

I cannot take all the credit though because I came up with the solution by
looking at what other people, using other LINUX distros, did to fix it. So I
have taken bits from their solutions and sorted the wheat from the chaff and
created a solution that works on Fedora 10 and possibly earlier versions of
Fedora too. Enjoy!

Burn an MP3 with K3B

Friday, March 28th, 2008

This article is specifically aimed at Fedora users when using the Gnome desktop. However, it should be easy to translate it to your own specific Linux distro, I think.

When starting/using K3B, you may get the following message:-
————————————————————————————————————————————————–
Mp3 Audio Decoder plugin not found.
K3b could not load or find the Mp3 decoder plugin. This means that you will not be able to create Audio CDs from Mp3 files. Many Linux distributions do not include Mp3 support for legal reasons.
Solution: To enable Mp3 support, please install the MAD Mp3 decoding library as well as the K3b MAD Mp3 decoder plugin (the latter may already be installed but not functional due to the missing libmad). Some distributions allow installation of Mp3 support via an online update tool (i.e. SuSE’s YOU).
————————————————————————————————————————————————–

Now, I had previously installed libmad so initially was somewhat confused by this message as libmad was installed and I thought that this was all that was needed to give me MP3 support. When performing a ‘yum install libmad’ it did not request for any dependencies. So after further research, I was surprised to find I also needed to install libmad-devel (MPEG audio decoder library development files) and madplay (MPEG audio decoder and player) but that was still not the end of it, oh no…

The final piece of the jigsaw was a little K3B plugin by the name of k3b-extras-nonfree-1.0.3-1.lvn8.i386.rpm – should you need the RPM package you can find the relevant one for your disto & version at http://rpm.pbone.net/ and just search on “rpm-mp3″ without the quotes. Currently needed for RedHat and Fedora and you should be able to get the RPM package for your specific version. Or if you prefer then just open a terminal and perform a yum install k3b-extras-nonfree and job done.

***UPDATE*** as of Fedora 10 you should do yum install k3b-extras-freeworld and NOT k3b-extras-nonfree.

In Ubuntu you may only need to Run the following code in a terminal: sudo apt-get install libk3b2-mp3 – unsure as to whether you need the other stuff  (or similar), above?

Now when you run K3B, your system configuration should get the all clear and you can burn your MP3’s using your chosen method.

Upgrading Wordpress with SVN & RSYNC

Thursday, October 18th, 2007

The first time I upgraded my Wordpress installation I used the standard upgrade instructions and although it went through without a glitch I did find them long winded and time consuming, it took over 10 minutes so in my book that is time consuming.

If you are fortunate enough to have SVN on your server then I recommend you convert your Wordpress installation to be able to upgrade with SVN. The conversion is quick and easy and future upgrades using SVN are a doddle and very fast.

Now we get to the crux of why I’m writing this – I do not have access to SVN and nor am I allowed to install it on the server so I came up with a work-around for everyone else who finds themselves in this situation. I am still fairly new to LINUX, so for more experienced users this method is probably obvious or perhaps even considered pointless? but nonetheless it works for me.

This is in relation to the stable version and not the trunk (unstable) version of Wordpress. The link for the instructions for converting your wordpress installation to use SVN along with upgrading using SVN can be found here: http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion – that is the page I used.

On that page, scroll down to the instructions for “Converting a “Traditional” WordPress Blog to a Subversion Checkout” and go to “1. Create a new temporary blog directory”. On your local server/PC, follow the instructions below “First, create the temporary directory and check out WordPress there:”. But we need to add an additional step after performing the SVN. We now need to get the blognew folder on to the remote server before continuing and this is where we use RSYNC over SSH:

rsync -avz /home/username/blognew/ -e ssh remoteuser@remotehost:/home/sites/mydomain/public_html/blognew

Don’t forget, we are still working on the local server/PC and you will have to amend the RSYNC command accordingly depending on your system, so “/home/username/blognew/” is where you downloaded wordpress to using SVN. And “username@remotehost:/home/sites/mydomain/public_html/blognew” is the destination on your remote server. You may need to confirm some details with your host if you are not sure of them. For instance “remotehost” can be an IP address or URL/domain. In my case, I use an IP address. The path after “:” should be where you place your website files and in the location directly above the folder of your wordpress installation.

Then, all the following instructions, below “Next, copy the old wp-config and .htaccess files to the new site:” are performed on the remote server.

And that is it – basically a 2 minute job. All future upgrades can then be done by repeating the above. Please note, I am only using RSYNC because I do not have SVN installed on my remote server. If you have SVN on your remote server then you do not need the additional RSYNC step. Hope that makes sense and helps other people in the same situation.

First Crash? – Maybe Not!

Monday, September 10th, 2007

I had my first crash in LINUX or did I?? Everything froze, in the GUI, and any item/icon/button etc I clicked on gave no response whatsoever. I could not even open a shell (or so I thought) to kill off the rogue process, so resigning to defeat (far too easily I hasten to add) I simply rebooted.

Now, I have recently discovered from colleagues that I could have used CTRL+ALT+F1 to get a shell and obviously from here I could have discovered the rogue process and killed it off. Then I could have used CTRL+ALT+F7 to return to the GUI. I was also informed that if that did not work then I could use CTRL+ALT+Backspace to restart XTERM and return to the login screen without the need to reboot, D’oh! and double D’oh!

What’s Your Flavour and Why?

Friday, July 27th, 2007

I chose to install Fedora 7 (Moonshine) on my computers at home and am in the process of creating a nice little wireless network (WLAN), nearly completed now. I’ve got to say that I wished I had chosen LINUX earlier – O the power is sending my head dizzy, its great! I still use Windows XP (spit spit) on my laptop but that is purely for playing CSS and one or 2 other games. Fedora is now my operating system of choice.

I chose Fedora because it is very similar to the flavour used at my workplace so obviously I get double the benefit and should increase my knowledge quicker – well that is the theory anyway =;-)

Top 12 LINUX Commands

Tuesday, July 17th, 2007

What are your top 12 LINUX commands? I nicked this idea from my mate, Paul. But mine is considerably better because it lists your top 12 most recently used commands where as his only lists a measly 10… so, without further ado here is the command:
history | awk ‘{print $2}’ | awk ‘BEGIN {FS=”|”} {print $1}’|sort|uniq -c | sort -rn | head -12

Mine are:-

172 ls

85 vi

84 ps

61 cat

50 tail

39 yum

39 less

32 telnet

29 whereis

27 locate

25 service

18 kill

I also reckon my list is better than Pauls as mine is quite poetic, if you look hard and, basically, his isn’t… lol

Handy tip for newbies like me

Sunday, July 15th, 2007

If you are a newbie to LINUX as I am then like me you probably sometimes forget those cool switches you used in a command or maybe you edited a configuration file but forgot its path. For example, I might have been working with spamassassin and forgot how to start it or maybe forgot I edited its config file. I’m sure one of the first things you learned is the arrow up key to scroll through your history but what if you have used loads of commands since using the specific one your interested in… Try this:

[root@HostBlade ~]# history | grep spamassassin

This will search your command history for all occurences of spamassassin and return results similar to the following:

799 vi /etc/mail/spamassassin/local.cf
800 cat /etc/mail/spamassassin/local.cf
803 cat /var/spool/exim/.spamassassin/
821 ps aux | grep spamassassin
824 /etc/init.d/spamassassin start
831 chkconfig spamassassin on

So, from the above I can see that line 799 is what I typed to edit the config file. I can also see that line 824 is what I typed to start spamassassin.

I have found that using the history command in this way has really help me to remember more and more and although I still use it, I don’t use it as often as I used to. I hope other newbies will find this helpful. And, for all you LINUX gurus out there chuckling away to yourselves then don’t worry, your respect is still assured and your presence is still welcome.