Posts Tagged ‘ubuntu’

HandBrake install for Ubuntu

June 9th, 2011 No comments

I recently upgraded my machine to Ubuntu 11.04, but I still want to be able to convert my movies for my iPod. HandBrake is a nice little tool that will allow you to do just that. At the time of this writing these instructions would work for ubuntu 9.10 – 10.04.

To install simply type the following in your terminal:

sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update
sudo apt-get install handbrake-gtk

You should now find HandBrake installed in you system menu.

Categories: Media Player Tags: ,

Connecting to MySQL on remote machine

May 31st, 2011 No comments

I just installed Ubuntu 11.04 on a machine that I was using as a shared XBMC database server.  It was the same machine that I was using before.  I backed up the database and restored it on the new machine, but when I went to use XBMC it wouldn’t connect to my shared database.  I tried doing the following from a XBMC machine:

ERROR 2003 (HY000): Can't connect to MySQL server on '###.###.###.###' (111)

After a bit of time on Google I found the solution.  It appears that they changed the security in the latest version of MySQL.  It used to be a setting called skip_networking which had to be set to off, they have since added the bind-address setting in the MySQL my.cnf file.

sudo nano /etc/mysql/my.cnf

You will need to find the bind-address setting and comment it out. Save and exit the file, and then restart MySQL.

sudo /etc/init.d/mysql restart

After that I could connect to the remote database, which was on my LAN. Please note that should take care to make sure that your server isn’t accessible from the outside, e.g. stay behind a firewall.

Categories: Software Tags: , , ,

Automount samba drives

May 30th, 2011 No comments

I have a network share that gets backups sent to it automatically, so I want to have the network drive automatically mounted on bootup, so the backups will work. You’ll need to make sure you have smbfs installed and then open fstab and edit it.

sudo apt-get install smbfs
sudo gedit /etc/fstab

Add the following to the fstab

# My Network Drives
// /media/media cifs credentials=/home/michael/.mediaserverCredentials,rw,iocharset=utf8,_netdev,uid=1000,gid=1000 0 0
  • _netdev is supposed to make it not try to mount the drive until the network is up and going.
  • credentials is where your access credentials are stored
  • cifs is the samba file system type
  • uid is the user id, exclude for root
  • guid is the group id

You will need to create your .mediaserverCredentials

sudo gedit /home/michael/.mediaserverCredentials

and add the following to it.


obviously you will need to put your username and password, and change the paths to something for you. You may want to use /etc/samba/ as a location to store the credentials file. You need to make sure that the file is owned by root, and only readable to root.

sudo chown root:root /home/michael/.mediaserverCredentials
sudo chmod 400 /home/michael/.mediaserverCredentials

I’ve seen it mentioned places to update the unmount order to prevent hanging during shutdown. I’m not sure if this is necessary or not.

sudo update-rc.d -f remove
sudo update-rc.d stop 15 0 6 .
Categories: Operating Systems Tags: , ,

Automount drives based on UUID

May 29th, 2011 No comments

I wanted to be able to automatically mount my drives by adding them to fstab. I have done it before, but I have used the /dev/sdb1 syntax. I have noticed a problem when I unplug the drives, and plug them back into a different SATA controller. When I do that it changes the /dev/sd## to something else. I have learned that if you use the UUID in the fstab, then this issue doesn’t really arise.

First off is to determine the UUID of the drives that you have mounted. Enter the following in the command line.

sudo blkid

It will return something like

/dev/sda1: UUID="6413b21e-ec40-4d80-8103-da8ea5fbbd30" TYPE="ext4" 
/dev/sdd1: UUID="08ae0157-7718-4e3d-be15-11a3b2802148" TYPE="ext3" 
/dev/sdd5: UUID="e580e4fe-4aed-4ea9-bcac-8ab9220414db" TYPE="swap" 
/dev/sdb1: LABEL="Seagate320" UUID="ce09b320-c7b3-4d7c-a192-a2d55208473c" TYPE="ext3"

You can also run “sudo fdisk -l” if you want more information about the different /dev/sd## drives. Otherwise if you can tell from the results which UUID you want then theres no need for “sudo fdisk -l”. The drive I am going to add to fstab is the “Seagate320” drive.

sudo gedit /etc/fstab

Add the following to the fstab file

# My Local Drives
UUID=ce09b320-c7b3-4d7c-a192-a2d55208473c /media/Seagate320/ ext3    defaults,errors=remount-ro 0       1

Next time you reboot the drive will automatically be mounted.

Categories: Operating Systems Tags: , ,

Find words in files in linux

March 7th, 2011 No comments

After wanting to find text inside of files in Ubuntu I ran across a nice little post. They way it was described to do it works great.  It uses the grep command.

Say you want to find some text called “my_function” in your scripts folder located at the /home/michael/scripts/ directory. Simply run the following command:

grep -i -n -r 'my_function' /home/michael/scripts/

Here is what is happening:
grep is function name to search a pattern in files
-i means ignore case
-n means output line number
-r search recursively

This makes it easy to edit the files with vim, and then jump straight to the line that you needed to edit.

Categories: Scripts Tags: , , ,

Pop-up notification from the command line

August 12th, 2010 No comments

pop-up notifitacionI was looking for a way to tap into the pop-up bubbles that Ubuntu displays notifications in. I wanted to be able to have some scripts run and notify me when they were done. After searching for a little while I finally ran across a post on  He goes into pretty good detail about the things that you can do with the notify program.  Read more…

Categories: Scripts Tags: , , ,

Misc Bash Scripts

August 1st, 2010 No comments

Here are a few little bash scripts that i use to do different things on my ubuntu machine.  I can’t always remember them, so I have to write them down somewhere. Hopefully someone else will find these useful too.  Visit for some other command line basics. Read more…

Categories: Operating Systems Tags: , , ,

Remote control Ubuntu server with android

July 31st, 2010 No comments
Server Assistant qrcode


ConnectBot qrcode


There are two little programs I like to use. The first is called ConnectBot, which allows you to say into your remote machine

The second which is capped ServerAssistant, will allow you to save settings for multiple servers. From within ServerAssistant you can launch an ash session in ConnectBot, but it also allows you to save commands for the different servers you have added to the program. It comes with a standard command called status, which allows you to see if the server is up and running and some other stats.
Read more…

Categories: Uncategorized Tags: , ,

Ubuntu 10.04 LTS

April 21st, 2010 No comments

Looks like I’ll be getting another new free operating system.  If you use both two different operating systems like my you may want to try dropbox, to sync your files between the two.

Categories: Operating Systems Tags: ,

Ubuntu 9.10

October 25th, 2009 No comments

Aren’t we all excited?  Actually I’m the only one in my family and friends that I know to use Linux daily as a desktop. There are a couple that have linux servers floating around. Anyway I should have posted this a while ago.  I’ve been looking forward to the new version of Ubuntu for a while now.  Also the new looks like it will be a nice little feature.  Similar to dropbox, but linux only.

Categories: Operating Systems Tags: ,