Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Saturday, September 23, 2023

Installing the Ted word processor in modern Linux

So one day, I'd installed Debian 11 in Windows 11 using Windows Subsystem for Linux (WSL). This one is a separate ordeal, and today I discovered, that the install even included LibreOffice, which I didn't think I needed to download and install, as I have the same package on Windows already.

Installing a small word processor program ontop of an installation of Debian running atop WSL in Windows 11 is perhaps a form of overkill in terms of memory and storage requirements, since WordPad itself is still present, and Windows-native small-footprint open source word processors exist, too; one of them being the fabled AbiWord. But Linux in Windows is very much another story.

WSL did make it possible for me to investigate how to install Ted in modern Debian, as a proof of concept. — without having to use a LiveCD/LiveUSB variant of Linux, and without the opportunity to use either. One of the reasons was, that the hardware is a modern notebook computer able to run Windows 11; this laptop does not have an internal optical drive, and I don't have any form of external storage that I could use to run a LiveUSB variant of Linux.

Contents

About Ted

Ted is a simple Linux-based word processor for RTF documents, and its history goes back to November 1998 or even earlier; version 2.0 of the program was released on 9 November 1998.

Ted is more advanced than any plain text editor, such as Notepad or Nano, very roughly equivalent to — and often more advanced than WordPad, and more basic than AbiWord.

Compared to WordPad, Ted includes more formatting capabilities, spell-checking functionality, and can export files into HTML, EML (HTML mail message), EPUB, PostScript, and PDF formats. It can only open plain text files and RTF files. Ted 2.23 introduced a basic autosave function to help recover files in the event the app suddenly exits.

AbiWord, OTOH, is more advanced, and comparable to the word processing component of Microsoft Works. AbiWord can open, save, and export a greater amount of document formats; it has a proper toolbar, page zoom, and plugin support, spelling and grammar checking, the highlighting of misspelled words; document annotations, revisions, and versioning, and collaboration functionality. The last AbiWord release for Windows is v. 2.9.4 (from 25 November 2012), and remains available for download.

Ted is one of the most fitting Unix/Linux word processing programs for really old computers: its storage requirements are small, and its memory footprint low. I remember in 2005, I could launch it relatively quickly in a 120 MHz computer with Debian 3.0 and just 32 MB of RAM.

The installed size of Ted is 9.76 Mb, while the installed size of AbiWord is roughly 25 Mb. Ted is one of the smallest word processing programs for Linux. In terms of size, it would be competing with Pathetic Writer of Siag Office.

There can be instances, when Ted might crash, such as when quickly browsing through different fonts in the fonts dialog, so take care to save your work regularly.

The latest version of Ted is 2.23, dated 4 February 2013, and its installers are available at the Ted homepage.

Pick your architecture

Given the 64-bit nature of Windows 11, Debian over WSL is also 64-bit. The architecture in use is usually called amd64, even if the CPU in a consumer-grade computer was made by Intel or VIA. 64-bit Ted is available as ted-2.23-amd64.deb.
IA-64, aka Itanium, is Intel's own in-house 64-bit architecture, which is incompatible with AMD64. IA-64 should not be confused with Intel 64 or EM64T, as these two are the names of Intel's implementation of the AMD64 architecture. IA-64 has been discontinued. Its chips have always had niche uses, and they're not found in most PCs.

Installers of Ted for other architectures and operating systems, its language packs, and spelling dictionaries are available at the official Ted FTP directory here.

Required dependencies for Ted

The main problem is, that Ted has several old dependencies that are not available in any modern version of Debian, as Ted has not been maintained since 2013. The .deb packages must each be downloaded and installed separately.

Installation goes with dpkg in the command line. For the sake of simplicity, make sure the current folder is the same where the downloaded .deb packages are located.

$ sudo dpkg -i packagename.deb

Install packages in roughly this order:
Package Download link Download page Notes / From
multiarch-support multiarch-support_2.28-10+deb10u2_amd64.deb Package page / AMD64 package download page Install this package before anything else.

Debian 10 Update 2 (Buster)
libjpeg8 libjpeg8_8d-1+deb7u1_amd64.deb Debian archive Debian 7 Update 1 (Wheezy)
libpng12 libpng12-0_1.2.49-1+deb7u2_amd64.deb Debian archive Debian 7 Update 2 (Wheezy)
libtiff4 libtiff4_3.9.4-5+squeeze10_amd64.deb Debian archive Debian 6 Squeeze

Then install ted-2.23-amd64.deb.

After installation has completed, the shortcut to Ted should be visible in:

Start Menu > All Apps > Debian > "Ted rtf text processor (Debian)", with a dedicated icon. The shortcut can then be pinned to Start or the taskbar.

Subsequent to that, a spelling dictionary can be installed. Their .deb filenames use this naming format: ted_en_GB-2.23.all.deb. Make sure Ted is closed when installing dictionaries.

Finding out what dependencies to install for old or obscure packages in Debian.

I had actually used dpkg to try to install Ted first, not knowing what the dependencies were, and dpkg had promptly informed me what the required packages were. The installation was not finalised because of the missing packages.

apt-get install required_packagename did not help, as the package list for Debian 11 did not contain the names of those old packages.

The Debian installation also includes the Synaptic package manager front-end. I couldn't activate it through the start menu, but could launch it from the Debian command line:

$ synaptic &

This starts Synaptic without administrative privileges. That's just enough to find out information.

In Synaptic:
  1. click on "Status" in the bottom left section > then click on Installed in the top left page.
  2. The list to the right shows the list of all installed packages.
  3. Click into the list to focus into it.
  4. Type ted to search for the package.
  5. If the install failed or did not finalise, the package is marked with red.
  6. Right-click Ted, select Properties
  7. In the Properties window, click on the Dependencies tab.
  8. The Dependencies tab is self-explanatory, and lists all the packages required for a program, component, or package to work.
  9. Packages listed in italics are missing from the system. This should inform users as to which packages to look for on the web.

Configuring user interface font sizes

Graphical apps installed with Debian over WSL by default have small font sizes, as they don't recognise Windows scaling settings. On my computer, very nearly all display elements are scaled to 150% in Windows, which Debian are unaware of.

Fortunately, there are two configuration programs that can fix that.

One is xfce4-appearance-settings. In Application Finder, it's listed under Settings > Appearance, but fails to launch from there. It does launch from the command line:

$ xfce4-appearance-settings &

