Archive for the ‘Ubuntu’ Tag

ConvertAll for Mint 8 and Ubuntu 9.10 broke

I don’t use ConvertAll very often but when I do, it’s pretty darn handy.  It’s a conversion program. Miles into Kilometers and so on. We’ll version 0.4.2, the version in the Mint 8 and Ubuntu 9.10 repos, seems to be broke. I found a bug report >here< that included a comment >here< with instructions on how to fix or at least get around the problem. Which is pretty much, download version 0.4.3 . This is a solution from Colin Mills that fixed it for me. Colin writes:

“I can confirm that there is a bug in this version of Convertall. The developer ( has released a new version with a number of bug fixes.
If you are comfortable running the terminal, there is an alternative. Uninstall the current version of Convertall. Download and unpack the latest tar file from the website. Since the new package has the same dependencies as the current version, open a terminal and enter:-

sudo apt-get build-dep -y convertall
cd Convertall
sudo python

This will install a working version of Convertall. In my case, Convertall was not shown on the menu, so I used the Alacarte menu to add it. The launch command is “convertall’ and the icon is in “/usr/local/share/icons/convertall”.

Hopefully, the new version of Convertall will be ported to the Karmic repos at some point.”

Like I said, this worked for me except for the icon. It wasn’t there. That’s ok though, not needed. Thanks Colin Mills.

Ubuntu 9.10 : Disable recently viewed documents

I was asked how to disable recently viewed video files in Movie Player. Well looks like there are no GUI options to do this. I mean no options in Gnome or Movie Player to shut this feature off. It’s not an option but we can get it done. This solution also shuts off the Recent Documents feature in Gnome. I’ve only had success with this in Ubuntu 9.10. I doesn’t work on Debian 5(Lenny). That’s as far as my testing has gone. I will try it on Mint 8…. but not tonight. First lets create a hidden file in our home directory. Open a terminal and type:
touch ~/.gtkrc-2.0
You now need to open the file you just created with gedit. Type:
gedit ~/.gtkrc-2.0
sudo is not needed. You created this file in your home directory, you own it. 🙂 That will open the blank document “.gtkrc-2.0”
Now copy and paste this command into that document and save it.
For this to take affect, you need to restart Gnome. You can reboot your machine, or restart Gnome from the command line. To restart Gnome from the command line, shut down all running applications. Firefox, gedit….whatever…shut it down. You might want to write this command down. Now open a terminal and type:
sudo /etc/init.d/gdm restart
Done! No more history. Go to Places > Recent Documents, and it should be grayed out…. empty. Now open Movie player. The file history should be gone.
I got my info from here. >Ubuntu Guide<

Hope this helps…

Ubuntu 9.10 : Adding and automounting a second hard drive

I really should document things like this while I’m doing it and not after the fact. This is how I think it went. I was given and old hard drive. I figured I’d add it to the Ubuntu 9.10 install that I’m using as kind of a media server. It would be nice to have a second hard drive that just contains media. In the end, the hard drive was trashed, but I will repeat this process with a new hard drive soon. I think I need a terabyte drive anyway.

The PC involved/Hardware:
MB: Epox: EP 8RDA3+ Pro
CPU: AMD Athlon XP 2400+ (2Ghz)
Ram: 1.5 Gig
Video Card: Nvidia GeForce 4 Ti 4200
HD1: Western Digital 120 GB drive (IDE)
Adding HD2: 300 GB Western Digital (IDE)

First thing I did was shut down the computer. I made sure HD1 and HD2 were both jumped CS (Cable Select). I connected HD2 to the secondary position(middle) of the IDE cable. Connected the power plug and turned the computer back on. I’m not sure why but I was expecting it not to boot… but it did.

HD2 showed up in nautilus, but it was not mounted. If I click on it, I need to enter my password to mount it. I’ll deal with this later. I need to format the drive first. I went to System > Administration > Disk Utility. Selected HD2, deleted the current partition, formated it ext4 and I believe I was asked if I wanted to take ownership of the drive… I think. Well I did. Oh yea, It asked for a new volume name and I called it bucket. I’m gonna be tossing a lot of stuff in.. the… bucket…. …. nevermind.

At that point I could open nautilus, click on bucket, enter my password to mount the drive to read and write to HD2(bucket). I tried to navigate to this drive with mediatomb and was informed that mediatomb does not have permission to access this drive. Ok. Anyway, nautilus looks like this right now.That’s after I manually mount HD2(bucket).

I have to edit the /etc/fstab file to automount HD2. So I opened a terminal and typed:
$ sudo gedit /etc/fstab

It looked like this:

After a lot of research on the net, I narrowed my entry down to this:
/dev/sdb1 /media/bucket ext4 rw,user,auto,exec 0 0
I got the /dev/sdb1 /media/bucket information from the disk utility at System > Administration > Disk Utility. I also had to create the mount point. I opened nautilus with root privileges:
$ gksudo nautilus
I then made my way to /media and made a folder named bucket.
My fstab file now looks like this:

I commented above my entry there at the end. It works. It is mounted when the machine boots and read write access for myself and other programs(mediatomb) is not a problem. I’m going to be doing this again real soon because this disk is trashed.

Ubuntu 9.10 serving the PS3… pt 4

Ubuntu 9.10 serving the PS3 and everything involved… pt 1 : MediaTomb
Ubuntu 9.10 serving the PS3 and everything involved… pt 2 : HandBrake
Ubuntu 9.10 serving the PS3 and everything involved… pt 3 : Mashpodder
Ubuntu 9.10 serving the PS3 and everything involved… pt 4 : cron

So far I have Mediatomb installed and serving media to my PS3. I’m using Handbrake to rip DVD’s that I own and serving those mp4’s to the PS3 via mediatomb. I am downloading videocasts from the Internet via mashpodder and serving those files to the PS3 via mediatomb. Now I want to automate the downloading of those videocasts and the deletion of them after a week or so. For that we need cron… or crontab.

With cron, I’m going to automatically run mashpodder in the middle of the night and delete the old files that I have been downloading into those Audio and Video folders.

So open a terminal and add some cron jobs. At the commandline type:
$ crontab -e

Now you need to know the path to the script. My path is mashpodder-svn23/ .
Now how to set it up or write it in our cron tab file. The format is:
* * * * * [COMMAND]
1st * – Min (00-59)
2nd * – Hour (00-23)
3rd * – Day of the month (00-31)
4th * – Month (01-12)
5th * – Day of the week ( 01-07)

00 03 * * * [command] Would be an entry to run a script every night at 3am.

My mashpodder entry looks like this:
30 03 * * * mashpodder-svn23/
It runs at 3:30am every night.
If i wanted it to run every Sunday at 3:30am, it would look like this:
35 03 * * 07 mashpodder-svn23/
It seems that the week starts on a Monday in cronland. I think we get the point. Experiment, play around with it.

I have mashpodder putting those video/audio files in these directories.

I want to delete my videocasts after 10 days and my audiocasts after 180 days. I like to keep the audio around a little longer. I like to be file specific. My ogg file delete entry looks like this.
/home/terry/podcasts/Audio -name '*.ogg' -mtime +180 -exec rm -r {} \;
Now add specific times to delete these files. I use the same timing scheme that I used to run mashpodder.
I had to hunt around for the right delete command. The one I’m using works and is specific. It is also recursive, meaning it hits all subfolders. It will leave all other files alone. I know this is a bit confusing… at least it was to me but I got it hammered out and working. My crontab file looks like this:

I didn’t have to specify the Audio or Video folders in the delete commands. During the hunt for the correct delete command I had commands that would delete everything… even the folders themselves. The above commands do not do that. They are specific. I just left the Audio and Video folder part in there. My current crontab file is >here<.

Lots of good information here. Command scheduling with cron.

That’s it. I just let that machine run 24/7 and it does it’s thing. I fire up the PS3 on a daily basis to see what shows up. Like I said in the other posts, I’ll be re-doing/writing this all over again when the next Ubuntu LTS comes out. Maybe then I can document the whole process a little better. This was an experiment that snowballed and worked out well… for me anyway.

Ubuntu 9.10 serving the PS3… pt 3

Ubuntu 9.10 serving the PS3 and everything involved… pt 1 : MediaTomb
Ubuntu 9.10 serving the PS3 and everything involved… pt 2 : HandBrake
Ubuntu 9.10 serving the PS3 and everything involved… pt 3 : Mashpodder
Ubuntu 9.10 serving the PS3 and everything involved… pt 4 : cron

Installed from synaptic:(make sure this is installed)

Once you have MediaTomb set up  and scanning the media filled folders you want to serve, lets add some more media. I want to download videocasts… or video podcasts.The best option for me is Mashpodder. I say this because I want to automate this downloading of the videocasts on a nightly bases. The automation part will be in part 4. Alright, lets get Mashpodder. Go >here< and download mashpodder-svn23.tar.gz

Download the file to your home directory. In your home directory, right click the tar.gz file and select Extract Here. Or open a terminal and navigate to your home directory. Type:
tar xvf mashpodder-svn23.tar.gz

Both methods should land a folder named mashpodder-svn23 in your home directory. Open this folder. The file we want to look at is mp.conf . Open it with gedit. The stock file should look like this.

It’s pretty self explanatory. What is not explained is that mashpodder will auto generate a “podcasts” folder in your home directory and save the downloaded podcasts here in what ever folder you decide to put them in. Also, your mp.conf file will need to live in this podcasts folder also. I just copied the mp.conf file from the mashpodder-svn23 folder to the podcasts folder… that I just created. Now make the necessary changes to the mp.conf file in your podcasts folder. I split mine into Audio and Video folders. It makes it easier to browse with the PS3. Now this is what my mp.conf file looks like as of today. It’s also located >here<.

I only listen to 2 audio oggcasts on the PS3… because they are music. All other audio pod/ogg casts are handled by gpodder on my laptop. Those go on my portable media player.

Now lets make sure the script executable. Open a terminal and navigate to the mashpodder-svn folder in your home directory. Type this:
$ chmod 755
chmod – Changes the permission of a file.
755 means read and execute access for everyone and also write access for the owner of the file.
Now run mashpodder. Open a terminal and navigate to the mashpodder-svn folder in your home directory. Now type:
$ ./
It might seem like it’s not working but it is. Give it a few minutes.

Now add the podcasts folder to your Mediatomb scan and all of the videocasts that mashpodder downloads should show up on your PS3 menu. Provided that they are the correct format. Check that out beforehand. Most videocasts these days are in the mp4 format(.mp4/.m4v) . The Mediatomb scan needs to be a recursive scan to get the subfolders.

I”ll be redoing this whole series probably within the year. This is a trial run that is working out pretty good.

Part 4 will cover cron. Every night I’ll be auto downloading videocasts and auto deleting old videocasts. Automation… dig it!

Update: Field 3 in the mp.conf file doesn’t always work as advertised. I just added a new videocast and gave it a 3 in field 3 and it only fetched 1 episode. I should have gotten 3 of them. Oh well. I do know that it will stay up to date though.

Ubuntu 9.10 serving the PS3… pt 2

Ubuntu 9.10 serving the PS3 and everything involved… pt 1 : MediaTomb
Ubuntu 9.10 serving the PS3 and everything involved… pt 2 : HandBrake
Ubuntu 9.10 serving the PS3 and everything involved… pt 3 : Mashpodder
Ubuntu 9.10 serving the PS3 and everything involved… pt 4 : cron

Once you have MediaTomb set up  and scanning the folders you want to serve, let’s put some media in them. The thing that I have always wanted is my daughters DVD collection at the click of a button. I want her DVDs on a media server because she likes to watch them often and they seem to get pretty scratched up when she handles them. I still think that the DVD/disk media sucks because it’s so fragile. I can’t keep replacing Snow White every time it gets scratched by someone because it’s handled so much. I only backup DVDs that I have bought and I don’t share them. I have a good set up and I want to keep it that way.

So how to I get the DVDs onto my MediaTomb server so I can watch them via my PS3 on my TV upstairs? Handbrake. In part one I set up MediaTomb on Ubuntu 9.10 and set it to scan/serve a folder(Video) in the home directory. In part two I will convert a DVD into an mp4 file with Handbrake, then put it in that directory(Video). Easy as that. Why an mp4 file you ask? Because the PS3 likes the mp4’s .

I’m using a different machine to do the converting. It’s newer and faster. Debian 5 (Lenny) is the OS on this machine. The machine set up is here.

Installed from synaptic:(make sure this is installed)

You can also install the latest and greatest from the HandBrake site here. Pick your flavor.

Once HandBrake is installed, launch the application. Applications > Sound_&_Video > HandBrake.
It should look something like this:

I almost forgot. The movie you want to backup, put it in your set top box DVD player and start the movie. Once the actual movie starts, look to see what title it’s playing. You might have a Display button on your remote or something like that. Sometimes when you hit the skip chapter button, an on screen display will tell you the title and chapter. It’s sometimes abbreviated as TT. It could be from 1-99. Most movies play title 1 but a handful will play a different title. If you choose the wrong title, HandBrake will make the back up and it will look great….but the chapters will be out of order. So, check out the DVD in a regular non PC player first and get that title number.

Once you have the correct title, put the DVD in the DVD player/burner in your PC. With the DVD in the player and HandBrake open, Click Source. It’s in the upper left of the HandBrake screen(see image above). You will then be looking at a Select Source screen. Select your source on the left hand side, then click Open(see image below).

HandBrake will scan the DVD and select a title. Now look on the HandBrake screen and see if the correct title is selected. If not, select the correct title via the drop down menu next to it. Now select the location that you want your new mp4 to be saved. Then change the file name. I named this one example.mp4 . Hit start and that’s it. The default settings is perfect for the PS3. It will produce a file approximately 1-1.5 gigabytes. It might seem large but it’s very good quality. It usually takes about 2 hrs on my machine so have some patience. Some versions of HandBrake have a predefined PS3 setting. I’ve read that some people have had problems with this setting. The default mp4 setting works great for me. Nothing to adjust. The mp4 files look great playing on a large flat screen TV.

Once the conversion is done, put the mp4 file in the Video folder that MediaTomb is scanning. Open MediaTomb and rescan the folder so it shows up right away. Or you can wait until auto scans. Now you should be in business.

Part 3 will cover Mashpodder and possibly cron. Mashpodder to auto download video casts into my MediaTomb Video folder and a cron job to auto delete them after so many days. But, i might split those two up.

Ubuntu 9.10 serving the PS3… pt 1

Ubuntu 9.10 serving the PS3 and everything involved… pt 1 : MediaTomb
Ubuntu 9.10 serving the PS3 and everything involved… pt 2 : HandBrake
Ubuntu 9.10 serving the PS3 and everything involved… pt 3 : Mashpodder
Ubuntu 9.10 serving the PS3 and everything involved… pt 4 : cron

A PS3 for Christmas this year?… Lets get started. My original plan was to just feed some movies from a server/PC in my basement to the PS3 but things have changed. This will be a multiple part series so I’ll do the best I can to explain it. I’m doing this for my benefit, so I can set the whole thing up again once the next Ubuntu LTS comes out. If I can do this, most anyone else should be able to do this.

Parties involved:
Ubuntu 9.10
A couple of bash scripts

So in pt 1, I’ll be installing and setting up MediaTomb.

The PC involved/Hardware:
MB: Epox: EP 8RDA3+ Pro
CPU: AMD Athlon XP 2400+ (2Ghz)
Ram: 1.5 Gig
Video Card: Nvidia GeForce 4 Ti 4200

Installed from synaptic:(make sure these are installed)
mediatomb 0.12.0

The Idea here is to have Mediatomb serve up some video to my PS3.
The OS on the PC is Ubuntu 9.10 . I installed MediaTomb right from Synaptic. The version in the repo’s is fine. Once installed, go to Applications > Sound_&_Video > MediaTomb. That will launch MediaTomb in your default browser(Firefox). It should look something like this:

Now you need to add which folders you want Mediatomb to scan/serve. At the top of the Mediatomb page you have Database and Filesystem. Click on Filesystem. Now if you have specific folders that you have your media in(video/audio) then specify each folder. Lets say you want to scan the video folder in your home directory. Then under Filesystem, click home > Your_user_name > videos.

Now to start scanning that folder, you click on the plus sign with the little arrows going around it. It’s in the upper right corner of the MediaTomb page.You will now get this page:

I have selected
Scan Mode: Timed – I want it to scan in specific intervals.
Scan Level: Full – I want a full scan.
Recursive: Checked – I want it to scan all subfolders.
Include hidden files/directories: Checked – Yes I want it too.
Scan Interval (in seconds): 1800(default-30min)

Do this for each folder that you want scanned. Now you should be set. If your MediaTomb and PS3 are plugged into the same network and MediaTomb is running, the PS3 will see it and display your Video folder and it’s supported contents. Look around on the PS3 menu’s under Video. You’ll see the MT icon.

Next set up your config.xml file. The location of that file is:
I used gedit to open and edit the file. Type at the commandline:
$ sudo gedit /etc/mediatomb/config.xml
Read through the file. I added ogg support because the PS3 does not support ogg. I left comments in my file above the 2 changes I made for the ogg addition. Also for ogg support, install VLC. It’s involved in the transcoding. VLC is in the repo’s. And turn on transcoding. The transcoding change is also in red.

For preview/thumbnail support, enable ffmpegthumbnailer. Enabling ffmpegthumbnailer is also in red. Then install ffmpegthumbnailer if you haven’t already. I installed it using synaptic.

This is my current config.xml file. All my changes/additions are commented and/or in red. I was going to set up MediaTomb to auto start on start up but I appears that it does that automatically. Maybe because I also installed mediatomb-daemon. I’ve done nothing else make it do this… but I like it.

Part 2 will cover converting DVD’s with Handbrake and the file format for the PS3.

More on the way… I just have to remember what I did. I will rewrite this whole thing on the next install. This install was more of an experiment that worked.

*A little bit of confusion*
If you haven’t noticed, there are two different locations for the config.xml file. One is in your home directory. It’s hidden:
The other location is:
The version that I have installed uses the config.xml file in the etc/mediatomb location. This is also the config.xml file that is used during the auto start when Ubuntu boots. If you open MediaTomb from the command line, The config.xml file in your home directory is used. I’m not using that one. So, just open MediaTomb from the drop down menus and edit the config.xml file located at etc/mediatomb/config.xml and everything will be fine.

* I’m sure I’ve missed something. I’ll add them in and fix my spelling and grammar errors as I go.*

Update: This auto start thing isn’t 100%. I’ve had to reboot on more than one occasion to get it to start on it’s own. I’ll have to look into it more.

Ubuntu 9.10, Resolution Issues

Ubuntu 9.10 (Karmic)
Kernel Linux 2.6.31-14-generic
Gnome: 2.28.1

I just installed Linux mint 7 on this machine and had resolution issues. I thought I’d try Ubuntu 9.10 on the same machine. Sadly, Ubuntu produced the same results. But, the fix was easier. Same Hardware. For more in depth details, check out my previous post on Mint 7.

MB: Epox: EP 8RDA3+ Pro
CPU: AMD Athlon XP 2400+ (2Ghz)
Ram: 1.5 Gig
Video Card: Nvidia GeForce 4 Ti 4200

I installed Ubuntu 9.10. At first boot, my best resolution option was 800×600. I’m using a 19″ CRT so I’m only looking for a resolution of 1024×768. I let Ubuntu install the restricted Nvidia driver. Reboot and I’m stuck with a resolution of 640×480. Nice. Display Preferences and the Nvidia X Server settings only gave me the 640×480 option. To fix this, I opened a terminal and ran:
$ sudo nvidia-xconfig
It complained a bit, but it modified my xorg.conf file.
I then opened my xorg.conf file via the terminal:
$ sudo gedit /etc/X11/xorg.conf
Everything seems to be there. I did change the HorizSync & VertRefresh rates because I’m using an old monitor and the default settings would throw my monitor “OUT OF RANGE”. That setting is in the “Monitor” section. It looks like this now:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-0"
    HorizSync       30.0 - 68.0
    VertRefresh     50.0 - 85.0
    Option         "DPMS"

The HorizSync was something like 30.0 – 110.0 and the VertRefresh was 50.0 – 150.0 . To much for this old monitor. I then rebooted the machine. It booted into a crazy resolution that was too high. I think it was 1280×1024. I could barely see it. But…. it worked. I opened Nvidia X Server settings via the menus. Made the change to 1024×768 and rebooted. No good. Still 1280×1024. I opened the Nvidia X Server settings via the command line with root privileges:
$ sudo nvidia-settings
Then made my changes to 1024×768. This time they stuck.
Now I’m happy with it. Next I installed the extras:
$ sudo apt-get install ubuntu-restricted-extras
Everything installed ok. Now I’m set.

Regarding the Nvidia X Server settings. After you “apply”, don’t forget to hit the “Save to X configuration file” button and merge it with the existing file. Done……almost.
I had to turn off desktop effects. The minimize, maximize and close buttons on the title bar of open applications disappeared with the effects on. Maybe it’s a bug, maybe it’s a feature. I usually turn it off anyway.

Texas Hold’em Poker

scareenshot pokerth

screenshot pokerth

PokerTH is a Texas Holdem style poker game.

I myself am not a big poker player but I do know a few people that are. I just switched my dad over to Linux Mint 6 on one of his machines. He is tired of his windows machine running like crap all of the time so I figured I’d let him try Mint for a while. Thing is that he likes quite a few games that run on windows. I’ve never been able to get wine to work very well so I’ve been looking for replacement games. One of the games is Texas Holdem Poker and I think that PokerTH will do nicely. It’s fun and runs very well.

It is in the Debian repositories. I’ve installed it on Debian(Squeeze), Ubuntu(8.04) and Mint(5 & 6).

Install through Synaptic or at the terminal type:

sudo apt-get install pokerth

website: PokerTH


screenshot convertall

screenshot convertall

ConvertAll is a conversion program for just about any unit of measurement that you can imagine. I found a similar program many years ago for windows and I still use it at work. I would recommend everyone have this installed on something somewhere.

It is in the Debian repositories. I’ve installed it on Debian(Squeeze), Ubuntu(8.04) and Mint(5 & 6).

Install through Synaptic or at the terminal type:

sudo apt-get install convertall

website: convertall