Monday, April 25, 2011

Somehow installing, configuring, and using NoScript in K-Meleon 1.5 via Wine

I am assuming that you probably already know how to use Wine and know your way around the computer.

The conditions: Knoppix 4.0.2, because it runs passably with 128 Mb of RAM, in a situation where no swap space is available. This version of Knoppix has a really outdated version of Wine, which makes it difficult to use Windows programs there. There may be people stuck with either that version of Knoppix or that old version of Wine. At least this post provides a case study, which I hope could be of some interest.

The only reasonable place I could find NoScript for K-Meleon 1.5.4 is from extensions.geckozone.org/KMES-NoScriptEn. The version is 1.7.8.0 and it's from 17.06.2008 (that's 2 and 3/4 years old as of April 2011).

First off, change installer's .exe file rights for it to be an executable. Like this from the command line:
chmod u+x "K-Ext(1.1-1.5-1.6)_NoScript(1.7.8.0).exe"
u = for current user; + = add/enable; x = executing;
The filename is wrapped in double quotes, because it contains parentheses "()".
In my case, the first round of installation didn't work. Later I specified this target install directory:
z:\mnt\hda1\Program Files\K-Meleon
^ can't remember if I specified an upper- or lowercase letter z
and installation worked after that.

K-Meleon should not be running during installation, so run it after installation.

