2007-10-31

Death of a Laptop/Windows Vista Review

My HP/Compaq a220n died on 13 July, 2007. It does not complete the boot process, and appears to be hanging while executing the optical drive Power On Self Test (POST) code from the system BIOS.

I have since acquired an Acer AMD 64 Dual Core machine [will post the specs later] which came from Walmart pre-loaded with Windows VIsta.

I've been using the Acer for a couple weeks now, and am finding that Windows Vista sux even harder than Windows XP - this is Win95 territory, in fact. Crappy OS, crashes regularly, and runs slower the new, better hardware (this new system has a 64-bit dual core processor w/ 2Gig of RAM) than XP did on a system with only 512M of RAM and a 2 generations older processor.

This system is so slow that the cursor hangs for seconds at a time just while trying to move it across the screen, w/ nothing in particular running in the background.

The Vista user interface is ever cluckier to use than the XP interface (e.g. the new Start Menu is just utter crap - it doesn't fit on the screen, and going to "All Programs" gets me into a mess that need the arrow key pad to get out of without doing serious collateral damage to the menu itself as the brainded trackpad driver tries to drag and drop your menu items in places that, while not specified ahead of time, appear to be more malicious than just random.

In short, this machine

  1. Appears to have a malign intelligence all its own
  2. Obviously and very "vocally" HATES the user.
  3. Appears to be pursuing some other-motivated agenda that has to have been conceived and implemented by Microsoft Corp at the expense of anyone with the temerity to actually try to do useful or productive work with a laptop computer.

Next order of business: Install a 64-bit OS that supports full multi-tasking. [note that Vista seems to be running 32-bit code in a 32-bit emulated environment running on top of the 64-bit hardware - probably why the machine is so slow - HAL is not your friend, anymore, it seems]

So despite the gifting a brand new, higher-end-than-what-we-had replacement for the HP, we still aren't able to accomplish any non-trivial tasks with the new machine until the system software is rebuilt and properly configured. Film at eleven.

2007-08-10

USR Ethernet / WiFi Bridge Model 5430

This article discusses the use of the US Robotics 5430 802.11g Wireless Ethernet Bridge device to connect to a Ethernet-connected PC to a "managed" WiFi network. This article does not discuss use of the 5430 as an "Ad hoc" network device/node.

By default, the USR Ethernet / WiFi bridge boots up using 192.168.1.201 as it's "Management IP Address". The IP address used can be changed by accessing the 5430's management interface via HTTP.

  1. Connect a CAT5e Ethernet cable from the PC NIC to the 5430; this is a "straight thru" Ethernet patch cable, not a crossover cable, although a crossover cable might work here, don't know yet]
  2. Perform a "hard reset" on the 5430; this may be acccomplished by holding down the reset switch on the back of the device while power is applied - the reset switch can be depressed using a matchstick or a paperclip - hold it down for about 30 second after power is applied in order to restore the device to its "factory default" settings [30 sec may be overkill in that some smaller amount of time may be all that is required, but 30 seconds works, and we use it here until we have a chance to refine the process.
  3. At a Bash prompt [on the computer that is connected to the 5430], do something like
     sudo ifconfig eth1 192.168.1.111 up
    
    This will bring up the 2nd Ethernet interface on the PC with an IP address in the same sub-net as the bridge's management interface, allowing access to the 5430 using a web browser [HTTP client].
  4. Open e.g. Konqueror or Firefox and enter 192.168.1.201 in the Location bar; make sure Javascript is enabled for this address, since the 5430 appears to user Javascript in the web forms that make up the device's management interface. [If there is a username/password prompt/dialog box when opening the 5430 management interface pages, the default userid/password for the 5430 when set to factory defaults is admin/admin]
  5. Use the Site Survey on the Tools page of the 5430 management interface to see what wireless networks are available [note that the 5430 firmware does not seem to any channel or signal strength info for the available networks - see below for firmaware version number].

Here is the firmware version info for the 5430:

 Boot Loader Firmware Version:  CFE 3.51.21.0.2
 OS Firmware Version:    Linux 3.51.21.0.3
 Firmware Date:        Mar 9 2004

Once you have the SSID of the wireless network to connect to, select it from the Site Survey popup and follow the prompts. [It may be necessary to enter the desired SSID string directly into the SSID text input element on the Wireless page of the 5430 management interface, as well].

Once the wireless network has been selected within the 5430 management interface, the 5430 will immediately attempt to retrieve a network IP address for the new wireless network association the next time the PC requests DHCP provisioning for the NIC connected to the 5430.

Use the command

 sudo ifconfig eth1 0 down

to close down the static IP configuration for the NIC [created above], and use

 sudo ifup eth1

to bring up the NIC using the default [DHCP] NIC configuration.

Note that the syntax

  sudo ifconfig eth1:1 168.192.1.123 up 

Can be used to re-establish a connection to the 5430 Management Interface once eth1 [or whatever the device name is] has been provisioned using DHCP to have the same WiFi netowkr address as the bridge (I.E. the IP address assigned to the 5430 by the selected wireless network association).

2007-07-25

High Fructose Corn Syrup (HFCS)

[this item cross-posted to earth_food at http://blogs.earthside.org/earth_food/2007/07/high-fructose-corn-syrup-hfcs.html]

We've been hearing that "high fructose corn syrup (HFCS) is not good for you" for a couple years now, but up until now it has just been something to avoid if possible (i.e. choose the brands that don't have it in the ingredient list if and when an alternative is available, pass up certain "SALE" items because they contain it, etc), but - at least up until this point, no evidence concerning HFCS has been presented (to me), and no critical warnings have been raised about its use in human food products.

Today while moderating a discussion at slashdot.org entitled PubPat Kills Four Key Monsanto Patents, I ran across a post (#19982005 by an "anonymous" author) which - while substantially directed at the issue of genetically modified (GM) crops, mentions some of the reputed [according to the anonymous author] problems with HFCS and includes some [supporting] internet links.

We've had HFCS on a sort of "probationary" status for some time since it's lack of usefulness for human consumption was first brought to our attention a few years ago.

At the present time, HFCS seems destined for infamy on that list I carry around in my head of "poisonous items which are disguised as food and to which the U.S. FDA turns a blind eye." Items which are already on that list include, but are not limited to:

  • aspartame
  • fluoride

The [anonymous] author of the /. post quotes from a source at http://ezinearticles.com/?The-Dangers-of-High-Fructose-Corn-Syrup&id=28535, which quote is reproduced again, here, in part:

When high fructose corn syrup breaks down in the intestine, we once again find near equal amounts of glucose and fructose entering the bloodstream. As covered in recent newsletters, the fructose short-circuits the glycolytic pathway for glucose. This leads to all the problems associated with sucrose. In addition, HFCS seems to be generating a few of its own problems, epidemic obesity being one of them. Fructose does not stimulate insulin production and also fails to increase "leptin" production, a hormone produced by the body's fat cells. Both of these act to turn off the appetite and control body weight. Also, fructose does not suppress ghrelin, a hormone that works to increase hunger. This interesting work is being done by Peter Havel at UC Davis.

Some of the problems associated with high fructose corn syrup:

  • Increased LDL's (the bad lipoprotein) leading to increased risk of heart disease.
  • Altered Magnesium balance leading to increased osteoporosis.
  • Increased risk of Adult Onset Diabetes Mellitus.
  • Fructose has no enzymes or vitamins thus robbing the body ofprecious micro-nutrients.
  • Fructose interacts with birth control pills and can elevate insulin levels in women on the pill.
  • Accelerated aging.

2007-07-21

FEMA Continues to Contribute to Katrina Death Toll

Democracy Now! is reporting that FEMA suppressed warnings of toxic gases [formaldehyde] in trailers issued for the use of persons evacuated from the destruction wreaked by Hurricane Katrina. From the Headlines page for 20 July 2007:

FEMA Suppressed Warnings on Toxic Gas in Evacuee Trailers
[…] documents show top Federal Emergency Management Agency officials have suppressed internal warnings about dangerous levels of toxic chemicals in trailers inhabited by Hurricane Katrina evacuees […] FEMA field workers warned the evacuees were living amidst levels of potentially cancerous formaldehyde gas […] seventy-five times the recommended maximum […] Hundreds have complained of health effects […] emails show FEMA officials were only concerned with avoiding any legal liability … a FEMA official wrote [that] agency lawyers had advised against carrying out tests because doing so: “would imply FEMA’s ownership of this issue.” […] FEMA lawyer Patrick Preston wrote: “Do not initiate any testing until we give the OK … Once you get results […] the clock is running on our duty to respond to them.” Eleven days later, an evacuee who had complained about the chemicals was found dead in his trailer. […] FEMA attorneys rejected calls for an independent investigation into his death […].

It is interesting to note that as of 08:21 EST Saturday 21 July 2007 [the time of this writing] the GSA auction site at http://gsaauctions.gov/gsaauctions/gsaauctions/ where these trailers are being auctioned is unavailable, returning an HTTP 503 "503 Retry request – Service will be available shortly. Please retry request" error for repeated retries.

This sort of incident brings forcefully to mind the actions of the European settlers to North America in giving blankets contaminated with smallpox to the native tribes residing in the territory upon which the Europeans wished to settle. I.E. There have been repeated allegations amongst the Katrina survivor community to the effect that the Federal government planned to use the disastrous events surrounding the hurricane to depopulate New Orleans in order that the city might be turned over to corporate interests.

The story in the Washington Post titled FEMA Announces Trailer Air Testing Plans, also dated 20 July, mentions several other FEMA-trailer-related deaths and lawsuits which have been filed.

A point which is mentioned in the Washington post article is that at least one of the lawsuits which has been filed, and which is attempting to gain class action status, is against the trailer manufacturer.

  1. Why is/was FEMA concerned with liability when in fact the manufacturers who produced trailers purchased by FEMA are the ones who ultimately bear liability for their unsafe product?
  2. These trailers purchased and distributed by FEMA are brand­name, commercially available "Recreational Vehicles" (RVs) – if the formaldehyde levels in them are sufficient to kill the occupants – even if the occupants killed are "infirm" or suffer from respiratory problems – how is it that the manufactures are allowed to sell these deathtraps to the public?
  3. If private individuals purchase these trailers and resell them, will they be responsible for "cleanup" of the toxic materials in them, and if so, what sort of toxic materials handling and disposal certifications will be required of them?

[note that the GSA auction site is back online as of 09:24 EST today, 21 July 2007 - no explanation of the outage provided on the GSA page]

2007-07-19

Additional info about Konqueror, Blogger Dashboard, and Spell Checking

Apparenlty the prooblem with Konqueror dying trying to load the Blogger.com Dashboard was temporary. This post is made using Konqueror 3.5.2 (KDE 3.5.2). It appears that the problem may have had somewhat to do with the Spell Checker problems I was trying to post about earlier (at the time the Konqueor crash occurred.

The problem then was that Konqueror as configured by default under Knoppix 5.0.1 was still using the German language dictionary for spell-checking, even though I had changed the KDE language preference to US English (US-EN) using the KDE Kicker panel [I.E. "toolbar"] widget.

I have since restarted KDE (due to some problems that seemed to have been caused by my moving the system /tmp directory to an internal drive partition while KDE was still running) and Konqueror starts up and runs and has not [yet] crashed on the Blogger Dashboard interface.

The earlier crash which killed Konqueror for the duration of that KDE session occurred after the problems with the spell checker manifested, and after I clicked the Save Now button to save the post. The Save Now button did not "depress" at that time, and no draft of the message was saved. Immediately after the save operation failed is when I clicked the Dashboard link, which is what caused Konqueror to crash.

Note that at this time, the spell checker does not seem to be working at all in Konqueror (the Auto Spell Check option is checked, and the Check Spelling context menu command does nothing), and that

  1. There is no "typeahead" pattern matching in the tags field of the blogger.com Posting interface as there is with Firefox v2.x
  2. The layout of the blogger.com Posting interface in Konqueror is munged - there is a large whitespace block below the text entry area, between the bottom edge of the HTML textarea element and the the bottom edge of the boarder which encloses the HTML element. (above the Post Options link, the Labels (sic) [tags] entry field, Publish Post and Save Now buttons, etc.

erratta: KNOPPIX audio is working

This is to correct a statement I made previously in a post on this log [earth tech] about KNOPPIX and the audio capability on the HP Pavilion a220n.

The audio input does in fact work under the KNOPPIX 5.0.1 LiveCD release. I missed this because, while the audio output worked fine once the audio sub-system was enabled via the KDE Control Center | Sounds & Multimedia | Sound System control panel, the mic input levels were defaulting to zero, so no singal was being captured.

Links:

Additional problems with blogger.com

Another problem that has shown up recently with blogger.com recently is some strange behavior under Firefox v2.0.0.4 and v2.0.0.5 - specifically, the Posting interface, when certain buttons are clicked, does not behave as expected.

For instance, the "Link&qut; button [supposed to add an HTML anchor (A) element in the text box where the blog post is entered and/or edited:

When the link button is clicked, Firefox apparently initiates a "Drag and Drop" operation for the button image. The URL entry box pops up as expected, but the pointer cursor is changed to indicate that a drag/drop is in progress, and if the user clicks within the URL entry field on the popup, the URL of the button image [at blogger.com] is pasted into the URL entry field. If the user clicks outside the text entry field on the popup, the "drop" part of the drag/drop operation fails silently and text can be entered.

For some reason the drag operation does not provide the "NO" symbol cursor on screen areas which will not accept the dragged image.

This is almost certainly a Firefox issue, rather than Blogger issue, but it is possible that it is something funky w/ the Javascript Blogger uses. I have not examined the Javascript source or tried to replicate this error on other sites or with other browsers (although the same issue does exist with Iceweasel under Debian).

2007-07-18

Blogger.com Dashboard Crashes Konqueror

Well, the Dashboard page at blogger.com seems to have killed Konqueror web browser under KNOPPIX. Konqueror crashed first while I was trying to post about the spell-checker problems that exist in Konqueror under the KNOPPIX LiveCD distro - at that point I was logged in to blogger.com - then it crashed again when I re-ran Konqueror and tried to log in to the blogger.com dashboard. Both times it gave the DrKonqi crash-handler screen.

Now, after I created a persistent installation of Firefox 2.0.0.5 and ran it to make this post, I find (while trying to run Konqueror to get the version number to use in this post) that Konqueror won't run at all [from the toolbar button, at least - haven't tried any other approaches, yet]; it shows the bouncing "wait" cursor for about 15 or so seconds, then just dies silently.

This is Knoppix 5.0.x - I don't have the version number to-hand, but I may be able to post it later. I see that Knoppix 5.2 is released, so the problem may be solved by burning a new LiveCD. Note, however, that the version of K3B that shipped with this version of KNOPPIX does not work - or at least, it doesn't work on this computer, so the burning of a new CD is problematic, right now.

2007-07-16

Bash du+sort Script

This is a one-liner that shows something about why grep has behaved so strangely in the past when we've tried to feed it regular expressions as the pattern to match:

  du -h | grep  "^[1-9]\+\.[0-9]\+[M]" | sort 

The trick here was to add the backslashes ('\') in front of the plus signs ('+'). apparenlty grep interprets the '+' literally if it is not escaped.

Note A: the Debian-blows-goats version of grep is not built with support for Perl regular expressions (bug #15051), which figures, since the Debian-POS developers only seem to know Python.

Note B: it apparenlty makes no difference to [this version] grep if the quote delimiters used in the above command are single- or double-quotes [this is counter-intuitive, since use of single quotes typically means no escape characters are needed], but the quotes must be there for the command to work - leaving them out causes the command to emit no output.

Solution to Debian's Problem with 'mount /dev/sda1'

There is a problem - as mentioned previously - with the default Debian-blows-goats install. For whatever reason, the system refuses to mount a USB mass-storage device when it is connected - that is, the Debian-POS system neither automounts the new storage device, nor will it allow either root or any loggeg-in use to mount it, despite the appropriate entries in /etc/fstab and the expected messges in /var/log/messges.

The forum thread /dev/sda1 missing [now closed] at LinuxForums describes the problem, some attempts at solutions, and some "workarounds" (see our post Found a workaround, maybe...) in detail, but the information we're posting here is not there [or if it is, it's in another thread and we didn't find it], and since the thread is "closed" we are posting it here...

Basically, the solution is very straight-forward: Install the udev package.

While that sounds straight-forward, Debian-blows-dogs-for-quarters has [again] gone out of their way to make the administrators life as difficult as possible by making sure that there is no apparent way to navigate to 'stable' distro from the 'untable' distro, and furthermore there is no clea way to select which Debian-POS distro you want to get .deb packages from. There appears to be no way to do a substring match when seraching packages. And there seems no way to either know which distro (eg.. 'stable', 'unstable', etc) the packages installed on a given machine came from, either.

And now IceWeasel-POS is crashing - randomly deleting characters from the textarea on blogger.com, and taking a good .7sec per charcteer typed to echo the characters typed - andddddddddddddddddddddddddddddddddddddddddddddd this with dysfunctional spell checking! Also, as you can see, the IceWeasel-POS is repeating characters and words randomly when blogger does its autosave operation.

So this is like : I'm typing a sentence, then stopping and waiting fffffffffffffffffffffffor the words to appeare. - and when they do- the repeats.

We have [sort of] found a solution. Note that in the log below, the 'apt-get install udev' command output is from the second run of same command. Ran it, then ran it again. Not sure why, but it worked.

root@juggalo:/dev# apt-get install udev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  bluez-bcm203x hotplug
The following NEW packages will be installed:
  udev
0 upgraded, 1 newly installed, 2 to remove and 2 not upgraded.
Need to get 263kB of archives.
After unpacking 471kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://ftp.de.debian.org stable/main udev 0.105-4 [263kB]
Fetched 263kB in 1s (183kB/s)
Preconfiguring packages ...
(Reading database ... 139905 files and directories currently installed.)
Removing bluez-bcm203x ...
dpkg: hotplug: dependency problems, but removing anyway as you request:
 atmel-firmware depends on udev (>= 0.070-3) | hotplug (>= 0.0.20040329-12); however:
  Package udev is not installed.
  Package hotplug is to be removed.
Removing hotplug ...
Selecting previously deselected package udev.
(Reading database ... 139875 files and directories currently installed.)
Unpacking udev (from .../archives/udev_0.105-4_i386.deb) ...

**************************************************************
* Please purge the hotplug package!
* (/etc/init.d/hotplug has been found on this system)
**************************************************************

Setting up udev (0.105-4) ...
Installing new version of config file /etc/init.d/udev ...
Installing new version of config file /etc/udev/links.conf ...
Installing new version of config file /etc/udev/persistent-input.rules ...
Installing new version of config file /etc/udev/persistent.rules ...
Installing new version of config file /etc/udev/cd-aliases-generator.rules ...
Installing new version of config file /etc/udev/udev.rules ...
Installing new version of config file /etc/udev/devfs.rules ...
Installing new version of config file /etc/udev/hotplug.rules ...
Installing new version of config file /etc/udev/permissions.rules ...
Installing new version of config file /etc/udev/persistent-net-generator.rules ...
Installing new version of config file /etc/scsi_id.config ...

Note that it is not clear how or why bluez-bcm203x hotplug got installed - it was not requested or wanted, as this machine has no Bluetooth devices, and probably never will.

Other notes of note:

  • The udev package was already installed, but wasn't working right.
  • The installed version of udev did not include the documentation that was [according to the Debian udev package description] supposed to exist in /usr/share/udev/
  • As with so many other Debian-POS commands, there was no man page installed, despite the fact that 'apropos udev' showed a number of [non-existent] man pages for the command. This seems to be a pervasive problem with this particular Debian-lies-like-a-whore distro - many [we're inclined to say "most" actually] of the administrative manual pages are notably missing, even though 'apropos' claims they are there - perhaps there is some issue with the configuration of the 'makewhatis' cron job on Debian-blows? Why would these man pages be left out? And if they are going to be left out, why lie about it through apropos?

So yes, we seem to have fixed this problem, but Debian still sux0r.

Fed Up (rant)

Okay, I've had it - I am fed up. Debian Linux is crap - pure, unadulterated crap. Furhermore, it is crap like Debian that is giving Linux such a bad name. Nothing works on this distro. Nothing. These are not hardware problems, since most of the stuff work under e.g. WINDOWS or fraking SUSE Linux 9.1 - NINE POINT ONE, fer godx sake - that's what, 4 years old now, 5? SuSE 9.1 still uses the 2.4.x kernel, fer fux sake. Yet SuSE 9.1 has some functionality - it "just works".

Since installing this Debiian crap, nothing on this machine works - from the USB drive (won't mount - Debian records in /var/log/messages that the drive has been plugged in and all is well, but all attempts to use the mount command fail with a "Special File /dev/sdXX not found" error. It's true, they're not there (the /dev/ files). Where did they go? They were there yesterday (at least for a little while); they were there about 20 minutes ago when this same machine was running KNOPPIX from a LiveCD image (same source from which I so unfortunately installed this alleged OS called "Debian" - I will refer to it henceforth as "Debian-piece-of-crap" or "Debian POS" for short - [note that this is a run-on sentence which refers back to the "- from the USB dirve ..."] - to the freaking spell-checker in this stupid IceWeasel browser. As I type this, every word in the text input area is flagged as a misspelling - EVEN the ones that I specifically told StoopidWeasel to "Add to Dictionary" - simple shit like "for" and "to" and "an" and "the" and so on. WtF? "Check-as-you-type" spelling? Konqueror has had it for several versions/years now. Freaking MS WORD has it. AND IT WORKS [sort of, in word, but still].

I've heard for years now how Debian such a l33t "engineers" distro - I fought with obsolescent Debian versions in the lab, at work, thinking to myself "there has to be a good reason they chose this lame bullshi over [fill-in-the-blank-distro] that works" - I've [sort of] followe the FOSS debates where all the acolytes sing hoseanah to the great Debian-ness and how "at Debian they are really committed to FOSS."

I call bullshit. Debian is crap, and anyone who doesn't realize it is jst sucking up to the emporer, every bit as the tailors who pretended to make a suit. Linux is the emporer, Debian are the tailors, and the emporer has no clothes. Deal with it.

Now please excuse me while I go find and install a distro that actually works with some of this hardware that apparenlty is just to newfangled a gee-whiz-bang for Debian to have gotten around to - stuff that everybody else was supporting out-of-the-box 8 or 10 years ago - okay, maybe 5 or 6 years, but still...

And finally, I want to make as clear as possible the information that the Debian Package management tools [such as they are] a clearly sub-standard, inferior, user-unfriendly, and just generally suck ass compared to any other modern computing system standard of which I am aware.

I will never again reccomend Debian to anyone [except perhaps to enemies], and will not bother with the excuciating downloads of this Debian crapware. And KNOPPIX - well, you have mislead us all, KNOPPIX - all your fiddling and fixing to make this Debian bullshit run half-assed normal from a LiveCD - it really shows thru what crap Debian is when the KNOPPIX tweaks have are no there.

One final point - I installed the Debian-piece of crap to /dev/hda4 but that process somehow hosed the saved KNOPPIX LiveCD configuration on /dev/hda1 - there is no apparent way to get it back or to copy it over to the Debian-piece-of-crap partition, so not only does the Debian-piece-of-crap not work, it trashed the most stable configuration this machine has had since WinXP was removed, and didn't bother to either a) warn me it was about to trash my working config, or b) tell me that it had done so once it had hosed both the saved config and the new install.

So knoppix myconfig=/dev/hda1 doesn't work anymore - which I suppose is part of the greater plan by the Debian-piece-of-crtap manufacturers to eliminate Linux as a functional alternative OS.

2007-07-15

Konqueror Crash

Konqueror is :

  1. Hanging while waiting for blogger.com to "Publish" a blog post.
  2. Crashing; Konqueror will crash if - while the "publish" operation is in its infinite refresh loop, loading and reloading the "Please wait while your page is published" message page - the user
    1. opens another Konqueror window
    2. goes to view the blog in the new window [note that the post which initiated the publish operation has been posted - the post has uploaded and the blog has been updated, despite the braindead infinite loop the first window of Kongqueror is stuck in]
    3. goes back to the first window [where the ininfinite refresh loop is going on]
    4. clicks on the Blogger Dashboard link there, in the first window, while the infinite refresh loop is going on

Other info from the Crash Handler:

  • Konqueror [crashed and] threw SIGILL.
  • "The application was asked to save its documents"

Default browser indentification string for this version of Konqueror [note that I have broken the line below at the backslash]:

Mozilla/5.0 (compatible; Konqueror/3.5; Linux 2.6.17; X11; i686; en_US)\
 KHTML/3.5.2 (like Gecko) (Debian package 4:3.5.2-2+b1)

Here is the backtrace data from the crash handler:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1231935808 (LWP 4267)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#5  0x08f95edc in ?? ()
#6  0xb62d57ae in DOM::checkChild () from /usr/lib/libkhtml.so.4
#7  0xb629e96c in DOM::XMLAttributeReader::~XMLAttributeReader ()
   from /usr/lib/libkhtml.so.4
#8  0xb6268f9e in KHTMLPart::saveState () from /usr/lib/libkhtml.so.4
#9  0xb62289fe in KHTMLPartBrowserExtension::saveState ()
   from /usr/lib/libkhtml.so.4
#10 0xb6875b5f in KonqView::updateHistoryEntry ()
   from /usr/lib/libkdeinit_konqueror.so
#11 0xb6893a11 in KonqView::slotCompleted ()
   from /usr/lib/libkdeinit_konqueror.so
#12 0xb6893c23 in KonqView::slotCompleted ()
   from /usr/lib/libkdeinit_konqueror.so
#13 0xb689987d in KonqView::qt_invoke () from /usr/lib/libkdeinit_konqueror.so
#14 0xb72b8678 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#15 0xb72b8fdc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#16 0xb7f85e0a in KParts::ReadOnlyPart::completed ()
   from /usr/lib/libkparts.so.2
#17 0xb62581c0 in KHTMLView::timerEvent () from /usr/lib/libkhtml.so.4
#18 0xb72b5786 in QObject::event () from /usr/lib/libqt-mt.so.3
#19 0xb72f2b9a in QWidget::event () from /usr/lib/libqt-mt.so.3
#20 0xb724e87a in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#21 0xb724f5f5 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#22 0xb792502e in KApplication::notify () from /usr/lib/libkdecore.so.4
#23 0xb71e0001 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#24 0xb7240305 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#25 0xb71f3d2a in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#26 0xb7267255 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#27 0xb726717a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#28 0xb724d38d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#29 0xb68be17c in kdemain () from /usr/lib/libkdeinit_konqueror.so
#30 0xb7fb1524 in kdeinitmain () from /usr/lib/kde3/konqueror.so
#31 0x0804e1d6 in ?? ()
#32 0x00000004 in ?? ()
#33 0x080cff68 in ?? ()
#34 0x00000001 in ?? ()
#35 0x00000000 in ?? ()

More about KNOPPIX and the HP a220n

The X log file on the HP Pavilion a220n running KNOPPIX:

uploads/Xorg.0.log.TXT

This file is found at /var/log/Xorg.0.log on the system while the system is running.

Getting 'sudo' Working

There is a simple bit of information that has finally penetrated the fog of insanity that surrounds computers and related equipment that information is this:

When using the sudo command under Linux [don't know about other systems, yet] it is the case that users who are listed in the /etc/sudoers file actually use their own account password to execute the sudo command, not [as some of use might have once thought] the root account password as is used when accessing the root account with the su command.

This information has now been shown to be true under systems that include, but are not limited to:

  • KNOPPIX (with passwords and user accounts enabled
  • Debian
  • CentOS

Full dmesg Output for a220n under KNOPPIX

Capture of the output of the command dmesg performed under KNOPPIX on the HP Pavilion a220n:

Here is the output of uname -a for this same system:

Linux Knoppix 2.6.17 #4 SMP PREEMPT Wed May 10 13:53:45 CEST 2006 i686 GNU/Linux

Audio Problems on HP Pavilian a220n under Debian Linux

This is an excerpt from the output of the lsmod command run under KNOPPIX on an HP Pavilion a220n desktop computer:

snd_intel8x0           31260  3
snd_ac97_codec         88352  1 snd_intel8x0
8250_pnp               12288  0
snd_ac97_bus            6016  1 snd_ac97_codec
snd_pcm_oss            38176  0
snd_mixer_oss          17536  1 snd_pcm_oss
snd_pcm                73220  4 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer              22148  2 snd_pcm
shpchp                 37032  0
i2c_nforce2             9856  0
snd                    44768  10 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer

For some reason neither KNOPPIX 5.0.1 nor the Debian install to the hard disk [provided by the KNOPPIX LiveCD via the knoppix-installer command] seem to be able to get the audio input functionality of the sound card working.

Audio output works okay when the Sound System is enabled via the KNOPPIX control panel, but does not appear to work under the Debian instantiation of KDE.

No version numbers captured yet from the Debian kernel, or the versions of KDE involved (which are different between the Debian install (with updates) and the KNOPPIX distro.

2007-07-11

MSN Proprietary Wink Protocol?

Has anyone put a protocol sniffer on the MSN protocol lately? I'd like to have the protocol definition for the proprietary winks [shown in photo as rendered in Pidgin IM client v2.0.2 ] - or maybe they're filtering on the server? Can I spoof the IM client ID to the MSN server?

Zoom the screenshot to read the text ad sent by MSN servers to my IM client when the person I was chatting with sent a [apparently proprietary to MSN] "wink"

Note that Pidgin IM client is the former Gaim IM client for windows, AND that Pidgin's domain is the first instance I've seen of a working .im TLD [it is pidgin.im]

[And: props to my new sweetheart for sending that wink which highlighted this issue for me - apparently no one else talks [types] to me quite like that, kittykitty]

2007-06-16

Parking a Domain

Message from cPanel when domain is successfully parked:

Parked Domain Additions

Using nameservers with the following IPs: 67.43.9.227,67.43.9.226 Bind reconfiguring on host using rndc
Created DNS entry for americanwifi.us
americanwifi.us was successfully parked on top of weedllc.net 

This went pretty smoothly:

  • On the first try, the cPanel utility came back with an "number of parked domains allowed exceeded" message - had to go back and add domain parking to the account using Web Host Manager (WHM).
  • … on the second try, the cPanel utility to Park a Domain" failed with an error indicating that the americanwifi.us domain was using name servers that were not on the weedllc.net domain, and so the domain could not be parked there;
  • … went to the godaddy.com control panel interface (GoDaddy is the registrar for americanwifi.us) and set the name servers for the domain
  • … the parking maneuver was accomplished on the third try, after setting the number of parked domains allowed for weedllc.net and the DNS server records for americanwifi.us
  • There was not real waiting for any of these steeps - the longest wait time was for godaddy.com to update the domain domain records for americanwifi.us
  • Also, had to "unlock" the domain record for americanwifi.us before changing the name server record(s). Not sure if it can be re-locked now that the name servers are off godaddy.com
  • New name servers of record for americanwifi.us are ns1.weedllc.net and ns2.weedllc.net
  • The DNS changes for americanwifi.us seem to have already propagated at this time: 2007-06-16 13:39 EST

2007-06-14

Customize a Device Icon in WinXP

This information is quoted from the page at Microsoft.com:

Including Icons in Device Driver Packages

Note: The following information will be included in a future 
version of the Windows DDK.

Once you have created a custom icon for a device, you can include
the icon in the device driver package by referencing it in the INF
file. The DDInstall.HW section is used to set driver-independent
information that is device-specific.

In the sample INF sections that follow, the DDInstall.HW section 
points to a separate AddReg section, which specifies the personalized 
icons.

[DDInstall.NT.HW]
AddReg = IconInformation
[IconInformation]
HKR, , Icons, 0x10000, "<name of icon file>"
HKR, , NoMediaIcons, 0x10000, "<name of no media icon file>"

The AddReg section in this example defines two separate registry values and
corresponding icon files, one for the custom icon to display when media is 
present, and a second, "NoMediaIcons," which specifies an icon to be used to 
indicate the same device when no media is inserted.

The following example shows the registry entries for a Vid_0000&Pid_0000 
device and the dynamic-link library (DLL) files that contain the 
"media inserted" and "no media" versions of the icon.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\ 
 ** remove line break before using! ** 
  Vid_0000&Pid_0000\059B003112010E93\Device Parameters
Icons [REG_MULTI_SZ]= %SystemRoot%\system32\icon.ico
NoMediaIcons [REG_MULTI_SZ]= %SystemRoot%\system32\noicon.ico

In the INF file, icon files must be listed in the [SourceDisksFiles] 
section within the INF file, and copied to the user's system by either a 
CopyFiles directive or a CopyFiles section.

During driver installation, the INF entries listed in the example 
will be stored in the Device Parameters subkey within 
HKLM\System\CurrentControlSet\Enum.

Drivers or other code should never access or modify this registry key 
directly; instead, use one of the following APIs:

* From user-mode, use SetupDiCreateDevRegKey and SetupDiOpenDevRegKey.
 
( From kernel-mode, use IoOpenDeviceRegistryKey.
 

For information about the INF entries cited here, see the Device 
Installation Reference in the current Windows DDK.

2007-06-01

interesting utilities for NTFS - TimeStomp

The article Slashdot | New Anti-Forensic Tools Thwart Police pointed to a couple interesting things:

TimeStomp is a program for viewing and setting file system object date/timestamps on the NTFS file system.

Quick TimeStomp How-To from the Security Articles section at DataStronghold.com.

2007-05-26

Firefox disapearing scroll bar problem - clues

I've been using Mozilla Firefox 2.0.0.x under Windows XP and I have found a clue to the source of the problem that can be seen when resizing the Firefox browser window horizontally and the [Firefox] vertical scroll scroll bar - at some seemingly arbitrary point - disapears under the right edge of the shrinking window.

I tried to look this problem up using Google, but I didn't find much - just some forum posts on a forum I've already forgotten the name and URI of. However, there was a vital clue in the lengthy thread which didn't apply to my situation directly: the problem is triggered by some characteristic or behavior of the Status Line.

There was also some other mention of the Status bar in the threads I looked at. Someone complained that when they removed the weather.com widget from their status bar the problem cleared...

To make a long story short, I had installed a fairly large number of widgets ("add-ons") that took over various bits and chunks of the status line.

The point at which the vertical scroll bar disappears is the point at which the status bar reaches its minimum possible width based on the combined widths of whatever widgets you have installed on the status bar.

Simple, huh? Well, it took me a minute to work it out, so I thought I would share...

2007-05-17

multi-select tag search tool, the general case for a

I've been using "tags" and software applications that utilize and/or perform "tagging" operations for some time now, and while I am not an expert in the theory of operations concerning why we should all use tagging rather than the folder model of organization of information (I use both, and have caught myself trying to use both together), but I do have an observation having watched and done a certain amount of analysis of how I myself use tagging. That observation is this: I really, really want a tag search that will let me specificy multiple tags, rate on tag hits, and not include "keyword text searches" unless I specifically request it as a seperate function.

That's all. I know, I know: I'll have to build it myself. *sigh*

Tag the Bird for Thunderbird Concifuration Issue

========
 Issue:
========

The "Tag the Bird" (version 1.0) extension for Thunderbird
Portable version 1.5.0.10 (20070221) stores a hard-coded path
name in the Thunderbird configuration file.

This information is of interest only insofar as it affects the
working of "Tag The Bird" (and hence Thunderbird) in the
situation where Thunderbird has been moved from one location to
another via a simple Copy operation.


=============
 Background:
=============

Having installed Thunderbird Portable on a USB drive, and having
subsequently realized that the size of my Gmail inbox was
subsequently going to over-run my 1Gig USB stick, and that
having furthermore realized that Thunderbird would load more
quickly and just generally be more lively on my 2.8Ghz laptop if
I had the Thunderbird install on the internal hard disc, and
that I wouldn't have to keep up with a USB stick for my email if
it was on the drive - all these things [and others, like the
fact that Thunderbird stores its message archives in a
sub-folder with an arcane naming scheme under root
ThunderbirdPortable directory]taken together led me to simply
drag the Thunderbird folder from the USB drive to my WinXP
desktop and drop it in a spot where I can open it with a single
click any time I feel the need to use Thunderbird instead of
web-mail.


=========
 Detail:
=========

The config file that is changed is the same one that is opened
from within Thunderbird that is opened when the "Tools | Options
| Advanced | Config Editor..." button is pressed, presenting the
about:config page with a list of several hundred configuration
settings in Thunderbird [and extensions] - which settings may or
may not be accessible otherwise through the Thunderbird or
Extension GUI.

The name of the setting is "webmail.logging.comms.FileLocation"
[no quotes in the view of the file within Thunderbird].  The
listing of items in the about:config page is one item per line,
in alphabetical order.

The first part of the line is the name of the setting, and is
made up of identifiers [words] separated by dots [periods].
Lines that have been changed from their default values [I
believe this is the criteria] are shown in a boldface font.
Line items that have been created after the software was
installed may also be included in the bold facing, so
creation/modification time of the line in the file is somehow
used in the decision taken by the software as to whether the
line should be boldfaced or not.

Each line also contains a "Status" field [I see that "user set"
may be the status condition value which determines boldface of
lines], a Type field ["boolean", "integer", and "string" seem
the most common], and a value conforming to the type of value
shown in the "Type" field.

The value in question, here (webmail.logging.comms.FileLocation)
is a string value giving a fully qualified path name, apparently
a log file location.  The value on my system was

 F:\ThunderbirdPortable\Data\profile\extensions\{3c8e8390-2cf6-11d9-9669-0800200c9a66}\logfiles

Notes:

0.  The Thunderbird root directory in the string above path
    given above is "F:\ThunderbirdPortable\" - all file system
    objects [files] belonging to Thunderbird Portable reside in
    or below the Thunderbird root directory.  We will call this
    directory "ThunderbirdRoot" here, since the concept of the
    root directory as an environment for the operation of the
    software is important, here, to the understanding of the
    problem, and the crafting of a solution.

1.  Rhe string of hexadecimal digits in braces -
    {3c8e8390-2cf6-11d9-9669-0800200c9a66} - that is part of the
    string value shown above is [I believe] a so-called "GUID" -
    a "Globally Unique Identifier" - which uniquely identifies
    some piece of software or item of data [in fact, in many
    cases, a piece of binary executable code which is to be
    treated as data for one reason or another].

2.  {3c8e8390-2cf6-11d9-9669-0800200c9a66} identifies something
    that I find - by looking in the directory, and opening the
    standard-format install.rdf file at
  F:\ThunderbirdPortable\Data\profile\extensions\{3c8e8390-2cf6-11d9-9669-0800200c9a66}\

    is a Mozilla (and so Thunderbird, and so Thunderbird
    Portable) extension called "Tag the Bird" (obviously
    designed for Thunderbird specifically).  I installed this
    extension some time ago, but have not used it, since it
    requires that I log in to my Gmail account through the Tag
    the Bird software, and I haven't been comfortable doing that
    until/unless I have time to examine the sources or otherwise
    convince myself that this software is not phishing software
    designed to steal my account ID and password...

3.  The install.rdf file is an XML file that describes the
    initial configuration of a piece of software - in this case
    Tag the Bird.  RDF is an acronym for "Resource Descrition
    File" [perhpas "Format"] and is a standard extension to XML
    used by Mozilla [and - presumably - others].

4.  The RDF file must identify precisely - in this case using
    GUID, version number, program name, and author name - the
    software that the configuration description applies to.  For
    our purposes here, we just we looking for the program name
    and version number that goes with the GUID in the path name.


============
 Solutions:
============

Since setting entered into the about:config file points to a
sub-directory of the ThunderbirdPortable directory tree, and
since I had previously copied the directory tree entire, I can
assume that the directory pointed to by the current value stored
for webmail.logging.comms.FileLocation was valid at one time -
that is, the point at which the log [we presume] files were
copied from the existing subtree of ThunderbirdRoot on the USB
(F:) drive to the desktop folder on the laptop.

Furthermore, since we know that the desktop folder on the laptop
lives at "C:\Documents and Settings\USERNAME\Desktop" [where
USERNAME is the system user name of the user whose desktop we're
talking about], we can know that when we copied ThunderbirdRoot
from F: to the desktop, the the ThunderbirdRoot directory tree
was copied into C:\Documents and
Settings\USERNAME\Desktop\ThunderbirdPortable such that the
director on the C: drive is a snapshot of what was on the USB
stick at that time,

Therefore, the only critical path question in deciding to simply
change the about:config: setting to point to the path on the C:
drive is simply "Do we need to merge the changes that have been
made to the F: drive path [...]/logfiles into the new C: drive
path before we change the pointer?"

This is important in a couple ways:

1) the log files may be updating even as we make the change, if
Thunderbird is running at the time.  This means we should shut
Thunderbird down while we make the change, so we must get over
the angst of having to shut down a running program and just do
it...

2) We may just want to archive all the existing logs and start
new ones - we didn't know we could do that before, but now since
we know, perhaps we should.

3) We still don't know what physical file-system object [file]
Thunderbird is storing the about:config data in.  This is of
mild historical interest, since it's a point of hacker cred to
know which, amongst the many and varied configuration files
Mozilla uses, particular text file in which to make a particular
change to get the change to "work" in Thunderbird [or any of the
other mozilla softwares].  The reason this is [was] of interest
is simply because there was a time, back in the day, when
Mozilla was known as "Netscape", and the prefs.js file was
marked with a clear notice to the effect of "DO NOT CHANGE THIS
FILE IN YOUR TEXT EDITOR JUST BECAUSE YOU THINK YOU KNOW
JAVASCRIPT, YOU FILTHY TEXT-EDITING, UNRECALCITRANT ANTI-GUI
HACKER YOU FILTH YOU POND SCUM LINUX SUSPECT" which was noticed
by some few of us who were perhaps a bit too enamored of
tweaking hidden text files in an attempt to make our PCs love us
like real women having multiple orgasms.  We must find out if
she's a real blond, here.  Again.  Someone already knows. We
could look it up.  We don't care, we want to figure it out for
ourselves.

4) Okay, after that thrilling adventure, we're about ready to
make this config change to this Thunderbird plugin to make sure
there is no hard reference to a drive/file system which may or
may not be mounted and/or available when the software program in
question actually runs at any given time, at the command of some
as-yet-to-be-determined user.  Just gotta check a few more
things, first, and take another quick look at the current
program state.  Also need to shut down Thunderbird for a minute.

5) Shutting down Thunderbird:  We can figure out which file(s)
in the thunderbird are changed if we make a change to the config
right before we shut it down.  Since this knowledge will be of
use to us in determining which config file stores which config
setting [see above for why we want to know that], we will make a
"random" change to the about:config settings - we do this under
the assumption that all the settings shown in the about:config
dialog are in fact stored in the same file.  This may or may not
be the case, which will also be shown by this particular
[experimental] operation and its outcome.   We select a setting
from this dialog that we either a) don't care anything about,
but can observe, or b) must remember to change back to what we
want it to be, later - say, when (/if/) we come back to make
this change [the logging path] from within the GUI.  I say /if/
because we may just make the changes in the text file once we
know which file that is... we toggle the randomly chosen boolean
setting "wallet.enable" - don't forget to set it back.  Check
the time.  20:40

6) Back into WinXP now, we use the explorer mode of Windows
Explorer to navigate back up to the secret file stash of the
instance of Thunderbird that's running from the hard disc:
C:\Documents and
Settings\USERNAME\Desktop\ThunderbirdPortable\Data\profile

Note:  This is the same directory created when we copied the
ThunderbirdRoot folder off the USB drive.

7) By checking the time-stamps we find that the changed config
file is in fact our old nemesis from the profile folder:
prefs.js  - and if you don't think that filename is
extra-ordinarily hard to remember over time - that is: hard to
remember than "most filenames" - well then, that would mean that
my weed is superior to yours at least in function if not
necessarily in form.  Nothing personal.  We open the file.

8) Sure enough, there it is [see fig. 1.]


Figure 1:

/* Do not edit this file.
[...]
*/

... you scum sucking linux-lovers ... it may as well add.

9) Change it in the about:condig dialog to point at the new
directory [after you merge the files if you're that kind of
person, which we're, not; you should be able to figure out what
"it" means here from what was said above - if not, well, you
probably didn't make this far through here anyway, in that case
;)

2007-01-30

earth blog blogger templates

Here are [links to] templates used for the earth blogs pages. These templates are HTML encoded, so they should be copied and pasted rather than directly downloaded, since the HTML elements and blogger tags will show up as HTML entities in the HTML source code.

These templates is specific to blogger.com and probably won't work with other blogging services.

These templates are moving towards being XHTML and CSS standards compliant, but probably aren't there, yet. That is: the goal here is to write the template in such a way that the resulting blog pages will validate using the W3C validation services.

The blogger template for the ain't it strange blog: aint_it_strange.html

The template for blog null: blog_null-v3.html

The template for this [earth tech] blog is derived from the template for earth food: earth_tech-blog-template.html. Additionally, the stylesheet for earth tech is available: earth_tech.css

Set the bookmark Icon for a Javascript Bookmark in Firefox

Problem

The problem we're solving here is that Firefox does not store a page icon when a bookmark is created which launches a Javascript to e.g. open a pop-up. Specifically, while the Google Bookmarks script is handy and functional, there is no icon stored for it, which means that if we - as some are wont to do - put the Google Bookmarks shortcut on the tool bar without a Name (in the Name: field of the Properties dialog), a generic icon is used which is difficult to differentiate from the rest of the toolbar icons at a glance.

To give you an idea of how annoying this is, here's a screen-shot of typical our FF Links toolbar on a typical day:

[toolbar screenshot 1]

Where is the Bookmark Icon Stored?

In looking at the Firefox bookmarks.html file we find that bookmark icons are stored as non-standard attributes of HTML A elements, each of which contain a bookmark URL as an HREF attribute.

We haven't been able to find this documented anywhere, but if we look at the Firefox bookmark file [Firefox 2.0.0.5], the bookmark for the Firefox Start Page looks something like this:

  <DT><A HREF="http://en-us.start.mozilla.com/firefox"
  LAST_VISIT="1162959544"
  ICON="data:image/png;base64,
  iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/
  9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJ
  ZTwAAAHWSURBVHjaYvz//z8DJQAggJiQOe/fv2fv7Oz8rays/N+VkfG/iYnJfyD/1+rVq7
  ffu3dPFpsBAAHEAHIBCJ85c8bN2Nj4vwsDw/8zQLwKiO8CcRoQu0DxqlWrdsHUwzBAAIGJ
  mTNnPgYa9j8UqhFElwPxf2MIDeIrKSn9FwSJoRkAEEAM0DD4DzMAyPi/G+QKY4hh5WAXGf
  8PDQ0FGwJ22d27CjADAAIIrLmjo+MXA9R2kAHvGBA2wwx6B8W7od6CeQcggKCmCEL8bgwx
  YCbUIGTDVkHDBia+CuotgACCueD3TDQN75D4xmAvCoK9ARMHBzAw0AECiBHkAlC0Mdy7x9
  ABNA3obAZXIAa6iKEcGlMVQHwWyjYuL2d4v2cPg8vZswx7gHyAAAK7AOif7SAbOqCmn4Ha
  3AHFsIDtgPq/vLz8P4MSkJ2W9h8ggBjevXvHDo4FQUQg/kdypqCg4H8lUIACnQ/SOBMYI8
  bAsAJFPcj1AAEEjwVQqLpAbXmH5BJjqI0gi9DTAAgDBBCcAVLkgmQ7yKCZxpCQxqUZhAEC
  CJ4XgMl493ug21ZD+aDAXH0WLM4A9MZPXJkJIIAwTAR5pQMalaCABQUULttBGCCAGCnNzg
  ABBgAMJ5THwGvJLAAAAABJRU5ErkJggg=="
  LAST_CHARSET="ISO-8859-1"
  ID="rdf:#$.vPhC3">Firefox Start Page</A>

The example above has been line-wrapped and HTML encoded, but clearly, the icon used for this bookmark is defined by the content of the [non-standard] ICON attribute of the A element. Furthermore, we may deduce a few things from the definition shown:

  • data: - this implies that something besides data might be stored here. Since we don't have a specification for this attribute value, we'll pass over this for the moment and just plan on using it "as is" - that is, we will create a bookmark that uses this same format for the ICON attribute
  • image/png;base64 - This appear to be a MIME-type/encoding specification - we're guessing that the 'base64' goes with the [more obviously a MIME-type] 'image/png' since it is separated by a semi-colon instead of a comma...
  • The string after the comma is obviously uuencoded data - the image itself, stored as ASCII characters pto avoid the problems inherent with trying to put binary image data in a text file]

