Thursday, December 30, 2004

select random file

This bash script will come in handy with my idea of using habak in a
cron job to update the background to my screen every hour:
nfiles=$(ls -1 $DIR | wc -l | tr -d ' ')
fileno=$(( ($RANDOM % $nfiles) + 1 ))
FILE=$DIR/$(ls -1 $DIR | head -n $fileno | tail -n 1)
echo $FILE

Thanks to Joshua Oreman
for the script. Also, another possible script is randfile found at

Tuesday, December 28, 2004

WalMart Earth Shoe==garbage footwear

Needed some new shoes two months ago and bought a pair of casual Earth Shoes at WalMart ($26.97). Took a couple of days for the lining to start becoming unstitched. After a couple of weeks the interior heel was completely worn. By now (two months passed) the shoes are flat-soled static generators. I've been psychologically traumatized when I reach for grounded items. Continuous zapping becomes increasingly unpleasant.

Dockers Glacier was the decided replacement. If we had an REI near my place I would've purchased the Dunham Rutland. First day has been pleasant, nice arch support (which was another lacking element of the Earth Shoe). Anyhow, beware the Earth Shoe from WalMart. See it has low price, see it appears gentle on the pocketbook but, lo, it will strike from behind and crush they investment!

Tuesday, December 21, 2004

MySQL Hibernate and Timestamp issues

Long day trying to figure out a problem with passing a null value on a
Hibernate object that corresponds to a Timestamp field in MySQL. You
can't do it because MySQL interprets the null to mean "insert current
time", and so it does. But, in your sql statement you can place '' and
the column will remain null. After looking through the forums the
general suggestion is the DateTime type to get around this issue.
Because we'll be using Oracle in production anyway (both types map to
Date) this is a moot point--we need to update all of our Timestamps to
DateTime and manually set the values per record.

Thursday, December 16, 2004

updated prompt

