Web Devout tidings


How to: Enable edge mouse wheel rotate in Gutsy

October 19th, 2007 by David Hammond

Update: It seems this solution only works until you log out, and it has to be applied again. At the bottom I’ve written a script to do this automatically.

When I upgraded to Ubuntu Gutsy (7.10), there was one thing that annoyed me about its version of Compiz Fusion: I’m used to rotating my desktop cube (well, octagonal prism for me) by moving my mouse cursor near the screen edge and rotating the mouse wheel, but that no longer seems to work.

In the past, you’d enable this through the CompizConfig Settings Manager by going to Rotate Cube → Actions → General → Rotate Left / Rotate Right, enabling all edges, and setting button 4 for left and button 5 for right. But that doesn’t work in this version, because the Rotate Left and Rotate Right settings are bound to the general Gnome keyboard shortcuts (that’s what the blue text in the Name column means). So you can change the settings, and it doesn’t give you any errors, but it just doesn’t do anything.

But fear not! The problem is that the settings manager just isn’t bothering to change the Compiz Fusion gconf entry when you change it. So the solution is to just go in and change it yourself. Here are the steps:

(First of all, keep in mind that this issue and solution are only for people using the Rotate Cube plugin, which isn’t enabled in Ubuntu Gutsy’s default profiles. If you aren’t using the Rotate Cube plugin, this probably won’t interest you.)

  1. You’ll need the Configuration Editor. Although this application doesn’t appear in your menus, it should be installed on your system by default. In case it isn’t, you can install it by going to Applications → Add/Remove… → System Tools → gconf-editor; or if you prefer a command line, typing “sudo apt-get install gconf-editor” in a terminal.

  2. Press Alt+F2 to bring up the Run dialog, and type “gconf-editor” to bring up the Configuration Editor.

  3. In the Configuration Editor, navigate to / → apps → compiz → plugins → rotate → allscreens → options.

  4. Double-click on rotate_left_edge (not rotate_flip_left_edge). Add the following values: Top, TopRight, Right, BottomRight, Bottom, BottomLeft, Left, and TopLeft. Press OK.

  5. Double-click on rotate_left_edgebutton, change the value to 4, and press OK.

  6. Double-click on rotate_right_edge and add the same values as in step 4. Press OK.

  7. Double-click on rotate_right_edgebutton, change the value to 5, and press OK.

  8. Close the Configuration Editor.

That should be it. Now when you rotate your mouse wheel near the edge of the screen, it will rotate your desktop.

Update: As it turns out, the above solution is only a temporary fix. Once you log out, Compiz seems to forget the setting. Below is a workaround script that you can set to automatically run at the start of each session:

#!/bin/bash
sleep 5
gconftool --type=list --list-type=string --set \\
	/apps/compiz/plugins/rotate/allscreens/options/rotate_left_edge \\
	[Top,TopRight,Right,BottomRight,Bottom,BottomLeft,Left,TopLeft]
gconftool --type=left --list-type=string --set \\
	/apps/compiz/plugins/rotate/allscreens/options/rotate_right_edge \\
	[Top,TopRight,Right,BottomRight,Bottom,BottomLeft,Left,TopLeft]
gconftool --type=int --set \\
	/apps/compiz/plugins/rotate/allscreens/options/rotate_left_edgebutton 4
gconftool --type=int --set \\
	/apps/compiz/plugins/rotate/allscreens/options/rotate_right_edgebutton 5
  1. Paste the above into a text editor and save the file as /home/<username>/bin/enable-edge-mousewheel.sh (substituting <username> for your account username).

  2. Open your home directory, then the bin directory. Right-click on the newly created file and click Properties. Click on the Permissions tab and check the box next to Execute. Close the dialog.

  3. Click on your System panel menu, then go to Preferences and Sessions.

  4. Click the Add button. For Name, put “Enable Edge Mouse Wheel“. For Command, put “/home/<username>/bin/enable-edge-mousewheel.sh“. Click OK.

  5. Close the windows.

Al Billings on the late IE feedback system

September 20th, 2007 by David Hammond

Al Billings, who left Microsoft and the Internet Explorer team in May 2006, has just made a lengthy post about “Borgzilla” (his name for the mismanaged Internet Explorer public bug database which was shut down around the time that IE 7 was released).

Al pretty much confirmed my take on the situation: Microsoft didn’t dedicate enough resources to the project and didn’t provide the users with the tools they needed to use the system effectively. He also explains that there was a disconnect between the public bug database and the IE developers, since the IE team was primarily working with their own private bug database.

