You are viewing richdawe

richdawe's Journal
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 20 most recent journal entries recorded in richdawe's LiveJournal:

    [ << Previous 20 ]
    Monday, August 30th, 2010
    10:45 am
    More problems with Ubuntu 10.04 on Samsung N510

    My main laptop's hard disk died at the weekend, so I started migrating all my data to my Samsung N510 netbook (thank goodness for backups). Unfortunately, I hit this Ubuntu 10.04 bug, which meant my netbook was crashing sporadically when I ran lots of programs -- firefox and thunderbird simultaneously:

    Bug #539482: Page allocation failures on Dell E5500

    I tried installing mainline 2.6.34 kernel builds, as described by the Ubuntu Wiki Kernel/MainlineBuilds page. The 2.6.34 kernel seemed to hang the netbook hard.

    Instead, I decided to try a backport of the Ubuntu Maverick kernel, as mentioned on Ubuntu Updates Lucid kernel page. I installed the following:

    sudo add-apt-repository ppa:kernel-ppa/ppa
    sudo aptitude update
    sudo aptitude install linux-image-generic-lts-backport-maverick linux-headers-generic-lts-backport-maverick

    The current backport kernel is 2.6.35-19-generic.

    The boot process appeared to hang, so I disabled the boot splash screen, by editing /etc/default/grub:

    #GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX_DEFAULT=""

    and then ran sudo update-grub.

    I also had to build the module for the wireless chipset -- Realtek 8192 PCI wireless -- because the built-in wireless driver in 2.6.35 does not appear to work with my WPA-enabled access point. That is a story for another blog post... In the meantime, I have seen reports that switching the access point from WPA+WPA2 to just WPA mode helps.



    Current Mood: contemplative
    Wednesday, May 19th, 2010
    8:26 am
    Upgrading to Ubuntu Netbook Remix 10.04 - no title bar or window decorations
    I upgraded from UNR 9.04 to 10.04 the other day, and found that the window decorations such as the title bar and close/maximize/minimize had disappeared from all windows (even in "GNOME" log-in sessions).

    My particular problem seemed to be caused by saved GNOME session state. I've attached a suggested resolution to Launchpad bug #576696.
    Friday, February 5th, 2010
    11:45 am
    Slow scrolling in Firefox on Fedora 12 - workaround
    After upgrading to Fedora 12, I found that scrolling in Firefox was painfully slow. I'm using the Nouveau driver with a Geforce Go 5700 chip in my old 3.2 GHz Athlon64 laptop. Scrolling seemed to peg the CPU usage at 100% and render the computer unusable for the duration of the (very slow) scrolling.

    Disabling "smooth scrolling" in the general section of the preferences seems to have fixed this.
    Tuesday, June 9th, 2009
    11:33 am
    Mac OS X firewall vs. DHCP

    I've been having some issues with Mac OS X not being able to configure itself with DHCP. It looks like the firewall was blocking DHCP responses. Quick solution was to turn off the firewall. Longer-term solution may be that I need to reinstall configd and mDNSResponder from the latest Mac OS X update, so that they are signed correctly, so that the firewall trusts them again.



    Current Mood: annoyed
    Tuesday, May 19th, 2009
    10:32 pm
    Looking for a contractor for Professional Services

    I work in the Professional Services team at Message Systems, where I have fun designing and developing custom integrations of our e-mail software platform to fulfil the needs and requirements of various clients.

    We're looking for someone for a six-month contract in the Bristol area:

    From the full job specification:

    The Message Systems engineering team is looking for a highly motivated Professional Services Engineer to help build custom solutions on top of our best-of-breed messaging platform. You will work closely with our internationally-renowned engineering team to deliver solutions to our customers.

    The projects range from carrier-class deployments to support millions of messages per day to mass-market enterprise appliances used by Fortune 500 companies.

    Please see the full job specification for details of how to apply.



    Current Mood: working
    Tuesday, March 17th, 2009
    12:15 pm
    Macbook Pro overheating

    It appears reinstalling Mac OS X Leopard has done something to the default fan settings on my work MBP. I've had problems today with the GPU overheating (triggered by several minutes of Spotlight indexing things). I've installed smcFanControl2 and cranked the default fan speed up to 3,000 rpm. This seems to be keeping the GPU temperature under control.



    Current Mood: relieved
    Saturday, March 14th, 2009
    2:11 pm
    FileVault ate my home directory

    Yesterday I upgraded my work Macbook Pro from OS X Tiger 10.4 to Leopad 10.5.6. It was not an entirely smooth experience. After upgrading to Leopard, it all appeared to work fine -- everything seemd intact. I ran the software updates tool, and it downloaded some updates. I needed to reboot.

    I use FileVault to encrypt my home directory, to protect all the confidential data on it. When you reboot/shutdown the laptop under OS X 10.4 Tiger, it asks you whether you want it to free up space occupied by deleted files within the encrypted image. You can "Skip" or "Continue".

    After installing the updates and rebooting, I elected to "Skip". When the laptop came back up, I could not log in to my account. I rebooted with the OS X 10.5 Leopard install DVD (hint: press Apple-C at start-up to boot off DVD), ran Disk Utility and tried to repair the encrypted .sparseimage in my home directory. No luck.

    I ended up re-installing OS X 10.5 Leopard from scratch. Fortunately I had a backup on my Linux box (encrypted with encfs).

    Couple of lessons learnt:

    1. Set up an administrator account that does not use FileVault. All the help articles I've seen assume that you can actually log into your Mac under an admin account and run Disk Utility. I wasn't able to because my account was the only administrator account.

    2. Don't use the "Skip" option with FileVault. NB: It appears they removed it in OS X 10.5 Leopard.



    Current Mood: chipper
    Saturday, March 7th, 2009
    10:39 am
    File::ExtAttr 1.09

    AKA the "reduce the CPAN Testers FAIL results" release.

    I also fixed a minor bug on Solaris, and documented a difference in the handling of empty attribute values on Mac OS X 10.4 vs. 10.5. See File::ExtAttr on CPAN soon.

    Changelog:

    1.09 2009-03-07
    
        - (richdawe) Add note to README about needing to install
                     package that provides the headers <attr/attributes.h>
                     and <attr/xattr.h>.
    
        - (richdawe) Fix RT #31970: "OS X: setfattr fails to set empty value".
                     According to the CPAN Testers results, this works
                     on Mac OS X 10.5.
    
                     Skip the "empty" tests on Mac OS X 10.4 and earlier.
                     Document issue.
    
        - (richdawe) Fix #34394: "Test suite should skip on filesystems
                     with no xattr support when run non-interactively"
                     on Linux.
    
                     When run interactively, it will suggest what you need
                     to do, to get the test suite to pass.
    
        - (richdawe) Fix RT #37889: "Crash when operating on a closed file handle
                     on Solaris". This was due to using an uninitialised
                     directory handle.
    

    Tuesday, March 3rd, 2009
    8:35 am
    Fedora 9 vs. VMware-server 1.0.8

    VMware-server 1.0.8 seems to barf on the GTK+ theme files shipped with Fedora 9. I'm using Clearlooks. You can force VMware-server to use the system GTK+ libraries:

    export VMWARE_USE_SHIPPED_GTK=no
    vmware &

    On my F9 x86_64 install, I needed to install a few i386 packages first, before VMware start. VMware-server is an i386 program, so you need these i386 packages to be installed for it to be able to use the system GTK+ libraries:

    yum -y install glib2.i386 gtk2.i386



    Current Mood: annoyed
    Wednesday, February 18th, 2009
    11:13 am
    Linksys wireless gear vs. Xbox 360

    I've been trying recently to connect a wired LAN printer and my Xbox 360 to the wireless LAN in our house. This proved trickier than I expected.

    First off I wanted to connect my old Linksys WRT54GS v2 wireless access point to the existing wireless network, so that I could hook my printer up to it. The wireless network is using WPA-PSK authentication. I reflash the WRT54GS with OpenWrt, version 8.09 RC1. I didn't find OpenWrt very friendly, but I managed to get it to join the wireless network. Unfortunately there seemed to be some problem with bridging -- the wired and wireless networks were not connected.

    Eventually I gave up and switched to DD-WRT, which worked much better. I set it up into Client Bridged mode, and it just worked.

    The next task was to connect my Xbox 360 to the wireless network. I bought the wireless adapter, but I found it would not connect to my wireless router, a Linksys WAG325N. Apparently this is a known issue. The recommended fix is to downgrade to version 1.00.06 of the firmware, which unfortunately did not work for me. I upgraded the router to the latest firmware, v1.00.12, and made sure my Xbox had the latest updates. Still no joy.

    I read reports that the Xbox 360 worked fine with the WRT54GS, so I wondered if I could create a second wireless network just for my Xbox. Fortunately I discovered that DD-WRT has a repeater mode and a repeater bridge mode. In repeater bridge mode, you create a virtual wireless network with a new SSID, and then traffic is bridged between the real wireless network and your new "virtual" wireless network. The virtual wireless network is a real wireless network to all intents and purposes.

    After some poking around the DD-WRT GUI, I had it all configured and it works! (Note: I skipped the nvram set wl_ssid="" step -- you don't need that for Repeater Bridged mode.) The path for traffic from my Xbox to the internet is now something like this:

    Xbox <--> WLAN 2 <--> WRT54GS Access-Point <--> WLAN 1 <--> WAG325N router <--> internet

    DD-WRT is pretty sweet. I've only scratched the surface of its features.



    Current Mood: tired
    Saturday, January 31st, 2009
    6:02 pm
    Thanks to Linux desktop developers

    I've just caught up with 2 years' worth of Linux desktop developments (NetworkManager works, user switching, built-in volume controls working on my laptop). I like. Thanks for all the hard work, Linux desktop developers!

    PS: Turning on "subpixel aliasing" has made text much more readable.



    Current Mood: chipper
    Friday, January 9th, 2009
    7:17 pm
    Occasional lock-ups due to Parallels & FileVault?

    I've been running a Windows VM under Parallels on my work Mac. I have my home directory encrypted using FileVault. I've had ~5 lock-ups in the past 6 months where my Mac has just locked hard. It always seems to happen when I'm using a Windows VM. I've allocated 768 MB of RAM to the Windows VM. The Mac has 2 GB of physical RAM. The disk image is pre-allocated, to avoid performance problems with it being resized on the encrypted volume.

    I've wondered if the box has locked up because FileVault cannot allocate memory for some reason. This doesn't seem to happen in normal usage. Maybe the Windows VM is pushing memory usage over the edge.

    Today I've switched to hosting the Windows VM disk outside the encrypted partition, and using NTFS encryption for the data I need to protect. Hopefully that will work better.



    Current Mood: working
    Wednesday, December 31st, 2008
    2:10 pm
    Interesting essay on "Misunderstandings of Privacy"
    I found the article "'I've Got Nothing to Hide' and Other Misunderstandings of Privacy " by Daniel J. Solove interesting. Specifically how he tried to categorise privacy into different categories based on the kinds of problems encountered, and his discussions on privacy and the relationships between individuals and society.

    Current Mood: contemplative
    Monday, November 10th, 2008
    8:04 pm
    3 mobile broadband on Mac

    I got some mobile broadband from 3 to cope with a two-week gap in my wired broadband provision. I had some pain getting it to work on my work Macbook Pro (which is a US one) running Mac OS X Tiger (10.4.x).

    The software gave me an obscure error -- "internal error 5370" or similar -- when running the 3 Connection Manager software. According to a techie in the 3 store I went to, I needed to download the latest drivers from the 3 website. That was pretty hard to find. It turned out to be on the support page for the Huawei E160G on Mac OS X 10.4. (I don't recall how I found that page.)

    I uninstalled the old software, deleted the "3Connect" folder from applications, installed the new software and fired up the "MobileConnect" application. That detected the 3 network, but crashed when I tried to connect. This thread on the Huawei forum suggested that I could create a profile in the Network panel of the computer settings:

    Firstly, run the “Mobile Connect” Make sure under “settings” there is a profile: I called mine “3 USB Modem”, with Access Point name of 3internet and Telephone number of *99#. You only need to do this once.

    Secondly, go into System Preferences. In the Network pane, select the HUAWEI mobile device in the left pane. Now, in the right pane, under Configuration, select “Add Configuration”. I caled mine “Three”. Add *99# as the telephone number, make sure “Show modem status in menu bar” is ticked (for convenience) and you’re all set.

    I had to enable a profile called "HuaweiMOBILE" first. Once I edited that as instructed above, I found that the MobileConnect application could connect.

    Actually, it failed to connect the first time due to some authentication error. But it's worked every time since. Perhaps the auth error was a signal strength issue.



    Current Mood: calm
    Friday, October 3rd, 2008
    9:39 am
    Knowing what rpms you've just built

    One idiom I've found myself repeating in various projects is a build-all script that builds multiple rpm packages in a certain order. This isn't very sophisticated -- each time I've ordered the packages being built manually.

    But how do you know what rpms you will get, when you run rpmbuild? You need to know this, so you can install the rpms. Here is a solution:

    specfile=project.spec
    
    RPMDIR=$(rpm --eval '%{_rpmdir}')
    
    # What format does rpm use for built binary rpms?
    # %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm
    BUILD_NAME_FMT=`rpm --eval '%{_build_name_fmt}'`
    
    rpms=$(rpm -q --specfile $specfile --queryformat "$BUILD_NAME_FMT ")
    
    pushd $RPMDIR
    rpm -ivh $rpms
    popd
    

    This works as follows: get the rpm root directory into $RPMDIR; find the format rpmbuild uses for built binary rpms; query the rpm specfile for packages and format the results using the build rpm filename format; finally, go into the rpm root and install all the binary rpms.



    Current Mood: chipper
    Saturday, July 19th, 2008
    12:16 pm
    File::ExtAttr 1.08, (Open)Solaris and 2 xattr schemes

    I released File::ExtAttr 1.08, which has some changes to make it report errors more consistently ($! should always contain the value of errno now). It also has some build changes, which will hopefully avoid all the CPAN Testers FAIL reports on platforms that don't have the development packages installed for using xattrs (libattr-devel rpm on Linux).

    I development this release on various platforms, but the most exciting one was OpenSolaris 2008.05 (AKA Project Indiana). This is so much easier to install and use than Solaris 10. It's much more like using a Linux distro. The OpenSolaris LiveCD is very easy to install, and things just seem to work. It took about 6 steps to get a fully functional development environment for File::ExtAttr.

    While developing 1.08 on OpenSolaris, I discovered that it has two separate ways of storing extended metadata: extended file attributes, and extensible system attributes. The extensible system attributes were added as part of supporting CIFS on ZFS. It's still unclear to me why the existing metadata scheme wasn't good enough -- maybe the semantics of the original xattr interface weren't compatible with the use cases?

    (The original xattr scheme is that you open the file as though it were a directory, and then the xattrs can be accessed through directory entries. This is clever, but different to the way Linux, *BSD and Mac OS X implement xattrs.)

    I'm now not sure which xattr API I should be exposing through File::ExtAttr. I guess it comes down to which one will be more portable across platforms. I think that will be determined by which xattrs are preserved by tar, etc.

    Anyow, here's the change log for File::ExtAttr 1.08:

    1.08 2008-08-19
    
         - (richdawe) Add a typemap for usage of "const char *" in the XS.
                      This may help fix the build with Perl 5.6.x or earlier.
    
         - (richdawe) Remove NetBSD 3.x from list of supported OSes,
                      since File::ExtAttr's test suite will never pass on it.
    
         - (richdawe) Update Makefile.PL to fail more gracefully when the build
                      pre-requisites are not present. On Linux use
                      Devel::CheckLib to check for libattr. Also exit
                      more gracefully if libattr's headers are not present.
    
         - (richdawe) OpenBSD isn't supported, so bail gracefully
                      in Makefile.PL on that platform.
    
         - (richdawe) Make sure that the errno value from any failed
                      system calls is propagated into $! (#32679, #32680).
    
         - (richdawe) File::ExtAttr no longer generate noisy warnings
                      when an xattr system call fails. All error reporting
                      is now via the function return values and $!.
    
         - (richdawe) Operations with non-default or non-"user" namespaces
                      will now fail with EOPNOTSUPP instead of ENOATTR
                      on Mac OS X, *BSD and Solaris. This behaviour
                      matches the behaviour on Linux.
    
         - (richdawe) Added a note to the documentation about Solaris
                      extensible system attributes, which are different
                      to extended file attributes.



    Current Mood: tired
    Wednesday, March 19th, 2008
    10:13 pm
    rpm: Filtering dependencies differently for different subpackages

    Recently I was trying to work out how to filter rpm Requires/Provides dependencies differently for different subpackages. I was trying to produce a subpackage that was the same as another subpackage, but stripping out some library dependencies. Call the one subpackage foo and the other foo-nodeps. (Don't ask why I was trying to do this.)

    rpm has a way of hooking the dependency generation, as described in FilteringAutomaticDependencies at the Fedora wiki. This is pretty magical. You disable rpm's internal dependency generation. You can then override the default external dependency generation scripts (if you want). Normally rpm uses find-requires and find-provides in /usr/lib/rpm, or /usr/lib/rpm/redhat on some Red Hat or Red Hat-derived systems. If you do override the scripts, it's likely you'll want to call them and filter their output.

    When you define your own dependency generation scripts, they are applied to all subpackages. There is no information passed to the script to indicate which package/subpackage it is being call for. You can pass arbitrary parameters to your custom find-requires/find-provides scripts. But there are no macros that you can use to pass that in as a parameter (%name is always the main package's name -- there's no %subpackage macro AFACIS).

    A solution was to pass that information in via the filesystem. In the %install script I'd create a file per package. Something like this:

    mkdir -p %{buildroot}/NOTINSTALLED
    touch %{buildroot}/NOTINSTALLED/foo.ghost
    touch %{buildroot}/NOTINSTALLED/foo-nodeps.ghost

    Then in each package's file list I'd put the appropriate file:

    %files
    ...
    %ghost /NOTINSTALLED/foo.ghost
    
    %files nodeps
    ...
    %ghost /NOTINSTALLED/foo-nodeps.ghost

    The %ghost ensures that the file isn't installed, but is still passed to the find-requires/find-provides scripts. A custom find-requires script can then find out which subpackage it's being called for. Something like this:

    cat > .files
    if (grep -q -E '^/NOTINSTALLED/foo-nodeps.ghost$' 2>/dev/null); then
      # Filter out dependencies on libfoo
      /usr/lib/rpm/find-requires | grep -v -E '^libfoo.so'
    else
      /usr/lib/rpm/find-requires
    fi



    Current Mood: calm
    Saturday, January 12th, 2008
    8:40 am
    FileVault
    I enabled FileVault home directory encryption on my work Macbook Pro the other day, which is running Mac OS X Tiger (10.4). I was a little bit hesitant about doing this, because of various horror stories about it not working, or performance being terrible. I made sure I had a proper backup, before starting the process.

    The 160 GB hard disk was about 40% full before I started. It took 1.5 hours to encrypt my 41 GB home directory, followed by 3.5 hours to securely erase the old unencrypted version.

    The performance afterwards seems to be generally the same before. The only exception I've hit so far is with Parallels resizing an expanding disk in a virtual machine, and there the performance is terrible. This makes some kind of sense: There are two disk images being expanded, the Parallels VM disk inside the encrypted home directory, and then the encrypted disk image containing the home directory. Pre-allocating the disk image for the VM helps, because it means no resizing is required at run-time.

    Some of my preferences seem to have been lost. I had to make Firefox my default browser again. And I had a hot corner to turn on the sceensaver, which mysteriously stopped working -- I fixed that by setting a different corner to do "show desktop", after which the screensaver hot corner worked again (strange).

    Current Mood: chipper
    Sunday, November 11th, 2007
    9:35 pm
    Recycling Compact Flourescent Lightbulbs (CFLs)

    I read in Scientific American that Compact Flourescent Lightbulbs (CFLs) contain mercury, and some US stores/states have recylcing programmes at stores or kiosks. I didn't realise they contained mercury, and probably would have just thrown them in the bin with my other rubbish. Links:

    Compact Fluorescent Light Bulbs at energystar.gov
    Compact fluorescent lamp at Wikipedia
    Toxic Mercury In CFL Bulbs
    lamprecycle.org (not much use here in the UK)

    I had a look to see what's on offer in the UK. The "Recycle Now" website doesn't seem to contain any information about how to recycle CFLs. Greenpeace has an article about CFLs, which suggests I should be able to take them back to the retailer. Do I have to prove that I bought the bulb from the retailer in the first place?

    Sunday, November 4th, 2007
    10:34 am
    File::ExtAttr 1.06, mab2ldif

    I released File::ExtAttr 1.06 to fix building on Mac OS X. File::ExtAttr provides an interface to extended file attributes (meta-data) that's consistent across Linux, Mac OS X, *BSD, Solaris.

    I also released mab2ldif, which takes a Mork-format address book (e.g.: as used by Thunderbird) and converts it into an LDIF file. You can import the LDIF file into Thunderbird. I wrote this to recover my old Thunderbird address book from an old computer that died. You can actually export the address book from Thunderbird into LDIF, but if Thunderbird won't run, you'll need this tool to get your data back.



    Current Mood: productive
[ << Previous 20 ]
About LiveJournal.com