There, it's easy to change the look and feel of most graphical programs; the most important would be the font size.

But Ted is an older program, so it requires the installation of gtk-chtheme, which is a front-end to change GTK+ 2.0 themes.

gtk-chtheme can be installed that way from the command line:

$ apt-get-install gtk-chtheme

or by launching Synaptic as sudo from the command line:

$ sudo synaptic
On invoking a command with sudo, you may be prompted to enter a password.

In Synaptic:
  1. Click the Search button, enter gtk-chtheme in the Find dialog, click Search or press Enter.
  2. gtk-chtheme should be listed in the results >
  3. Right-click on the gtk-chtheme package, select "Mark for Installation."
  4. Click Apply in the toolbar > review information in the Summary window. It contains details about what packages would be installed. > Click Apply.
  5. Once you get the 'Changes applied' window, it should be safe to close it, and quit Synaptic.
Subsequent to the installation, a "Gtk-ChTheme (Debian)" item will appear in the Debian folder in the All apps section of the Windows Start menu, and it can be launched from there. Its user interface is similar to xfce4-appearance-settings. Changing the font size to 14 pixels or greater should improve the legibility of menus and most other user interface items in Ted. Themes can be changed, too, from light to dark.

Ted 2.23 showing the prologue of "Romeo and Juliet" formatted on a B6-sized page.

Friday, May 14, 2021

Optimizing Firefox for a weak PC

This blogpost was first written as a reply on reddit.
This post applies to Firefox Quantum — v.57, v.60esr, v.68esr, v.78esr, and newer)

Instead of Lubuntu, consider BunsenLabs, which is based on Debian. BunsenLabs will run in a computer with 1 gigabyte of RAM, probably with plenty of swapping, so you'll still need at least 2 Gb of RAM. BunsenLabs LiveCD's actual commit after boot is ~200 Mb, which is equivalent to Windows XP SP3.

BunsenLabs is one of the few distros that offers a live CD (yes, a CD image), but the LiveCD edition is meant only for 32-bit systems.

As for Firefox, then off the top of my head:

In Settings:
  • Disable "Check spelling as you type"
Under Performance:
  • uncheck Use recommended settings;
  • Play with "user hardware acceleretion"
  • Set the Content process limit to 1
Under Browsing:
  • Disable smooth scrolling
  • Disable "recommend extensions as you browse"
  • Disable "recommend features as you browse"
Under Search:
  • Disable search suggestions
  • Uncheck the search engines that you do not use
  • Under Privacy & Security > Permissions:
    In Settings for Autoplay (new window), set the default for all sites to block audio and video. Use Ctrl+I, and in the Page Info window under the Permissions tab list for a domain, to allow audio/video on YouTube, for example.
Uncheck all under Firefox Data Collection. In about:config, set:
  • browser.sessionhistory.max_entries to 25 (from 50)
  • browser.sessionhistory.max_total_viewers to 0 (from -1)
  • browser.sessionstore.max_tabs_undo to 5, 7, or 10 (from 25)
     
  • browser.sessionstore.interval from 15000 *to* something greater
  • extensions.update.interval from 86400 *to* something greater
  • media.peerconnection.enabled to false
  • media.peerconnection.video.enabled to false
Extensions:
  • Install the NoScript extension, as it uses a whitelist (with some built-in entries). Set it to display full domains in settings. You'll have to permit certain domains from the NoScript pop-up menu to make a site work.
  • Install uBlock Origin or Adblock Plus to block ads. While NoScript blocks most of the harmful cruft, one of the two adblockers won't let video ads pass through.

Sunday, September 29, 2019

My BunsenLabs story

Posted as a reply in the BunsenLabs user forum.

I have an hp Pavilion dv5000 (dv5204ea), with Intel Celeron M 410 running at 1.46 GHz and 1 Gb of RAM memory, and a BIOS date from 13.06.2006., so the computer is 13 years old.

I use the CD version of BunsenLabs Helium as a LiveCD, and due to limited RAM memory, prefer that over the DVD variant.

NoScript is a huge amount of help when browsing the web, but YouTube is impossible to use with 1 Gb of RAM when BL is run from a LiveCD. In my experience, the LiveCD experience of YouTube is good with at least 2 Gb RAM and a dual-core CPU.

BunsenLabs (BL) meets several requirements:

  • LiveCD (not DVD), so uses less memory;
  • Small memory footprint;
  • Based on Debian, so is also compatible with Ubuntu;
  • Can run X, with only a window manager;
  • Touchpad and pointer drivers must work reliably;
  • Has modern Firefox.
  • Bonus point: SystemD allows me to limit the memory Firefox can use.

BunsenLabs is one of the few that offers all that. I have a Knoppix 7.2 liveCD, but it's from 2013, is very old, has unreliable pointer drivers, and installing ID card software was cumbersome, and worked partially; I was only able to login and check my bank balance, but not make any transfers.

Ubuntu compatibility and modern Firefox are required for the latest supported software that uses the Estonian ID card. Upon tweaking the installation script, it installs the ID card software and a Firefox extension (both meant for Ubuntu Xenial) that helps with authentication and making electronic signatures online.

The Estonian ID card is a smart card and an identification document that's used for electronic authentication and electronic signing; it's used to access banks and make money transfers; to sign official documents (incl. contracts); to access government services, to conduct business and communications with the government; to vote online in local, general, and EU elections (expat or traveling Estonians can vote anywhere in the world, if they have the kit); to encrypt files, usually for transfer, to ensure high message secrecy; to remove oneself from party membership, and lots more. The ID card is a valid travel document within the European Union.

Estonia adopted the ID card system in 2002, but I got my first ID card in 2009, seven years after adoption. Until then, I used a passport, mostly to identify my person during elections, and when taking cash to the bank.

