Upgrading Ubuntu from Feisty to Hardy

I just upgraded my main computer from Ubuntu Feisty (7.04) to Hardy (8.04).

I had been running Debian exclusively since early 1997, but last year switched to Ubuntu. Mostly to get the hardware to “just work” which is nice for an old-timer like me. And Ubuntu is really Debian anyway.


The upgrade itself (which went in two stages, first to 7.10 and then to 8.04)
went smoothly, but after a number of things were broken with my own
customizations and with things I use a lot:

  1. My dual-head setup was no longer working.
  2. I use FVWM as my window manager, but it was gone after the upgrade.
  3. My Java plugin in Firefox was gone.
  4. Text zoom in Firefox (CTRL-+) was broken.

I did manage to fix all of it relatively quickly though:

Dual-head setup

I use two monitors side-by-side, the laptop screen on the left and a big 1600×1200 monitor on the right. They share the viewport, so each shows a part of a 2624-by-1200 screen (with the lower left corner invisible). I use the left screen to keep Gnome panels, IRC and other instant communication always visible, and the right screen for real work. This was set up with some MergedFB x.org/radeon option, and FVWM is excellent at handling this (ie. I never see windows popping up in the dead zone.

But after the upgrade, this setup was broken, both monitors showed the same 1600-by-1200 screen. So time for some investigation to find out what the problem was.

Turns out that the new x.org (version 1.4 in Hardy I think) replaces the old MergedFB (or whatever) options with a new feature called RandR. So time to do some reading to learn how it works… actually, I quickly found a link on x.org to this excellent document from Debian. It is a quick read, and after reading it, setting up an equivalent dual-head setup in /etc/X11/xorg.conf was a snap.

It is always annoying when an upgrade breaks your setup. But it seems pretty clear that the new RandR stuff is very good, and much better and more general than the previous method I used, which seems a bad hack in comparison. So I should be happy I guess…

The RandR feature also appears to have some excellent facilities for managing and switching modes and monitors, even dynamically. Hopefully this will make it much easier to connect the laptop to a projector when doing a talk, maybe having it just work, or at least work after a few simple xrandr commands. Running a dual-head setup like mine on the laptop does make using projectors a bit more challenging I think…

FVWM

So after the upgrade, my FVWM was completely gone! The package fvwm-gnome was removed during the upgrade (I did note this at the start of the upgrade as something to be looked at later).

I did not spend a lot of time looking into this. I think the dependencies on the FVWM packages are slightly broken somehow. The problem was something to do with there being two versions of fvwm (old and new?), the new one in universe/x11, the old one in x11 (maybe FVWM moved to unsupported / universe). And the new one conflicts with fvwm-gnome which I think is what I was running before. And the new fvwm-gnome depends on fvwm (but it is a dummy package anyway just for upgrade). So package A depends on B, but package B conflicts with A.

So probably there is a bug here that the new fvwm should conflict only with old fvwm-gnome, not with the new one. Or something.

Anyway, once this is realised, the fix was easy: sudo apg-get install fvwm.

However, that did not give me back FVWM yet! Gnome still runs Metacity by default. I remember having the same issue when installing FVWM in Feisty, I do not remember how I solved it then, so not sure why it disappeared (I vaguely remember setting something in the gnome registry). So not sure why it disappeared, maybe due to the FVWM package being removed during the upgrade.

After a little Googling, I came up with this solution:

  • sudo ln -s /usr/bin/fvwm /etc/alternatives/x-window-manager
  • Add export WINDOW_MANAGER=/usr/bin/x-window-manager in $HOME/.gnomerc.

Java

I use the Firefox Java plugin for my internet banking. For some reason this was gone after the upgrade. Again I do not remember how I installed it originally, so not sure why it disappeared during the upgrade. Again, the upgrade noted that the package j2re1.4-mozilla-plugin would be removed. It seems that package is gone in Hardy, not sure why dependencies failed to install the replacement package.

Anyway, Firefox offered to install the plugin when I visited the page with the Java applet. I choose the “Sun Java 5.0” one, and that works fine. Or it would have if I had not managed to not accept the Sun license by accident (hm, I should try if I can get the internet banking working with a free Java runtime. Didn’t Sun release Java as GPL?).

So in the end I had to fix it up manually by removing the brokenly installed sun-java5-plugin package and re-installing the plugin through Firefox.

[And BTW, did anyone else notice that Java only works on the second attempt after the upgrade? Or is it just my imagination?]

Firefox text Zoom

I find that lots of web pages hardwire font sizes that are much too small for my 19 inch 1600-by-1200 monitor. What is wrong with these people, what makes them think that they know better than me the correct font size for me to read the text in?!? And if not, why do they override my font settings? Sheesh.

Anyway, due to this stupidity, I find myself using the CTRL-+ on the numeric keypad constantly to increase font size. But that was completely broken after the upgrade, it brought up the right-mouse context menu and/or sometimes did other wierd mouse-related stuff. Very strange.

A quick Googling turned up lots of discussion about the new Firefox 3 zooming all of the web page instead of just the text size as in Firefix 2, and people being unhappy about it. Well, looks like the version now in Ubuntu Hardy has a “zoom text only” option that appears to make it similar to Firefox 2. I enabled it, but mostly because the default of zooming everything seemed a tad slow. Maybe I will experiment with full page zoom later, as it appears potentially useful; in Firefox 2, text zoom would often mess up the layout badly

In any case, it turns out my original zoom problem was not related to the full vs. text-only zoom of Firefox 3. Instead it seems something else was grabbing the CTRL-+ keypress and doing stuff, so Firefox never got the event. I do not know what it is that grabs it, I guess the x.org X server or some Gnome thing (and it did not help that it seems to happen somewhat inconsistently). But it is clearly related to the numerical keypad keys being special in some way.

Now, the numerical keypad has been annoying me for ages. I do not use it much (except for the text zoom which always worked), but it was always stupid that by default it would do navigational keys instead of numbers. And hitting numlock on breaks my FVWM keyboard shortcuts (I use various Alt/Shift/Ctrl combinations with the F1-F12 keys to allow quick switching between all the programs/windows I use). And I never was quite sufficiently annoyed to go fix it.

So taking this as an opportunity to remove and ancient pain point, I finally got rid of all traces of numerical keypad cruft. I already have a custom xmodmap file I use to tweak the keyboard layout into what my fingers know by heart (don’t ask, this layout goes back to ancient Amiga keyboard layout times). So I added commands to kill the Num_Lock modifier and change all the other keys to produce the normal numbers, “plus”, “minus”, etc., not the KP_ variants.

So now Firefox zoom works, and the other small annoyances are gone as well. I’m happy!

Conclusion

So once again, the superior Debian (and now Ubuntu on top) upgrade handling shows its power. I use a heavily customised setup, so I had to redo some of that customization. And that does annoy me, but I should be fair: a new install would have taken me probably 10 times as long to customize from scratch. And it was good to learn of the new RandR stuff. So I should be happy I guess. The disappearance of FVWM does look like a bug that could be fixed though.

And by the way, a tip as reward for anyone who reads this far. I keep all my configuration file changes under revision control using RCS. This makes it really easy to merge my own customizations with any upstream changes during upgrades, not to mention undoing my own mystakes or remembering what I did before. And using RCS is really lightweight, it is literally just hitting CTRL-x v i before the first edit, and then CTRL-x CTRL-q after each change (yes, I am an Emacs guy since 1991 or so).

1 comment

  1. try out etckeeper

    Hi Kristian! I recently started using etckeeper to store all my config files under version control, it’s really nice.

Leave a Reply to (Anonymous) Cancel reply

Your email address will not be published. Required fields are marked *