Flash on Firefox on Debian — one way to update it

This is just what I did. It could be simpler but it’s what I did. It worked.

Firefox is always telling me my Flash installation is outdated and a security risk. I’d rather just not use it, but the computer needs to work with Flash-enabled education-related websites, I have no choice in the matter if important things are going to get done.

So I clicked through the links and ended up on Adobe’s Flash page. I clicked through asking for the .deb file, but apparently this needs some kind of handler for apt-get type installation through the browser which is specific to Ubuntu, a Debian derivative, and I use actual Debian, so no good.

Another time, I selected ‘APT for Debian/Ubuntu’ and got the error message:

“The address wasn’t understood”, and the browser went to

apt:adobe-flashplugin?channel=$distro-partner

So I googled a bit. Unenlightened. Something called pepper exists, but only for Chrome, or maybe there’s a wrapper so it’ll work on Firefox but maybe the wrapper is flaky and… I dunno.

Instead, went to https://get.adobe.com/flashplayer or whatever and downloaded the rpm not the deb (as noted, the apt/deb file is for Ubuntu and would not download — Firefox did not recognise the protocol).

rpm is at:

https://get.adobe.com/flashplayer/download/?installer=FP_27.0_for_Linux_32-bit_(.rpm)_-_NPAPI&sType=7757&standalone=1

Then used alien to make a deb package; it makes no promises but converts between rpm and deb, and Slackware tgz.

sudo apt-get install alien

Went to where the rpm was downloaded and typed:

alien --to-deb --scripts flash-player-npapi-27.0.0.187-release.i386.rpm

Output:

flash-plugin_27.0.0.187-1_i386.deb generated

OK. install the deb file:

$ sudo dpkg -i flash-plugin_27.0.0.187-1_i386.deb
(Reading database ... 228404 files and directories currently installed.)
Preparing to unpack flash-plugin_27.0.0.187-1_i386.deb ...
Unpacking flash-plugin (27.0.0.187-1) over (26.0.0.131-1) ...
Setting up flash-plugin (27.0.0.187-1) ...
Processing triggers for gnome-menus (3.13.3-9) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...

Looked very promising, but the plugin did not show up in firefox when I fired it up and went to the address:

about:plugins

I guessed I might have to manually tell firefox where the new library lives. Where was it installed to? Can look at the file tree in the .deb file:

dpkg-deb -c flash-plugin_27.0.0.187-1_i386.deb

Ah-ha. It’s in

usr/lib/flash-plugin/libflashplayer.so

So fired up firefox again and…tried to use the Add-ons menu to manually add the file.

about:addons then click the gearwheel and ‘Install Add-on from file’

Navigated to where the so file was, but was not recognised as an Add-on.

Firefox told me it was corrupt.

OK. In my ignorance and the knowledge that I am documenting what I do so it can always be undone, this led me to look at the about:plugins firefox screen, which told it was getting the .so file from:

Path: /usr/lib/mozilla/plugins/libflashplayer.so

Also took a look at usr/share/doc/flash-plugin-26.0.0.131/readme.txt

So after closing down firefox and backing up the older version of libflashplayer.so, I just copied the one from usr/lib/flash-plugin/ to /usr/lib/mozilla/plugins

$ sudo cp /usr/lib/flash-plugin/libflashplayer.so /usr/lib/mozilla/plugins/

On firing up firefox and going to about:plugins, I got this:

Shockwave Flash

    File: libflashplayer.so
    Path: /usr/lib/mozilla/plugins/libflashplayer.so
    Version: 27.0.0.187
    State: Enabled
    Shockwave Flash 27.0 r0

Which is indeed the version number of the current Flash, and lo and behold firefox stopped telling me I need to update Flash and Flash-enabled pages are working.

Long story short, I suspect I could have just exploded the rpm, fond the .so file and stuffed it into the correct directory, rather than messed around with alien. But things are working and that’ll do until next time the plugin is deemed outdated and firefox starts complaining again. I already had any config files from the automagically installed previous version(s), too. If it was a clean install, just copying the .so to the mozilla/plugins/ directory would probably not work — there’s other stuff in /usr. Maybe it’s put in the correct place by the dpkg install of the alien-made package, but I do not really know.