So, a year ago, after my bank stopped using non-electronic code cards (those with written numerical codes) for two-factor authentication, I finally got an ID card reader — nine years after I got my first ID card (I'm on a second one), and sixteen years after ID card readers became a thing in Estonia.

With some effort, it's possible to install Estonian ID card software meant for Ubuntu, so I could login into my bank and make transfers. Unfortunately, the ID card management software does not yet work properly. But I could vote! — Because the voting program is a separate package.

I'm not a luddite when it comes to technology, but am one of those who gets personal access to interesting stuff and technology much later than my reference group. Because reasons, but that's life, I guess.

So, in Autumn and Winter of 2018, BunsenLabs was essential just so I could check my bank balance at home, and make transfers.

The day-to-day need to use BunsenLabs waned in January 2019. On Christmas 2018, a relative got a new smartphone, and I asked for their old smartphone, explaining, that I could upgrade that old smartphone from Android 4.0.3 to Android 4.1.2, and install Smart-ID — so I could easily access my bank when in transit. Android 4.1 is the oldest version still supported by the Smart-ID app. The relative was convinced, and I got their old smartphone.

My earlier smartphone runs Android 2.3.6, and does not have any more upgrades available. Furthermore, in December 2018, the YouTube app also stopped working on Gingerbread. (There, the default browser would render the mobile YouTube page and thus allow playback in an external player until September 2019.)

Smart-ID is a new two-factor authentication system and app in Estonia and Latvia.

There is also Mobile ID (Mobiil-ID). It's equivalent to the ID card, and supports absolutely all kinds of phones, even featurephones dating back to early 2000s and even a bit before. One can vote with Mobile ID, but not with Smart ID. But — Mobile ID requires a phone contract and a specialized and more expensive SIM card, and is not exactly free, as it requires a small and regular fee.

Whereas Smart-ID is completely free, but has support for less services.

The newer device I got, is LG Optimus L5, which series was released in June 2012, a few months later than my Gingerbread phone.

I really didn't know if I could upgrade the LG phone from ICS to Jelly Bean. While information about upgrade possibility was up, off-the-air upgrades stayed within Android 4.0.3. This meant that I had to check if there was a computer-based upgrade possible.

At first sight, LG's official site had software available that would run on Windows 7 or greater, while I have Windows XP. Fortunately, LG's Australian section offered packages compatible with Windows XP, enabling me to make a backup of device data, and perform the upgrade to Android 4.1.2. Yay!

Getting Smart-ID registered still required use of the ID card, so BunsenLabs came in handy again.

I could login into my bank again. Yay!

As a result of installing registering Smart-ID, I could download my bank's app that just happens to also have Android 4.1 as the earliest supported Android, so with some effort (because this phone's RAM is only 512 Mb), I used Smart-ID to register my bank's app. My bank's app is crashy for most things, but at least allows me to check the balance quickly.

LG Optimus L5 has the same CPU and RAM specs as the phone with Gingerbread (Samsung Galaxy Mini 2), but sports a 5-megapixel camera with auto-focus and flash, while the Samsung smartphone has only a 3.15 Mpix sensor with just fixed-focus and without flash. This is really an upgrade to me, as the LG phone is able to scan more detailed QR codes, which has come in very handy.

Coincidentally, Android 4.1 is also the earliest/oldest Android supported by the Estonian online vote verification app, which scans a QR code displayed by the voting app in the computer after a user has finished voting. For some technical reason, the app wouldn't work as intended during the Estonian Parliament elections in March 2019. It's very possible, that the QR code to verify a person's vote has a very short lifetime. The app worked flawlessly during European Parliament elections in May 2019.

Monday, October 22, 2018

Eesti ID-kaart ja Knoppix 7.2

Algupäraselt on blogipostitus kirjutatud käigupealt, mistõttu on seesinane küljendamata kujul. Artikkel on mõeldud kõigile, kes oskavad natuke terminali (käsurida) kasutada.

Kindlasti võis midagi kahe silma vahele jääda, kuid suures osas peaks andmed paika pidama.


Intro

Ehk kuidas saada tööle panka sisselogimiseks vajalik ID-kaardi tarkvara Knoppixi 7.2 Live-CD-le, ja millised on selleks vajalikud .deb-paketid. Kuna Knoppix on Debiani-põhine, on artiklis väljatoodud pakettide arv minimaalne ja vaid antud Knoppixi-versiooni jaoks, kuid võib kasuks tulla ka teiste Debiani- kui ka mitte-Debiani-põhiste distrodega opereerimisel.

Sissejuhatus

Niisiis tekkis mullegi lõpuks permanentne ID-kaardilugeja (OmniKey CardMan 1021) ja võib-olla ka võimalus seda kasutada, et sisse logida panka. Nimelt otsustas minu pank koodikaardi võimaluse (need, mis numbritega) ära kaotada. Ainult et mul on Windows XP, ning see pole ID-kaardi tarkvara poolt enam toetatud.

Estobuntu plaadile keevitamine ei aidanud, sest selle versioon on samuti aegunud ja uut pole välja lastud. Kui seda reklaamitakse kui eestikeelset distrot, mis "toetab ID-kaarti", peaks see pidevalt kaasaegne olema.

Estobuntu põhineb Lubuntu 14.04-l, mis lasti välja 17.04.2014. Estobuntu DVD-tõmmise juures on kuupäev 02.05.2014.

Lisaks: Estobuntu 14.04 DVD Live-versiooni puhul sai värskeima Firefoxi installimisel miskipärast mäluruum otsa, sest minu masinal on vaid 1 Gb RAM-mälu (muutmälu). Kõvakettale ma tõmmise sisu ei salvestanud, sest kõvakettal on teine opsüsteem; seetõttu läks käiku vaid Live-variant, mille puhul kasutatakse ramdisk-i.

Seevastu Knoppix Live-CD puhul mälu kohese otsasaamise kartust gigabaidise RAM-mahuga pole. Etteruttavalt võib juba nentida, et Knoppixist oli kasu.
• Knoppix Live-CD (mitte DVD!) ja värske Firefoxi käitamiseks on vaja vähemalt 1 Gb RAM-mälu.
• Estobuntu töötab rahuldavalt, kui arvutis on vähemalt 2 Gb RAM-mälu.
Kaalukausile jäigi Knoppix 7.2 Live-CD, mis on Estobuntust vanemgi, aga ka viimane Knoppixi CD-versioon (24.06.2013. väljalase). Sellel on näiteks Firefoxil põhinev Iceweasel 29.0 21.0.
Iceweasel 21.0 ei toeta TLS turvaprotokolli versiooni 1.1 (järgmist) ja uuemaid. Toetatud on ainult TLS 1.0. See tähendab seda, et arvestatav osa turvatud https: veebisaite ei ole kättesaadavad, kuna: nad kasutavad TLS 1.1 protokolli, nad kasutavad TLS 1.2 protokolli, ning vähesed juba TLS 1.3 protokolli. Google, GMail ja Blogger töötavad, samuti DuckDuckGo otsing. YouTube ei tööta.