27.04.2011.–: After a relatively quick-and-dirty article which turned out to be far more specific than originally anticipated and still quick-and-dirty, I've updated the following with information which will make K-Meleon slightly easier to use as it is, with what the setup is and all...
When running K-Meleon through Wine in Knoppix 4.0.2 (remember that it's from 2005 and very outdated) and when you're stuck with such a set-up:
  • The NoScript button menu can be used with a mouse by right-clicking on the NoScript button and holding the pointer device button down and dragging the cursor to the necessary command (shortcut menus will otherwise turn off after right-clicking on an item and hovering a mouse cursor over its menu; I've seen this in TWM, don't know how it works in other window managers).

    Other ways:
    • Click on the NoScript button, then use menu hotkeys (underlined) to perform a function;
    • or consider dragging the pointer through the NoScript menu via the main Tools menu.
  • Saving configuration changes in the NoScript Options window does not work, because it's impossible to save settings by clicking the OK button, but you can otherwise close the window (saving options may work with newer versions of Wine; haven't tried this myself).

    Workarounds:
    • Configuring NoScript is possible only at about:config for settings (use the noscript text pattern in the about:config search bar to get NoScript-specific settings);
    • ^ Consider removing some default domains there from the noscript.default string;
  • Worse, the NoScript menu in K-Meleon (at least in the given configuration and set-up) won't show domain names in its menu (Shock! Horror!).
    • Now, the whitelist, which is not shown in about:blank, is only configurable in prefs.js at the local K-Meleon profile folder on the hard drive (from where K-Meleon is run). If you don't know what the prefs.js location of the current profile is, open Preferences, go to "Privacy & Security" preference category, click on the Cache tab and see the "Cache Folder:" entry, which shows the location of the current profile folder.

      An example location is here:
      "/mnt/hda1/Program Files/K-Meleon/Profiles/g1bb3r1sh.default"
      So, edit the prefs.js file with a text editor at this line:
       
      user_pref("capability.policy.maonoscript.sites","place.doma.in nam.es here.com in.alphabetic.al ord.er.com ea.ch doma.in na.me separated.wi.th a.space.com and.do not.break.the.li.ne");
       
      Make sure just in case that K-Meleon is not running when editing the file, because if you've saved the file and then exit K-Meleon, then K-Meleon is highly likely to overwrite your changes.

      13.09.2011.
      Given that I had been using K-Meleon like that for a longer while, I created a menu item in the TWM window manager, where I could directly open the prefs.js file from the menu.
    • Alternately, adding sites to whitelists works from the menu (see above), but since the above configuration does not make it possible for the K-Meleon URL bar to function and display addresses, then a user is limited to knowing the site domain and web page address in the following ways:
    • In K-Meleon, the tab bar is typically shown by default, so it should be enough to hover the mouse cursor over a page's tab button: This displays the tool tip, which then shows the site/page title and its partial address.
    • A user might know the site's domain name, if they've entered it themselves (because of limitations, entering a URL goes through editing bookmarks and accessing a bookmark set up for just that).

      A user can specify that only top-level domain names are added, by setting this in NoScript preferences through about:config, only that the whole point of NoScript to me is the fine-grained way in which some subdomains can be whitelisted, so that disruptive ones are duly excluded. Unfortunately, not directly seeing a site's domain name in the URL bar has security implications, including the fact that the non-functioning URL bar doesn't change color when visiting a secure site, though a bottom-right status bar indicator should work. Preferably, only safe sites should be visited. (Avoid clicking e-mail links, if you know they're dubious, but this requires at least some user education and this is where NoScript is useful. There is nevertheless a greater amount of security in running K-Meleon equipped with NoScript, no matter how limited it is, through Wine in Linux than in Windows 9x);
    • Some necessary domain names pulled by a page from (a) differently-named domain/s to fetch scripts and/or stylesheets across sites and subdomains are not displayed anyway (not even in the NoScript menu), so there is no direct way of learning which other domains must be allowed for scripting.
    • Consider disabling NoScript for the duration of the session, if you're using a service which requires logging in and if it's been impossible to learn what are the exact outside domains with necessary scripts.
    • The third option is to import domain names from other NoScript settings in other prefs.js files. This actually works. But what if using a new service that users a non-primary domain name for scripting? Or what if an existing service sometimes changes its subdomains?

Kasutaja valikud seoses saidiväliste linkide ja hüpikakendega

On olemas vähemalt kaks arvamusringi selles osas, et kuidas kohelda oma kodulehel saidiväliseid linke: üks toetab välislinkide avanemist samas aknas/vahelehes, teine uues aknas, sest tegemist on teise saidiga.

Näiteks Vikipeedias avanevad välislingid omas aknas; mõnedes teistes (kommerts?-) saitides olevad välislingid on seatud avanema uues aknas.

Üks mu sõber kirjutas mulle, et olla kunagi ühest kohalikust arvutiajakirjast lugenud arvamust (mis kirjutati enne Wikipedia loomist), et välislingid peaksid avanema uues aknas, sest nii olevat korrektsem.

Minu vastuväited on, et linkimisel on tegemist põhimõtete erinevusega. Kui Wikipedia ja wiki-laadsed saidid lingivad teistele saitidele ilma, et avaneks uus aken (või vastavalt lehitseja seadetele vaheleht), siis lingi juures on pildiga märge, et tegemist on välislingiga.

Hüpikakna (või -vahelehe) avamine ei ole õige lahendus, kuna see kasutab sellisel juhul rohkem arvutiressursse, nii et kasutajale peab jääma valik selle kohta, et kas ta tahab uut akent, vahekaarti või lehitseda edasi samas aknas/vahelehes. Kui link on seatud avanema tavakliki korral uues aknas/vahelehes, on kodulehe tegijad võtnud oma külastajatelt selle valikuvõimaluse nii või teisiti ära.

Thursday, April 7, 2011

Free Software alternatives to Trajan Pro

With the image and font table well below I have tried to find out free small caps and fallback font alternatives to Trajan Pro, a very popular Roman-style font known for its style and legibility. With free, I have in mind the context of free software, so free as in freedom.

The reason for this was that I was fixing the design of a simple website and its original designer had specified Trajan Pro as the font for the site's menu text, only that Trajan Pro is proprietary and non-free, which means that not everyone has it and I had to find out the necessary fallback fonts.
A fallback font means that I specify multiple fonts in the font-family CSS property: If a web browser can't find the first font, it shows text in the next specified font or uses the browser default.

I recently discovered that a similar trick can be used in OpenOffice.org documents, where I'd specify two or more fonts and separate them with a comma. OO.o also has the means to set fallback and replacement fonts in its options.

Requirements for matching fonts:

• Roman typeface.
• Must have small caps, just as Trajan Pro does /capital letters should then be bigger;
• Must look good and legible in bold weight (this was the site requirement) at default size (12pt/16px) and I only chose ones that looked good enough;
• Must contain the ü character /implies that other Latin-extended characters are also contained.
N., 06.09.2012 update:

A large number of primary fonts are already 'Roman' or like by their looks, and nowadays' CSS conventions should allow transforming text into uppercase with a favoured font. Alas, there are sites that are likely to use Trajan Pro, and so there need to be fallback fonts that are similar.

Process:

I found most of the interesting fonts from fonts.debian.net (one large page contains several hundred images of font examples, so beware), an otherwise fabulous resource for all who want to seek free software fonts.

As I was seeking only small caps fonts, I only downloaded these.
In the process it occurred that that some of those fonts wouldn't show properly, because space marks were visible. Since fonts.debian.net shows fonts with all their subsets, I made a half-educated guess that some of the small caps fonts I downloaded were also subsets, which therefore didn't require to have spacemarks in them, because any rendering software would fall back to the main/primary font for symbols that were not used in the subset. Another reason for visible spacemarks might be that the fonts that I got from the above site were not compiled for Windows, but Linux and Unix in a wider sense, so this could also be the reason.

As it turned out some of those fonts displayed on fonts.debian.net were indeed subsets of TeX fonts, which are listed here (if not with the same extensions, like ttf, then still with the same filenames), so skimming over that list should help in distinguishing the fonts that should not be downloaded in the first place, unless you know exactly what you want. The fallback system in TeX is called Metafont, so spaces are probably there, too.
Furthermore, when creating the table, it turned out that the text had to look good both in high contrast (black on white) and in lighter incarnations. I haven't put that yet as a requirement.

Result:

The following is a quick-and-dirty preliminary report, as I have yet to do more research on small caps fonts on the subject.

The fonts I included in the table are only those that passed the requirements, well, somehow:
• Whether any example resembles the cut-into-stone effect of Trajan, is debatable, at least they're Roman;
• They must be reasonably light even when in boldface;
• The winners' most common denominator is that their small caps really are what they say they are, unlike with Trajan, where actual capitals are only slightly larger, which makes the alternatives metric-wise imperfect.

Fonts in the results image and table are in medium size, which defers to the browser and operating system default (typically 12pt). Since even small caps are small, then any smaller-sized text with some of these fonts is very likely to be less legible.

In the image, I've avoided using the actual Trajan Pro font, which is non-free, and resorted to using contours of the text that use it. In a table below the image, the Trajan Pro row text is formatted in that font, but the font is displayed only when a client computer actually has it (otherwise the browser will defer to the blog's default body text font). To fully comply, I've formatted the heading row with the Liberation Sans font (with fallbacks to Helvetica, Helv, sans-serif).
Trajan Pro FOSS alternatives
Results table
Font name
Test wordNotesOverall mark
Trajan ProKülalisteraamatReference
Romande ADF Style StdKülalisteraamat++++
LMRoman10-CapsKülalisteraamatSlightly fatter+++
Berenis ADF No2 StyleKülalisteraamatLegible, but small caps are small...++
The below fonts are fallback fonts with small caps. Conga might be a non-free font, although it's been included in a version of Knoppix.
CongaKülalisteraamatKnoppix 4.0.2, fallback
Copperplate Gothic LightKülalisteraamatWindows, fallback
CastellarKülaliste­raamatWindows, 2nd choice fallback /note that "lower-case" capitals are level with "upper-case" capitals
Felix TitlingKülalisteraamat
Perpetua Titling MTKülalisteraamat
The below fonts, while having "small" caps, were found in Windows, but they don't qualify because of various visual aberrations.
Copperplate Gothic BoldKülalisteraamatWindows, fallback /Ugly when bold, but small caps are smaller
Engravers MTKülaliste­raamatWindows /Too large
AlgerianKülalisteraamatWindows /Too ugly
I intend this post to be a work in progress of sorts, so I hope to make further updates.

