Saturday, October 27, 2007

Alberta Advantage?

So, here in Alberta we've been having a debate about energy royalties. If you're not from around here, allow me to sum up the history of the argument:
  1. In the beginning, Alberta had no money. Then we discovered oil. And for a time it was good.

  2. Now Alberta has lots of money. So do the oil companies. We regularly post billion-dollar surpluses, they regularly post billion-dollar profits.

  3. Recently, there has been a feeling that oil companies are getting too much money for what, by rights, is a public resource. So, a panel was commissioned to review the issue, and found Alberta could up its' resource take by 2 billion. The industry protested. After reviewing the panels' recommendations, the government raised its' take by 1.4 billion. The industry continues to protest. Now times are less than good.

My take on the whole issue is that I can support raising energy royalties in principle IF that money is then reinvested in growing Alberta's economy in other sectors. As it currently stands, Alberta has one industry driving the economy: oil. I don't see anything wrong with expanding the number of industries propelling us forward out a bit.

But I don't support increasing royalties. Why? Because it's not going to be used for growing our economy. It'll go where most of the budget goes: to various peoples' pet causes. Someone will say "it's a crime that in a province as rich as Alberta we can't afford [more health care, better roads, more schools, whatever]" and the government will then fund it.

There's nothing wrong with any of those things I mentioned as pet causes, and these are things the government must address... but the economy comes first. And if the economy suffers, by taking money out of revenue-producing industries and placing it into things that do not produce revenue, then ultimately revenue will drop and we still won't have any funding. If jobs are lost, projects shut down, junior companies can't viably explore, the whole thing falls apart.

I really get the sense that people are thinking about this issue with their hearts not their heads. They look at executive compensation and say "that's not fair! I want some of that!" And so when they get the chance, they tell the government they want to put the thumbscrews to the oil industry. That's an emotional reaction, not a logical one.

Because logic would point out the thumb in the screws is the same one attached to the hand that feeds.

Wednesday, October 10, 2007

Diversity Downsides

So Mozilla has recently mentioned that system integration is a key goal for Firefox 3. Rather predictably, they don't talk about integrating with Linux at all, just OS X and Vista. Judging by the comments to the blog post, Linux users appear to be miffed about this.

Which is odd, since this is a hole the Linux community has dug themselves. Listen, I know that software diversity is a strength in many ways, but the fact is it comes with some downsides. Even whittled down to the major ones, Mozilla would still be looking at integrating into 5 or so distros, some of whom have 2 (or more) desktop environments for a user to choose from. Oh, and they're supposed to do this for a tiny fraction of the desktop market.

Bottom line? Saying that the Linux market can't justify the investment, and that in any event even if they did make a theme it couldn't possibly fit every Linux anyways is perfectly valid. And to act like they've somehow dropped the ball because they aren't willing to spend money to develop styles/themes for you to use for free makes the community sound a little spoiled, doesn't it?

Tuesday, October 9, 2007

Improve True Type Font Rendering on Feisty

As a student, I get assigned written reports with a fair amount of regularity. It's not uncommon, when going over the instructions, to read that the assignment must be X pages long, be double spaced, have 1-inch margins, and yes, use Times New Roman. Turns out that teachers are now wise to the formatting tricks we've been using to slip in under page counts, so formatting has been more-or-less standardized.

Long story short, even if I'm on Linux, I have to be using Microsofts' True Type fonts anyways. Given that, I suppose I may as well make them look pretty.

The first order of business is to install the fonts. From a terminal type:
sudo aptitude install msttcorefonts
Now, open up your apt sources list:
kdesu kwrite /etc/apt/sources.list
Ok, scroll to the end, add the following to the file and save:
deb feisty fonts
Now type:
wget -O- | sudo apt-key add -
Install the new rendering packages:
sudo aptitude update && sudo aptitude install libfreetype6 libcairo2 libxft2
sudo dpkg-reconfigure fontconfig-config
(When prompted choose Native, Always, No bitmapped fonts, in that order)
Finally, download the package from here:
and install it with:
sudo tar xvjpf fontconfig.tbz -C /etc/fonts/

Personally, I've enabled KDE's anti-aliasing settings (found under System Settings --> Appearances --> Fonts). They're using full subpixel hinting, but are excluding the range from 0.0 to 8.0. So far, that seems to make TrueType fonts look more or less as they do on Windows.

Saturday, October 6, 2007

Improve Ubuntu Boot time and Responsiveness

Whether or not these changes will have any effect depends largely on your specific hardware setup. Still, I doubt this would actually harm anything.

First, are you using a dual-core or other processor that supports hyperthreading (also called multithreading)? If so, open up /etc/init.d/rc:
kdesu kwrite /etc/init.d/rc
Now, find the line that says "CONCURRENCY" and make it read "CONCURRENCY=shell".

Secondly, do you have a lot of RAM? If so, you probably don't need your computer to touch your swap file much. Open up /etc/sysctl.conf:
kdesu kwrite /etc/sysctl.conf

Now, scroll to the bottom and add the line "vm.swappiness=0" to the file. Save, and exit.

Are you using broadband? Open up /etc/sysctl.conf again:
kdesu kwrite /etc/sysctl.conf
Now, scroll to the bottom and add the following to the file:
net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1
Save and exit. Type:
sudo sysctl -p
and you're done.

