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:

http://www.eecis.udel.edu/~mills/ntp/clock2a.html


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/handle.pl:

---begin----
#! /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$/) {
system('/sbin/halt');
}
---end----

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

---begin----
event=.*
action=/etc/acpi/handle.pl %e
---end----

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
Mike
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.