19.11.2018. Üks hea uudis ka: Firefoxi ei pea eraldi all tõmbama, sest Iceweaseliga sai panka ilusti sisse. Allpool olev pakettide installimise kadalipp tuleb ikkagi läbida, misjärel Iceweaselis digiallkirjastamise mehhanism pangaülekane (PIN2) tegemiseks erinevalt allatõmmatud Firefoxist isegi kuidagimoodi eksisteerib, kuid ei tööta, ning ma kaldun arvama, et siin on tegemist lihtsalt vananenud lehitsejaga. Üks võimalik lahendus oleks installida Iceweaseli uuendus koos vajalike sõltuvustega ja siis võimaluse tekkides proovida, kas pangaülekande tegemine õnnestub.
Et Knoppix 7.2 on veidi üle aasta vanem kui Estobuntu, ning kuna Knoppix ei ole varustatud ID-kaardi kasutamise jaoks vajalike teekidega, tuleb Knoppixile peale panna terve posu pakette ja omakorda nendest sõltuvaid pakette. (Mitte, et Estobuntuga oleks vähem vaeva, aga Knoppix ei võta kõike mälu endale.)
• Knoppix 7.x versioonidel on probleeme Synaptics puutepatjadega, millest olen ma varem inglise keeles kirjutanud. Ajutine lahendus on kasutada välimist osutusseadet (USB-põhine hiir);
Tähtsamad käsud Knoppix 6.x ja uuemate käitamiseks, sh. sõrmistiku keele valik ja kasutajakeskkonna välimus (samuti inglise keeles).

Paketid

Synaptic paketihaldurit ei soovita ma praegu üldse, sest pakettide vaikimisi aktiivseks seatud allikatega andmebaasi uuendamisel tuleb Firefoxi (või sellel põhineva Iceweaseli) uuendamist valides ette sisuliselt kogu opsüsteemi uuendamise protsess, sest välja vahetada tuleks liigagi suur arv pakette. Firefox koos vajalike lisadega tuleb installida eraldi, aga sellest jutu lõpupoole.

Osad tarkvarapaketid on Knoppixil juba olemas; siin artiklis tõin välja vaid puuduvad või uuendatavad.

Valikupõhimõtted

Pakettide valikul osutus määravaks versiooniühilduvus, lähtudes printsiibist, et kui süsteemis on juba vajaliku paketi ühilduv versioon olemas, siis ei pea sellele uuendust tõmbama.

Näiteks mida vanem Linuxi-distributsooni versioon, seda rohkem uuemaid ja puuduvaid pakette ja nende sõltuvusi (omakorda pakette) peab peale panema.

Sellest johtuvalt osutus valik vähemas osas Ubuntu 14.04 LTS Trusty Tahr (edaspidi Trusty) ja suuremas osas Debian 8 Jessie (25–26.04.2015) distrodele kompileeritud ühilduvatele pakettidele — põhimõttel, et mida vanemale distrole tehtud ühilduv pakett, seda vähem tuleks selle jaoks sõltuvusi tõmmata.

Kompromissi ei saanud teha konkreetselt ID-kaarti puudutavate pakettidega, nagu opensc jt., mis tähendas, et osa vajaliku versiooniga pakette on Debian 10 Buster-nimelisest kõige värskemast enam-vähem stabiilsest distro-versioonist.

Kui mõni muu ühilduv pakett oli vanemas distros olemas, langes valik selle kasuks.

Installimisjuhis ja versioonide kontrollimine

Esialgu on targem tõmmata individuaalseid pakette, jälgida nende sõltuvusi ja alles siis need vaid dpkg kaudu installida nii:

$ sudo dpkg -i paketi_failinimi_koos_versiooniga

dpkg siis vastavalt annab teada, kas install õnnestus või mitte ja mis lisapaketti täiendavalt vaja on.

Ennetavalt on võimalik kasutada dpkg-query võimalust, et teada saada, millise paketi versioon installitud on:

dpkg-query -W paketi_nimi_suurversioon

Esmapilgul vajalike teekide paketid (info sain siit) —

Tsitaat:
* openssl (1.1.0h)
* libpcsclite1 (1.8.23)
* pcsc-lite (1.8.23)
* QT (5.9.4) (Miks küll?)See muuseas jäigi installimata.
Et hoida kokku vaba RAM-mälu, võib tarkvarapaketid tõmmata ja salvestada mitte tingimata Knoppixi Downloads või Desktop (töölaua) kataloogi, vaid kõvakettale või mälupulgale konkreetsesse kataloogi, mis tuleb ise luua.

Pakettide nimekirja loomine

Terminalis koostatud mittetäielik nimekiri tõmmatud pakettidest koos sõltuvustega, kõige varasemast kõige hilisemani:

08:51 pcsc-lite-1.8.24.tar.bz2 — Selgus, et polnud vaja
09:08 libsigsegv2_2.10-4+b1_i386.deb — Polnud ka vaja
09:14 libpcsclite1_1.8.24-1_i386.deb
09:24 dpkg_1.17.5ubuntu5.8_i386.deb
09:37 libreadline7_7.0-3_i386.deb
09:42 libtinfo5_6.0+20161126-1+deb9u2_i386.deb
09:47 libssl1.1_1.1.0f-3+deb9u2_i386.deb
09:50 opensc-pkcs11_0.19.0-1_i386.deb
14:49 libglib2.0-0_2.40.2-0ubuntu1.1_i386.deb
Kataloogis olevate failide ajaliselt sorteeritud järjekord ls käsuga:

Kui käsurea käsklus ls -l näitab nimekirja failidest ja nende atribuutidest, siis -ltr parameetrid näitavad detailset nimekirja ajalises järjekorras vanimast uuemani ("modifitseeritud" ehk salvestamise aja järgi) —

l — list — detailne nimekiri
t — time and date — kellaaeg ja kuupäev
r — reverse order — "taguridi järjestus", ehk vanima salvestusajaga fail on kõige üleval

Kuna ma aga tahtsin vaid kellaaega ja failinime, tuli käskluse väljund lasta toru abil ("piibu", i.k. pipe) läbi awk-i:

$ ls -ltr | awk '{print $8, $9}'

