Archive

Archive for the ‘Beta’ Category

OpenSolaris FIX: Server refused to allocate pty (SSH)

May 11th, 2010 5 comments

Just upgraded a friends OpenSolaris boxen to SNV_134 (latest available from the OpenSolaris dev repository) and after rebooting we realised we couldn’t SSH into it.

Server refused to allocate pty

DOH! This is caused by a known bug that has been around for a few builds now.

You’ll need to modify /etc/minor_perm and add the following to the bottom of the file.

clone:ptmx 0666 root sys

And what happens if your terminals don’t accept keyboard input? You could drop back into the shell *or* be lazy like me, find gText editor in your Accessories, add it to the panel and change the properties to run it as a privileged user:

pfexec gedit %U

Then run the file, open the /etc/minor_perm file, save and reboot. Make sure you change back the shortcut path :-)

{lang: 'en-GB'}
Share

VirtualBox 3.2.0 Beta 1 Released!

May 3rd, 2010 No comments

Finally downloaded the latest 3.2.0 release of VirtualBox today and gave it ago!

From the forum post for this pre-release.

VirtualBox Version 3.2.0 is a major update. The following major new features were added:

  • Following the acquisition of Sun Microsystems by Oracle Corporation, the product is now called Oracle VM VirtualBox and all references were changed without impacting compatibility.
  • Experimental support for Mac OS X guests
  • Memory ballooning to dynamically in- or decrease the amount of RAM used by a VM (64-bit hosts only) (see the manual for more information)
  • CPU hot-plugging for Linux (hot-add and hot-remove) and certain Windows guests (hot-add only) (see the manual for more information)
  • New Hypervisor features: with both VT-x/AMD-V on 64-bit hosts, using large pages can improve performance (see the manual for more information); also, on VT-x, unrestricted guest execution is now supported (if nested paging is enabled with VT-x, real mode and protected mode without paging code runs faster, which mainly speeds up guest OS booting)
  • Support for deleting snapshots while the VM is running
  • Support for multi-monitor guest setups in the GUI (see the manual for more information)
  • USB tablet/keyboard emulation for improved user experience if no Guest Additions are available
  • LsiLogic SAS controller emulation
  • RDP video acceleration
  • NAT engine configuration via API and VBoxManage
  • Guest Additions: added support for executing guest applications from the host system
  • OVF: enhanced OVF support with custom namespace to preserve settings that are not part of the base OVF standard

In addition, the following items were fixed and/or added:

  • VMM: fixed crash with the OpenSUSE 11.3 milestone kernel during early boot (software virtualization only)
  • VMM: fixed OS/2 guest crash with nested paging enabled
  • VMM: fixed Windows 2000 guest crash when configured with a large amount of RAM (bug 5800)
  • VMM: fixed massive display performance loss (AMD-V with nested paging only)
  • Linux/Solaris guests: PAM module for automatic logons added
  • GUI: guess the OS type from the OS name when creating a new VM
  • GUI: added VM setting for passing the time in UTC instead of passing the local host time to the guest (bug 1310)
  • GUI: fixed seamless mode on secondary monitors (bugs 1322 and 1669)
  • GUI: added –seamless and –fullscreen command line switches (bug 4220)
  • Settings: be more robust when saving the XML settings files
  • Mac OS X: rewrite of the CoreAudio driver and added support for audio input (bug 5869)
  • Mac OS X: external VRDP authentication module support (bug 3106)
  • Mac OS X: Moved the realtime dock preview settings to the VM settings (no global option anymore). Use the dock menu to configure it.
  • Mac OS X: added the VM menu to the dock menu
  • 3D support: fixed corrupted surface rendering (bug 5695)
  • 3D support: fixed VM crashes when using ARB_IMAGING (bug 6014)
  • 3D support: fixed assertion when guest applications uses several windows with single OpenGL context (bug 4598)
  • 3D support: added GL_ARB_pixel_buffer_object support
  • 3D support: added OpenGL 2.1 support
  • 3D support: fixed Final frame of Compiz animation not updated to the screen (Mac OS X only) (bug 4653)
  • Added support for virtual high precision event timer (HPET)
  • LsiLogic: Fixed detection of hard disks attached to port 0 when using the drivers from LSI
  • NAT: fixed ICMP latency (non-Windows hosts only; bug 6427)
  • Keyboard/Mouse emulation: fixed handling of simultaneous mouse/keyboard events under certain circumstances (bug 5375)
  • Shared folders: fixed issue with copying read-only files (Linux guests only; bug 4890)
  • OVF: fixed mapping between two IDE channels in OVF and the one IDE controller in VirtualBox