But it works.

Advertisements

Olympia SG3 — the behemoth has landed

Some text, typed using an Olympia SG3 typewriter.

The text as typed in using the Olympia SG3.

Olympia SG3. Wide carriage — can hold paper 16″ wide.

Paper injector (adjustable). Multiple tabs. Shading key.

I really like the font. The ‘k’ is a bit sticky, so I think kt needs a clean — I tried to type ‘it’ but the ‘k’ was still up and the ‘i’ knocked it into the ribbon.

It has a d o u b l e   s p a c i n g setting, but the paper stand is missing. It weighs a tonne (or a ton) and looks rather well used. The bell is nice and clear.

The double spacing key.

As I said, I really rather like the font. It’s quite strongly modulated for a typewriter face, but compact as well — it reminds me a lot of the VGA font on IBM computers.

This is one hell of a typing machine. I better give it a good clean, and then set it up somewhere I can use it regularly.

And the font seems to work really well with the script I wrote to do OCR using Tesseract.

Pictures:

On the little desk it does not leave a lot of room.

 

The paper injector lever on the SG3.

Inject that paper!

 

SG3 wihout the cover on.

Coverless.

 

Based on the serial number, I think it’s from about 1963 or 64. Made in Germany. I only got it because it was $20 (and that’s in our paltry Australian dollars) and I don’t have a full-on desk typewriter — all the others are portables. And it has the wide carriage, so it can do the jobs the portables can’t. And it has the paper injector lever which is like the typewriter version of a great big blade switch that brings Frankenstein’s monster to life. Which means I’ll never need to buy another one! Especially since I got that Smith Corona Clipper for $14… oh, haven’t I mentioned that?

 

OCR!

Monitor

The battle between the Monitor and the Virginia appears with monotonous regularity in books about ships, particularly fighting ships. It was the first battle between iron ships, the first involving a ship with a turret, the first involving ships that did not rely on sail, nor even have masts as backup to the engines.

Cover of <i>Monitor</i>, the book about the boat.

Cover of Monitor, the book about the boat.

One thing this book brings home is how small it was. No great fleet action like Jutland or Lepanto or Trafalgar — it was really just a skirmish, though one with great repercussions.

deKay does a nice job of bringing these repercussions to light. They were strategic, technological and even geopolitical.

Strategic: The Confederate states needed access to weapons and materiel from Europe, and the Virginia‘s job was to break the blockade set up by the North. Hampton Roads was a vital nexus for bringing cargo from the Atlantic to inland waterways, and it was here that Virginia sallied out and caused pandemonium amongst the wooden ships. Though she was slow and hard to control, she was also impervious to their shots and could stand off and pound the Union ships into pieces. Had the Monitor not been flanged together in about 3 months and thrown into battle against the _Virginia_ almost as soon as completed, the civil was could have looked very different. Had the Confederates gained mastery of the east coast the marked superiority of the North in terms of industrial capacity would have been at least partially mitigated by better access to imports. Further, it is supposed that had the South been able to maintain this kind of sovereignty over its borders, which would promote interchange with Europe, it might have been granted diplomatic recognition by more potential trading partners. So the book pitches the one-on-one battle as a kind of ‘for want of a nail’ situation. Of course, it’s natural for an author to point out the significance of their topic — they’ve bothered to write about it after all — but there is some substance to this. Had the South been closer in stature to the North, the likelihood of a genuine fissioning of the USA would have to have been greater. We shall never know. Most likely, the war would have gone on even longer, caused even more suffering, and had the same outcome.

Technological: At a stroke, Monitor ushered in a new age in warship design. Though it low freeboard and raft-like construction limited it to coastal waters, it’s general concept — an iron hulled ship, powered by steam, dispensing with sail altogether and armed with turreted guns — was to dominate naval thinking until the rise of the aircraft carrier during WWII. Previous ironclads had looked like modified sailing ships, still arranging their guns in broadsides and still carrying a full complement of sails. Monitor must have looked like something from another world. Just as the Dreadnought reset the benchmarks in 1905, the Monitor forced a reappraisal of what made for a power navy. What value was a hundred ships of the line if a handful of ironclads could pick them off at leisure? So influential was the design of the Monitor that it leant it’s name to a style of ship. Shipyards around the world started building ‘monitors’, and would continue to turn them out for fifty years to come.