N., 06.09.2012. update:

Fonts with small caps that didn't make the cut:

Aegean /incomplete
Akkadian /incomplete
Analecta

Computer Modern Roman Regular Small Caps / CM Roman /ugly
TeX Palladio L Small Caps & Old Style Figures / TeX Palladio L

Irianis ADF Style Standard Regular / Irianis ADF Style Std
Linux Libertine O Capitals / Linux Libertine O C

Text about Free software alternatives to Segoe UI was moved to a separate post.

Monday, March 21, 2011

What's left of sidebars for Netscape

Ed Mullen has a great page on Netscape and Mozilla tips and even a page that includes installable links to sidebars that can still be added to SeaMonkey 1.1.xx, a successor to Netscape 7/8 and Mozilla Application Suite.

Unfortunately, some of the sidebars are now outdated, half-work, redirect, cannot be found anymore or are completely offline.

Below is a selection of sidebars I found to be interesting to check them out.

Sidebars that still work:

  • The Google sidebar works! Yay!
  • The Real.com Guide sidebar only offers search for audio, video, and radio stations (no actual Guide to speak of).

...That are outdated:

The CNN Expanded Sidebar is still live, but stopped having updates since two years ago on March 2, 2009: The Dow Jones index dropped below 7000 on that day, because AIG had a record loss, tech gadgets had become a luxury, and "Twilight" stars were huge.

