it all flows together

scott barber blog

Archive for the ‘linux’ Category

MythTV Adventures

Tuesday
Feb 6,2007

I just recently upgraded my MythTV to Knoppmyth R5E50 (MythTV .20+) and added a new 200GB drive. Here’s a few tips for the road:

- That USB remote (RC6) that came with your PVR-150 MCE not working? All you need is a new lircd.conf and an updated .lircrc

- DigestAuth seems broken all the way around for securing MythWeb… go for BasicAuth

- MythBrowser already has flash installed! YouTube from the couch!

Mighty Monit

Tuesday
Jan 16,2007

It all started with faulty power at one of our hosting areas. I use the term “hosting area” as lightly as possible. Servers would stop responding and we’d get the call. “Wait… is that in building 2?”, we’d ask ourselves. If the answer was yes then we’d get in the car and head on down to physically restart the server. Now - before you go off about what a piece of crap setup we have and how it reflects badly on me as a Senior SysAdmin - just wait. I have nothing to do with the current situation. All those boxen were supposed to be transfered to a VM eons ago. We’ve tried all in our power to fix it. As my fellow sysadmin likes to say, “My Care is Broken.” We just laugh and go on working with things we can fix.

All of the “servers” in said building 2 are supposed to be Dev / QA only. How can one expect to run production code in a lousy place like that? For reasons I have yet to understand, a nice little Rails app was pushed into production without a production server to put it on. “We’ll just run it on the QA box, right?” uhh… yeah, whatever. I found out about only after the fact, so I said, “I’ll do the best I can to keep pound and the mongrel cluster up, but no promises there.”

It got to be a an issue - having to restart pound and mongrel on the box - but I was busy with other projects to fix it right away. I’ve now learned my lesson: Throw monit on there right away and be done with it.

FYI: Our setup looks something like lighttpd -> pound -> mongrel_cluster. It’s not the final setup we’ll be using for prod, but it’s great for now.

After a 1/2 day of tweaking and experimenting here’s my /etc/monitrc:
(some names have been changed to protect the innocent)

set daemon 120
set logfile syslog facility log_daemon

## Little monit webserver
set httpd port 2812 and
allow 10.0.0.0/8
allow localhost
allow admin:[super secret password here]

###### Pound #######
check process pound with pidfile /var/run/pound.pid
start program = “/etc/init.d/pound start”
stop program = “/etc/init.d/pound stop”
if failed host 127.0.0.1 port 88 protocol http
with timeout 10 seconds
then restart

###### 411 App ######

# Mongrel-4000
check process mongrel-4000 with pidfile /home/[user dir]/apps/411/current/log/mongrel.4000.pid
group mongrel-411
start program = ” /usr/local/bin/ruby /usr/local/bin/mongrel_rails start -d -e qa -p 4000 -a 127.0.0.1 -P /home/[user dir]/apps/411/current/log/mongrel.4000.pid -c /home/[user dir]/apps/411/current/” as uid and
stop program = ” /usr/local/bin/ruby /usr/local/bin/mongrel_rails stop -p 4000 -P /home/[user dir]/apps/411/current/log/mongrel.4000.pid -c /home/[user dir]/apps/411/current/” as uid [user] and gid [group]
if failed host 127.0.0.1 port 4000 protocol http
with timeout 10 seconds
then restart

# (Repeat for other mongrels in the cluster… 4001, etc)

I threw monit in the inittab for those nasty restarts:

# Run monit in standard run-levels
mo:2345:respawn:/usr/local/bin/monit -Ic /etc/monitrc

Thursday
Nov 30,2006

So there are a few tutorials out there for linking your Linux laptop to your Treo 650 for dial-up-networking, but nothing Ubuntu Dapper or Edgy Specific - or Sprint PCS Specific.

Here’s what I’ve done to get it all to play nicely together:

Install bluez-passkey-gnome. This allows you to input the PIN to get the treo and your bluetooth device to pair. I spent a good 1-2 hours on this alone!

sudo apt-get install bluez-passkey-gnome

In fact — add that to your gnome session. The executable is bt-applet

So now you can safely pair your Treo to your laptop and set it as a “trusted device”

I left my /etc/bluetooth/hcid.conf stock except I changed the PIN.

Now you need to edit a few files. Here’s what mine look like:

/etc/bluetooth/rfcomm.conf:

#
# RFCOMM configuration file.
#

rfcomm0 {
# Automatically bind the device at startup
bind yes;

# Bluetooth address of the device
device 00:07:E0:63:33:54;

# RFCOMM channel for the connection
channel 1;

# Description of the connection
comment "DUN to Treo 650";
}

/etc/chatscripts/BluetoothDialup:

TIMEOUT 5
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO CARRIER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\rRINGING\r'
'' \rATZ
TIMEOUT 12
OK ATD#777
TIMEOUT 22
CONNECT ""

/etc/ppp/peers/BluetoothDialup:

noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
defaultroute
usepeerdns
/dev/rfcomm0 115200
local
novj

Now all you need to do to start-up is run:

sudo hcitool cc 00:07:E0:63:33:54
To pair up the Treo
and then

pon BluetoothDialup
to spin up the connection.
You’ll need to wait 20-30 secounds to get fully connected, but it’s sweet nectar when you see ir ppp0 device with an IP address and all.

To shut ‘er down you can just poff BluetoothDialup.

The cool thing about Sprint PCS is that they give you an outside routeable IP address!

Thanks to the following for inspiration / credit:

http://www.uslinux.net/docs/sprint-wireless-internet.php
for the ppp scripts to connect to sprint

https://help.ubuntu.com/community/BluetoothDialup
for the Ubuntu love

and
http://www.gurulabs.com/goodies/Using_Linux_and_Bluetooth_DUN_with_the_Treo650.php
for the original pimpin howto

VMWare issues with Edgy Eft

Monday
Oct 30,2006

Is your VMWare Workstation broken after your Edgy Eft upgrade?
Errors with libpng12.so.0?

Short answer:
sudo apt-get remove libdbus-1-2

Long answer:
VMTN Discussion Forums: edgy eft libpng12.so.0 …

Flash 9 for Linux!

Thursday
Oct 19,2006

Flash Player 9 is out in beta for Linux:
Adobe Labs - Downloads: Flash Player 9 Update

For those of you running Ubuntu Dapper the following will get you there:

sudo apt-get install libc6 libx11-6 libxext6 libxt6 libfreetype6 libfontconfig1 libgtk2.0-0 libglib2.0-0 libasound2-dev libssl-dev libasound2 libssl0.9.8

MythTV video over WiFi, etc.

Monday
Sep 11,2006

So I’ve had my MythTV humming along real well for the last 2+ months now. Dual PVR-150s, 1/2 Gig of RAM with a meager 60Gig HDD. It has really passed the wife test with flying colors. I have the audio folders remote CIFS (samba) mounted from my NAS box back in the office. I can stream audio files all day long with no problem, but when it came to video I just didn’t have the bandwidth (it seems) to get anywhere. Mplayer was studdering trying to play back the video file. I tried tweaking my WRT54Gs that help the network together, but I my WiFi signal was already around 80-90%. No help there. I dig around on the Knoppmyth wiki until I found an article about switching over to Xine (in this case for DVD iso - pretty slick if you ask me) I swicthed the default video commandline option to:
<code>
xine -pfhq –no-splash %s
</code>

For some reason xine does a better job of buffering the video signal across as slower network mounted drive. Props to Xine on MythTV

Flash 9 for Ubuntu

Monday
Aug 28,2006

Amen Brotha. It’s OK to be tricky like this.

Flash 9 for Xubuntu « Xubuntu Blog

Ubuntu Bash Aliases

Tuesday
Aug 1,2006

Even though it seems that there a a proliferation of code snippet sites, this one entry caught my eye. (Notice the ubuntu references?)

Programming is Hard: Bash aliases [bash]

Democracy Player on Dapper

Tuesday
Jul 25,2006

Democracy player .debs giving you the fits? (ie: ImportError: libgtkembedmoz.so)
Install ‘mozilla-dev’ and ‘mozilla-psm’ as seen in:
#3234 (Problem running on Ubuntu Dapper) - Democracy - Trac

New RADRails

Tuesday
Jul 25,2006

RadRails - A Ruby on Rails IDE

New version 0.7 is out. Gotta love the RHTML editor and Mongrel sever support.

Meta


Blogroll


Twitter


My del.icio.us


RSS My last.fm