Archive for the 'linux' Category

Next idea…

Wednesday, June 16th, 2004

I want to write an app that will let me catalog all my cds, MP3s, DVDs, and books. It will support the CueCat scanner to make for easy entry of items (I won’t assume that all people have their CueCat hacked, as I do). It will be in perl of course because I just can’t seem to get anything written in Java in a timely manner as it is such a PITA about everything. I found a few abandoned projects on SourceForge that either never got past the planning stage, or never got much useful code written.

It started out as just something to catalog MP3s. It would read the ID3 tags (if there were any) and use that data to populate the db entry or supplement data found on FreeDB.org. A perl/tk app was going to run on any desktop/laptop with MP3s but no
internet access, which would grab as much data as possible about the mp3s and dump the output to a flatfile. A second perl/tk app would send that output file to a cgi/webapp that would get the data into the db after looking up whatever it needed on FreeDB.

It will be stored in a mysql db and have a web interface for searching and adding new data.

cool OSD tricks

Friday, June 11th, 2004

Recently my Linux box at work got b0rked, so Ihad to move the hd from that box to what was my Windoze box. Previously I listened to music on the Windoze box, and did everything else on the Linux box. This meant that my Linux box could make all the noises for various apps that it wanted to. No such luck when it’s the same box that you are listening to music on. Until I could figure out how to get all the apps to share the soundcard with XMMS, I came up with a neat workaround that uses xosd. xosd includes something called osd_cat which will display any text you want via OSD, in any color you want, and in any location. I have Gaim setup to run a short bash script whenever I receive an IM (you can specify the ’sound’ program that you want to use — nobody said it had to be something like ‘play’). In the bottom left corner of my screen, I see "IM!" flash for a second, pause, then again. The flashing part is reqd so it will catch my eye. That script looks like this:

#!/bin/bash
# appears to blink
echo "IM"| osd_cat       -p bottom -o -30 -f lucidasans-18 -c yellow -d 1
sleep 1
sudo aplay -Dplug:ossmix /usr/share/sounds/gaim/receive.wav
echo "IM"| osd_cat       -p bottom -o -30 -f lucidasans-18 -c yellow -d 2
sleep 1
echo "IM"| osd_cat       -p bottom -o -30 -f lucidasans-18 -c yellow -d 1

I’m using the built-in email check function of GKrellm, which lets you choose a script to run when you have new mail. That script looks like this:

#!/bin/bash
echo "* New mail *"|osd_cat -p bottom -o -20 -c green -d 2
sleep 1;
sudo aplay -Dplug:ossmix ~/sounds/email_hs.wav
echo "* New mail *"|osd_cat -p bottom -o -20 -c green -d 2

