Sunday, January 31st, 2010 | Author: muthii

Do you have a linux box or you have booted of a live cd and you want to mount a samba share here is the command(s) for it.

#smbmount //ipaddress/share /mnt/moountfolder -o username=username,password=password

or

#mount -t cifs -o username=username,password=password //ipaddress/share /mnt/mountfolder

Any of the two methods above should work. You can use the name of machine instead of ip address if you want, and no space between username and password else you will get an error.

smbmount
Wednesday, January 20th, 2010 | Author: muthii

Am assuming you already have MySQL installed, download the MySQL Connector-J from their website.

Unzip/Untar the file and copy mysql-connector-java-version-bin.jar to java jre/lib/ext.  Doing this will allow the java interpreter to find the driver.

Category: Linux  | Tags:  | Leave a Comment
Sunday, January 17th, 2010 | Author: muthii

In case you ever forget the your password in Linux there are several ways you can go about resetting it if you have physical access to the machine.  On your boot up menu select the recovery mode option you should end up at a command prompt on a black screen type the following cmd

#passwd username

Remember to change out ‘username’ with your real username. You will be prompted to enter the password twice, when done just restart your machine and you should be able to log in with your new password, if the cmd completed successfully . This method works in some Linux distributions but not all of them.

Another option is to boot up from Live CD, open up a command prompt and mount your HD as root/super user or with sudo whichever applies. Chroot your mounted drive then use the passwd cmd to change password as below.

$su

#mount  /dev/hda1 /mnt/hda1

#chroot /mnt/hda1

#passwd username

You will be prompted to enter the password twice when done just restart your machine and you should be able to log in with your new password

NB: To reset root password with the above methods just run the passwd command without including a username.

Thursday, December 03rd, 2009 | Author: muthii

I just came across a Linux compatible MP3 player for the first time, it’s called ematic check them out here if you know of any others please leave a link in your comment am interested in finding one.

Category: Old  | Leave a Comment
Tuesday, October 27th, 2009 | Author: muthii

I was trying to work on a computer the other day, it would not recognize it’s DVD drive and switching with another dvd drive did not make a difference. The error message provided was
“Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)”

To solve this Code 39 error, follow these instructions:

1) Close all open programs

2) Click on Start, Run, and type REGEDIT and press Enter

3) Click on the plus signs (+) next to the following folders

  • HKEY_LOCAL_MACHINE
  • SYSTEM
  • CurrentControlSet
  • Control
  • Class
  • {4D36E965-E325-11CE-BFC1-08002BE10318}

4) This folder is the DVD/CD-ROM Drive Class Description in the registry. Look for any of the following names in the right hand column.

  • UpperFilters
  • LowerFilters
  • UpperFilters.bak
  • LowerFilters.bak

5) If  any of the above keys shown in step 4 are listed, right-click on them and choose Delete
6) After deleting the keys, close the Registry Editor
7) Reboot your computer
8) Open My Computer and check to see if your CD or DVD drives have returned. You may also want to open Device Manager and verify that the yellow exclamation and error code on the CD or DVD drive is gone.

I got this info at this site and they even tell you other things you can do with drive errors.

Category: Computer, Windows  | Leave a Comment
Friday, September 11th, 2009 | Author: muthii

Like most people I prefer to use centos supplied apps from their repos as it just makes keeping things updated easier. So I use the eclipse supplied by centos which does not have Junit4 if you would like to enable it here are the steps I followed:

1.Download eclipse from there site the .tar version

2.Extract folder org.junit4_4.5.0.v20090423 and file org.eclipse.jdt.junit4.runtime_1.1.0.v20090513-2000.jar and copy them to folder /usr/share/eclipse/plugins/ download file junit-4.1jar and place it in folder org.junit4_4.5.0.v20090423

3.Restart eclipse and you should be set. Happy Testing!!!!

NB: Depending on the eclipse version you download the numbers on the folders and files may be different, and incase the new versions require a different file than junit-4.1.jar eclispe will tell you the new version needed.

the Junit-4.1.jar I used is here or you can google it if you want.

Wednesday, September 09th, 2009 | Author: muthii

I have read hundreds of articles with the above headline but it wasn’t until I read this article that I realized just how far Linux has come, the fact that it can compete toe to toe with an advanced os like OS x is just insane let alone come out ahead. I can’t wait to see in the years ahead how Linux evolves, I have been using it for the last 5 years and am still impressed and always learning new things about it.

Wednesday, August 19th, 2009 | Author: muthii

I found this neat cmd to use when trying to find files larger than certain sizes e.g

find / -type f -size +200M

If you want files less than that size you can do

find / -type f -size -200M

For other ways to use the cmd check out this post where i got the info from.

This other cmd finds files larger than 10M and calculates their sizes too.

find / -size +10240000c -exec du -h {} \;

Remember in all cases to change “/” to the location you want to search for the files e.g “/home/username”.

Thursday, August 13th, 2009 | Author: muthii

By default Gtkpod uses xmms to try and play songs from your Ipod, a few linux distributions come with xmms. If yours came installed with it first remove it as it does not play music from your Ipod. Then go ahead and install
xmms-mp3

You should now be able to play music from your Ipod with Gtkpod. Although xmms is not the latest player I like it because it’s small and lightweight.

Monday, August 10th, 2009 | Author: muthii

For a single file:

ffmpeg -i -acodec libmp3lame -ar 22050

For a bunch of M4B files:

for m4b in $(ls -1 *.m4b); do ffmpeg -i $m4b -acodec libmp3lame -ar 22050 ${m4b}.mp3; done