The links to news sites don't work, because they use a redirect via info.netscape.com (which now redirects to netscape.aol.com ).

In terms of context, the "Last updated" text in the sidebar is inaccurate, because it's most likely a script. That sidebar page is now a virtual time capsule of World news.

Netscape Sidebars

...that redirect:

  • Netscape WebCenter Travel (webcenter.travel.netscape.com) — Ah, well, this at least redirects to travel.aol.com, but that's it. At least it's topical.
  • Netscape Celebrities (celebrities.netscape.com) — redirects within the sidebar to netscape.aol.com.
  • Netscape TV Listings (tv.netscape.com) — redirects in-sidebar to netscape.aol.com.

...that don't work anymore:

(in descending order of importance)
  • Netscape Time Zone Converter (cgi.netscape.com) — "Not found" — Ed Mullen's screenshot of it is now a historical artifact;
  • Netscape Netbusiness — because netbusiness.netscape.com is completely offline (no 404 page, even);
  • Netscape Netbusiness Industry Headlines (netbusiness.netscape.com) — domain is offline;
  • Netscape Netbusiness Search (netbusiness.netscape.com) — offline;
  • Netscape DevEdge (developer.netscape.com): "This tab is not available right now." — Taken offline since about 11.10.2004 and then moved to devedge-temp.mozilla.org/index_en.html
     
  • Netscape Home Improvement (homeimprovement.netscape.com) — "Not Found";
  • Netscape Home Improvement House and Home (homeimprovement.netscape.com) — "Not Found";
  • Netscape Lifestyles Pet tools (lifestyles.netscape.com) — "Not Found".
     
  • American Greetings (lifestyles.netscape.com) — "Not Found"
• The OS/2 sidebar does not work either, because os2.org cannot be reached.

Speaking of which — OS/2 has officially outlived Windows 9x, because according to screenshots, Mozilla Firefox 3.5.4 works in it. OS/2 can also run OpenOffice.org 3.1.1 and OS/2 now lives on as eComStation, where Firefox 3.6 and 4.0 (beta) can also be run.

eComStation is capable of running OpenOffice.org 3.2, VLC Media Player 1.1.4, and CUPS, a free software printer framework (modern printer support).

While Windows 9x only supports Mozilla Firefox 2.0, OpenOffice.org 2.4, and has ageing support for printers (I admit as much that some printers useless with CUPS are supported in Windows 9x)...

Tuesday, January 25, 2011

Older Flashblock and NoScript for older Firefox and SeaMonkey versions

If you're ever stuck with an older computer and a Live CD (an older version of Knoppix) or an older computer with Windows 95/98/Me and an older version of Firefox or Mozilla or SeaMonkey, then useful extensions (add-ons, but not plugins) for these still exist and can be installed.