This one is a bit more concise
\[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'):
\[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g')
files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed
's/total //')b\[\033[0m\] -> \[\033[0m\]"

nifty bash promp

\[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'):
\[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g')
files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed
's/total //')b\[\033[0m\] -> \[\033[0m\]"



" Vim syntax support file
" Maintainer: Bram Moolenaar
" Last Change: 2001 Sep 12

" This file sets up the default methods for highlighting.
" It is loaded from "synload.vim" and from Vim for ":syntax reset".
" Also used from init_highlight().

if !exists("syntax_cmd") || syntax_cmd == "on"
" ":syntax on" works like in Vim 5.7: set colors but keep links
command -nargs=* SynColor hi
command -nargs=* SynLink hi link
if syntax_cmd == "enable"
" ":syntax enable" keeps any existing colors
command -nargs=* SynColor hi def
command -nargs=* SynLink hi def link
elseif syntax_cmd == "reset"
" ":syntax reset" resets all colors to the default
command -nargs=* SynColor hi
command -nargs=* SynLink hi! link
" User defined syncolor file has already set the colors.

" Many terminals can only use six different colors (plus black and white).
" Therefore the number of colors used is kept low. It doesn't look nice with
" too many colors anyway.
" Careful with "cterm=bold", it changes the color to bright for some terminals.
" There are two sets of defaults: for a dark and a light background.
if &background == "dark"
SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE
gui=NONE guifg=#80a0ff guibg=NONE
SynColor Constant term=underline cterm=NONE ctermfg=Magenta
ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE
SynColor Special term=bold cterm=NONE ctermfg=LightCyan ctermbg=NONE
gui=NONE guifg=Orange guibg=NONE
SynColor Identifier term=underline cterm=bold ctermfg=Cyan
ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE
SynColor Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE
gui=bold guifg=#ffff60 guibg=NONE
SynColor PreProc term=underline cterm=NONE ctermfg=LightBlue
ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE
SynColor Type term=underline cterm=NONE ctermfg=LightGreen
ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE
SynColor Underlined term=underline cterm=underline ctermfg=LightBlue
gui=underline guifg=#80a0ff
SynColor Ignore term=NONE cterm=NONE ctermfg=black ctermbg=NONE
gui=NONE guifg=bg guibg=NONE
SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE
gui=NONE guifg=Blue guibg=NONE
SynColor Constant term=underline cterm=NONE ctermfg=LightYellow
ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE
SynColor Special term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE
gui=NONE guifg=SlateBlue guibg=NONE
SynColor Identifier term=underline cterm=NONE ctermfg=DarkCyan
ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE
SynColor Statement term=bold cterm=NONE ctermfg=Brown ctermbg=NONE
gui=bold guifg=Brown guibg=NONE
SynColor PreProc term=underline cterm=NONE ctermfg=DarkMagenta
ctermbg=NONE gui=NONE guifg=Purple guibg=NONE
SynColor Type term=underline cterm=NONE ctermfg=DarkGreen
ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE
SynColor Underlined term=underline cterm=underline
ctermfg=DarkMagenta gui=underline guifg=SlateBlue
SynColor Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE
gui=NONE guifg=bg guibg=NONE
SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red
gui=NONE guifg=White guibg=Red
SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Red
gui=NONE guifg=Blue guibg=Yellow

" Common groups that link to default highlighting.
" You can specify other highlighting easily.
SynLink String Constant
SynLink Character Constant
SynLink Number Constant
SynLink Boolean Constant
SynLink Float Number
SynLink Function Identifier
SynLink Conditional Statement
SynLink Repeat Statement
SynLink Label Statement
SynLink Operator Statement
SynLink Keyword Statement
SynLink Exception Statement
SynLink Include PreProc
SynLink Define PreProc
SynLink Macro PreProc
SynLink PreCondit PreProc
SynLink StorageClass Type
SynLink Structure Type
SynLink Typedef Type
SynLink Tag Special
SynLink SpecialChar Special
SynLink Delimiter Special
SynLink SpecialComment Special
SynLink Debug Special

delcommand SynColor
delcommand SynLink

ls colors

# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# $Header: /var/cvsroot/gentoo-x86/sys-apps/coreutils/files/DIR_COLORS,v
1.3 2004/06/30 15:13:00 vapier Exp $

# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.

# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.

# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM linux-c
TERM mach-color
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM xterm-color
TERM xterm-debian
TERM color-xterm
TERM color_xterm
TERM rxvt
TERM screen
TERM screen-w
TERM vt100
TERM dtterm
TERM ansi
TERM Eterm

# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 37 # global default, although everything should be something.
FILE 37 # normal file
DIR 01;36 # directory
LINK 01;33 #symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointer to.)
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to

# This is for files with execute permission:
EXEC 01;32

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')

.cmd 01;32 # executables (bright green)
.exe 01;32
.com 01;32
.btm 01;32
.bat 01;32
.sh 01;32
.csh 01;32

.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z 01;31
.Z 01;31
.gz 01;31
.bz2 01;31
.bz 01;31
.tbz2 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.rar 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31

.jpg 01;35 # image formats
.jpeg 01;35
.gif 01;35
.bmp 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.mng 01;35
.xcf 01;35
.pcx 01;35
.mpg 01;35
.mpeg 01;35
.m2v 01;35 # MPEG-2 Video only
.avi 01;35
.mkv 01;35 # Matroska (
.ogm 01;35 # Ogg Media File
.mp4 01;35 # "Offical" container for MPEG-4
.m4v 01;35 # MPEG-4 Video only
.mp4v 01;35 # MPEG-4 Video only
.mov 01;35 # Quicktime (
.qt 01;35 # Quicktime (
.wmv 01;35 # Windows Media Video
.asf 01;35 # Advanced Systems Format (contains Windows Media Video)
.rm 01;35 # Real Media
.rmvb 01;35 # Real Media Variable Bitrate
.flc 01;35 # AutoDesk Animator
.fli 01;35 # AutoDesk Animator
.gl 01;35
.dl 01;35

.pdf 00;32 # Document files
.ps 00;32
.txt 00;32
.log 00;32
.tex 00;32
.doc 00;32

.mp3 00;36 # Audio files
.wav 00;36
.mid 00;36
.midi 00;36
.au 00;36
.ogg 00;36

Wednesday, December 15, 2004

Jedit macros

Thanks to Scalex in the JEdit community forums, I wrote a bunch of auto completion macros based upon some code he posted. I've saved each of these snippets my ~/.jedit/macros/.bsh and then associated each one as a short cut. That is, to initiate the bracket completion I assigned it to the "[" key as a shortcut. These are really basic and I plan to make updates (especially to the LOG one) as
I have time. For now they work and it's rather slick.

for auto quotes in JEdit:
buffer_mode = buffer.getMode().toString();
if (buffer_mode.equals("java")
||buffer_mode.equals("html")) {
} else {
for auto brackets:
buffer_mode = buffer.getMode().toString();
if (buffer_mode.equals("java")) {

} else{
for auto parenthesis:
buffer_mode = buffer.getMode().toString();
if (buffer_mode.equals("java")) {
} else {
for auto LOG debug statements:

mysql startup script

Created this script as "mysql" in /etc/init.d and then executed
"rc-update add mysql default"

start () {
ebegin "Starting mysqld..."
/usr/local/share/mysql/mysql.server start
eend ${?}

stop () {
ebegin "Stopping mysqld..."
/usr/local/share/mysql/mysql.server stop
eend ${?}

emerge rpm

In the course of getting the Lexmark T632 working on the new Gentoo box we followed the previous post I made a couple months back. There were a couple of things I failed to include the first time. Turns out that to get rpm properly working it requires db3. This can be obtained by emerging openldap (which is something else we needed anyway). Also, the Lexmark installation won't work if you don't have CUPS emerged.

Tuesday, December 14, 2004

mysql #2

To get the manually-built mysql to startup at boot a script file (that basically wraps the mysql.server script) is required in /etc/init.d. I'll include the script in a future post...

mysql 4.1.3

Needed to get MySQL 4.1.3 working on the new Gentoo laptop and we
downloaded the binary distribution. But it croaked immediately upon
startup with a signal 11. Rather lengthy bug threads didn't provide us
with much information so we simply downloaded the source and built it.
That did it, mysqld_safe now works.

xorg 6.8.0-r3

Installing Gentoo on another Dell D800. Had a slight issue with the Keyboard driver in the xorg.conf. The xorg.conf that I have didn't work on the new version (my version was 6.7.0-r1 compared to 6.8.0-r3). Slight tweaking and we had it working with the "kbd"
driver rather than "Keyboard".

Monday, December 13, 2004

himem needed for laptop memory upgrade

Just received two 1G DIMMs for the old D800 and what to my surprise to see that cat /proc/meminfo only shows 900MB! That was my old amount. good. Turns out, thanks to bcowan on #gentoo, that "himem" needs to be set to 4GB in the linux kernel config or else 900MB is the max recognizable. Easy solution and I'm now cruising with 2026MB. Beautiful.

Thursday, December 09, 2004

Biometrics and linux

Interested in this topic but I haven't found much yet (little effort here) other than the BioAPI that NIST released earlier. This got me thinking...

Thursday, November 18, 2004

JEdit 2

Quick way to get the syntax checking on is to create a macro that runs JCompiler. This worked for me because the classpath that I have JCompiler set up with (from maven) will compile the files I'm working on. So all I do is run a macro that saves the buffer and compiles it. JCompiler updates ErrorList with the line numbers of the issues it
encounters. Everything works beautifully.

Jedit rules

Okay, I've had it again with Eclipse. It's slow, cumbersome, and drives me nuts with its unresponsive behavior. Several times this week I've completely lost my keyboard functionality. Sure it responds to the mouse and I can navigate, click on menus, etc. But i can't type! Usually I have to either reset the beast or I have to open a model
dialog, then close it, and then the keyboard may work. Either way, I'm jumping back to JEdit.

Several huge plug-ins I got working this morning and absolutely love:

a) Open It. This functions just like the Open Resource in Eclipse: a dialog pops-up, you type in the filename and it matches as you type. This is great because it alleviates the necessity to use the built-in file-explorer in JEdit (which I think is kind of a pain).

b) Dot-Complete. Finally had some inspiration this morning in getting this to work the way I want it. Our projects are Maven projects. How to get the classpath into Dot Complete? Solution is simple, maven -X build-ourproject. Dumps out the the classpath that's created from the dependencies in project.xml. This is great! Now it works and is saving me time and pain of constantly referencing Javadocs.

c) XML/HTML. While I have had this working forever, I simply love how easy it is to create XML/HTML docs in JEdit. It's awesome because it auto-completes closing tabs, shows the hierarchy of the DOM (in relation to the current element) and is overall so fluid. Have yet to find something so simple and powerful. Oxygen is too bloated, Eclipse HTML editor is crap, etc. JEdit reigns in this area.

d) JDiff. This is a beautifully simplistic diff. Nothing else to add. It just works, and functions nicely.

e) Java Browser. If you like the ctrl+o functionality in Eclipse, then this does an adequate job of replicating the behavior. Opinions may differ.

f) Getters/Setters. Autogenerate these by selecting the the variables for which you want them created. Then run the build-in macro.

g) Class Wizard. Rather simple but competent class wizard (for those that like using wizards).

Only thing missing now is a nice syntax validator for the missing ;

Monday, November 15, 2004

MVC definition

Best definition I've yet to find of the Model-View-Component design pattern:

* A Model that represents application data or state
* The View that processes, formats and renders the display of the Model
* The Controller that is responsible for taking user/client input and
updating the Model
(Enhydra XMLC, David H. Young, Sams Publishing, 2002)

Thursday, November 11, 2004

Search through jars for a class, then invoke javap

Script now works nicely--now to track down my DOM problem:

echo -n "Enter class name: "
read -e SEARCHEE
echo Beginning recursive search through jars $PWD for $SEARCHEE
for i in `find . -name "*.jar"`;
# result= sed -e 's/\//\./g `jar tf $i | grep -i $SEARCHEE`'
result=`jar tf $i | grep -i $SEARCHEE`
if [ "$result" != "" ]; then
echo $result > $temp
#replace / to .
result=`sed 's/\//./g' $temp`
echo $result > $temp
#get rid of the .class, print to file for awk evaluation
`sed 's/.class/\ /' $temp > $temp2`
result=`awk 'BEGIN {FS="[ ]"}; { print $1 }' $temp2`
echo $i
echo $result
#setting the bootclasspath to . otherwise this search
#will report classes found in the bootclasspath jars and not the
#jars starting in .
javap -classpath $i $result -bootclasspath .
`rm $temp`
`rm $temp2`

javap and classpath resolution

Having a heck of a time trying to get javap to spit out correct info
for a class that's contained in many jars--it was spitting out the
same thing for each class in the jar (from my script that searches
through the jars for a particular class). After about 10 minutes of
frustration and figuring this out I went to the web and found this: So, no thanks
to the man page for javap. If the class on which you are invoking
javap resides with the JDK, it'll ALWAYS be decompiled from the JDK
entry. What you need to do is add "-bootclasspath ." to the command
line so that you bootclasspath gets reassigned (to something you don't
care about) to your local dir. Glad this didn't waste too much more
time. Once I get the script completed I'll post it.

Friday, October 22, 2004

importance of having DEVFS in Gentoo

Had a buddy here at work install Gentoo, and he chose dev-sources
which gave him 2.6.7-gentoo-r11. I have r7. Turns out that he *had to
include* dev fs to be compiled into the kernel. The menu states
OBSOLETE, but when Gentoo boots it gives you a warning message if you
don't have it. Without it he could only use terminals (xterm,
gnome-terminal) in X if he was root.

The terminal (gnome-terminal) that he invoked was essentially dead
and was not functional. It loaded a blank, white screen with a
blinking cursor. Took about 5 minutes to figure what he needed in the
Gentoo forums: he needed dev fs. Quick kernel reconfigure, recompile,
copy to /boot, and lilo execution. After a reboot and loading Gnome,
his problem was solved..

Thursday, October 21, 2004

Bluetooth, speedstep

I needed to get Bluetooth working so I could toy around with my iPaq
(tossed the Zaurus, too slow and the iPaq is far more aesthetic).
After reading around a bunch of places what to do (mostly at the
Gentoo forums), I reconfigured my kernel and pretty much added all of
the Bluetooth options there are (L2CAP, SCO, RFCOMM, RFCOMMTTY, BNEP,
Multicast filter, Protocol Filter, HCI USB, sco, HCI uart,BCSP). At
the time I also changed my power settings to fix the wierd
clock-synching problem I've been having (since day 1). I enabled CPU
Freq. scaling, ACPI Proccesor P-states driver, Intel Enhanced

Bluetooth was easy to get up and running after finally figuring out
that modprobe hci_usb was the only thing needed to get the Dell D800
integrated bluetooth alive. But, since this kernel
recompilation/reconfiguration I've been running noticebly slower.
However, my clock as begun to work. Finally decided to take a look at
the CPU freq today (cat /proc/cpuinfo) and noticed that it's been
capped at 600MHZ! No wonder i've been going crazy with delays. SImple
fix, modprobe speedstep-centrino and the clock is kicked to the max at
1698MHZ (1700MHZ rated).

Thursday, October 07, 2004


To get multisync to work correctly with Opie Datebook running on the
SharpROM, you have to SIGHUP the actual process. Kind of a pain, but
at least it works. You don't appear to need to do this with the
contact list.

Wednesday, October 06, 2004

Zaurus pxa255 5600

So I sold my Palm Tungsten C for a Zaurus. And then I bricked the
thing by renaming the wrong file and trying to reflash. Solution was
to get into the Service menu by holding down "d" and "m" while
pressing reset, then powering on (to get out of the Service menu, just
reset). From here you can restore from a NAND flash (4th menu, I

Nice fellow (stormer) from Ireland helped me out by creating two clean
NAND backups from his devices. One an Opie 3.6-pre, the other a QPE.
Both of which I still have and am waiting to post to for downloads. If you would like this NAND, email
me, and I'll make it available.

Secondly, I was able to get the wireless synchronization working with
Evolution using Multisync. I love Gentoo. I didn't need to download
the plugins for this, just typed the following:

USE="evo opie" emerge multisync

Too lazy to add those to my official USE flags. This built the plugins
right into Multisync. Withing minutes everything was up and running.

Love the unit so far. Love being able to SSH and FTP with the thing.
Wireless works wonderfully. Need an SD card for more room.

Tuesday, September 21, 2004

Tapestry 2

Beautiful, only took me about 10 minutes to figure out the way to do get multiple stylesheets into the Shell component. Here's what what I have working in Border.jwc:


expression="{assets.ColorPrintStyles, assets.ColorStyles,
assets.Content, assets.FontStyles}"/>


So, now all the pages will have the Border component and inherit the style. Plus, the style is easily managable for the designer at the component level.


Okay, so the Home service with Tapestry is HARD-CODED to resolve a blank URL to a Well, the beauty of open-source is that you can modify that to your heart's content. I tried that, spent a couple hours on getting it to work and ended up just overriding the service with a local one (extends org.apache.tapestry.engine.HomeService & )

Next piece I'm working on is modifying a basic Border component to provide only the shell and specific stylesheets. According to the Shell component you can provide many stylesheets to be applied by assigning an array or collection of IAsset. At this point I'm not sure where I should do that. Should it be in the engine that I define my list? I've got the entries as context-assets, can I just provide that as the expression? Gotta figure it out and record it.

Friday, September 17, 2004

JSF or Tapestry?

Heard a bit about Java Server Faces lately and I'm interested in investigating. At work I'm beginning a new project in Tapestry and am looking forward to really delving in.

So in searching out information on JSF, Raible Designs added some insight to the process of creating a JSF app.

Thursday, September 16, 2004

script to find a class in jar files

Thanks to N. Jarvis for the guts of this:


echo -n "Enter class name: "

read -e SEARCHEE

echo Beginning recursive search through jars $PWD for $SEARCHEE

for i in `find . -name "*.jar"`; do echo $i; jar tf $i | grep $SEARCHEE; done


xdiskusage is a great linux app to graphically mesaure your disk usage. Can be a bit lengthy to generate on a large disk, but it's quite useful to be able to drill down into the directory structure and view the numbers.

Thursday, September 09, 2004

rox-filer key binding

Bothering me that rox-filer default ctrl+n is set to Create New File. So, how to change it to Create New Directory? After scouring Google, #rox, and the mailing list I pieced together the information. You have to have ROX-Session running in order to edit the menu entries. I guess it's assumed in the Help that you do have ROX-Session running.

Of course, it would be nice to just have .roxrc or something equivelant...ROX Faq Keyboard Shortcuts

Wednesday, September 08, 2004

VIM color pain, change search highlight color

Finally found where to change the search highlight color in VIM. This was a great resource:

Simply added the following lines in my .vimrc:

hi Search ctermbg=LightBlue ctermfg=White

map :let &hlsearch=!&hlsearch

More info available in :help hlsearch

Tuesday, August 31, 2004

Lexmark T632 working Gentoo

What a fiasco here at work to get the T632 working in Gentoo, compared with Fedora. It was entirely user error.

So today I decided to give it another shot by downloading the drivers from Lexmark's site. I chose the Suse/Redhat driver because it appears to be the only legit linux driver. Steps for operation:

1) emerge rpm

2) rpm -Uvh --nodeps whateverdrivername.rpm

3) /usr/local/lexmark/setup.lexprint