print käseb trükkida, ning $8 ja $9 määravad vajalike veergude numbrid. Veerude number tuleb mõistatada ls -l käsuga tehtud nimekirjast. Koma veerunumbrite parameetrite vahel on tähtis. Ilma komata võib ka, aga siis ei tule kellaaja ja failinime või muude esemete vahele tühikut.

Võib kasutada ka lihtsamat varianti

$ ls -tr

— See koostab pakettide lihtsa nimekirja ajalises järjekorras vanimast salvestatust kõige uuemani suunaga ülevalt alla.

Pakettide asukohad ja nende installimine

Tuleb tähele panna, et antud Knoppix 7.2 on 32-bitine, ning pakettide tõmbamisel tuleb valida i386 arhitektuur. Arhitektuurinimetuse puudumisel on arhitektuuri asemel kirjas all (i.k. kõik).

Vajadus on seega järgmiste pakettide järele (tabel on veel pooleli) —
Link kirjeldusele Link paketile
# Pakett Vajaminev
versioon
Knoppix 7.2-s? Paketi
versoon
distro distro
ver.
Sõltuja
libpcsclite1 1.8.24-1 — paketis olev üks või enam faile sai pakendatud xz formaadis. Sellest ka vajadus uuema dpkg versiooni järele.
Jäi meelde, et see dpkg versioon pidi olema just see konkreetne ja mitte mingi muu. Võimalik, et Ubuntu või Debiani ametlikel lehtedel olevad dpkg versioonid kas (veel) ei sisaldanud xz formaadi toetust, või olid pakettide sõltuvusversioonid liiga suured.
1. dpkg 1.17.5ubuntu5.8 1.17.5 1.16.10 1.17.5ubuntu5.8 ubuntu trusty libpcsclite1
2. libpcsclite1 1.8.24-1 uusim 1.8.8-3 1.8.24-1 debian buster
* opensc-pkcs11 0.19.0-1 uusim Puudub 0.19.0-1 debian buster
#
opensc-pkcs11 paketil on omad sõltuvused:

* libglib2.0 >= 2.39.4 (Knoppix 7.2-s: libglib2.0-0:i386 2.36.3-1)
* libssl1.1 >= 1.1.0 (Knoppix: Puudub; on libssl1.0.0:i386 1.0.1e-2)

libglib2.0-0_2.40.2-0ubuntu1.1_i386.deb ubuntu trusty

4. Mingi hetk tekkis tahtmine tõmmata peale ka uusim opensc:

opensc (0.19.0-1) debian buster

Sõltuvused:
* libglib2.0-0 >= 2.16.0 — esmapilgul polnud vaja, aga siis opensclite1 (üleval) tahtis ikkagi uuemat.
* libreadline7 >= 6.0 (Knoppix: Puudub; kõige hiljutisem on libreadline6:i386 6.2+dfsg-0.1)
libreadline7_7.0-3_i386.deb debian stretch (i386)
** Omakorda sõltuvus: libtinfo6 >= 6 (Knoppix: puudub; on libtinfo5:i386 5.9-10)

** libtinfo5_6.0+20161126-1+deb9u2_i386.deb debian stretch (i386)

* libssl1.1 >= 1.1.0 (Knoppix: puudub, on libssl1.0.0 1.0.1e-2)

libssl1.1_1.1.0f-3+deb9u2_i386.deb — ilmselt stretch; i386

* opensc-pkcs11 = 0.19.0-1 (Knoppix: puudub täielikult)

opensc-pkcs11_0.19.0-1_i386.deb debian buster i386

Edasi tuli installida opensc pakett:

opensc (0.19.0-1) buster i386 (Knoppix: Puudub täielikult)

Edasi: pcsd
pcscd (1.8.24-1) buster i386 (Knoppix: puudub täielikult)

aga sellel on õige mitu sõltuvust:

* libccid >= 1.4.1~ (Knoppix 7.2-s libccid justkui eksisteerib, aga uuendust sellele on ikka vaja)

libccid (1.4.18-1) jessie i386

* libsystemd0 (215-17+deb8u7) jessie i386 (Puudub täielikult)
Sõltuvused:

** libgcrypt20 (>= 1.6.1) 1.6.3-2+deb8u5 jessie dl (Knoppix: Antud versioon puudub, on libgcrypt11 1.5.0-5 )

Sõltuvused:

*** libgpg-error0 (>= 1.14), Knoppix 7.2-s 1.10-3.1 1.17.3

debian jessie i386

* libudev1 (>= 183) (Knoppixis puudub) 215-17+deb8u7 jessie i386

Kokku on pakette umbes kuue megabaidi jagu.

Firefoxi tõmbamine ja installimine

Nagu ülevalpool mainitud, siis eraldi Firefoxi tõmbamine ei ole tingimata kohustuslik. Seda kahel põhjusel:
*Minu panka sai Iceweasel 21.0 lehitsejaga sisse logitud;
*Eraldi tõmmatud Firefox ei toeta PIN2 koodi mehhanismi üldse. Iceweaseliga oli ka võimatu PIN2 koodi kasutada, kuid peale esmaselt vajalike pakettide installimist esitatakse päring selle järele, kui katsetasin ülekande tegemist. Iceweaseli uuendamisel versioonile 38.0 erilist abi kahjuks ei olnud, kuid asja tasub veel uurida.

Mozilla "FTP"-sait sidaldaaab (jutumärkides, sest see on http) Mozilla Firefoxi ja teiste programmide kõiki versioonie. Postituse tegemise kuupäeval on uusima eestikeelse Firefoxi asukoht see:

https://ftp.mozilla.org/pub/firefox/releases/62.0.3/linux-i686/et/firefox-62.0.3.tar.bz2

Kui Firefoxi pakitud fail on näiteks Iceweasel lehitsejaga salvestatud, avada faili kataloog pcmanfm failihalduris.

* firefox-62.0.3.tar.bz2 peale saab ühe korra peale klikkida, ja siis avaneb see XArchiver programmis.
* Alternatiiv on failile parema osutinupuga vajutada ja valida Extract To... käsk, mis aktiveerib XArchiver programmi lahtipakkimise mooduli. Selles tuleb valida Firefoxi installatsiooni asukoht. Kuna tegemist on Knoppixiga, võib Firefoxi rahumeeli pakkida lahti /home/knoppix kataloogi. Seal jääb see omakorda firefox/ kataloogi.

Firefoxi saab edasi käivitada terminalist:

$ cd /home/knoppix/firefox

Minna Firefoxi lahtipakitud kataloogi

