nav-left cat-right RSS
cat-right

How to Set Up Virtual Web Hosting with Apache

Apache
Up until a couple of years ago, I used shared web hosting for serving up my various sites. I went through several of them because for whatever reason, they turned out to not be what I wanted. I finally came to the realization that I needed to get my own dedicated host. I found a good provider (The Planet), and started migrating over my websites (along with my friend Chris’ sites). Something I knew I would have to learn is how to set up Apache to be able to do virtual hosting. In this guide, I’ll show you how I did it, and the script I created to make things easier.
(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Linux RetroGaming: Atari 8-Bit

I’ve been into emulation again lately, and I started with my first favorite system of all time, the Atari 8-bit computer. When I was growing up, I had 2 different 8-bit machines:

The Atari 400:
Atari 400

(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Gaming in Linux

GamingOne of the reasons people have a hard time making the jump to Linux is the fact that they have a hard time leaving the games they play in Windows. In this article, I’m going to describe some methods of getting around this hurdle, and make the transition to Linux easier. I’m not going to promise that your favorite game will work, but will give you the tools to be able to try. I’m also not going to be talking about native linux apps – those are pretty straightforward. This article will focus on Windows apps in Linux.
(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Convert DVDs and TiVo MPEG2 Videos to H.264

H.264
Previously, I have showed you how to set up software to be able to rip DVDs to your hard drive, and I’ve also shown you how to copy your TiVo videos nightly. I’ve described the method I use to transcode the videos, but haven’t provided the script… Until now. After months of using and tweaking, here’s what I use. I call it VidProc.

(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Installing Perl Modules on Ubuntu Linux

perl
I’ve been a perl programmer/scripter/hacker for many years now, and I will frequently use CPAN modules to be able to do the out-of-the ordinary. This small guide is intended to help people easily install these modules.

First, let’s get the CPAN module up to date:

$ sudo perl -MCPAN -e shell
(take defaults to set everything up)
cpan> exit
$ sudo perl -MCPAN -e shell
cpan> install Bundle::CPAN

(answer yes to the question about saving data)
cpan> reload cpan

Then, to install a module, it’s simply:
$ sudo perl -MCPAN -e shell
cpan> install <name of module>

cpan> exit

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Set Up a TiVo Media Server on Ubuntu Linux

TiVo
This guide will help you set up a media server to be able to play videos on your Series 3 TiVo, using pyTiVo. (Note: this post was moved from my old blog, but has been updated a bit)

First, install ffmpeg:

$ sudo apt-get install ffmpeg

Then, install git (needed to grab pyTivo):

$ sudo apt-get install git-core

Then, grab the latest version of the pyTivo script (Look at the Current Release page to verify that you have the right version):

$ cd /usr/share
$ sudo git clone git://repo.or.cz/pyTivo/wmcbrine.git
$ sudo mv wmcbrine pyTivo

Edit /usr/share/pyTivo/pyTivo.conf:

$ cd /usr/share/pyTivo
$ sudo cp pyTivo.conf.dist pyTivo.conf
$ sudo vi pyTivo.conf

The only thing that I changed is to comment out the default video share, and add my own:

[Movies]
type=video
path=/data/Video/Movies
[Television]
type=video
path=/data/Video/Television
[Music]
type=music
path=/data/Audio/Music

Run pyTivo:

$ sudo python /usr/share/pyTivo/pyTivo.py

Verify that things are working correctly — on the Tivo, go to “Now Playing List” and look for the shares.  If they appear and you can browse to them, you’re almost done!

One issue I had was with transferring the videos.  When I transferred them to the TiVo, it had a message of “unknown mpeg2 codec” or something to that effect.  Apparently the package for ffmpeg on Intrepid doesn’t have all of the codecs needed.  To install them, run the following:

$ sudo apt-get install libavcodec-unstripped-51

After I did this, videos were able to be transferred just fine.

The last thing to do is to make pyTiVo start automatically on bootup. To do this, simply copy the following script to /etc/init.d:

#!/bin/bash
# chkconfig: 2345 99 05
# description: pyTivo server

### INIT INFO
# Provides: pytivo
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-description: pyTivo server
# Description: Start and stop the pyTivo server.
### END INIT INFO

RETVAL=0

start() {
echo -n "Starting pyTivo: "
pgrep -f pyTivo.py
RETVAL=$?
[ $RETVAL -eq 0 ] && echo "pyTivo already running: Exiting" && exit 1

# this call actually starts pyTivo.
python /usr/share/pyTivo/pyTivo.py > /dev/null 2>&1 &
RETVAL=$?
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}

stop() {
echo -n "Stopping pyTivo: "
pkill -f pyTivo.py
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
sleep 1
start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RETVAL

Note: I didn’t write this – I just grabbed it from somewhere when setting it up – let me know if you wrote it so that I can give you credit!

After creating the script, make it executable:

$ sudo chmod u+x /etc/init.d/pytivo

Then create links to /etc/rc3.d and /etc/rc1.d:

$ sudo ln -s /etc/init.d/pytivo /etc/rc3.d/S99pytivo
$ sudo ln -s /etc/init.d/pytivo /etc/rc1.d/K99pytivo

This should make it so that pytivo starts automatically upon bootup.

Hopefully you’ve found this guide useful. Next time, I’ll be talking about how to make the videos show up perfectly on the TiVo, with appropriate titles, etc.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Mount External Drives Statically on Ubuntu Linux

External Drive
The Issue:
You have external USB drives that you want to be mounted the same way every time, but the /dev/sdX device name keeps changing.

The Solution:
First, unmount the drive:
$ sudo umount /media/disk

Then, look in /dev/disk/by-id to find the correct device file:
/dev/disk/by-id/usb-WDC_WD30_00JB-00KFA0_DEF107679C83-0:0-part1

Add this to /etc/fstab:
/dev/disk/by-id/usb-WDC_WD30_00JB-00KFA0_DEF107679C83-0:0-part1 /mnt/data01 ext3 defaults 0 0

Create the mountpoint:
$ sudo mkdir /mnt/data01

Mount the volume:
$ sudo mount /mnt/data01

Now, this device should always be mounted on /mnt/data01.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Rip DVDs on Ubuntu Linux 9.04 (Jaunty)

DVDsOne thing that I really enjoy is to be able to watch my DVDs from any computer in the house, or from (almost) any of the TVs, without having to deal with physical media.  The way I do this is to “rip” the movies to my media server, and then transcode them to a smaller format.  This guide will discuss part one of this — ripping a DVD.  I know there are several utilities which will do this for me, but since I have very specific needs, and like things to be as automated as possible, I wrote a script to do this (naturally).
(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How To Set Up a Two-Way Mirror Between Mac OS X and Ubunt...

Mirror to the Sky (aloshbennet CC)After my hard drive crash a few months ago, I’ve been a bit paranoid about losing data.   By “a bit” I mean I’ve been sticking copies of my data on different machines to make sure I have various copies in case another hard drive dies, or a computer gets fried, melting everything inside, or my house burns down… Oh wait, I don’t have that scenario covered….  Time to fix that!  What I want is the ability to copy my data to an offsite location, and keep the backup up to date.  The main thing I care about is my family photos.   I was talking to my cousin Dave, and he had the same issue.  He wanted access to my photos, as well as have an offsite backup copy of his family’s photos.  I thought of a solution.  What if we could set up a two-way mirror between his machine and mine, and keep it updated nightly?  That way if he sticks something in the directory on his machine and vice versa, keeping a live backup.  I began doing some research, and I found the tool — Unison.

(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

How to Automatically Copy Images from Removable Media

Nikon D300 and AF-S VR Zoom-NIKKOR 70-200mm f/2.8G IF-ED

So, I’m lazy.  I also like things to work perfectly.  This is why I write tools to do things so that I don’t have to.  After recently moving to Linux for my main desktop, I wanted to be able to do everything I had previously done when it was running Windows, with a reasonable amount of effort.  One thing I needed to be able to do is manage my photos.  I was happy when I found out that Picasa runs just fine in Linux, so most of the battle is won.  One of the things that always bugged me in Windows was transferring photos from removable media, such as an SD card.  In my mind, this should be a simple process:

  • Copy the photos to a specific location, with a folder named appropriately
  • Skip duplicates
  • Do all of this without having to do anything manually

(more…)

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

« Previous Entries