4) /usr/lexprint/bin/lexprint

The Java app will take it from there. It was a breeze to browse to the T632, create a queue, and print a test page. "gnome-cups-manager" will then have the queue listed, right-click to make default and the setup was complete.

Another completely satisfactory Gentoo experience.

Thursday, August 05, 2004

X Font Server, who needs it?

I dunno who needs it, but removing it from startup now returns my initial speed of booting up.

Updating FC Cache

Do I really need X-Font Server? It takes an extra 10+ seconds on boot and I'm wondering what purpose it serves. I emerged it due to the font problem I had some time ago, but I don't think that it solved anything. For now I'm removing it from startup for efficiency's sake.

Eterm versus aterm,materm,multiaterm

I've had enough of using aterm and it's variants. I continually find descrepencies in behavior when running jboss and other apps. The terminal will simply vanish and take whatever was running with it.

Eterm appears more solid, just as configurable, and more polished.

Wednesday, August 04, 2004

emerge gnome-blog

This is great, now I can post straight to the blog using gnome-blog. What a slick tool. So much for writing a java app to accomplish the same thing that this does, if I ever get the time...

Tuesday, July 27, 2004

Time sync

For some odd reason I've been having time issues when I halt the
machine. Simple fix by emerging ntp and updating configuration:

# emerge ntp