Geopolitical: It could be argued that the Monitor is the first significant example of the USA gaining technical, military leadership over Europe. It can be thought of as the very beginning of the process that led the USA to gain military and technological leadership during the 20th century. Ericsson, the man behind the Monitor, was a migrant who had been unable to sell his design in Europe. The strength of the US coming from its inclusiveness is a very modern idea, and the Monitor is an early and potent example.

Anyway, the book follows the politics and the military sides of the story. How the ship got built, how the battles were fought, and what it all meant. I would have liked more technical details — we do not even get a table summarising the capacities of the two combatants. Some more diagrams, perhaps cutaway, and clearer illustrations of how the two ships were laid out and so on, would have buttressed the work nicely and made it more rounded in its coverage. As it is, it is a nice little read.

 

Monitor.

Quite a big deal

The Age of Napoleon by Alistair Horne.

This book does a very readable job of looking at the influence of Napoleon. The famous battles — Austerlitz, Trafalgar, Wagram and all — are mentioned but not discussed in detail. They provide context, they chart the rise and fall of his empire, but they are not the focus of the book. In many ways Bonaparte reminds more of Alexander the Great than other modern conquerors. His time in charge was brief, he founded no long-lasting, united empire. Yet his influence was enormous and did persist. His was an epoch when the work of centuries seemed to happen in years. Much of what the revolution started was finished (or at least advanced far enough to make turning back impossible) by the dictator. From the metric system to reorganisation of schools and the redesigning of Paris itself.

Paris. In many ways this is a book of two stars. Paris and Napoleon, for in this book France and Paris are synonymous. We get the occasional sentence pointing out how desperate things were in the provinces, but we never visit there. That is the only real weakness of the book (aside from some odd editing — there is considerable repetition that might have been excised). Yes, it takes us away from the political histories that focus on battles and borders and the struggle for leadership, but only as far as the salons and streets of Paris. How did Paris react to the rise and fall of Bonaparte? What monuments did he build there? How were the Prussians and the English received after the fall(s)? It’s all here — if it happened in Paris.

The book does cover the age of Napoleon in Paris. His influence on the rest of the continent is alluded to (he is credited with releasing the ‘genie of German nationalism’, thus triggering the events of the next 130 years, events that would end in another conquering dictator whose efforts ended in ignominy). Hitler is explicitly compared with Napoleon, and reasonably enough comes off poorly, since Napoleon does not seem to have engaged in genocide, slavery or rampant anti-Semitism. He did run a police state, though, and was rather keen on monumental architecture.

The book is a quick, easy read. It does a nice job of outlining the times and the man’s role in them.

Solid.

Simple use of Word regular expressions — remove commas from numbers

Note to self:

Our house style says we should us nonbreaking spaces in numbers of five or more digits, not commas. That is, a number like 13,456 should be 13 456.

If I get a document with lots of commas in, this is what I do in Word:

Wildcard replace
(1) Turn off track changes (sad but true – long time bug Mico$oft have no interest in fixing).
(2) Search for numbers of the form XX,XXX. The regular expression for this is: ([0-9]{2}),([0-9]{3})
(3) Replace with first half nonbreaking space second half – that is \1^s\2
(4) Step through in case of accidental fits to the pattern.
(5) Turn track changes back on if appropriate.

Yes — cannot track changes while doing this.

So what’s going on? The component of the search that matches the first set of parentheses is stored in variable 1, the second in variable 2. These values are got at by prepending a backslash — it’s a bit like the $ sign in a bash shell, if that helps, or % on the Windows/DOS command line — it returns the value of the symbol. With ‘Use wildcards’ checked in the Find and Replace box then [0-9] finds any digit. [0-9]{2} finds exactly two digits in a row. The lot in parentheses makes sure the matching fields are stored in variable 1. Then I want to match a comma, but its not in parentheses so I’m not storing it. Then I want to match exactly three digits in a row and put that into variable 2.