Bootilicious! Download links are on the site (updated for BETA2).

{lang: 'en-GB'}
Share

Multi-tasking in style on the Android Platform

May 2nd, 2010 No comments

An interesting article posted on the Android Developer Blog from Dianne Hackborn (born to hack!) who discusses the way multi-tasking works on Android. Recommended reading as it goes beyond how it works (and why!) and offers some suggestions on how to make the most of it!

{lang: 'en-GB'}
Share

Ubuntu 10.04 and getting Sun JRE instead of OpenJDK

May 2nd, 2010 1 comment

If you’ve downloaded the latest Ubuntu 10.04 Lucid Lynx you’d realise that they ship with the OpenJDK instead of the Sun (Oracle) JRE. The Ubuntu team has decided to move the Sun Java bits to the partner repository which means we need to do a couple of things prior to getting it through apt-get.
First add the repository to your /etc/apt/sources.list via the add-apt-repository command, then do a full update.

$ add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ apt-get update

Then lets install the Sun JRE & JDK as required.

$ apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
$ apt-get install sun-java6-jdk

Once installed you can verify the correct JRE is installed with:

$ java -version

I have to say, this release of Ubuntu is incredibly refreshing :-) Its matured so well in a short period of time, its definitely got the Lynx Effect(NSFW).

{lang: 'en-GB'}
Share

FIX: WordPress Older Posts not working in IIS with Permalinks

April 28th, 2010 2 comments

I spent some time tweaking my blog today after moving it to some fresh hardware. You may find that everything is loading much faster now which can be attributed to two plugins in addition to the hardware upgrade – wp-super-cache and wp-widget-cache.

I’ve also fixed a long standing bug with my particular configuration of WordPress that runs on IIS which causes the “Older posts” link at the bottom does not function for the second page. The WordPress generated URL for this is

http://www.thushanfernando.com/index.php/Index.php/page/2

Which is a bit problematic, this ofcourse can be reproduced only on IIS from my musings (serves me right eh?). There are a couple of suggestions by people on the forums already, but I wasn’t too keen on them as they seemed too high-level fixes.

I’ve enabled Permalinks with this format:

http://www.thushanfernando.com/index.php/2010/04/28/sample-post/

So I looked through the sources to see why this was happening. After a bit of snooping about I got to the get_pagenum_link function in wp-includes/link-template.php file.

Heres a bit of source for reference – this is with WordPress 2.9.2:

function get_pagenum_link($pagenum = 1) {
	global $wp_rewrite;

	$pagenum = (int) $pagenum;

	$request = remove_query_arg( 'paged' );

	$home_root = parse_url(get_option('home'));
	$home_root = ( isset($home_root['path']) ) ? $home_root['path'] : '';
	$home_root = preg_quote( trailingslashit( $home_root ), '|' );

	$request = preg_replace('|^'. $home_root . '|', '', $request);
	$request = preg_replace('|^/+|', '', $request);

	if ( !$wp_rewrite->using_permalinks() || is_admin() ) {
		$base = trailingslashit( get_bloginfo( 'home' ) );

		if ( $pagenum > 1 ) {
			$result = add_query_arg( 'paged', $pagenum, $base . $request );
		} else {
			$result = $base . $request;
		}
	} else {
		$qs_regex = '|\?.*?$|';
		preg_match( $qs_regex, $request, $qs_match );

		if ( !empty( $qs_match[0] ) ) {
			$query_string = $qs_match[0];
			$request = preg_replace( $qs_regex, '', $request );
		} else {
			$query_string = '';
		}

		$request = preg_replace( '|page/\d+/?$|', '', $request);
		$request = preg_replace( '|^index\.php|', '', $request);
		$request = ltrim($request, '/');

		$base = trailingslashit( get_bloginfo( 'url' ) );

	if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || '' != $request ) )
		$base .= 'index.php/';

		if ( $pagenum > 1 ) {
			$request = ( ( !empty( $request ) ) ? trailingslashit( $request ) : $request ) . user_trailingslashit( 'page/' . $pagenum, 'paged' );
		}

		$result = $base . $request . $query_string;
	}

	$result = apply_filters('get_pagenum_link', $result);

	return $result;
}