$ ./firefox -P &

* -P avab Firefoxi profiilihalduri, sest Iceweasel ja Firefox kasutavad sama profiiliarhitektuuri. Seepärast on parem Firefoxis luua uus kasutajaprofiil.
* & tõstab graafilise programmi eraldi terminaliaknast.

Kuna Firefoxi uuendatakse tihti, siis Mozilla "ftp" releases kataloogis on kõige uuem versioon, aga mitte päris alguses. Otsida tuleb 62.0.3-st edasi.

(Synapticut või muud paketihaldurit ära kasuta, sest see tõmbab kaasa liiga suure arvu muid pakette).

Alles siis tuleb Firefoxi laadida onepin moodul.

Firefoxi ingliskeelses variandis:
  1. Mine seadistustesse (about:preferences) >
  2. Privacy & Security (ülevaltpoolt paremalt) >
  3. alaosa Certificates (lehekülje kõige all) >
  4. nupp [ Security Devices...] >
  5. uuel aknal vajuta [ Load... ] nupule >
  6. tekkinud kastis kirjuta ülemisele reale Module Name juurde mooduli nimi (mul on lihtsalt onepin)
  7. Ning siis failikorjajast leia see fail:

    /usr/lib/i386-linux-gnu/onepin-opensc-pkcs11.so

    — opensc deb-faili järgi pistab dpkg programm onepin-mooduli installimisel sinna.
Tuleb sellega siiski arvestada, et mooduli laadimise aken (kast) võib kaduda lehitseja-akna taha, kui aktiveerida samas aknas olnud muu vahekaart mõne teise leheküljega. Lahendus on siin Firefoxi aken tõsta allapoole senimaani kuni mooduli laadimise aken nähtavale tuleb.
dpkg-põhise installiprotseduuri kõige lõppeks panin peale ka esteidfirefoxplugin_3.12.2.1145beta-1404_i386.deb paketi, mille tõmbasin Ubuntu Trustyle mõeldud RIA varamust.

Kas sellest ka mingit kasu oli, ei ole selge.

esteidpks11loader paketi unustasingi peale panna, aga tuleb välja, et ülejäänust ja allolevast piisas, et sisse logida.

Selle saab kätte samuti RIA poolt Ubuntu Trustyle koostatud varamust.
Küll panin Firefoxile peale Open-eID lehitsejalisa. Kätte saab selle Firefoxis aadressilt
https://addons.mozilla.org/firefox/addon/open-eid/

Edasi tuleb Firefox sulgeda, alles siis kaart sisestada kaardilugejasse, ning lehitseja siis taaskäivitada.

Kui kaarti parasjagu enam vaja pole, siis sulgeda terve Firefox ja kaart lugejast välja võtta. Kui kaart on kaardilugejas ja lugeja indikaator vilgub, siis kaarti välja võtta ei maksa. (Kui lamp jääb pikaks ajaks vilkuma, siis tasuks proovida süsteemi kinnipanekut või restarti.)

Vähemalt eesti.ee-sse ja panka sisselogimiseks kõlbab küll, kuigi allkirjastamist pole ma proovinud (näiteks ülekande tegemiseks).

Friday, November 20, 2015

Synaptics touchpad erratic on Knoppix 7.x

The title is self-explanatory. I first discovered this issue with Knoppix 7.0.5 (IIRC), and it continued "well" into Knoppix 7.2 CD versions. I prefer to use CD versions of Knoppix, because of a lack of storage and download speeds. Yes! Mmh!!

Note, that to avoid fancy Compiz effects, I almost always use the no3d parameter at Knoppix startup.

The Synaptics touchpad is highly erratic (in Metacity), and until today, I had had nothing that would resemble workaround to make it less erratic. One of the symptoms in a browser, for example, is that text suddenly gets selected, and I can't release the selection. No, nothing helps. I could only use the keyboard to navigate, and LXDE/Metacity environments don't appear to have any keyboard shortcut to access the taskbar (start) menu.

Some of the workarounds:
  1. An immediate workaround is to restart X from the console via restartx
    One can have a non-minimised terminal window (uxterm) ready in the background, and then use extant keyboard and menu commands to close active apps. Another is to use Ctrl-Alt-F1 to revert to the text-only console. Restarting X is not a longer-term solution, because the problem might return again.
  2. Another is to fall back to Knoppix 6.7.1, which allows a stable pointer with the Synaptics touchpad, but this Knoppix release has outdated software (Iceweasel 6.0, for example).
  3. Yet another in Knoppix 7.x consists of adding the psmouse parameter into the Knoppix start-up command-line:
    knoppix no3d psmouse.proto=imps
    The imps somehow changes the pointer input device. At least on my machine, the immediate effect was that cursor tracking (movement) with the touchpad became slower.

    While the terrible and annoying erratic behaviour was not there as much, it still kept being somewhat erratic in other ways, albeit less so, and in a more manageable manner. Then I discovered the following:
  4. The thing is to never open the CompizConfig Settings Manager. — Because I noticed that it will start changing settings right after it's started or when a user changes settings on their own. That way, I have been able to evade issues that cause/d the pointer to misbehave so terribly.
  5. 04.08.2018 update:

    At some point, I realised, that since the touchpad is misbehaving, it would be saner to use an external pointing device, such as a USB mouse (or PS/2, or what have you). That doesn't fix the problem, but prevents usage of the touchpad.
  6. The issues crop up less, but even using an external USB mouse is not perfect enough for uninterrupted work. Disconnecting the external mouse from the USB port, using the touchpad for a short while to resolve the pointer hang, and re-connecting the USB mouse may help.
  7. Then I got the idea, that perhaps I should disable the touchpad entirely, because I'd occasionally touch it by accident, and it interefered with the pointer driven by the external mouse, forcing the pointer to get stuck again.

    Here I got very nice instructions as to how to disable a misbehaving pointing device: The output of xinput --list with the pointing devices that X has identified:
    Virtual core pointer                          id=2    [master pointer  (3)]
      ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
      ↳ Logitech USB RECEIVER                     id=9    [slave  pointer  (2)]
      ↳ PS/2 Generic Mouse                        id=11   [slave  pointer  (2)]
      ↳ SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
    
    • "Virtual core XTEST pointer" is the first, and should never be shut down, as it will cause X to restart, and lose any unsaved work.
    • Logitech USB RECEIVER is the wireless USB mouse. It's the first wireless laser mouse, and as such, the receiver is a separately mains-powered cradle that connects to the USB port.
    • PS/2 Generic Mouse. I can't tell, if it belongs to an external mouse, or is identified separately by X. Because it's not the external USB RECEIVER mouse, and not then touchpad.

    Follow the id= number of the device, and use that to enable/disable it with the respective console commands below:

    xinput --disble 12
    xinpute --enable 12

    — to shut off what one could think is the offending device. Instructions from here.

    Then again, disabling the TouchPad didn't work, and I was still stuck with a stuck pointer. Ugh.
  8. 19.11.2018 update: Use a different window manager, such as twm.

    At first, I thought the erraticity of the Synaptics Touchpad to be because of LXDE and its use of Metacity. No.

    I'd somehow installed twm (Klaus Knopper gutted the CD-version of Knoppix 7.2 so much, that he omitted twm from it).

    Switching between twm and LXDE requires creating and then editing the local .xinitrc file, and then launching restartx to choose the correct window manager / desktop environment.

    In .xinitrc, the execution commands for twm and lxde are different: For twm, it's just

    twm

    ; For LXDE, it's

    exec startlxde

    For one window manager to be chosen via $ restartx, comment the other out with a hash # sign.

    And so I thought at first to be safe from the Erratic Synaptics Touchpad. Well, no. That still happened, but somehow less, and it was easier to escape the erraticity and non-responsiveness of the pointer. On the other hand, if the pointer did become sticky, I'd be stuck until I'd restartx, sometimes even via Ctrl+Alt+Backspace, if hovering over a terminal window in twm would no longer switch focus to it to allow retartx to happen. In console (as in, Ctrl+Alt+F1...F4), restartx would start, but wouldn't display. Ugh.

    But at least now I know, that it's the fault somewhere in the driver and how X handles it, and not directly with LXDE.