The Find and Replace dialogue box in Word, showing the Use wildcards box has been checked to allow use of regular exppressions.

Ctrl-H brings up this dialogue box in Word. Not what’s checked.

OK. Now, I want to replace that with the value of variable 1 (\1) then a nonbreaking space (^s) then the value of variable 2 (\2). And that’s it.

Wordy mac wordface.

Business Name Renewal Scammers

What it says in the title.

They want $99 for a 1 year renewal, when the actual governing body (ASIC) have a perfectly usable website and change $35. They seem to be called Online Business Registration Pty Ltd, but the letter just says ‘Renew your Business Name’ in big letters. The first thing that made me suspicious was the off capitalisation of that request. The second one was the lack of any reference to ASIC in the letter or the URL/email. And I’ve got nothing against Altona, Altona Meadows or anything, but it just did not sound like the right address for a national body. I don’t know if this is illegal or just bad faith. They are effectively charging $64 for reminding you to renew the name and providing you with a website through which to do it (if indeed it does get renewed). Do they, by law, have to tell you they’re doing that? I dunno. I’m too ignorant. I do know I would not want to give my credit card information to people who are at the very least misleading.

Letter from scammers trying to charge excessive fees for renewing your business name.

Do not deal with these people!

 

Shame, shame, shame.

Weird Windows errors: Windows\system32\config\systemprofile\Desktop

Note to self:

Windows\system32\config\systemprofile\Desktop is unavailable it might have been moved or deleted.

or

“Windows\system32\config\systemprofile\Desktop” refers to a location that is unavailable It could be on a hard drive on this computer, or on a network. Check to make sure that the disk is properly inserted, or that you are connected to the Internet or your network, and then try again. If it still cannot be located, the information might have been moved to a different location

Oh crap. Windows cannot find your personal information. It’s like everything in AppData is missing. The desktop is empty and a message like that above keeps cropping up when you try to do anything much.

https://appuals.com/fix-system32configsystemprofiledesktop-refers-to-a-location-that-is-unavailable/ is where you need to go. But I am making this posting because there may be extra complexities. We have a situation where the login name of an account was changed, so, for example, the login might be ‘Kids’ but the actual desktop is stored in C:\Users\Dad\Desktop because the account was repurposed.

If you go to the link above, it offers some advice:

Solution 2: Reset Desktop’s Location

In Explorer, navigate to

C:\Users

Open the folder with the relevant username and right click on Desktop. and then select Properties. Select Location and then ‘Restore Default’ then OK and reboot.

Now, when I did this, the error message went away — yay — but the applications could not find the personal, local stuff stored in AppData — logins, local resources for Minecraft, all that malarkey. I think it is because the username and the folder name are not the same. That’s my theory, anyway. So I went to method 3 — registry editing…:

In the Run box of the Start menu (or after pressing Win Key + R) type regedit and press enter. May need to say ‘Yes, I know this is admin task’.

Here are the verbatim instructions:

In the left pane, click on HKEY_CURRENT_USER to expand it. 
Now click on Software under it. 
Similarly navigate to Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders.

Make sure User Shell Folders is highlighted and in the left pane, then double click Desktop. 
Make sure under Value data: the value is either %USERPROFILE%\Desktop or C:\Users\%USERNAME%\Desktop is the value. 
Click OK. 
Close the registry editor. 
And restart your system, and check if your problem is fixed.
Now, all the relevant fields on the computer in question were of the format %USERPROFILE%\Desktop. So instead I changed the relevant ‘Desktop’ key (and only that one) to the second format, C:\Users\%USERNAME%\Desktop

And that seemed to work. I don’t know what the kid did to the machine to cause the problem, of if it was just bad luck, but the inconsistent naming I suspect made things worse.

If it works for you, thank the original poster.

Et seq.

Manipulate multiple selections in Word — GUI and macro

Note to self: Well, it’s not flexible, but it’s useful. Styling documents in Word — that is, making sure they are rigorously styled rather than formatted in an ad hoc way — is a pain.

