note to self....

http://blogs.earthside.org/note_to_self/

Tuesday, June 06, 2006

Firefox Selected Text Color Fix

Okay, here's a solution to one that's been bugging me for awhile:

The problem is that Mozilla Firefox 1.x under SuSE 9.2 KDE 3.3 has some weirdness with the text select foreground / background color. The fix for this was found [tweaked] from http://www.mozilla.org/unix/customizing.html#prefs.

This fix is documented on the mozilla.org website for Mozilla, but this works [seems to] for Mozilla Firefox [curr ver 1.5.0.4], as well.

The tweak was that my X server didn't like the color names that were used in the example from the website - not sure why "green" or "white" are not being mapped by the X RGB color database, but using the [somewhat] standard HTML color hex number format ('#rrggbb', where rr == red, gg == green, bb == blue, and each color is a 2-digit (8-bit) hexadecimal color component value) seems to work fine.

Note that this fix might be possible in the ${ff_user_app_dir}/chrome/userChrome.css file, but I haven't found the CSS definitions of Firefox user interface elements, yet. That should exist, I believe, but it may be wrapped some sort of XUL implementation verbiage.

Anyway - here are the pertinent entries from my newly created ${ff_user_prof_dir}/user.js file [user.js did not exist by default for Firefox - simply create it and add whatever of the available Javascsript UI style commands are desired - the page linked above has more examples]:

// Set select colors for text:
user_pref("ui.textSelectBackground", "#00ff00");
user_pref("ui.textSelectForeground", "#000000");
// Select color for typeahead find is slightly different:
user_pref("ui.textSelectBackgroundAttention", "blue");
// Not clear when/if widgetSelectBackground ever gets called: let's find out.
user_pref("ui.widgetSelectBackground", "orange");


Notes:

For the shell variables used above -

${ff_user_app_dir} - this is the user's application config and state directory (typically something like $HOME/$USER/.mozilla/firefox/)

${ff_user_prof_dir} - this is the Firefox user profile directory (typically something like $HOME/$USER/.mozilla/firefox/${profilename} where ${profilename} is a string randomly generated for the [default] profile when Firefox starts up - usually the first time.

Labels: , , , , , , , , , , , , ,


Sunday, April 23, 2006

Fixing the telnet:// protocol handler in Firefox 1.5.0.2 (Linux)

I had some problems getting Firefox to accept/provide arguments to a protocol handler command entered in the about:config page [see previous post for about:config settings], but I have found a workaround, and posted a HOWTO document about it. See: HOWTO Enable Telnet URI Handling in Firefox.

The gripe here is that telnet://host.name:portnum/ URLs didn't work by default in Firefox. The HOWTO gives a fix.

Labels: , , , , , , , , , ,


Firefox about:config settings for telnet: URLs

Register Protocol from the Mozillazine Knowledge Base.

Gecko DOM Reference

About:config entries from the Mozillazine Knowledge Base.

pound-perl perl mongers wiki posting about settings for telnet URL.

Labels: , , , , , ,


Archives

2004/09   2005/03   2005/04   2005/05   2005/06   2005/07   2005/08   2005/09   2005/10   2005/11   2006/01   2006/02   2006/04   2006/05   2006/06   2008/01  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]