I should probably mention that I don’t use a sound server like Arts or ESD because they usually come along with Gnome/KDE and I dont use them. That’s why I had the problem (with ALSA to begin with; I didn’t want to add yet another unnecessary item (sound server) to my box. I finally found the solution to sharing the sound card here:
http://www.groupsrv.com/linux/viewtopic.php?t=7237
Also, I am running aplay with sudo because of some permission errors on /dev/dsp that I can’t seem to resolve…yes I’m too lazy to worry about it.

One other thing I use OSD for is a quick monthly calendar, using ‘cal’:

#!/bin/bash
cal | osd_cat -p bottom -o -10 -d 30 -l 8

The ’showcal’ script is assigned to a key combo in my $HOME/.fluxbox/keys file. Whenever I want the calendar, I just do Shift-Ctrl-C. It hangs out for a nice long 30 seconds, just long enough for me to locate what I need

Visor Deluxe plays well with Linux

Monday, June 7th, 2004

I bought a Visor Deluxe off eBay recently (only $30); it arrived Saturday. It only took about 10 minutes to get it set up with my 2.6.1 kernel. This speedy setup was due mostly to this great, very-specific USB/Visor HOWTO. I setup JPilot to do my syncing with. I had to set $PILOTPORT to /dev/usb/tts/1 (which only exists when the Visor is HotSyncing) to make it work though. HINT: *during* a sync, create a symbolic link (world writable) from this port to /dev/palm and /dev/pilot as these are the most commonly-used device names that apps will try to use to connect.

Before you start in on me about how old it is and why did I waste my $$ and all that, here’s why I chose this PDA (for now anyway! haha):

  1. It uses PalmOS which Linux has had support for for *years*, mostly due to this wonderful package: Pilot-Link. If you are using Gentoo, as I am, all you need to do is run “emerge pilot-link”.
  2. I have owned several PocketPCs and could never get them to interact with Linux in any way, especially syncing anything. Meaning, I am well aware of much more ‘powerful’ alternatives. As soon as they have the same solid support under Linux as Palm devices do, I will gladly try again with a PocketPC, or with another Zaurus (which my BF has now)
  3. I don’t need to know C to write my own programs to interact with the Visor. I found Pilot Manager, which is written with Perl/Tk and has easily extensible conduits. It even syncs on Solaris to the built-in CDE calendar. The conduit I care about most is: SyncXML. I will try to use that to sync events from “WebCal” that are stored in a mysql db because that is where I keep all my appointments now. The possibilites are endless for uses of this conduit.
  4. A primary reason for purchasing it: a cheap but highly effective ebook reader. Much, much cheaper & smaller & lighter & more productive than this HIeBook (for example).
  5. I have no web-accesible contacts/address book manager

More later

GO me

Thursday, May 20th, 2004

look what I’ve done….all because I copied a section of code from someone elses script without understanding what the hell it did

gathering data
/usr/lib/dld.sl: Call to mmap() failed - ZEROES /usr/lib/libpthread.1
/usr/lib/dld.sl: Not enough space
Out of memory!

and now the server is unreachable, and we cant even get in remotely… we have to put in a “reboot” order.

Damn I’m good :-/

Ack! This stupid Redhat VPS

Friday, May 14th, 2004

Ah this damn VPS (Virtual Private Server)……i should really learn RedHat so I dont screw it up anymore/again any time soon. These are the pitfalls of having root access to a box.

However, RimuHosting.com tech support has been awesome helping me get it all straightened out.

On a tangent: Everyone who stops by my office sees and loves my Linux is the SHIT sticker I have slapped on my monitor

Gopher becoming “Invisible Web” Resources

Wednesday, May 12th, 2004

Yeah, like this:
linux-1.0.tar.bz2
and this:
Mosaic web browser

3 recent geek moments

Wednesday, May 5th, 2004

Geek Item #1The script I created to keep an eye on my net connection was useful in proving that Adelphia service was down starting
at 6:30am this morning. It didn’t come back up until 5:30pm. Freaking ridiculous. I would have backup DSL if it were
possible, but lucky me has “Fiber to the Curb”.

Anyway, my script uses a serial device to talk to an X10 appliance module that I have my cable modem plugged into,
so when the script detects that we are no longer on line, it reboots the cable modem (using a great command-line X10
program called HEYU and restarts dhcpcd to re-aquire an IP. This script has saved me many
times in the middle of the night when I couldve been down for hours (until I noticed and power cycled the modem myself).

Geek item #2: I have a “movie” and a “sewing” (started a crosstitch project, need lots of light to tell colors of thread apart)
X10 lighting macro setup. When we want to watch a movie, we use the X10 remote and do “X10–>2–>on” and the living
room lights go off. When the movie is over, we do “2–>off”, and the lights come on at the same level they usually do at dusk
every evening. When I want to sew, I do “X10–>3–>on”, and I get the lights brighter than usual which makes it much easier
to tell what thread is what color (when you have 50 different shades of brown, this sort of thing matters). Around 11p, the “bedtime”
macro gets run which turns off all but one light, and dims that so it’s just enough light to see without tripping over anything.
As soon as anyone approaches my front door, a wireless X10 motion sensor tells the front porch light to turn on (great when
you are struggling with lots of crap and need to see the lock on the door. When anyone approaches my back door (uses another
wireless X10 motion sensor), they get a nice 100 watt light in their eyes for the next 20-30 minutes. The cool thing about this
setup is that I replaced the light switches for the front and back lights with X10 controllable ones. No need for giant flood lights or
anything that ugly and obtrusive.

Geek item #3: I use a super-cool PHP app called Tasks to organize all sorts of work and home “ToDo” items. I just
created a little perl script that can log into the mysql backend of Tasks and insert a todo item, including notes and a relevant URL.
This way I can create other scripts that use this script to generate new tasks. I just created one for Gentoo that scans
the /var/log/esync.log file and checks for updated versions of packages I have installed. It then creates new tasks for me
(one for each package) so I know what to upgrade. No more checking the file just when I remember to. I like to stay on
the bleeding edge of available versions of software.

Please Wait

Monday, May 3rd, 2004

The best “please wait” message ever:
Be patient and don’t consider the suicide as an option (^_^)

My second favorite message is:
Bye bye, thx to use wmdrawer

I love open source software (especially linux). You always seee the greatest code comments or error messages or ‘please wait’ or whatever. The author of the first message should realize that the “suicide option” would likely only
be contemplated by those chained to M$ Windoze. If *I* was forced to use Windoze, I’d certainly consider it. ;)


Protect Web Form!

Our VPS Hosting By RimuHosting
Java and Linux VPS Hosting by RimuHosting


Bad Behavior has blocked 24 access attempts in the last 7 days.