Ubuntu: ALT TAB between browser windows?

I’m still using Ubuntu’s Unity desktop, which is saying a lot as I switched back to Gnome within a week or so of the previous release of Ubuntu.

One of the remaining bugbears I had with Unity was the window or task switcher. It was impossible to switch between Chrome browser windows. I had to click on the Chrome icon in the Unity sidebar and select the window I wanted. It felt like Ubuntu had tried to emulate what Windows 7 did with their taskbar, but Windows did it better because the window previews are close to the taskbar.

I’m not the only one to have this problem. You can either change window switcher in CCSM (oh oh, watch out when using CCSM!) or use ALT-`. That character is the tick character which normally sits above the TAB key on UK/English/US keyboards but may be elsewhere on other locales. I now need to get used to it like I did with Mac OS X.

Ubuntu 11.10: Be wary of Compiz Config Settings Manager (ccsm)

Have you recently installed Ubunty 11.10 and are you marvelling at the Unity Desktop? Not many are. Marvelling at the desktop that is, but it’s growing on me. I said that last time too so we’ll see how it goes.

Anyway, the point of this little rant is to tell you to avoid or be very careful with CCSM, or “Compiz Config Settings Manager” as it’s known to it’s enemies. This little app allows you to edit practically everything related to Compiz settings. Literally everything!

Unfortunately it can also lead to a world of pain. After fiddling around with it I went into the preferences and clicked on the “Plugins” link at which time my desktop froze and I couldn’t even CTRL-ALT to a different session. Forced reboot was the other of the day.

When I finally got back in my external monitor wasn’t detected and I was left with a 1024×768 display. I spent a few hours trying to figure out what the hell had gone wrong. I deleted .config/monitors.xml and tried editing it but nothing worked. Eventually I rebooted a few times and suddenly my monitor was recognised again!

Then it was on to the workspace switcher. It didn’t work the way it used to. I hesitantly fired up ccsm and dug into the settings in Viewport switcher, then in Rotate Cube, then Desktop Wall. It was then I discovered I couldn’t deselect “Desktop Cube”. ccsm would segfault every time. Switching workspaces using the cube was painful as my hardware just isn’t up to the task. Open windows would flicker slightly after I rotated the workspace. Eventually I discovered that I could take drastic action to restore normality. First I had to login as a different user and then go into my home directory and then move some configuration directories out of the way.

mkdir bak
mv .gconf .gconfd .gnome .gnome2 bak/

After logging in again I fired up ccsm and Desktop Cube was disabled! I usually switch between workspaces using CTRL 1-4 and I was able to configure Viewport Switcher to do just that with a minimal sliding animation.

After looking in the bak directory it appears that Compiz stores it’s configuration data in various compiz directories in .gconf/apps/. I suspect it’s enough to remove them rather than all the Gnome configuration files.

I like Ubuntu 11.10 so far, I’m getting used to Unity but the top menu bar feels to me like it’s crowding out the screen. The lack of Unity themes included is troubling too as there are only 4 (2 of which are for visually impaired users by the looks of things). I’ll have to go look for some more.

Hello Ubuntu 11.04

Today is the big day. A new release of Ubuntu Linux is out. Version 11.04 or “Natty Narwhal” is the first to ship with the Unity desktop and I’m very impressed! If you haven’t seen it yet, check out the Ubuntu website or this handy guide.

I like:

  • The auto hiding sidebar of icons. When a window is maximised it hides. Long click on an icon to move it around, and right click for a context dialog to remove it.
  • Control Center is 2 clicks away in the top right where there appears to be a light switch. That menu also has a lock screen item and various session controls.
  • Apps with multiple windows show a corresponding number of dots next to their icon on the sidebar. Click on the icon and you see all the windows of that application.
  • Application menus are in the top toolbar ala Mac OS. Some, like Chrome, aren’t however.
  • Long press Windows key and the sidebar icons are highlighted with numbers 0-9 to quick choose them.
  • Click the Ubuntu logo in the top left and you get a nice applications dispay.
  • Speedy alt-tab previews of each Window.
  • Left and right maximising of windows like in Windows 7. I think you need to drag it a bit further than in Windows 7 however, no bad thing. Full screen maximise on dragging a window to the top of the screen.
  • Painless upgrade from 10.10.

And what I didn’t like:

  • The window display for multi window apps requires you select a window. It’d be great if I could click the app icon again to return to the same window. ESC does the job though.
  • GIMP tear away menus are still broken, but this is likely an issue with GIMP. It was present in the last release of Ubuntu too and I just found a work around this evening.
    The menus you are looking for are no longer part of the drop-down menus, but rather part of a right-click menu visible when clicking on the canvas.

    I found using the space bar after clicking the menu option worked on torn off menus. This may be a bug.

  • The lack of formal application menus is off putting initially but it’s actually easy enough to find things with the new launcher.
  • I doubt I’ll ever like the thin scrollbar. There is a way to change that, must find out how.
  • Why does Ubuntu keep installing Evolution every time I upgrade? I’m fairly sure I uninstall that each and every time ..

In previous versions of Ubuntu I always felt the eye candy was there just to make things look pretty. With Unity they’re actually putting that graphical horsepower to good use. If you haven’t tried Ubuntu yet, give it a spin! You can even try it without installing anything simply by booting from the install disk (or usb drive) and opting for that. Check out the download page for further details.

I’m slowly making my way through all th…

Aside

I’m slowly making my way through all the video editing software in Linux. I’ve tried Cinnerella, Lives, Kdenlive, Openshot and a few others but for one reason or another they’re all lacking. Mainly bugs unfortunately.

Of the ones I tried I like Kdenlive and Openshot and was able to do some decent multi-track editing of a video. Kdenlive crashed quite a few times and I think I failed to create a video. Openshot did really well but then I triggered an odd bug where some clips in the video simply froze. The audio continued but the image displayed was the first frame. I went searching for it and found a discussion of the very problem. Seems to be slightly glitchy 1080×720 video will cause it.

Keep searching …

Admin 101: Postfix smtp limits

I’ve just moved all my sites on to a new install of Ubuntu on one of my VPses. This site and In Photos are now on the same server again and the VPS has finally calmed down.

Between configuring Apache (turn off keep alives, and reduce the number of child processes), installing xcache and the WordPress object cache and configuring it, and configuring MySQL I totally forgot about Postfix.

I did install Postgrey of course but when Blacknight switched the ocaoimh.ie web and mail traffic to this server things started to go screwy.
Load average shot up, I thought it was Apache and spent quite some time playing with the number of processes, all to no avail. I didn’t immediately notice the large number of smtp processes when I did a “ps auxw”. I was looking at Apache.

What was happening was a rumplestiltskin attack on my server. Rogue bots all over the Internet try to send spam emails to mail servers using randomly generated addresses in the hope of guessing a correct one. It happens all the time, and I had configured Postfix correctly in the past, but I had forgot this time.

So, if your server is suffering under the strain of too many Postfix smtp processes open up /etc/postfix/master.cf and look for the smtp line:

smtp inet n – – – – smtpd

Change the last dash to a number, try small first, depending on how much mail traffic your server gets. I changed mine to 3, restarted Postfix, and the server is humming along nicely now. Postfix was actually using up more resources than Apache during those attacks! It’s unfortunate that Ubuntu (and probably every other dist of Linux) allows unlimited number of smtp processes.

Oh, I’m hosted at Linode. Yes that’s an affiliate link, but I’ve been using them for years and been very happy with them.

Ubuntu Linux and the Canon MP492 printer

I bought a shiny new combination scanner/printer/copier last weekend. It’s the Canon MP492 and I expected it would work just fine in Linux. I mean, it’s just a printer, right?

Nope. The printer was detected as a Canon MP490 but unfortunately the CUPS system used by Ubuntu Linux didn’t support that particular version. It supported the 520 and others but no sign of my new purchase. To be honest, I was dumb founded. I even configured it on my Macbook and thought about sharing it over the network but the Macbook is on the wireless network while everything else is wired, and I didn’t feel like making things more complicated.

So I went searching again and eventually found this helpful thread (it didn’t show up on my first searches, Google refresh?). Drivers are available for the printer here on the Canon Thailand website. Thankfully the instructions were all in English, and the .deb package installed and configured correctly. Drivers for the scanner are listed on that forum post too but I don’t have an immediate need for that so I didn’t test them out.

Phew.

The printer itself is an average photocopying machine that does the job. Here’s the back cover of the December 1954 issue of the National Geographic. The copy is pretty good except for banding on big blocks of colour like that in the Coca Cola logo.

Reasons to upgrade your Ubuntu

ubuntu.com is down unfortunately. The release of Ubuntu 9.10, Karmic Koala the latest version of Ubuntu Linux, is obviously driving a heck of a lot of traffic to the site. (I wonder if they use the equivalent of wp-super-cache?)

Anyway, I’ll be upgrading tomorrow probably and once I do I’ll be checking out some of the applications mentioned on this page. Everything from an alternative media player, the (as yet unreleased) Gnome 3.0, audio/video editing, a photo manager to the pretty sweet Electric Sheep screensaver are listed here.

Many of the apps are available for Ubuntu 9.04 but others require building manually. I’ll be busy over the weekend :)

Here’s a few of the eye catching screenshots from that page, just to whet your appetite!

Ubuntu? Laptop? Intel Graphics? Speed Boost!

If you’re using the latest version of Ubuntu, Jaunty Jackalope, or version 9.04 and you use a laptop with an Intel graphics chip like I do in my Dell D630 you may have gotten used to to the God awful video performance since you upgraded from the previous release.

I had. I had forgotten that windows aren’t supposed to tear when you drag them, and that yes, the underpowered chipset in my laptop can sort of handle the special effects in Compiz. What changed? The new drivers in 9.04 did. Intel are apparently reshaping how their drivers work but while they do it performance has taken a back seat and is cheerfully swilling on beer while the computer does the heavy lifting up front. (errr)

Anyway, simple way to fix it? Revert to the driver in the previous version of Ubuntu! It’s horribly easy to do. Just follow this guide, update your apt sources, install the old driver and restart X. I did and now I have fancy windows bouncing here, there and everywhere! In fact, my wife used her online O2 account to send a few texts and the confirmation popup window hopped around the screen all on it’s own! Oh how we laughed!

Oh, and for anyone who uses a browser, there’s a really simple way to get a CPU upgrade for free. Download Chrome or Chromium (or for Ubuntu .debs) and give it a whirl. After using Firefox for many years it’s like a breath of fresh air, fast moving air that is as it zips along! OK, it’s not completely bug free. The latest builds have a problem with the “default browser” setting (grab a build from around Sep 4 but the fix will be available soon) but it’s the main browser on my Linux desktop and I love the thing!

Upgraded my Dell D630 to 4GB RAM

That was quick:

  • Order placed with Crucial yesterday afternoon around 1.30pm for 2 sticks of 2GB RAM.
  • UPS guy called this morning at 11.30am with RAM.
  • Dell D630 laptop upgraded to 4GB RAM with the help of this tutorial. Only took about 20 minutes, although unscrewing and removing the keyboard was a bit nerve wrecking.
  • Rebooted and found that Linux only found 3.5GB of the RAM but fixing that is simple:

    # apt-get install linux-headers-server linux-image-server linux-server

  • Reboot and I see 4GB RAM. Should make running Firefox and Bibble Pro 5 a lot less painful. Both memory hogs.

4GB of DDR2 RAM only cost me about 50 Euro. I’m sure I have a receipt for 8MB of SDRAM I bought years ago. Cost me 100 quid then. So, 4GB of RAM back then would have cost a small fortune.

laptopmemoryupgrade

2gbmemoryupgrade

Edit: the server kernel has terrible video performance (unsurprisingly), I’ve gone back to the desktop kernel and will recompile it when that 500MB of RAM becomes a real necessity (or I move to a 64 bit version of Ubuntu).

Run a program on one CPU core in Linux

Modern computers use CPUs with multiple cores for performance reasons. Software can take advantage of that and use both cores to run separate threads but sometimes it’s useful if you can force a process to use one core rather than both.

In Linux that’s easy to do. If you’re using Ubuntu or Debian grab the schedutils package:

sudo apititude install schedutils

That will install a program called “taskset” which is a tool to “retrieve or set a process’s CPU affinity”. It’s really easy to use too.

I wanted to force Bibblelabs on to one core while importing photos.

# ps auxw|grep bibble
donncha 19482 78.7 33.1 1090388 681220 ? RNl 09:56 77:28 ./bibblepro
# taskset -p 19482
pid 19482′s current affinity mask: 3
# taskset -p 01 19482
pid 19482′s current affinity mask: 3
pid 19482′s new affinity mask: 1

The app is still heavy on the system, and “System Monitor” doesn’t suddenly show 0% usage on one CPU because I’m also running Firefox, Xchat, X, Gnome Terminal but I’d almost swear the browser window refreshes faster.

PS. Thanks to whoever told me about this on Twitter a while back. It had slipped my mind and I had to search for it again. Blogging it to remember it!