Linux and Open Source

About Linux and Open Source

So my 10GB Windows XP VM (that'll be big enough!) ... wasn't big enough.

After some googling and some help from a friend, here's how I enlarged my image.

1. Shut down the VM.

2. From a terminal, run the following:

VBoxManage modifyhd /path/to/diskimagefile.vdi --resize SIZE-IN-MB

3. Then install 'qemu-kvm' package:

$ sudo apt-get install qemu-kvm

4. Load the network-block-device kernel module:

$ sudo modprobe nbd

5. Load the VDI file as a network block device using qemu-nbd:

$ sudo qemu-nbd -c /dev/nbd0 /path/to/diskimagefile.vdi

6. Use your favourite partitioning tool (i like gparted) to open the disk:

$ sudo gparted /dev/nbd0

Adjust your active partition size (you will see the original disk size, and available space up to the new size you set (as SIZE-IN-MB above). Commit your change. Bobs your Uncle.

So today, in amongst other bits and pieces, I set about trying to figure out why my old Ubuntu 10.04 Desktop - now connected to the TV in my livingroom - was constantly failing to play DVDs. In one case the title would load up, but none of the chapters would play.

Googling the errors that came up (oh thanks VLC for the constant references to 'fake' error messages), I finally found a useful hit on the Ubuntu Forums.

The bottom line was indeed that I needed libdvdcss2 - this is after I installed 'ubuntu-restricted-extras' to ensure I had all the codecs I needed. Of course, throwing that into apt-get install gives you this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libdvdcss2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libdvdcss2 has no installation candidate

The above link describes how to install it (on my Ubuntu 10.04 LTS installation.. which is definately not Medibuntu):

$ sudo /usr/share/doc/libdvdread4/install-css.sh

And just like that, it worked.

Not sure why Xubuntu didn't take a leaf from Ubuntu and make Vino a better integrated tool.. however you can install it, and you can configure it, and use it.
I used instructions from Ehow but the gist is:

# apt-get install vino

followed by

# vino-preferences

followed by creating a new auto-startup entry for

# /usr/lib/vino/vino-server

So knowing that my Ubuntu 10.10 was about to go out of support, I took the plunge and made two calls:

1) Ubuntu's move to Unity was not to my liking, and

2) I'd like to move to the new LTS; 12.04.

So I went to Xubuntu; the Xfce based Ubuntu variant.

Unfortunately, as it's only March 2012, 12.04 is only just into Beta stage. So my installation is Xubuntu 12.04b1 64bit.

First impressions? I like it. However there's been a few odds and sods i've had to deal to manually, and eventually i'll tie them into this blog article.

Browsers
I operate with Firefox as my main browser, and Chrome/Chromium as my second browser, used for mainly work-related things or where i'm testing for browser incompatibilities. Unfortunately Chromium doesn't seem to play well with other browsers, and where Firefox is otherwise configured as the default, this isn't necessarily true...

Anycase this was my fix to make Firefox take all the stuff that Chromium was stealing, in this case links presented via Pidgin IM:

root@hawkeye:/etc/alternatives# rm gnome-www-browser 
root@hawkeye:/etc/alternatives# rm x-www-browser 
root@hawkeye:/etc/alternatives# ln -s /usr/bin/firefox gnome-www-browser
root@hawkeye:/etc/alternatives# ln -s /usr/bin/firefox x-www-browser

More coming soon as I work through the kinks. On the whole i'm pretty damn happy with it so far, including the fact that it's able to run Gnome apps.

Running two browsers for a variety of reasons (Firefox, primary, Chrome or Chromium, secondary) on all my platforms meant I kept the habit up when I started using Linux more frequently.
My main machine (both work and home) is now Ubuntu 10.10 (likely to be upgraded further soon when 10.10 goes out of support) and though i'm also fiddling with Linux Mint, i'm not using it fulltime yet... (but I digress).

Recently I've noticed somewhat annoying behavior where having received an email with embedded links into Thunderbird, clicking on supplied links would variously use either Firefox or Chromium without apparent pattern.

Eventually I worked out that http:// links were opening in Firefox and https:// links were opening in Chromium.

In frustration (as everywhere I could see, 'default browser' was set as Firefox) I posted to NZLUG and a very helpful post this afternoon revealed the winner:

Use gconf-editor and check the following:
  /desktop/gnome/url-handlers/http/
  /desktop/gnome/url-handlers/https/

Whaddiyaknow... default http handler was indeed 'firefox %s' and default https handler was 'sensible-browser %s'.