This function (from reading through) essentially generates the links for the page numbers & page navigation taking into account Permalinks if configured. This is all fine and dandy for Unix hosts but for Windows, unfortunately this bit of code fails us.

...
$request = preg_replace( '|page/\d+/?$|', '', $request);
$request = preg_replace( '|^index\.php|', '', $request);
$request = ltrim($request, '/');
...

As the preg_replace is case sensitive, it will not replace the invalid Index.php that is seen on IIS. So the easiest fix is to tweak the regex pattern a little bit and tell it be case insensitive.

...
$request = preg_replace( '|page/\d+/?$|', '', $request);
$request = preg_replace( '/|^index\.php|/i', '', $request);
$request = ltrim($request, '/');
...

This will then generate the (invalid) urls and the preg_replace will remove any additional Index.php’s from the request URL as its already mentioned in the $base variable a few lines below:

...
if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || '' != $request ) )
$base .= 'index.php/';
...

Once you make the change and upload the files, your “Older posts” will start working again. I’ll submit a patch to WordPress I’ve submitted a patch to WordPress Trac, now its just a wait and see what they say, in the meantime here’s a patch file if you don’t want to modify sources manually. If there any issues, post a comment :-)

{lang: 'en-GB'}
Share

Office 2010 and SQL Server 2008 R2 (soon) available on MSDN!

April 26th, 2010 No comments

If you haven’t heard already, Microsoft have RTM’d both Office 2010 and SQL Server 2008 R2 and Office is already available for MSDN Subscribers with SQL Server 2008 R2 arriving soonishly – you can look at the download page for SQL Server 2008 R2 and download it from MSDN now (03/05/2010). There’s also a great ebook titled “Introducing SQL Server 2008 R2” available in XPS and PDF format :)

I’m one of those who love the ribbon UI, its made things easier for me (helps that I really wasn’t a heavy MSFT Office user back in the days). Now everyone’s getting on board the ribbon train, even the beloved WinZip!

Don’t forget the Office 2010 Movie from last year.

{lang: 'en-GB'}
Share

Visual Studio 2010 & Resharper 5 hit the interwebs.

April 13th, 2010 No comments

A little late on this one, but MSFT have released the long awaited Visual Studio 2010 release and JetBrains have also released ReSharper 5.

A full breakdown of Visual Studios are also available, not a huge fan of all these different SKUs to be honest. You can download a copy from your MSDN subscriptions now, or download the trial version (direct download), buy an upgrade from VS2008 or just download the .NET 4.0 runtime (48Mb).

I’ve spent the past 3 hours downloading from MSDN and its been crawling.

MUST.HAVE.PLINQ.FIX.

{lang: 'en-GB'}
Share

Google shows the power of HTML 5, ports Quake II to run in browser!

April 3rd, 2010 No comments

The title says it all. Using the Jake2 port of Quake II (to Java) the bright sparks at Google have used GWT to bring Quake II to HTML 5.

We started with the existing Jake2 Java port of the Quake II engine, then used the Google Web Toolkit (along with WebGL, WebSockets, and a lot of refactoring) to cross-compile it into Javascript. You can see the results in the video above — we were honestly a bit surprised when we saw it pushing over 30 frames per second on our laptops (your mileage may vary)!

At first I thought it was an April fools joke, but as cruel as that may be, it wasn’t. Download the source and give it ago, I nearly fell of my chair.

At the moment you have to build from source and mess about a bit, but fear not, I followed the guide on OSNews by Kroc on our MacBook Pro and it worked quite well, yet to try it on Linux.

{lang: 'en-GB'}
Share

xkcd goes CLI!

April 2nd, 2010 No comments

This is cool, xkcd is now command line based! Try it!

{lang: 'en-GB'}
Share

ASP.NET MVC 2 released!

March 14th, 2010 No comments

Quick note that ASP.NET MVC 2.0 was released on Friday, still yet to play with the RTM, but don’t let me stop you. Go for it!

Link dump – mostly from Scott Hanselman’s announcement:

Exciting and just in time for a fairly large project we’re working on right now :-)

{lang: 'en-GB'}
Share