Finally, since you made a bunch of changes, it's best to reprofile your boot-up sequence. You can read more about it here. Basically the system reads all the files it needs to boot up, puts them in order, and saves the list so it can boot faster the next time. Here's how you do it:

  1. At the bootup menu (GRUB), select your default kernel. You may need to press ESC to see this menu.

  2. Press e for edit.

  3. Choose the first line (it should start with "kernel"). Press e again.

  4. Move to the end of the line, then add the word profile. Press enter.

  5. Press b to boot.

  6. Let the system boot to the login screen, and wait for all disk activity to stop

  7. Reboot your system, and enjoy the results

It's a good idea to reprofile:
  • After you install Ubuntu and get the system set up the way you like,
    After doing a major upgrade, such as to the next version of Ubuntu. No need to do it for regular updates, etc.

  • After setting up prelink (if you use it), since that could cause bootup files to change locations on your hard drive

  • After restoring your entire system from backups, as that would change locations of files on your hard drive.

Friday, October 5, 2007

openSUSE 10.3 -- First Impressions

I'm something of a distro junkie, so VirtualBox is a lifesaver. It allows me to test out the latest and greatest, all the while keeping with my trusty Feisty Fawn install. Currently this means that I'm exploring the latest offering from the openSUSE project, version 10.3.

The last time I used SuSE regularly was when SuSE 10.0 was brand spankin' new. At the time, I was new to Linux, and the two distros everyone mentioned as good for newbies like me were openSuSE and Ubuntu -- the latter of which, for those keeping score at home, was version 5.04 (Breezy). At the time, getting wireless in Linux nothing short of a herculean task. Even after getting ndiswrapper under my belt, I to this day have no idea how I got my WPA wireless network working in Breezy. As I didn't know what I'd done, or how to switch networks, I tried openSuSE, which had better configuration tools.

Cut to today, and SuSE still has better configuration tools, although Ubuntu has closed the gap considerably. However, I've stuck to Ubuntu for the following reasons:

  • Better software installation. Installing software in SuSE never consistently worked for me.

  • Huge installs. You had to download 5 installation disks, and SuSE came with tons of software I never used. Sure, you could prune it during install, but that was a pain and initially I didn't know what to cut.

  • SuSE was slow! The main culprits here were the bootup time and YaST, the main configuration tool. I liked YaST in principle, since it was convenient for managing the system, but it took ages to boot up.

  • Third-party repositories. Increasingly, I found that while just about everyone provides an Ubuntu-compatible download, not everyone has a SuSE version. Again, getting software was harder in SuSE

Well, with version 10.3, I think it's safe to say that SuSE has begun to address these concerns. The improved SuSE experience begins with the download: you can either download a CD with Gnome or a CD with KDE or a DVD that includes both. I've even heard that an installable live CD a la Ubuntu will be released soon.

Installing openSuSE has always been a) easy and b) long and in 10.3 things are no different. It took about 45 minutes to install to my virtual hard disk using 512 MB of RAM for the guest operating system. By comparison, Ubuntu installs in about half that time. However, SuSE does ask you whether or not you'd like to install Adobe Flash, Sun Java and other non-oss software, allowing for an experience that 'just works' out of the box -- assuming that is, you have access to the non-oss repositories, either through the internet or the downloadable extra CD. SuSE also legally plays mp3 files out of the box -- something that has been a long time in coming for most Linux distributions.

SuSE has always been a beautiful distro, and that's still true in 10.3. Although personally I preferred the blue-themed SuSE of yore, the new green theme is distinctive, professional and smooth from the boot screen right until you hit your desktop. You'll also be hitting that desktop sooner, as openSuSE has improved it's boot times. Though it still lags behind the time it takes Windows to boot (even windows running in a VM), SuSE boots in more or less the same time it takes Ubuntu to do so.

Installing software has improved a ton. I really can't emphasize enough how much. Firstly, YaST is faster, though still a little on the slow side. It also has an annoying habit of scanning repositories rather than caching them, but that behavior can be changed from the default. So far, everything I've installed from SuSE has worked great, which is more than I could say the last time I used it. I haven't tried it, but SuSE's one-click install also holds a lot of promise. Installing Compiz Fusion all in a single click would be nothing short of amazing.

The default applications that come with SuSE have been slimed down, which makes it much easier to find things. Amarok, K3B, OpenOffice, Gwenview... all the 'best in class' applications you've come to expect out of a basic linux install are there. I still wish the kickoff menu was more like the SLAB found in Gnome, as it takes up way too much screen real estate... but it's still a step in the right direction.

So, am I going to install SuSE on my real computer right away? Nope. If your current distro is working for you, and Feisty is for me, I really see no reason to change. However, next time I upgrade, I will be sorely tempted to choose SuSE. The professional look, centralized configuration tools and increased ease of use are all strong arguments in it's favor. For me, the only unanswered question about SuSE is one of third-party support: for example, how hard will it be to get Avant Window Navigator installed? With Ubuntu I can more or less expect a .deb, but not so with SuSE. There again, by the time I'm ready to upgrade maybe I could more or less expect an rpm: if SuSE continues to build on the improvements they've made, the distro will be a strong contender against Ubuntu in the Linux desktop market.