Running sensible-browser called Chromium. (what a conceited name to use!)

Changing it to Firefox appears to have put things back where I'd expect them to be; Firefox is my default, and Chromium has particular uses.

The relative obscurity of some of these fixes is occasionally somewhat frustrating, so i'm publishing this in the hope it'll benefit others. I've also put it up on Ubuntuforums.org attached to another post with similar symptoms, albeit a different fix.

BlakJak.net has been dark yesterday and most of today in protest of the U.S. Stop Online Piracy Act (SOPA) and PROTECT-IP Act (PIPA). The U.S. Congress is about to censor the Internet, even though the vast majority of Americans are opposed, and a significant amount of the Internet sits outside of US Jurisdiction. I've darkened my website in support of those attempting to kill off attempts to pass laws that breach our our global rights to free speech, privacy, and prosperity. Learn more at AmericanCensorship.org (for the American Viewpoint) or for a New Zealand take on things, check out Vikram Kumar's Blog and recent guest post to the National Business Review (Similar content, but with some very interesting responses). Vikram is Chief Executive of InternetNZ, the non-profit organisation dedicated to protecting and promoting the Internet in New Zealand. Among other things he notes that domain names within .com/net/org - like my one - would also be forfeit.

There's plenty of good media out there explaining why SOPA and it's ilk are BAD.
I'll link you these:


(November 2011)
and

(Yesterday).

One hopes that the amount of mainstream attention this is getting, will cause lawmakers to wake up.
In a wider sense it's disturbing how often 'blackout' responses are becoming relevant. Almost like lawmakers don't like to listen to their electorate, or to experts, when suggesting law changes. Sigh.

A headusp that due to what I can only describe as a clerical error, the virtual machine that hosted linux.net.nz has been deleted in the last few days.

I've temporarily set up a Listserv on the NZOSS infrastructure (which I host) to keep folks in the loop. All the people whos email addresses I had in my inbox associated with NZLUG and Auckland LUG have been subscribed. Others are welcome. Details are here. I will update this page as I hear further.