Toward the end, Al offered the IE team some suggestions to improve their relationship with the web development community. I have to say, I completely agree with Al’s conclusions in this post. To people on the outside, it feels as if the IE development team has died again. We’re sitting here today with no real clue about what to expect in IE’s future beyond what we already knew a year ago. All of the latest posts on the IE blog are about the present or the past. The last few posts in Chris Wilson’s blog are about lolcats and vacation. I want to hear the IE developers’ opinions about HTML 5 and what parts (if any) are planned for IE 8. I want to know if display:table and friends, :before and :after, and outline support are currently being worked on. I’m not even asking for any promises; just some real open discussion.

Validate XHTML parsed as HTML

August 12th, 2007 by David Hammond

When you send XHTML to a browser using the common text/html content type, all major browsers will respond by using their regular HTML parsers on your page, regardless of the doctype. For some reason, the W3C HTML Validator doesn’t follow this widely-accepted convention. Instead, if you’re using an XHTML doctype, the W3C Validator will use an XML parser on your page. Obviously, that will give different results than what your browser is seeing. And unfortunately, there was no easy way to force the W3C Validator to parse your page with an HTML parser like everyone else did.

That is, until now. I’ve just released the new Validate XHTML Parsed as HTML tool. It works very much like the HTML Good Practice Checker: you submit the URL you want to test, it makes a few minimal changes to the beginning of your markup in order to modify how the W3C Validator sees your code, you click the button to validate it, and the results appear below.

The purpose of this tool is to illustrate how the compatibility issues between XHTML and HTML are not as simple as whether or not you follow the HTML Compatibility Guidelines. A fully-compliant HTML parser following widely-accepted conventions for parsing mode selection would encounter all of these errors when attempting to parse your page. Popular web browsers don’t support the Null End Tag construct, so they would see it slightly differently, but they would still see errors in each instance of /> on the page. I thought one of the selling qualities of XHTML was that it was supposed to put an end to lax error handling. I guess not.

What’s up

August 10th, 2007 by David Hammond

I apologize for the lack of updates here lately. I’ve been swamped at work with projects of biblical proportions (you know, getting colleges to actually talk to each other), all due at the end of August or September. Hopefully after that I can get back full-swing into some of the stuff I’m developing for Web Devout.

In the meantime, you can read some of my latest posts at Tech Center Current or my random non-serious blog Nanobits.

How to: Upload PNG, GIF, or BMP to Picasa Web Albums

July 12th, 2007 by David Hammond

After a few months of searching, I’ve finally figured out how to upload PNG, GIF, and BMP files to Picasa Web Albums without them being converted into JPEG. Here’s what to do:

  1. If you don’t already have one, sign up for a Blogger account at http://www.blogger.com/

  2. Create a new blog. The title will be the name of the album you want to make on Picasa Web Albums. You have to use Blog*Spot for the hosting, and you should pick a Blog*Spot address that no one else is likely to want (some random keyboard mashing will be fine). You’ll never need to actually visit this address.

    Warning: If an album of the same name already exists in your Picasa Web Albums account, they will *not* merge. You will end up having two albums of the same name (but different URL), which you probably don’t want. Take this into account before picking the blog name.

  3. Once your blog is set up, go to the “Create Post” page in Blogger.

  4. Click on the “Add Image” icon just above the post entry field. This will open an “Upload Images” window.

  5. Click on “Browse” and select the image you want to upload. This may be a JPEG (JPG), GIF, BMP, or PNG up to 8 MB in size.

  6. If you want to add multiple images at once, click on “Add another image”. A maximum of 5 images may be uploaded at once.

  7. Once you’re ready to upload, click the “Upload Image” button.

  8. After it’s finished uploading, optionally give the post a title (today’s date or something, just to identify the image upload session), save the draft, and leave Blogger. The post body may be blank and you don’t need to actually publish the post, but there has to at least be a draft saved or else the images will be lost.

  9. Go to your Picasa Web Albums account. If all went well, you should have a new album with a little Blogger logo in the bottom-left corner. If the album isn’t there, try waiting a few minutes and refresh. If it still isn’t there, you should recheck the steps above.

  10. To make the album public, open the album page in Picasa Web Albums, click on Edit Album Properties in the left sidebar, and set it to Public.

For these Blogger albums, you’ll always have to use Blogger to upload images; the regular Picasa Web Albums interface won’t let you upload images into those albums. But you can view them normally, set captions, comments, etc. The images retain the full pixel-precise quality and filesize of the original images, and you can manually download them in their original PNG/GIF/BMP formats.

It would be nice if Picasa Web Albums would allow us to simply upload PNG/GIF/BMP images from the regular upload interface, but this will have to do for now.