Bin-Ebuilds for Grails, Groovy, Gant, & Eclipse-3.4

Eclipse-3.4 has been out for some time. Unfortunately, the Gentoo-Java maintainer was devaway for a while and couldn't make an ebuild to build Eclipse-3.4 from source. Hence Gentoo bug #229609.

I say "to hell with building Eclipse from source" ... especially not for me, being an EEE PC user :)

For those who would just like the binary package for Eclipse 3.4 (eclipse-sdk-bin), and for those who may also be interested in groovy-bin, grails-bin, or gant-bin, try this out:
echo "dev-portage/eclipse-sdk-bin" >> /etc/portage/package.keywords
PORTAGE_BINHOST="http://virtb.visibleassets.com:2080/geeentoo/packages/All" \
FEATURES="getbinpkg" \
emerge -Kav1 =dev-util/eclipse-sdk-bin-3.4
For installing dev-java/grails-bin, dev-java/groovy-bin, or dev-java/gant-bin simply substitute the package name in the commands above.

Note: dev-java/grails-bin already contains precompiled Gant and Groovy jars, in order to run grails, but it doesn't support Groovy or Gant from the command line. If you need a command-line Groovy or Gant, then install groovy-bin or gant-bin as well.

As usual, you can download any of my Portage overlays with the command below (requires app-portage/layman).
layman -o http://virtb.visibleassets.com:2080/layman.conf -L -v --nocolor | less
Then use the '/' search function of the pager application 'less' to look for the string 'virtb' and you should be able to see my repositories. I guess for security purposes, and the fact that mine are not official gentoo overlays, they are not displayed by default unless you specify the '-v' option to layman.

You can add the overlay with
layman -o http://virtb.visibleassets.com:2080/layman.conf -a [overlayName]
Currently, overlayName can be one of "vuze-bin, eclipse, grails-groovy-gant, eee". If you'd like to check out any of my other overlays (mainly for ARM development), try using http://vaiprime.visibleassets.com/~cfriedt/layman.conf .

Debugging Groovy / Grails Apps in Eclipse

I finally found a page with some information on how to properly set up debugging in Eclipse for Groovy / Grails applications.

It was seriously painful to write a Grails app beforehand -  I hope this makes up for all of the time I've wasted restarting the app when I modified Service code.

Note to self:
  1. Try your damndest to get debugging in eclipse working
  2. Do more with Junit / Grails test cases
  3. If neither of those work - do it without Eclipse :)


Gentoo / EEE PC - Black Screen on Resume

I have been struggling with a bit of a productivity problem involving my EEE PC - I can't resume after suspending to ram (i.e. ACPI S3 sleep). All that I get is a black screen. I wish I had another machine to use to SSH in to the EEE, but my old work laptop has once again died. That is entirely another story but basically revolves around poor quality.

Using the ACPI S3 sleep state is actually not an uncommon problem with Linux end users, particularly the non-Ubuntu brand. I have to hand it to Ubuntu in that almost every machine I've ever owned has been properly detected and configured automatically. Getting a bug fixed is a bit more difficult, but whatever.

As many of you know, I use Gentoo almost exclusively on my EEE and Gentoo is historically one of the most difficult platforms to tweak. Gentoo has started offering only stage3 tarballs to get users off to a start, but when I began with Gentoo, they offered stage1 and stage2 tarballs, where building the compiler and baselayout from scratch was part of the installation routine.

The next generation of Gentoo-based distros sometimes offer what is called a stage4 tarball. A stage4 tarball is an entire pre-compiled root image and desktop environment, plus all of the tweaks and additional software necessary to exploit all of the capabilities of the hardware.

In my opinion, the stage4 scene is really lacking with Gentoo. Likewise with binary packaging. If there was a stage4 tarball publicly available for the EEE PC, then there would be thousands more users converted over, I'm sure. The same goes for the Maemo devices. The entire ultra-portable market is full of hardware that has unique specifications and tweaks. If Linux distributions don't start packaging the tweaks, then they'll find themselves falling behind the competition.

So far, I've found a few sites that have clearly explained things relating to building software for the EEE PC - one is by Nathan Coulson, and the other two are slightly outdated.

So the EEE PC model 702 (8GB SSD) has an intel 915 mobile graphics controller on the PCI bus. I would assume that this is the root of the issue when it comes to restoring the black screen after suspend / resume.

I've tried vbetool and saving / restoring /proc/bus/pci/00/02.0 to /tmp/video_state, but neither of those approaches has fixed the problem. Some Gentoo users have reported that the hibernate script works by default so that is my next option to try that out.

I thought I'd post the issue here - if you have any suggestions, please feel free to comment.

