Sunday, March 13, 2016

Office 2007 With Wine

Every once in a while I need a real honest to Bill version of Microsoft Office. Not often, but it happens.

Now I have a three license copy of Microsoft Office Home and Student Edition, purchased back in the day when Child No. 1 had a Windows computer. That computer is long gone and replace by a Mac. I could install this copy on Hal's Windows partition, but that means I have to reboot and update Windows 7 every time I want to use the software. Irritating.

Then yesterday I was updating my Harmony Remote, and found that the update software would run on Linux under Wine. True, the fonts were ugly, but hey, it ran, and given that updating a remote is a run-up-and-down-the-stairs-10-times kind of thing, having one less step was a blessing.

Now I've tried Wine before, and never been all that happy with it. But maybe it's now good enough, so what the heck.

Having installed Wine via the Synaptic Package Manager, I went looking to see if there was help for the Office install on the internet, and lo and behold, I found How to Install Microsoft Office 2007 in Ubuntu (Under Wine).

What can I say? As I said, I already had Wine installed, so it was mostly point at setup.exe and click. What do you know, it worked, right down to finding the riched20.dll library and correcting it so that PowerPoint would run.

Now this was a copy of Office 2007, so it's a little out of date. Fortunately, Microsoft is providing extended support until 2017, so it's still viable. There was a problem, though: Microsoft Update wants to work with Internet Explorer, and I don't have that installed under Wine — in fact, I don't know if I can install it properly, and I'm not inclined to try. But you can go fetch the update directly from Microsoft. Just download, make it executable, and run it from a terminal, ignoring all of those evil looking error messages.

A couple of things: LMDE puts all of the Office Suite in the Other tab of the menu. You can edit the menu, make an M$Office tab to hold everything, and move it there. Second, dialog boxes often revert to Wine's font, which is horrible. But Office itself uses native Office fonts, which is what we really want.

Now I have no idea what happens if you try this with a newer version of Office. This works for Office 2007, which was written for Windows XP. If you get a newer version running, leave a comment.

Saturday, October 18, 2014

Taking POODLE to the Pound

You may have heard of POODLE (Padding Oracle On Downgraded Legacy Encryption), which exploits a bug in the ancient SSL 3.0 Encryption Protocol. This has the capability of letting malicious sites take over your browser.

The fix is to turn off SSL 3.0, forcing your browser to use better encryption. This will break some sites, but that's their problem, not yours, and they are probably working on it right now.

For most browsers the fix is not too difficult. You change some configuration setting and you're done. There's even a Firefox Extension to change the settings for you.

For Google Chrome and its open source brother Chromium, it's a little more difficult. You have to tell the browser to disable SSL 3.0 every time you launch it, e.g.

$ chromium --ssl-version-min=tls1

the --ssl-version-min=tls1 being the string that does the trick.

Let's see. I launch chromium at startup, from the Mint panel icon, and sometimes from the command line. That means three places I have to fix the call to chromium, and I have to do it for every user on the machine. There's got to be a better way.

And there is, at least when using chromium on LMDE. There is a configuration file, /etc/chromium/default, which lets you set global options for the chromium browser. To apply the fix, run the command:

$ sudo vi /etc/chromium/default

and edit the CHROMIUM_FLAGS variable. This passes a set of commands to chromium every time anyone starts the browser: look at /usr/bin/chromium to see how it works. My current variable reads

CHROMIUM_FLAGS="--password-store=detect --ssl-version-min=tls1"

Now every time chromium is started on your machine, it applies the fix.

You can test your work at https://www.poodletest.com/.

I don't know how many platforms can use this trick. On CentOS there is an analogous way to do it, but a different procedure. If you have a different way to disable SSL 3.0 for chrome/chromium on your Linux box, leave a comment below.

Tuesday, August 13, 2013

Updating Firefox and Thunderbird in LMDE

A couple of weeks ago, as you may recall, I switched from ever-changing Ubuntu to nearly frozen Linux Mint Debian Edition (LMDE). So how is it?

Nice. Not only does it have the Gnome 2-like MATE desktop, but because it is based on Debian Testing (currently known as jessie), LMDE is relatively slow to change.

What's irritating about LMDE is that, because it is based on Debian Testing, it is relatively slow to change.

This really isn't too much of a bother, except for Firefox and Thunderbird, which change versions at the drop of a hat, not that anyone wears a hat they can drop anymore. So, for example, as of this moment (it could change by tonight), Firefox is on version 23, and Thunderbird is on version 17.0.8. LMDE's versions, OTOH, are at 21 and 17(.0.0).

