Convert wma/mp3 to ogg

Had a few wma’s I needed to convert to a different format as I was having trouble streaming them over the net with my internet jukebox. I decided to go with ogg since I don’t have a decent hardware setup, GUI converters did not give me the best output. I tried both oggconvert and soundconverter both are great apps, but my hardware didn’t do them justice, but the command line came to my rescue. To convert the wma’s to ogg I used this cmd

find -name '*wma' -exec ffmpeg -i {} -acodec vorbis -ab 128k {}.ogg \;

This will convert all wma’s in the folder and subdirectories to ogg and you don’t have to take out empty spaces in the file names, it handles them ok.
All the new files have a name “track name.wma.ogg” to rename them to “track name.ogg” I was given this handy scripts by my friends at LinuxQuestions.org.

for file in *.wma.ogg; do mv "${file}" "${file%.wma.ogg}.ogg"; done

and

for file in *.wma.ogg; do mv "${file}" "${file/.wma.ogg/.ogg}"; done

This last one is a more general solution that keeps the first part, and the last part, regardless of the extensions used

for file in *.wma.ogg; do mv "${file}" "${file%%.*}.${file##*.}"; done

just change your variable to suit whatever you are working with.

Trying out a lightweight Linux Distribution

I started trying out a few lightweight linux distributions for and old box “PIII, 256Mb” and it has been an interesting experience. Right now am checking out zenwalk and will try crunchbang in a day or so. It seems zenwalk is better suited than most common linux distros for new comers to linux than even well known ones like ubuntu and fedora.
Just to make a point clear am not bashing fedora or ubuntu, i have used both at one time or another and a few more. But I was looking for something I can use on a box for grandmama, that means few updates, no hassle install and most of the stuff running out of the box flash,mp3 etc.. I was just gonna try it for a day or so(Zenwalk) but it has ended up getting itself permanently on one of the partitions because it it is so user friendly, even my other half who is not sold on linux has been using it without any major complaints just the usual “where is word” and their collection of games even kid friendly ones is quite good.
Personally my main distro on my desktop/server is Centos, am looking forward to learning some new things along the way. I will come back and write on what I found out.

Edit: Tried cruchbang and a few more since I wrote the post and of those I tested slack based distros have the crown namely with Zenwalk and vector linux. One of the biggest problem with other linux distributions I found out during the test is that while the full live desktop versions running kde and gnome work ok out of the box, the xfce light verson most suitable for old hardware have video problems. I have now decided to stop the test and insted have opened up several bug reports with the ones I had problems with to try and resolve these problems.

Launch Adobe Reader from cli

I have adobe reader Installed on my box but there is no icon to launch it, so I checked up on how to do this:
From CLI type

acroread

to create a custom launcher use the command

%acroread

with the percentage sign added.
i normally don’t use it on my box but every now and then I come across a secured pdf that kpdf won’t open.
For more options check out this link
NB not all distros require the percentage sign when adding the cmd to a custom launcher.

yum-complete-transaction

After upgrading my box to centos5.3 I started seeing an error

There are unfinished transactions remaining. You might consider running yum-complete-transaction
first to finish them

On trying to run yum-complete-transaction the cmd was unrecognized.
. Solution: Install yum-utils, drop down to root environment (su -) and run the cmd yum-complete-transaction, it should run and fix your yum problem

.

Restoring wordpress from database

I messed up the permissions on my box and on restart three quarters of the services would not come up so doing a database backup was out. All my previous DB backups had the plugins still active. So when I tried to restore using them the blog is viewable, but when I try to log in I get a blank page on checking my Apache logs I saw the following error

Cannot use string offset as an array in wp-includes/capabilities.php on line 116

Restored database a couple of times nothing worked, tried upgrading & updating database nothing worked. Finally just installed WP from scratch with blank database. Opened up PhpMyadmin replaced new WP tables with tables from old WP DB backup, skipped table wp_options as it broke the new WP and both user tables as I had already setup the new user data on install, but I guess if you want to keep the old user data you can transfer these too.
Now I just made a backup of wp_options after restoring all the settings e.g blog name etc and turning off all plugins. This way next time all I have to do is just switch this table with the one from a backup whose plugins were still on at backup and am good to go.

unable to share new HD or Partition

If you have a new HD or a new partition and you are trying to add it as a samba share you might run into some problems. Check your log files if you see an error message like

 SELinux is preventing smbd (smbd_t) "search" to  (file_t)

.  Just log in as root and do

#  restorecon -v /mnt/newdrive 

the -v option tells it to give a verbose output of whatever its doing. You should be able to access your shares now. This puzzled me for a minute because I could still access other shares on the older partition/drive and even new ones as long as they were on the older drive but any new shares on new drive/partition were inaccessible.

Popular linux alternative apps

Looking for an alternative linux app compareable to your favorite MS apps . Well adler has just made your work a little bit easier. Just follow the link and there is a list of some 50 apps, that measure up to some commonly used windows apps.
I found Gmount-Iso to very interesting as I have been looking for an ISO app.

NB: This is a post I redid as I lost it when I messed up the box.

Wipe your old hard drive

Thinking of giving up your old computer, make sure you clean out the hard drive first and no reformating it is not a secure way of wiping your data. There are some free softwares available for you to use Secure Eraser,Secure Harddisk Eraser, and Eraser. i have received several donations for hd’s, which is why now am able to experiment with adding several features to the site, but of all of them none was cleaned out. I did clean them out all of them before doing anything with them. the point is people need to be more proactive especially in this days of identity theft.

Just installed fc10

Been running Centos for sometime and I have become used to the sparse updates every now and then. On the fc box the updates are insane now I remember why I choose a distribution with a long life cycle. The newer kernels in fc come in handy though my TV card works. Last time it worked with Linux I had fc5.

Fedora dvd not booting

I downloaded the ISO image twice, both times were torrent so the sum was checked I still run my own sh1sum to make sure. Burnt it onto 3 dvd’s before i gave up. Burnt it twice in k3b and once in nero. Used the slowest burn speed nothing worked. I even dl’d the live version and was contemplating using that, until I went through the dvd contents. In the Images folder is a file boot.iso just burn this as you would a regular iso image to cd. Boot from it and it will start the boot process just insert the dvd in another drive or when prompted to “I really didn’t wait to be prompted just left it in the other drive” but i guess it should prompt you at one time. This should solve your problem, hope this helps someone out there.