Category Archives: Linux

Xubuntu 11.10 on Novatech B940 NNB-888 laptop

This was for a client who only needs the basics — email, typing, web browsing — and doesn't have time to adapt to a trendy new GUI.

So I installed Xubuntu 11.10 (I like XFCE).

And it all just worked out of the box — wifi, webcam, sound etc.

Except for sleep and hibernation.  I tried all sorts of fixes and troubleshooting, but nothing worked.  The screen goes blank, but it doesn't turn off.  After being forced off, it resumes as though sleep or hibernation had worked.  Couldn't solve it, so I just changed the settings to never try to sleep or hibernate.

Updating from Ubuntu 9.04 to Xubuntu 11.10

I was working on a client's laptop, on which I'd installed Ubuntu 9.04 a few years ago and it hadn't been updated since then.

I wanted to bring it up to date, and knew that the client wouldn't want the look-and-feel of it to change radically, so to avoid Unity and Gnome 3, I decided to install Xubuntu 11.10.

I backed everything up, expecting to do a clean install of the new system.  But the Xubuntu installer offered to upgrade directly from 9.04, so I tried it, and it worked! 

The only minor glitch was that Thunderbird didn't find the old profile.  I had to rename ~/.mozilla-thunderbird to ~/.thunderbird, and then that worked too.

AppConfig and @ARGV

I've been playing with the Perl AppConfig module (http://search.cpan.org/~abw/AppConfig-1.66/lib/AppConfig.pm)

It seems that the getopt() method messes up the global @ARGV array even if I pass it a copy.

For example:
 


#!/usr/bin/perl
use strict;
use warnings;
use AppConfig;
my $opts = AppConfig->new( { CASE   => 0, } );
$opts->define('config=s', {DEFAULT => ''});
print "ARGV: @ARGVn";
my $argvCopy = [@ARGV];
print "argvCopy: @$argvCopyn";
$opts->args($argvCopy);
print "after args() ARGV: @ARGVn";
$opts->getopt(qw(auto_abbrev), $argvCopy);
print "after getopt() ARGV: @ARGVn";


produces this output


# appconfig-error.pl --config xyz 123 abc
ARGV: --config xyz 123 abc
argvCopy: --config xyz 123 abc
after args() ARGV: --config xyz 123 abc     # @ARGV is still complete
after getopt() ARGV: 123 abc                # @ARGV has bits missing


This is a problem because I need to call getopt() twice — once to get at the –config option, then I read the configuration file with the file() method, then I re-read the command line options so that they override the ones in the configuration file.

Using args() is OK — @ARGV is preserved — but I need the extra feature of getopt().

I've emailed the author, so I'll wait to see what his reply is.