Saturday, March 10, 2012

Cheat sheet and notes for using Knoppix 6 or newer

This I initially made for myself, but then writing got out of hand :-)

For a full-page treatment, see here.


Flash

Knoppix 6.0.1 includes Iceweasel 3.0.6, which does not have support for HTML5 video, so you need to install Flash to watch multimedia. Granted, these versions of Knoppix and Iceweasel are rather outdated, so Knoppix 6.7.1 (or 7) is often a better choice on a new computer.

Another option is to download and install a newer version of Firefox. See below.

The version of Flash compatible with Knoppix 6.0.1 is 10.3. Download it, extract libflashplayer.so into the
/home/knoppix/.mozilla/plugins directory (the plugins directory must also be created). Restart Iceweasel.

02.05.2013. Update

Modern Firefox

By May 2013, Iceweasel 3.0.6 has become so old and outdated that it's not supported by major websites anymore. This includes Google and all its properties (YouTube, Google Drive/Docs, Blogger, and others). The same applies to Yahoo!, twitter, and many other major sites and services.

Using Synaptic in Knoppix 6.0.1 to upgrade to Iceweasel 17 is impractical on account of the Iceweasel 17 package having hundreds of dependencies that must also be upgraded, which really amounts to a whole operating system upgrade. Therefore it's simpler to get the Firefox Linux binary.

The latest official major version of Firefox that still works in Knoppix is version 17, specifically 17 ESR (Extended Support Release). Newer versions won't work.

Firefox 17 ESR can be obtained from Mozilla's FTP site, and I got the latest version here:
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/17.0.6esr/linux-i686/en-US
Since Firefox 17.0 ESR is in active maintenance (17.0.6 released on 09.05.2013., which is very recent), then Mozilla is likely to release newer patchlevel versions.

Since new patchlevel versions are placed in a different FTP directory, then...

...here's a beginner's "navigation how-to" for people unfamiliar with FTP

Primer
FTP (File Transfer Protocol) is older than the web, and it has been very useful in facilitating large downloads. The content of FTP sites is structured hierarchically, as in folders in a computer file system. Files and directories are listed in alphabetical order UNIX-style: directories are not sorted first, but like all other files; items starting with capital letters are at the top of the list, then followed by lower-case items. In a graphical browser, file and folder names are linked and thus clickable.

Mozilla's FTP site
FTP URLs are given as examples
As Mozilla releases a new version of Firefox, then all files specific to a version are given their own directory. Genereally, all Firefox versions are placed in /releases folder of Mozilla's FTP site:
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases
The latest version at this time is 17.0.6 and you can scroll down the list to enter that directory:
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/17.0.6esr

As Knoppix is Linux, choose /linux-i686
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/17.0.6esr/linux-i686

What you get in the /linux-i686 directory is a longish folder listing of different Firefox language versions (Firefox is released in many languages), listed in the format of ISO-639-1 two-letter language code followed by ISO 3166-1 alpha-2 two-letter country codes.

The respective code combination for English-United States is en-US
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/17.0.6esr/linux-i686/en-US

There you'll see the archived Firefox binary firefox-17.0.6esr.tar.bz2
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/17.0.6esr/linux-i686/en-US/firefox-17.0.6esr.tar.bz2

Download this file to the Desktop. Once the tar.bz2 file is downloaded, go to the desktop, right-click on the file, choose the Extract > Extract To... command. You'll get a file/location picker and the default should be the Knoppix folder. Press OK to extract.

The Firefox executable is then in the /home/knoppix/firefox/ user directory (knoppix being the user account folder).

Even after Firefox is extracted, a shortcut won't be created to the Knoppix LXDE desktop environment menu.

Do keep in mind that since Iceweasel is code-compatible with Firefox, they both share the same user settings located at /home/knoppix/.mozilla/firefox

It is thus recommended to create a different profile for Firefox.

You can start Firefox from the command line:
knoppix@Microknoppix:~$ ./firefox/firefox -P &

./ stands for specifically targeting a folder from within the current directory;
-P forces the start of the Firefox Profile Manager;
& (ampersand) makes sure that Firefox starts independently from the terminal window.

After that, the Firefox Profile Manager opens up and you can create a new Firefox profile. When doing so, assign a new and simple profile name.

If you close Firefox, you can start Firefox again from the command line using the new profile:
./firefox/firefox -P newprofilename &
Alternately, the easier way is to unset starting Firefox or Iceweasel in a profile automatically. That way it's slightly more user-friendly to choose a profile, at least when starting Iceweasel. Whereas with Firefox only the ./firefox/firefox command without can be used without having to invoke additional command-line options.