Solution

Since

  1. we don't have a base64 encoder handy,
  2. we want to avoid manual editting of bookmarks.html
  3. the Firefox bookmark property sheet doesn't provide a means to set the icon to use for the bookmark
  4. we want to do this as much as possible within Firefox

we propose to follow the following steps to accomplish the goal of setting the ICON attribute of a bookmark which launches a Javascript target:

  1. Create a Shortcut Icon Image to use in the bookmark
  2. Create a webpage that has the bookmark/page icon we created
  3. Navigate Firefox to the page we created
  4. Boomark the page in Firefodx
  5. Edit that bookmark, removing the page URL, and adding the Javascript
  6. Clear the 'Name' property of the bookmark

Create an Shortcut Icon Image

Here is a link to the shortcut icon we created for the 'Add Google Bookmark' script: star-gold+16.png

This icon was created using The GIMP - a description of creating the PNG image is beyond the scope of this post.

Create a Web Page that Uses the Shortcut Icon

This is pretty simple, but assumes access to a web server - for some reason it doesn't seem to work with file:// URLs.

Here is the code for the HTML file we use:

  <html>
    <head>
      <title>example</title>
      <link rel="shortcut icon"
      href="star-gold+16.png" />
    </head>
    <body>
      <p>Example of shortcut icon META element</p>
    </body>
  </html>