You need a time server, which can be obtained here:

Uncomment the second statement and update the NTP server with your selection.

Add the service to default run-level to startup on boot:
# rc-update add ntp-client default

Start the service now for immediate sync
#/etc/init.d/ntp-client start

Monday, July 26, 2004

Printing now working

Easiest way for me to get printing in my Gentoo up and working was by
using gnome-cups-manager. Though I use fluxbox, this executed
flawlessly and worked in seconds. However, that was using the built-in
driver for our HP LaserJet. For the Epson at home I'll be going
through the
Gentoo printing how-to

Friday, July 16, 2004

Gentoo: Mysql 4.1.3 beta, Openldap

The latest version of MySQL (at the time of this writing) in Gentoo
Portage is only 4.0.20. However, my project at work requires 4.1.1+
for proper behavior. I found this out the hard way after emerging it
from Portage and then building/testing our project only to find a
connection pooling issue. Fortunately, due to the grace of emerge,
unmerging MySQL was painless. Installation of binaries from MySQL's
site was extremely simple and took a matter of minutes to get
everything up and running.

It's not my intention to zealously preach the benefits of Gentoo (or
maybe it is?) , but I do remember when I had a similar problem like
this while running Fedora and I had to go through several steps with
RPMs to set matters straight.

Similarly, what a riotous mess I encountered with getting openldap up
and running in Fedora. This round of installing Openldap, with emerge,
it was a delight. The only change I had to make was adding permissions
for others to write .to /var/lib/ldap so I wouldn't need to be root in
order to CRUD the entries. On second though, I suppose I could've
alleviated that need if I added myself to the ldap group.