In the mean time, I wanted to post my eee overlay. Note that many things with linux-2.6.26 already obselete what is in the overlay, such as the atheros driver, atl2, all of the EEE PC platform-specific fixups, etc. Here is a pretty comprehensive 2.6.26 changelog.

If you feel like using my eee overlay, then you can either directly download the tarball or use layman with
layman -o http://virtb.visibleassets.com:2080/layman.conf -a eee
The overlay contains:
  • sys-kernel
    • asus-acpi (asus acpi module for /proc/acpi/asus)
    • eee-sources (The same patches for 2.6.23 brought forward to 2.6.24)
    • eeepc-linux (the eee module which allows users to overclock their FSB)
  • net-wireless
    • madwifi-ng (atheros madwifi driver)
    • madwifi-ng-tools (tools specifically for the driver)
  • app-laptop
    • eee-acpi (a collection of scripts for acpi events - currently only eee-suspend and eee-video are disabled)
  • x11-apps
    • asusosd (ASUS On-Screen-Display for hotkey events)

Aside from the overlay, I also have a binary package repository at http://virtb.visibleassets.com:2080/geeentoo/packages/All . If you feel like using any of my binary packages, then prefix your emerge command with:

export PORTAGE_BINHOST="http://virtb.visibleassets.com:2080/geeentoo/packages/All"
export FEATURES="getbinpkg"
emerge -av1 asusosd

Please help fix my Black-Screen-Of-Death !!


Last.fm has adopted a new UI :) I like it - hopefully it doesn't have to do full page refreshes nearly as much as the last one!!

Hopefully they didn't decide to use Grails on their site - I'm using it right now, and I hate it - Grails sucks balls (IMHO).


Dell Laser Printer 1700 Setup in Gentoo Linux

It took me approximately 1/2 hour this morning to install the Dell Laser Printer 1700 under Gnome using gnome-cups-manager.
The page at linuxprinting.org was helpful in that it said to use the 'generic PCL6 driver'. Ensure that your /usr/src/linux/.config contains CONFIG_USB_PRINTER=[m|y] CONFIG_USB_SUPPORT=[m|y] CONFIG_USB=[m|y] In my kernel CONFIG_USB=y and CONFIG_USB_SUPPORT=y, but CONFIG_USB_PRINTER=m In /usr/src/linux, run make && make modules_install if necessary. Run 'modprobe usblp' Ensure that cups, gutenprint, and gnome-cups-manager are emerged. My USE="cups foomaticdb gtk ppds readline gimp X acl avahi dbus java jpeg ldap pam perl png ppds python samba ssl tiff zeroconf" but feel free to alter that, although in doing so, your mileage may vary. Now, if you power on your Dell Laser Printer 1700 and plug it in to your computer via USB, monitor the last few lines of dmesg with dmesg | tail -n 50 and you should see something like: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x413C pid 0x5202 usbcore: registered new interface driver usblp Running 'lsusb' should report something like Bus 003 Device 002: ID 413c:5202 Dell Computer Corp. Go to System -> Administration -> Printing -> New Printer Select 'Use Detected Printer', then for Manufacturer use Generic, for Model use PCL 6/PCL XL Printer, and for Driver use 'gutenprint'. Now just ensure that the default paper size is Letter and print a test page. I should also mention that the default paper size was originally set to A4, which is more of a European standard. Subsequently, when I printed a test page I received a page that said PCL XL error Subsystem: KERNEL Error: IllegalTag Operator: 0x2d Position: 6986 However, adjusting the paper size to Letter inside the printer properties fixed this issue. Happy Printing :)


VAI Prime Overlays Accessible Via Layman

After making my vuze-bin overlay accessible via layman, I decided to apply the same approach to my ts72xx related overlays on VAI Prime.

You can see the overlays via layman with

layman -o http://vaiprime.visibleassets.com/~cfriedt/layman.conf -i [overlay-name]