This file is a here: http://blogs.earthside.org/earth_tech/uploads.html

Creating the Bookmark

Here is a screen shot of the browser showing the newly created toolbar icon - a plain file icon with labeled 'example'.

Note that you will need to click the newly created shortcut once to get the new icon to show up on the toolbar - for some reason the icon doesn't load when the shortcut is created [this can be seen if you watch the bookmarks.html file - it doesn't update until you click the new shortcut for the first time and the icon loads - it may be that the shortcut would update if FF closed, but...].

Here is a screenshot of the browser after the toolbar shortcut icon has loaded:

Next we open the properties page for the old Gmark shortcut and copy the Jacascript out of the Location field.

Below is a copy of the the Javascript - this all has to go on one line for in the bookmark Properties dialog Location field:

 javascript:(function(){var
 a=window,b=document,
 c=encodeURIComponent,
 d=a.open(
 %22http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=%22
 +(b.location)+%22&title=%22+c(b.title),%22bkmk_popup%22,
 %22left=%22+((a.screenX||a.screenLeft)+10)+%22,
 top=%22+((a.screenY||a.screenTop)+10)+%22,height=420px,width=550px,
 resizable=1,alwaysRaised=1%22);a.setTimeout(function(){d.focus()},
 300)})();

Here is a link to a text file which contains the Javascript shown above, but all on one line, so it can be easily copied and pasted [the line is 392 characters in length]: gmark.js

  1. Open the properties dialog for the 'example' shortcut
  2. Clear the 'Name' field
  3. Paste the Javascript code into the 'Location' field
  4. Hit the 'OK' button to save the bookmark