ACPI handling for power-button and lid-closing events

Finally have a script for handling the power-button event and
turning off the screen when the lid button is triggered. Hopefully
will soon be able to resolve the issue of suspending and hibernating
(since both are supported in my kernel, 2.6.7-gentoo-r7). For some
reason it croaks reporting some piece of hardware doesn't support the
action...still need to investigate.

Here's the perl script to place into /etc/acpi/

#! /usr/bin/perl -w

use strict;

my $eventarg = shift (@ARGV);

if ($eventarg =~ /^button\/lid$/) {
system ('/usr/X11R6/bin/xset -display :0 dpms force off');
if($eventarg =~ /^button\/power$/) {

Make sure that it's executable after you create it. Next step is to
update /etc/acpi/events/default:

action=/etc/acpi/ %e

That's it. Now you can shutdown the machine by simply pressing the
power button.

the prerequisite I didn't mention is that ACPI must be compiled into
your kernel and you must have acpid running or nothing here will work.
In the case that you need to patch your kernel to enable it check out
Hardy's Dell D800 page

Thursday, July 15, 2004

Fluxbox GTK apps and large fonts

Recently installed Gentoo. I'm loving it. Had a problem, though, with
fonts in Fluxbox and GTK apps. Firefox's application fonts (not
rendered HTML) were distastefully large, Eclipse too.

It took me quite some time to track down the real problem. The fix was
a combination of switching the GTK theme to use a specific font
(emerge gtk-theme-switch; /usr/bin/switch2 ) and starting X with the
dpi flag: startx -- -dpi 96. Ended up with this in my .bashrc: alias
startx='startx -- -dpi 96' and now everything looks acceptable.

Up and running

Here's the first post. Don't have much time to write about anything due to time constraints and preperation for the vacation to Oregon tomorrow. Hopefully will have access at the rental place so I can post from there. If not, maybe I'll go "sniffing" around town.