So far, the available overlay-names are as follows:

  • jvmcp (Miniaturized Java environment suitable for the ts72xx boards)
    • custom JamVM (1.5.1)
    • custom GNU Classpath (0.97.1)
  • vai (mainly custom apps for the ts72xx)
    • custom JamVM (1.5.1)
    • custom GNU Classpath (0.97.1)
    • custom battery monitor
  • maverick (overlays necessary for creating a EABI/MaverickCrunch toolchain for the ts72xx)
    • patched binutils
    • patched gcc
    • patched crossdev
    • patched uclibc
  • ts72xx (overlay of applications for the ts72xx)
    • patched fastjar
    • patched busybox
    • patched screen
    • patched portage-utils
    • patched bash
    • patched java-config
    • patched jamvm
    • patched rxtx
    • patched ant-core
    • patched ant-eclipse-ecj
    • patched eclipse-ecj
    • patched gnu-classpath
    • patched mpfr
    • patched nfs-utils
    • patched libnfsidmap
    • patched openvpn
    • patched dropbear
    • patched wpa_supplicant
    • patched binutils (2.15)
    • patched gcc (3.4.6
    • patched db
    • patched psmisc
  • ts72xxtc (binary-compatible toolchain for factory TS filesystem)
    • patched glibc
    • patched linux-headers
It would probably be wise to move at least the binutils and gcc from ts72xx to ts27xxtc.

Anyway, check out the overlay with

layman -o http://vaiprime.visibleassets.com/~cfriedt/layman.conf


How To Use Gmail's Trash Folder With Thunderbird Via IMAP

If you've decided to use Thunderbird to access your Gmail account via IMAP, then you might have run into the Trash problem - deleted items are sent to a new [Imap]/Trash folder, or just Trash, instead of the [Gmail]/Trash folder.

This article describes how to fix the problem.


Prebootmisc for the EEE

I thought I would share a few more of my tricks for utilizing as much of the RAM on my EEE as possible in order to spare the flash memory from excessive write cycles.

So here they are!

In order to minimize writes to flash I would advise adding this line to your /etc/fstab:
tmpfs /tmp tmpfs nodev,nosuid,noexec 0 0
Accordingly, to utilize the ram-based filesystem in /tmp, you can also make some adjustments to portage in /etc/make.conf:
Now, in order to prevent certain daemons and applications from vomiting all over you on boot, it's necessary to build a bit of structure in /tmp that such apps expect to find. For that we'll need an init.d entry that starts right after the local filesystems are mounted, but before anything else!

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
need localmount
before logger
before bootmisc

start() {
ebegin "Starting prebootmisc"

if [[ -e /etc/conf.d/prebootmisc.start ]] ; then
source /etc/conf.d/prebootmisc.start

eend $? "Failed to start prebootmisc"

stop() {
ebegin "Stopping prebootmisc"

if [[ -e /etc/conf.d/prebootmisc.stop ]] ; then
source /etc/conf.d/prebootmisc.stop

eend $? "Failed to stop prebootmisc"

# vim:ts=4
if [ ! -h /var/cache/edb ]; then
rm -Rf /var/cache/edb && cd /var/cache && ln -sf ../../tmp/cache/edb edb
mkdir -p /tmp/cache/edb
mkdir -p /tmp/{portage,binpkgs,distdir}
if [ ! -h /var/log ]; then
rm -Rf /var/log && cd /var && ln -sf ../tmp/log log
mkdir -p /tmp/log/{gdm,samba,sandbox,news,cups}
Now just run the following commands to add prebootmisc to the boot runlevel
chmod +x /etc/init.d/prebootmisc
rc-update add prebootmisc boot
There is 1 catch that I've found after months of use - if your bootmisc is set to WIPE_TMP (wipe_tmp for openrc users), then it will destroy the directory structure that prebootmisc created. My suggestions are 1) disable wipe_tmp which is useless anyway if /tmp is a ram filesystem, 2) rename the service postbootmisc and change depends to have after bootmisc, if you really want /tmp to be wiped before it is mounted tmpfs.

After rebooting the machine you should find that many applications run faster and do much fewer write cycles to flash, preserving the longevity of your flash root filesystem.

To get Firefox to utilize /tmp as your cache (you will lose your cache after /tmp is unmounted), open firefox, navigate to about:config, and set this line:
browser.cache.disk.parent_directory /tmp
If you're a gnome user, you might also find it helpful to add the System Monitor applet to your panel and activate the disk monitor utility. I've changed my read indicator to a safe green colour and my write indicator to red. That way, whenever I'm using an application that is abusing my flash filesystem I'll see a red spike in the System monitor and I'll I know that I'll have to adjust the preferences for that app to use /tmp.

I hope this has helped speed up applications and spare the life of your flash and speed up your EEE!

Geeentoo Binary Package Repository

If anyone is also using an Asus EEE with Gentoo instead of the default Xandros operating system, feel free to use the binary package repository that I have set up here .

I'm going to try my best to put together some documentation about how I arrange my EEE PC, providing /etc/portage/{package,savedconfig}*, /etc/make.conf, /etc/init.d/portage_squashfs, etc. Although right now the documentation will probably consist of a static html page with links to the Gentoo Wiki and other places.

My eventual plans for the EEE are to get a full-blown GRP (Gentoo Reference Platform) set up on it, to create a stage4 for Geeentoo, and then of course to do hardware modifications :)

Planned modifications include:
Maybe I'll turn the static html page into some kind of RSS feed just to make people's lives easier.

In any event - stay posted!!


Running C and Python Code on The Web

Although I'm not a big fan of programming or web applications, this post sounds quite interesting.