Here is a screen-shot of the 'example' properties after the above changes have been made:

The DT element line from the bookmarks.html file with the Javascript target and the custom icon [saved to a text file]: http://blogs.earthside.org/earth_tech/uploads/gmark.txt

The toolbar with the new shortcut icon which launches the Javascript to add a Google Bookmark:

Notes:

  1. In the screenshot above, the button labeled "Gmark" has the script to add the current browser page to Google Bookmarks stored in its "Location" property - the script is launched when the button is clicked.
  2. This functionality [add Google Bookmark] exists in the IE Google toolbar, but not in the Firefox version.
  3. The Gmark button is the only button currently on the toolbar that contains a Javascript, but it's so ugly that it would be nice to have a way to add an icon to the buttons which launch Javascript before any more are added.
  4. The Firefox bookmark property sheet does not provide a way to set the icon to be displayed for a given bookmark.
  5. The Firefox bookmark property sheet does allow a blank "Name" property field, unlike IE, which treats the bookmark name as a filename, and hence will not allow the bookmark to exist without a filename.
  6. There are almost certainly others [e.g. manually Base-64 encoding the icon image], but this solution will work for trivial cases, since it leverages the "built-in" Firefox icon storage functionality - this has the advantage of not requiring you to edit the bookmarks.html file.
  7. Based on the previous note, above, it should be possible to create a PHP or CGI scripted server page which will allow this process to be somewhat automated [e.g. allow the user to select a favicon from a list, then return a page which has that image as a page icon - the Javascript could be added to the bookmark created for the generated page, preserving the ICON attribute of the bookmark A element...
  8. Various of the attribute names used in the Firefox bookmarks file are not defined in HTML, and so are not properly speaking "legal" HTML - we don't really care about that here, but it's worth noting if you are interested in manipulating the bookmarks.html file directly [ignoring the instructions from mozilla to the contrary].
  9. Comletely unrelated, but handy: If you click a button on the toolbar while holding down the Shift key, the target URL opens in a new window. Ctrl+<click> opens the target in a new tab.

2007-01-28

eater.org/blog: Free education

I don't usually blog about other blogs, but Eater's post about the open sourcing of MIT's curriculum is worth taking a look at, if only because he's propagating an idea that I've been pushing for quite a few years: Online [networked], open sourced public schools. Note that there is quite a bit of effort to create the definitive "online high school", but so far everything I've seen [e.g. in state of Ohio] is closed source, and is basically designed to keep the students off the internet. Public schools in the US are long way from being willing to use the Internet to educate students. From the luddite POV adopted by most "Boards of Education" [in my experience], the Internet is something the students must be protected from, not something that they should be allowed to reference as a source in a term paper...

2007-01-25

CSS syntax highlighter

Checking out the JavaScript drawing program example called Doodle at the webreference.com section on JavaScript Programming, I found this bit of CSS that does syntax highlighting: SyntaxHighlighter.css [http://www.webreference.com/css/SyntaxHighlighter.css]

See also the Doodle Javascript programming example provided by WebReference for use of these style classes. Nice bit of work.

Here is a trivial example of the HTML to use of some of SyntaxHighlighter.css classes [from the example article, page 3]:

<div style="width: 700px;">
<textarea name="code" class="javascript" cols="60" rows="10"> 

<P class=code>&lt;script src="core.js" 
type=text/javascript&gt;&lt;/script&gt;<BR>&lt;script src="graphics.js" 
type=text/javascript&gt;&lt;/script&gt;<BR>&lt;script src="canvas.js" 
type=text/javascript&gt;&lt;/script&gt;<BR>&lt;script 
type=text/javascript&gt;<BR>var canvas = null;<BR>function initCanvas() 
{<BR>&nbsp;&nbsp;&nbsp;canvas = new 
Canvas($('theCanvas'));<BR>}<BR>window.setTimeout(initCanvas, 
10);<BR>&lt;/script&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;div id="theFrame" 
class="CanvasFrame"&gt;&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;div id="theCanvas" 
class="Canvas"&gt;&lt;/div&gt;<BR>&lt;/div&gt;</P>

</textarea>
</div>

Other examples occur in the article.

This CSS seems to make a nice complement to the PHP syntax highlighter blogged about elsewhere.

2007-01-12

GNU Emacs Mouse Wheel

Scott Hurring's .emacs has some lines of interest:

;; Turn ON mouse wheel support
(mouse-wheel-mode)

This mouse-wheel-mode doesn't seem to be available in GNU Emacs 20.4.1 (sparc-sun-solaris2.5.1) - instead a couple functions are defined in the .emacs:

;; Mousewheel
(defun sd-mousewheel-scroll-up (event)
  "Scroll window under mouse up by five lines."
  (interactive "e")
  (let ((current-window (selected-window)))
    (unwind-protect
        (progn 
          (select-window (posn-window (event-start event)))
          (scroll-up 5))
      (select-window current-window))))

(defun sd-mousewheel-scroll-down (event)
  "Scroll window under mouse down by five lines."
  (interactive "e")
  (let ((current-window (selected-window)))
    (unwind-protect
        (progn 
          (select-window (posn-window (event-start event)))
          (scroll-down 5))
      (select-window current-window))))

(global-set-key (kbd "") 'sd-mousewheel-scroll-up)
(global-set-key (kbd "") 'sd-mousewheel-scroll-down)

Seems like quite a lot of code, but this probably is what's obscured by the mwheel and mouse-wheel-mode modules.

According to the Fedora Emacs docs, the following should work with "the older version 20 of Emacs":

;; Enable wheelmouse support by default
(require 'mwheel)

However, this doesn't seem to work with the Solaris version - probably because mwheel appears is not installed.

Other items of interest here include:

;; show line numbers at bottom
(setq line-number-mode t)
(setq column-number-mode t)
(line-number-mode t)
(column-number-mode t)

;; no crap in *scratch* on startup
(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message t)