(If installing them from a website won't work, download an .xpi separately and install from local storage.)

The most recent version of NoScript to support —

• Mozilla Firefox 1.0.x (in my case): 1.1.4.7 (XPI)
01.02.2011.
Noscript caveat:
Version 1.1.4.7 does not block META redirects within <NOSCRIPT> elements in HTML. — I saw this with one Russian social networking site.

The noscript.forbidMetaRefresh boolean (set to true) in about:config only applies to refresh elements outside <NOSCRIPT> tags.

Turned out that the functionality blocking META-refresh-in-<NOSCRIPT>-tags was first introduced with version 1.1.4.8RC1 of NoScript, which only supports Mozilla Firefox 1.5 or newer.
02.02.2011.
Multiple Mozilla Firefox 1.0 caveats with the modern Internet:
  • Firefox 1.0 is so outdated that only "Basic", "Classic" and "Lite" versions of various popular services work. Remember to place these services' old versions' addresses in the Bookmarks menu or toolbar.
  • Windows Live sign-in doesn't work at all.
  • Nowadays' popular Websites use scripts and AJAX so intensively that NoScript is invaluable in suppressing unnecessary scripts that may hog system resources (also applies to Firefox 2 and SeaMonkey 1.x).
Windows 95 Firefox 1.5–1.5.0.3: NoScript 1.5.2 (XPI)
Firefox 1.5.0.4:NoScript 1.8.1.3
Firefox 1.5–NoScript 1.10SeaMonkey 1.1.17
–1.1.19
Windows 98/MeFirefox 2.0.0.20
28.01.2016.
Windows 2000Firefox 12.0NoScript 2.9.0.1rc1SeaMonkey 2.9.1
NoScript versions page

I know I haven't posted much about Flashblock, but it can be had from flashblock.mozdev.org

The legacy options presented in this post pertain to situations where it's impossible to upgrade to SeaMonkey 1.1.19, such as an out of date Live CD (and what if someone has only that?).

Yet when it comes to a Windows 9x operating system, then it's best to install or upgrade to SeaMonkey 1.1.19. Reasons for this in one of my previous posts.

Wednesday, January 5, 2011

GIMP 2.6 UI text too small?

I had the happy occasion to download, install and use GIMP 2.6.11. Overall it's a very nice image manipulation program, so kudos to developers. One trouble was that its user interface's default text size was too small for my liking. While it may be good on small monitors, it's not good in large monitors and neither is it good for the eyes like that.

So I surfed the web and first found out one solution (forgot the source, of course), and then another one, which is easier (with attribution to the initial suggestion).

R., 05.10.2012. update:

Right, well, this has been brewing for a longer time, but I've now gotten up to describing a more elegant solution that has been available for well more than a year or so. If not more even...

So, anyways, I got the solution for Windows from the help page of the Pidgin instant messenger, and the page is on its own quite straight-forward:
  • Download the GTK2 preferences program, also known as the GTK+ Theme Switcher package (version 0.4.1 and Win32) from Sourceforge;
  • out of which compressed package you should extract gtk2_prefs.exe into the GIMP program folder, such as this —

    C:\Program Files\GIMP-2.0\bin\

  • Then create a shortcut to the program, and then move the shortcut to the desktop or copy it into the GIMP folder in the Start Menu;
  • Then make sure GIMP is not running when you change settings with the below program, because upon quitting it might overwrite the settings you've changed.
  • Launch the program, which is officially named The Gtk2 Theme Selector. There you should be able to change the look of GIMP, including themes. Of the two default themes I chose Raleigh, because it's nicer-looking, but you can download your own via instructions at the Pidgin help page.
Caveat: If you uninstall or upgrade GIMP, the Gtk2 Theme Switcher program (and any additional installed themes) will be deleted. Not sure about whether settings will also be retained, but after upgrading, you'll need to re-extract the Gtk2 Theme Switcher in order to set the settings right (if need be, again). The program's user interface is quite straight-forward. Save settings/quit the theme switcher, start GIMP.

But the above is a much simpler solution than advice below, which has worked for me, too.

And if that doesn't work, then the following should definitely help.

First of all, GIMP uses themes and keeps its configuration data in configuration files of those themes; the files are easily editable. Before you do any changes, make a copy of the original first, just in case.
  • Locations for themes can be found at Edit > Preferences > in the left-side section, click on Themes [since I use the Estonian-language UI, the word is Kujundus; located between User Interface (Liides) and Help System (Abisüsteem)].
  • In the right-side main section, you will then see the list of themes and their locations. Theme names correspond to their relevant folder names. By default, there are two: Default and Small.
  • Go to the themes folder, and make a copy of the Default folder, rename it. I've renamed it to Default-bigger. Making a copy of the theme folder will keep the original theme.
  • Go into the copied theme folder, Default-bigger in my case, and open the gtkrc file. This is the gtk configuration file for GIMP and contains settings directly affecting font size in the user interface. Make a copy of the file first, then open it with a text editor (if you use Windows, I suggest WordPad, because it supports UNIX-style carriage returns, or Notepad2; if resources permit, a local office productivity word processor is good, so long you save the file in the original format).
  • The file's settings are similar to formatting rules in a CSS file. Scroll down in the file and look for font-scale and label-scale items. The default size for these are given as 0.8333. Change them to 1.0, as in
    GimpRuler::font-scale          = 1.0
    Save the file, (re)start GIMP. If something goes wrong, you can overwrite the modified file either from its own original copy or the original in the original Defaults theme.

Monday, December 6, 2010

Best Gecko-based browser for Windows 9x

The latest and last versions of Gecko-based browsers to run on Vanilla Windows 98/Me (and 95, with updates and other reservations) are
  • Mozilla Firefox 2.0.0.20 (Gecko 1.8.1.20, 20081217),
  • K-Meleon 1.5.4 (Gecko 1.8.1.24pre, released on 05.03.2010) and
  • SeaMonkey 1.1.19 (Gecko 1.8.1.24, released on 16.03.2010).
If there were a competition between the three, then the winner would be SeaMonkey.

The reasons are thus:
  • Under similar limited circumstances, SeaMonkey 1.1 is more responsive than Mozilla Firefox  2.
    Here's why: SeaMonkey 1.1's XPFE/XPToolkit-based user interface (UI) technology dates back to Mozilla Application Suite (v1.0 released 05.06.2002, but pre-releases were usable since a year before), while Mozilla Firefox 2.0 (2006) is completely based on a newer toolkit (XUL).
  • SeaMonkey 1.1.19 has a newer and more secure Gecko layout engine than Mozilla Firefox 2.0.0.20 and K-Meleon.
  • SeaMonkey 1.1 has been supported by the two most important extensions to grace web surfing: Flashblock and NoScript.
    K-Meleon also uses the native Windows API for its UI, meaning that it can't run extensions which normally work in SeaMonkey or Mozilla Firefox.

    While K-Meleon comes close with its quick UI responsiveness and its rendering engine, it's only good for websites that are safe and are known to not be resource-intensive. Most of the latter still exist as they are, but the most popular sites (for webmail and news) are regularly redesigned to include more fancy features and are therefore made more demanding by way of including extensive JavaScript and AJAX technologies and often embedding multiple manifestations of the Adobe Flash plugin.
Which is why SeaMonkey 1.1.19 adorned with NoScript and Flashblock extensions is about the best Gecko-based browser solution that there is for Windows 9x, even Windows 95.

The only caveat is that SeaMonkey requires at least 64 Mb of RAM to run passably and at least a 266 MHz CPU. Well, a Navigator-only one-window/one-or-two-tab solution works in a PC with just a slightly lesser CPU.

K-Meleon is best for computers with 32–48 Mb of RAM (certainly less than 64 Mb).
Some words of caution: Java and JavaScript could only be allowed for safe and non-demanding websites. Because of a lack of NoScript or like extension for K-Meleon, JavaScript should be turned off for casual browsing (sometimes even a Google Search result may cause a hiccup). Keeping Java on is only recommended when a user consciously recognizes a real and pressing need to use that plugin (maybe a map application over the web).

On Plugins

Although Adobe Acrobat Reader 6.0.6 (released/updated last in 2003) is about the last version for Windows 98 as far as I know, it is still outdated and so more vulnerable to attacks that use the Reader.

While older computers might best handle even older versions of Acrobat Reader, it's most important to disable Acrobat (Java)Script in the Reader's preferences, no matter the version. This should somehow prevent malicious websites using the Reader as an attack vector.

A complete alternative to using Adobe Reader in old computers is muPDF: It's much less resource intensive, supports the newest PDF document display standard (PDF 1.7) and does not use AcroScript. muPDF does not support interactive PDF elements; this is both a caveat and a security/speed measure. muPDF does capture the file type association in Windows, so when using the app, then it's an either-or situation between it and Acrobat Reader. It should still be a no-brainer in old computers.