I wanted to search for a specific bit of text and format it in a specific way. Problem; something was embedded in the Word doc such that highlighting the text and selecting the style did not work; I had to select ‘Clear All’ in the styles pane before I could apply the style I wanted.

 

Now, can you make multiple selections via the Search tool and then process them all at once? Yes.

(1) Ctrl-H to open search tool, and just select find. Here I am going to convert all ‘the’ to Heading 3.

(2) Type ‘the’ in ‘Find what:’ and under ‘Find in’ select ‘Main Document’ (this is the core of the trick — for whatever reason).

(3) When you click on ‘Main Document’ you’ll get a message telling you how many instances were found and they’ll be highlighted on the screen.

(4) Press ‘Esc’.

(5) You can now operate on all the selections at once. In this case, I’ve converted them all to Heading 3 styles, but it could be anything else you like.

Here is a macro that will do the same:

Sub TestSearch()
'
' TestSearch Macro
' Search for some text and process it when it is found, repeat untill all instances done.
'
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "the"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute
    While Selection.Find.Found
        Selection.ClearFormatting
        Selection.Style = ActiveDocument.Styles("Heading 3 Char")
    Selection.Find.Execute
Wend
End Sub

 

FWIW

A beer review

I wouldn’t normally do this kind of thing, but I’m a bit pushed for content, so…

Furphy Refreshing Ale

With the large ‘Brewed in Geelong’ on the box, accompanied by ‘100% Victorian ingredients’, one suspects this is aiming for the VB market. The impression is confirmed by the mild, simple malty flavour, lacking in character. The simplicity of the taste is unexpected from Little Creatures Brewing. This is a good beer for cooling off after mowing the lawn, but needs to be thought of as a competitor in the more traditional (some would say boring) mainstream-style Australian lagers, despite its name. The Furphy name comes from the water tank manufacturers, based in Shepparton and known for the cylindrical water carts that have become something of an Australian and Victorian icon. This stretching for some kind of ‘old Australia’ (as if such a thing exists) cultural embedding is routine in the Australian beer industry, where it seems like every one who even thought about brewing beer in the early days of the colony has a brewery named after them. Given that ‘a furphy’ also means (essentially) a lie, or at least a tall story that is claimed to be true, I’m not sure it has ideal connotations…

The carton from Furphy refreshing ale.

Furphy Ale

Having said that, it is priced competitively with the likes of VB, Melbourne Bitter and To0heys New, so offers perfectly reasonable value if those sorts of beers are to your liking. I don’t mind admitting that I like to have a few options in the house, from interesting craft-y beers to uncomplicated malty beers like this one. A good BBQ beer.

 

Give me a moment

The Macquarie dictionary is excellent. But it reports what people do do not what experts think they should do. This is good for linguists and scrabble players, bad if you want a simple and strong rule to follow when editing something.

The dictionary has a strong bias towards being descriptive, whereas many users come from a more prescriptive angle. So, for example, if enough people use (say)  ‘fortuitous’ to mean ‘lucky’ when it ‘ought’ to mean ‘accidental’, then that is one common understanding of the word so that is effectively one of its meanings so now it does mean ‘lucky’, even though we already have ‘fortunate’.

What that means is that editors don’t use Macquarie blindly. Since it mirrors usage, it is fairly inconsistent (especially in things like whether to hyphenate prefixes and compound words). So we use consistent rules for a lot of things and don’t slavishly follow the dictionary.

Here you go:

What does momentarily mean?

  1. in a moment (I’ll be there momentarily)
  2. for a moment (I’ll only be there momentarily)
  3. at any moment (my arrival could occur momentarily)
  4. every moment, or moment to moment (the noise is increasing momentarily)

 

Well…

 

The first is considered a US usage, but all four are in Macquarie.

Oxford Australia says ‘for a moment’, plus notes ‘in a moment’ (‘instantly’) as a US usage.

Webster (a US dictionary) says ‘for a moment’ and ‘instantly’ on equal footing.

Frankly, I think the word should be banned.

Just say ‘soon’, ‘in a moment’, ‘for a moment’ etc, and never use the damned word.

 

That’s all from the bunker.