So much for now. I might continue and expand on this further.

Saturday, December 3, 2011

Eriotstarbeline vaba tarkvara

Kommentaar artiklile Delfis hakkas väikselt pihta ja siis kulus selle peale jälle mitu-mitu tundi, peale mida tundus kompositsioon juba nii kokkulitsutud, et vääris juba oma postitust (ilma lingita sealtsamusest). Alguses oli umbes 40-45 rida, alles jäi 34 rida ilusat teksti. Ennast meeldib ikka kiita :-).
Lõpuks tuli iga siinne lõik tõmmata kokku paariks lauseks, et kommentaar Delfis ei tunduks nii väljapeetud ja keerukas.


Umbes 10 (ja veidi rohkem) aastat tagasi samal teemal Delfis:
• Windows/Office on kallis, ei jõua osta, litsentsi hind maksab *kuue kuu palga!*
Nüüd:
• Windows/Office (karbi)litsents maksab ühe kuu palga!
^ Pange nüüd tähele, kuidas elatustase on vahepeal tõusnud :-)

Ühest kommentaarist jääb ehk liiga väheks, et kõiki teemasid põhjalikult puudutada.

Tehnilistel argumentidel põhinev võrdlus näitab Linuxi ja vaba tarkavara¹ kasuks olulist arengut, mispuhul isegi suured tootjad pakuvad Linuxiga eelinstalleeritud masinaid, küll kitsamas sortimendis, aga siiski. Samuti pole Windowsi ökosüsteem enam kõige-kõige olulisem, eriti mis puudutab laiatarbeprogramme, mõnesid mänge (põhjuseks Wine ja mängukonsoolid) ja internetiseadmeid (Android, MeeGo).

Iseasi on eriotstarbelise tarkvaraga, mis mujal ei jookse kui Windowsil/Macil ning kus spetsiifilised tööülesanded sõltuvadki ainult niisugustest programmidest. Et kõik kasutavad
suletud omanduslikke failiformaate, on monopoliseisus karanteeritud [sic] ja selliseid ökosüsteeme on raske murda. Säärane omanduslik eriotstarbeline tarkvara on kallis.

Kahjuks ei olda niskses olukorras vabatarkvaralistest alternatiividest väga teadlikud; ometi on niisugune teave kõigile ühest kohast kättesaadav, parimal juhul inglise keeles: en.wikipedia.org/wiki/Category%3AFree_computer-aided_design_software (näiteks)

Ehkki kahtlusteks palju ruumi pole, on kahju eeldada, kui koolitustasemel puudub omanduslikuga vähemalt samaväärse eriotstarbelise vaba tarkvara väljaõpe ja et vabade programmide juurutamise vajadust reaalelus justkui polekski. Võib väita, et õppematerjalid puuduvad või veel pole neid koos praktiliste näidetega süstematiseeritud, sest praegune omanduslikul tarkvaral põhinev olukord rahuldab. Seega nokk kinni, saba lahti ja vastupidi.

Või nähakse erialase tarkvara vabades alternatiivides vajakajäämisi, kus omanduslik variant on asendamatu. Sarnane oli olukord kontoritarkvaraga, mil edasiviiv vabatarkvaraline jõud alguses puudus ja peale tulemist oli mitu aastat kaasajooksiku rollis.

¹ Paluks vaba tarkvara mitte segi ajada vabavaraga, sest viimast terminit kasutatakse tihti tasuta ja omandusliku tarkvara kohta.

Saturday, July 16, 2011

DOM Inspector XPI for older Firefox/IceWeasel browsers

Knoppix is the kind of distro that by default does not include the DOM Inspector, it's only on a CD, and I think I had even spent a month searching for a way to install it from a .deb file to a version of firefox in Knoppix. All in vain, even if I had the supposedly right package, because it would still prove incompatible and thus unusable (would crasshh).

Then, by chance, I found the right way to install the DOM Inspector XPI separately for Linux in those distros, where a package might be missing (such as a relevant .deb package in Knoppix 4.0.2, because it's a snapshot from Debian's testing branch of the time) or not included at all... — By downloading a specific DOM Inspector XPI from the old mozilla.org FTP site, which is archived at mozilla.org's own ftp site:

ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0.6/linux-i686/xpi

Caveat in Knoppix and other Live CD-s: You can only install it as superuser, it won't install into the user directory and thus it won't save, but rest assured, you can install it again every time you need it, although it may be tedious for daily use, if that might be the case for some users.

Here's what you have to follow, if you're stuck using a LiveCD, a version of Firefox without DOM Inspector built-in, no package repository to rely on and no package to be found for your particular distro (Knoppix):
  1. Find out what your version of Firefox is in your Live CD (launch Firefox; Help>About). For some Knoppix Live CD's I sometimes use, mine is 1.0.6 for Knoppix 4.0.2 and something else in newer versions of Knoppix. Keep in mind that newer versions of Knoppix include Debian IceWeasel (Knoppix is based on Debian), which is a source-compatible rebranded copy of Firefox.
  2. Exit Firefox, relaunch it as superuser, best with sudo firefox
  3. Go to
    ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/
  4. From there, choose the version of Firefox/IceWeasel/GNU IceCat you are stuck using (if using a browser click the relevant version folder link);
  5. Once there, browse to a folder called linux or linux-i686 and there browse to the xpi folder. Note down the address in a separate editor.
  6. (Make sure that ftp.mozilla.org is the allowed domain to install XPI's)
  7. Click on adt.xpi (the XPI for DOM Inspector), which should be at the very top of the directory listing, go through the extension installation procedure. If after installation you don't see the extension listed, don't worry. Restart Firefox again as superuser, via sudo (you should now know how to use it). Verify that DOM Inspector is installed by checking the Tools menu. Exit the sudo'd Firefox.
  8. Start user-mode Firefox and you should see the DOM Inspector appear there.
  9. To maintain that you still have the XPI for future use, save it to local storage (a memory stick, for example) by downloading it in a normal-user firefox session from the same FTP address.
Now, I haven't been able to find out an XPI of the DOM inspector for older versions of Firefox that would actually work as an extension installed into the user profile, so until then, it's more of a case for frequent users of DOM Inspector in older Firefox browsers on a Live-CD of reinstalling the XPI after every restart.

Settings for DOM Inspector can be changed through about:config, then search using the inspector string.

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?

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.