OK, this is not one of life's big tragedies. Most updates of Fox&Bird do not involve major changes. But I like to keep a little more current.

Fortunately, there is a relatively easy fix for this which won't do too much damage to your installation even if it completely craps out. The details are all in this LMDE forum post and the one above it, but I've added a little twist of my own, based on a post even further up the topic than the ones I've already mentioned and linked to.

What makes this relatively easy is that LMDE stores Firefox & Thunderbird files in the /opt directory, since pure Debian doesn't support them under their default names because of trademark issues (see iceweasel and icedove). That means any mucking around you have to do is confined to /opt, rather than such touchy directories as /usr/lib and the like.

So what to do:

  1. Install Fox&Bird, if you haven't already:
    $ sudo apt-get install firefox thunderbird (N.B. If you haven't already installed Firefox or Thunderbird, and don't miss them, you might ask yourself just what you are doing reading this post.)

  2. Become the superuser and go to the /opt directory.
    sudo -i
    # cd /opt

  3. Back up the firefox and thunderbird directories. This lets you get back to the original versions if you frak everything up. If you are particularly paranoid, back up your $HOME/.mozilla and $HOME/.thunderbird directories in the same way.
    # cp -rp firefox firefox_21
    # cp -rp thunderbird thunderbird_17.0
    The -rp options recursively copy everything and preserve all permissions and time stamps.

  4. Optional step: Change the ownership of firefox and thunderbird. If you do this, then you will be able to update both programs without becoming superuser. Otherwise, you'll have to launch the apps using sudo to do the upgrades. Technically this a regression, as it allows someone to update a core component of the machine without root access, i.e., it behaves like Windows XP. On a single user machine this is probably not a big problem.

    Assuming your username is, say, capaldi,
    # chown -R capaldi:capaldi firefox thunderbird If you do this step you can now get out of su mode:
    # exit
    logout
    $

  5. Now for the trick. You need to put Fox&Bird into the release channel:
    $ vi /opt/firefox/defaults/pref/channel-prefs.js When you get here, look for a line that says
    pref("app.update.channel", "default"); and change default to release.

  6. Do the same thing for
    $ vi /opt/thunderbird/defaults/pref/channel-prefs.js In my copy, this was already set, which is why Thunderbird kept asking to update (and always failed, since it I wasn't root).

  7. Restart either app. In the Help menu click on About Firefox/Thunderbird. Updates should appear normally, though I had to go through the process a couple of times to get a successful update. In Thunderbird it took forever to do the update, but when I Xed out the update window and restarted Thunderbird it was properly updated. I'll let you know if this trend continues with the next update, which might occur as early as this week.

  8. Now if and when LMDE does push Fox&Bird updates, all of your lovely work will be overwritten. You can do that by locking the package. The easiest way to do this that I know is:

    1. Open synaptic. If you don't have it,
      $ sudo apt-get install synaptic
    2. Search for firefox and click on it.

    3. In the synaptic menu bar, click Package.

    4. Click Lock Version.

    5. Search again for Firefox and make sure it is locked. The whole Firefox line should be red.

    6. Repeat for Thunderbird.

And that should do it. Remember, if things get messed up, you can always use your backup directories to get back to the default distribution, or you can do complete remove/reinstall:
$ sudo apt-get purge firefox thunderbird
$ sudo apt-get install firefox thunderbird

Sunday, July 21, 2013

LMDE

As long-threatened, I've finally followed the crowd and move from Ubuntu to Linux Mint. The main attraction was Mint's use of the MATE desktop, which is enough like Gnome 2 to keep me happy indefinitely, but I also liked the fact that the Debian edition, hereafter LMDE, is a rolling release, meaning I'm not going to have to do a complete upgrade in 6 months. The price is that some software is going to be a little behind the times, but, hey, at work we use CentOS. At least with LMDE it's unlikely that I won't be able to run Google Chrome or Chromium.

So a brief review:

Installation was simple enough. After several hours of backing up my /home partition (twice, to two separate USB disks), I downloaded the DVD and did the initial install. I left my /home and /usr/local directories, which were on separate partitions, intact, and let LMDE overwrite the root directory and install its version of Grub to run through the boot process. This took less than an hour, which was a pleasant surprise.

It then took me another couple of hours to pick out all the packages that weren't automatically installed, and get them up and running. Not too bad, really.

There were, of course, a few things that didn't quite work perfectly.

After a week, those are all the problems I've found. The system is stable, MATE is as good a Desktop as you're going to find these days, and I've had no difficulties in installing other software that I want.

This could be the beginning of a beautiful friendship.