Update: Dylan Reeve, who owns/co-ran the linux.net.nz hosting server, has explained what went on in a blog post of his own. :( Until Nic returns from his holiday we're not sure where the various LUG's stands, except that Nic does think he has backups of all important data (notably the list membership database and mail archive for the list) as of a few months ago. So the data loss may not be huge in that front.

Can't speak for the website however....

More as I hear.

I installed OpenShot yesterday and published my first Youtube vid edited with it: And i've embedded it here just coz it involves cats, and we all love cats... right?

Later on I observed that VLC was no longer installed on my machine.
I also observed I had some videos that wouldn't play anymore (in totem) due to missing Codecs.

I was prompted to check my apt/history.log file after someone on Facebook doubted the correlation... I suppose I should stop openly blaming things without checking... so glad I looked:

Here's an extract:

Start-Date: 2011-12-27 19:36:05
Commandline: apt-get install openshot
Install: melt:amd64 (0.5.6+git20100727-1, automatic), libavformat-extra-52:amd64 (0.6-2ubuntu3.2, automatic), openshot:amd64 (1.2.2-1), libatlas3gf-base:amd64 (3.8.3-22ubuntu2, automatic), libmlt++3:amd64 (0.5.6+git20100727-1, automatic), libsox-fmt-base:amd64 (14.3.1-1build1, automatic), libquicktime1:amd64 (1.1.5-1, automatic), python-mlt2:amd64 (0.5.6+git20100727-1, automatic), libsox-fmt-alsa:amd64 (14.3.1-1build1, automatic), libavutil-extra-50:amd64 (0.6-2ubuntu3.2, automatic), libcvaux2.1:amd64 (2.1.0-2, automatic), libavdevice52:amd64 (0.6-2ubuntu6.2, automatic), libpostproc-extra-51:amd64 (0.6-2ubuntu3.2, automatic), libmp3lame0:amd64 (3.98.4-0ubuntu1, automatic), openshot-doc:amd64 (1.2.2-1, automatic), libhighgui2.1:amd64 (2.1.0-2, automatic), libswscale-extra-0:amd64 (0.6-2ubuntu3.2, automatic), libgavl1:amd64 (1.1.2-3, automatic), frei0r-plugins:amd64 (1.1.22git20091109-1.1, automatic), libqt4-svg:amd64 (4.7.0-0ubuntu4.4, automatic), libcv2.1:amd64 (2.1.0-2, automatic), libxvidcore4:amd64 (1.2.2+debian-1ubuntu2, automatic), libgfortran3:amd64 (4.5.1-7ubuntu2, automatic), librtmp0:amd64 (2.3-2, automatic), libsox1b:amd64 (14.3.1-1build1, automatic), libmlt-data:amd64 (0.5.6+git20100727-1, automatic), libopenjpeg2:amd64 (1.3+dfsg-4, automatic), libmlt2:amd64 (0.5.6+git20100727-1, automatic), libavcodec-extra-52:amd64 (0.6-2ubuntu3.2, automatic)

Remove: libswscale0:amd64 (0.6.2-1ubuntu1~ppa1~lucid1), libavutil50:amd64 (0.6.2-1ubuntu1~ppa1~lucid1), libavcodec52:amd64 (0.6.2-1ubuntu1~ppa1~lucid1), gstreamer0.10-ffmpeg:amd64 (0.10.11-1), vlc-nox:amd64 (1.1.4-1ubuntu1.7), vlc-plugin-notify:amd64 (1.1.4-1ubuntu1.7), libpostproc51:amd64 (0.6.2-1ubuntu1~ppa1~lucid1), libavformat52:amd64 (0.6.2-1ubuntu1~ppa1~lucid1), vlc:amd64 (1.1.4-1ubuntu1.7), vlc-plugin-pulse:amd64 (1.1.4-1ubuntu1.7)
End-Date: 2011-12-27 19:38:00

plenty of vlc packages removed as a result of installing OpenShot... and a swag of codecs...
reinstalled vlc and let totem go codec hunting, at least I have a list of what's missing now should I need it... I should've paid more attention to what it was up to I think!

... I have found that over time i've developed the habit of using Ctrl-W to close Windows.
I suppose this replaced the old Ctrl-F4 habit I used to have when I realised that Ctrl-F4 was very much a Windows-Only thing and that Ctrl-W was more widely supported (in particular, in Firefox, regardless of OS.)

Today after closing Firefox inadvertantly (by hitting Ctrl-Q, instead of Ctrl-W, by accident, and not for the first time!) I threw a frustrated search into Google, pondering whether Ctrl-Q could be disabled.

What do you know.... It Can. Keyconfig installed, and configuration changed.
I also took the opportunity to disable the F12 mapping for Firebug - another Firefox addon that I have installed and use very occasionally - but not often enough to justify stealing the F12 mapping (that I do have to use elsewhere - mainly when using the remote KVM on our blade chassis at work...!)

I must admit it really is great to be able to use a tool like Firefox and know that there's an addon for just about everything. :-) I have FireFTP, Adblock Plus, HTTPS-Everywhere, Firebug, Gmail Manager, NoScript and User-Agent Switcher (off the top of my head) and the best part is that I can use those addons on any of my machines, as long as they run Firefox (of a current nature). Windows, Linux, the lot.

Now if only they hadn't changed to this crummy version numbering schema they're now using to keep up with the Joneses, or is that, the Googles...

So.. my Ubuntu 10.10 box having been supplied with RPA data for Firefox and Thunderbird, upgraded me to Firefox 8.0 about a week ago.

Interestingly now if I try to hit http://www.asb.co.nz it now tries to send me a download into my browser...

"application/vnd.wap.xhtml+xml (-1 bytes)"

If I hit their Fastnet site directly https://fnc.asbbank.co.nz that renders as expected - until you finish your session, click 'logout' and it tries to redirect you elsewhere.

I was engaging ASB via Twitter who have their guys 'looking into it' and it appears to be related to my Firefox 8 upgrade.

Interestingly I also discovered that www.hotfrog.co.nz wont load in Firefox 8 either. However I grabbed the User Agent Switching plugin last night, and today I can visit both of the above with an alternative user-agent selected.

For comparison here's my pre and post-upgrade user-agents:

"Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"

(well, as of 11 November)

"Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0"

(as of today)

Interesting the 'Ubuntu' assertion that's been inserted.

So, um, 'hai hotfrog, hai ASB, please update your user-agent lists, thx!' :-)

(And it's not just me. Check out Auckland LUG discussion for more.)

Web URL's known to not work with my FF8/Ubuntu User Agent:

www.asb.co.nz as at 20111130 renders mobile site. @ASBBank have Acknowledged and are 'looking into' it.
www.hotfrog.co.nz as at 20111130 doesn't work at all. @HotFrogAU has Acknowledged which is excellent.
www.cudo.co.nz as at 20111130 renders mobile site. No tweeting for them?

Syndicate content