Thursday, June 7, 2007

Friday 8 June 2007 - power management in Kubuntu and other musings

I stay away from Kubuntu now. That galloping fan unnerves me. Every time I log in I wait patiently, thinking - this will be the time that 'speedstep' kicks in and relaxes the CPU to a gentle whisper, as Ubuntu and win XP do. But it never happens.

I've trawled the web looking for a solution. One kind forum member suggested:
"Check out http://www.ubuntuguide.org And look at the CPUFreq section, perhaps there's something about the Frequency scaling in your KDE...."

I went to that section and followed all the directions for setting 'ondemand' power management. Unfortunately it didn't make any difference. There seems to be something about Kubuntu that prevents anything but maximum perfomance mode on a pentium M laptop with speedstep. I think I'll stick with Ubuntu on one partition and maybe try openSuse with KDE instead of Kubuntu on the other.

Wednesday, June 6, 2007

Thursday June 7 2007 - enabling write access to NTFS drives

Another success to follow my crash and burn two days ago. I was put on this scent by yet another useful snippet in the trusty unofficial Feisty guide at: ubuntuguide.org
The particular section in question is entitled '1.17.5 How to mount Windows partitions (NTFS) on boot-up, and allow users read and write access'.

In a nutshell:
* Enable universe repository in Synaptic
* In Synpatic search for 'NTFS', you should find 'NTFS-config', the NTFS Configuration Tool - install it.
* Find 'NTFS Configuration Tool' in the Applications menu under System Tools - open it and check 'Enable Write Support';

That's it. It worked. And now I can save any file I'm working on to the 'My Documents' I'd set up on an NTFS drive for WinXP.

Monday, June 4, 2007

Wednesday June 6 2007 - Lights Camera Action!

I couldn't believe how easy it was to play both mp3 and wma sound files. I just clicked on the files and was prompted to install the appropriate codecs. The whole process was automatic. And it worked.

NB - first you have to add some extra repositories to Synaptic. There are guidelines at:
http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_add_extra_repositories

Enabling DVD playback was only marginally more difficult. Following the instructions at:
http://ubuntuguide.org/wiki/Ubuntu:Feisty#How_to_install_Multimedia_Codecs
I entered the following in a terminal:

sudo aptitude install ubuntu-restricted-extras libxine-extracodecs gstreamer0.10-plugins-base gstreamer0.10-plugins-good \
gstreamer0.10-plugins-bad gstreamer0.10-pitfdll

and pressed enter

(Note: The "ubuntu-restricted-extras" is a meta-package that installs : flashplugin-nonfree, gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-ugly-multiverse, msttcorefonts, sun-java6-jre and sun-java6-plugin)

Then I entered:

sudo aptitude install w32codecs

and pressed enter

To install DVD playback capability, I entered the following in a terminal, pressing enter after each:

sudo aptitude install libdvdread3
sudo /usr/share/doc/libdvdread3/install-css.sh
sudo aptitude install totem-xine
sudo aptitude install libdvdcss2

I popped "Pirates of the Caribbean 2" into the tray and hey presto - DVD playback in 'Totem'!

Tue Jun 5 2007 - adding Kubuntu desktop, then Kubuntu

I was keen to try the KDE look and compare it to Ubuntu's Gnome interface. At first I intended to create a fresh installation of Kubuntu in a separate partition. But then I came across a couple of sites which pointed out that I'd be using a lot less space on my hard drive for essentially the same result if I simply installed the Kubuntu desktop in Ubuntu. That way I could log into either Gnome or KDE.

Here are a couple of useful links. You don't need them to follow in my footsteps however:
http://ubuntu.wordpress.com/2006/01/13/ubuntu-to-kubuntu-keeping-the-menus-clean/
http://www.linuxjournal.com/article/9369

So I opened Synaptic, searched for 'kubuntu-desktop' and when it was found, checked it, ignored the warning and then hit 'reply'. Whoooh - nearly 200MB of download later, it was installed. Only one point worth mentioning - you'll be asked which desktop you want set as default. I chose 'gdm' - Gnome. 'kdm' refers to KDE.

Before I exited from Ubuntu, I noticed that many (if not all) of the KDE apps were already listed in the 'Applications' menu. If you google right, you'll find ways of avoiding this 'application crossover' - through both scripts and downloadable applets. I didn't mind. Anyway, my intention was to just uncheck the KDE apps I didn't want to see in my Ubuntu desktop in the main menu editor (system/preferences). (BTW, would those unchecked apps also be excluded from the Kubuntu menu? I tested that by unchecking 'Gwenview'. Turns out it still showed up in Kubuntu.)

So now I could log into either a KDE or Gnome session at login. I rebooted, and at login chose KDE. Hmmm - what would I see? Uh oh - that was Kubuntu alright. But the fonts were way too big. Come to think of it - so was the font on the login and password entry fields. Maybe they were related. I went hunting.

At http://ubuntuforums.org/archive/index.php/t-332101.html I found 2 separate pieces of advice. I tried the 2nd first - changing the entry font size in my theme settings. In a terminal I typed:
cd /usr/share/gdm/themes/Human
and then:
sudo gedit Human.xml

I changed the font size from 12 to 8 in this bit:

<item type="entry" id="user-pw-entry">
<normal color="#000000" font="Sans 8"/>
<pos y="2" x="2" width="-4" height="-4" anchor="nw"/>
</item>

That worked. But the KDE and session option fonts were still whopping. So I tried the 1st suggestion and added the suggested lines:
Options "UseEdidDpi" "False"
Options "DPI" "96x96"
into my /etc/X11/xorg.conf file in the screen section just under 'Defaultdepth 24'.

Then I rebooted. Whoops - that was a mistake. Disaster. I've cruelled my xconf.
DO NOT - I repeat DO NOT plonk those lines where I did.

Somewhere no doubt, someone has written a step-by-step guide to recovery from X-configuration failure. Unfortunately, I haven't found it... yet. After a few fruitless attempts at rebooting and issuing 'hope-for-the-best' commands at the prompt which resulted from each X-crash, I decided it would be better to cut my losses and just install Kubuntu in a new partition beside Ubuntu.

Sure enough, that went painlessly, and the outcome was a Kubuntu with the correct font size. Whatsmore I didn't have any overlap of KDE apps listed in Gnome menus and vice versa.

Of course, if I had been sensible and had backed up my xorg.conf file, it would have been a very simple procedure to replace the new error-laden file with the old one at a command prompt. But that was not to be...

So now I have Kubuntu as well. Shame about the lack of a desktop effects applet. Apparently you have to get your hands dirty with the console and commands to get that going. Another day maybe. And I noticed a rather noisy hum while using Kubuntu that never abated. I wonder what the story is there.

Sunday, June 3, 2007

Mon Jun 4 2007 - trying Kiba-Dock

I'd read here and there mixed reviews of something called Kiba-Dock. But I made up my mind to road test it when I saw a video demonstration at http://ubuntu1501.blogspot.com/search/label/eyecandy that looked sensational. Flying, sliding, springing, bouncing, pulsing, billiard-ball collisions - the list goes on. At http://www.kiba-dock.org/ there was mention of packages for feisty and a URL. So I lobbed over to http://download.tuxfamily.org/3v1deb/dists/feisty/eyecandy/index.html.

I grabbed the repository details: 'deb http://download.tuxfamily.org/3v1deb feisty eyecandy' from the top of the page and added that to Synaptic under Settings/Repositories. Then I searched for kiba-dock in Synaptic and selected 'kiba-dock' from the resulting list. Synaptic enforced the installation of 2 dependent packages. Fine. I clicked apply and installed all 3.

In the main menu under 'Applications' I now found 'kiba-dock'. I clicked it. Nothing happened. So I clicked 'kiba settings' (also under 'Applications') and enabled one of the plugins in the left hand pane called g-menu (Gnome menu). I clicked 'kiba-dock' again and at last, a dock showed. But contrary to the FAQs at http://www.kiba-dock.org/, I wasn't able to drag any launchers from my applications menu onto it. I'd half expected this. A couple of posters to the Kiba-dock site's forum had this very complaint.

Also I noticed that when I enabled 'akamaru' in kiba settings, the PC slowed to a crawl. CPU usage was mammoth. So there went all the nifty physics tricks and widgetry with the icons. Quite frankly, what I had was a dud. No launchers, no bouncing. But what about that demo site. Why did the dock work for others? I decided to find out.

I returned to that bosker demo page at http://ubuntu1501.blogspot.com/search/label/eyecandy
Some way down the page I found step-by-step instructions for installing kiba-dock, and noticed they bore little resemblance to the Synaptic path I had taken. This was command-line stuff. Ok, I thought nervously, I'll give it a burl. Unfortunately, the first time I tried it, I got a core dump error in the terminal window.

So I sought out all my kiba-dock folders (hidden and visible) and deleted them all, or in one case where I couldn't delete the folder - removed the 2 files within.
Then I tried again, and lo and behold - a nascent blue-striped kiba-dock. And I could drag launchers onto it! And akamaru was enabled by default and all those icon gymnastics came to life, just like in the video demo. Hey presto - kiba-dock in all its glory!

The only slight issue was that if the 'pulse' or 'zoom' effects were enabled on mouseover, a white square flashed briefly over the adjacent icon. This wasn't evident with the first installation via synaptic. But I prefer the dock without zoom - it makes clicking icons a little easier, so the issue hasn't been a show-stopper.

Sun Jun 3 2007 - Desktop Effects

Did I mention that Ubuntu found all my Windows partitions (and the DELL utility one!) and placed an icon for each on my desktop? That was impressive. I can see NTFS drives and peruse their contents. But I can't save files there. Not yet anyway. (But that will come)

Then I clicked the blue question mark icon in the top panel and read the help file, to familiarise myself a little more with the Linux world. I also went looking for the equivalent of Windows' 'add/install programs' and I found it in the 'Applications' menu (top panel left).

My goal for today was to get Compiz desktop effects. I had read about them online and was intrigued - wobbling windows, a rotating cube of the four workspaces and transparent window borders. This I had to see.

First some more background reading. I found the compiz.org site and also a very useful unofficial Feisty Fawn 'how-to' guide at http://ubuntuguide.org/wiki/Ubuntu:Feisty. I should mention at this point that my video card is an nvidia (GeForce), and this guide has a brief section on installing Compiz with nvidia. But I also had the benefit of some advice from a friend. "Install the nvidia driver first", he said. "Save yourself some pain. Use 'Synaptic' - look for nvidia-glx." And so I did. Under 'System/Administration', I found 'Synaptic package Manager'. I opened it and in the search box typed 'nvidia'. In the resulting list, I selected 'nvidia-glx' and clicked apply. Installation was straightforward. I didn't get a prompt to restart. But since this seemed like a major system change, I did. (Did I need to?)

Back in Ubuntu I chose 'Desktop Effects' from the 'System/Preferences' menu and ticked both options. A warning prompt later (they're a little racy and unsupported, you know), I had both window wobble (grab the title bar and shake) and workspaces on a cube (press ctrl-alt and the drag with your mouse on the desktop). Snodger!

I couldn't see any evidence of transparent window borders though. I was expecting something like Vista's aero glass, but they seemed unchanged from the Ubuntu 'Human' theme default. After an hour or so of googling and forum trawling, I discovered that in fact the 'Compiz' themes listed at gnome-look.org as well as some application called 'Compiz themer' belong to a former era (prior to the split with Beryl?) and no longer work in Compiz. Bottom line - the latest stable version of Compiz (the one which comes with Ubuntu) has no separate category of themes and has no system tray applet or program listed in the menu options, for configuring its effects. But you can make window borders transparent, fairly simply. Here's how:

The only configuration tool available with my current setup is the gnome configurator, called gconf. But it's hidden by default in Ubuntu. So I went to 'System/Preferences/Main Menu' then clicked on 'System Tools' under 'Applications', ticked 'Configuration Editor' and closed that window. I was now able to choose 'Configuration Editor' from the 'Applications' menu. Following the instructions I found in a forum entry I've since lost, I clicked 'apps' then 'gwd' then right clicked on 'metacity_theme_active_opacity' and changed it's value to .7 (ends up as .69 ?!) I also adjusted the 'metacity_theme_opacity' to .5. Then I opened a couple of windows and by sliding one across the other could clearly see the content of the lower pane through the title bar of the upper. Whacko - transparency!

So what's the story with themes? Quite simply, you use Metacity themes. These are the standard ones - the type included with Ubuntu and listed under 'Preferences/Themes'. There are also reams of others you can download from gnome-look.org. And then you adjust the opacity of 'gwd' (what is that short for?) in gconf (see above). I imagine there's a Metacity theme somewhere that looks a little like Vista and which, with an opacity of .3 or so, would look rather 'aero glass'. But I'm sticking with the default 'Human' theme for the moment.

Next question: What are Compiz extras? The Compiz site suggested installing them, so I located them in synaptic (see above) and installed. But what to do with them? What effects were offered and how do i configure them?

http://www.compiz.org/Plugins describes briefly all the plugins. And http://www.compiz.org/Gconf-Editor gives an overview of gconf
I discovered in gconf under apps/compiz/general/allscreens/options that I had the following active plugins i.a.: gconf, png, svg, decoration, wobbly, fade, minimize, cube, rotate, zoom, move, resize, switcher, annotate, screenshot, scale, place, inotify, dbus, keybinding. The ones that interested me most were: fade, minimize, zoom, switcher, scale.

Note - there are a few dead-ends on the compiz site. The 'compiz-settings' app for example, has been abandoned. So ignore that avenue. It's down to gconf (see above) for adjusting Compiz effects. Generally speaking, key combinations enable them. On key combinations, http://computerbits.wordpress.com/tag/compiz/ was useful, but had me scratching my head in a few places. And this page has a good overview of the various effects - http://gentoo-wiki.com/Compiz, as well as key combinations.

Fade - this affects menus on opening and closing. I slowed this in gconf from 5 to 10.

Minimise - slowed this gliding effect (on minimising windows) from 1.5 to 1. Sweet.

Zoom-in = Super-key (windows logo) + wheel mouse up - yeah
Zoom-out = Super-key + wheel mouse down - bewdy

Switcher - ctrl-alt + tab - bonzer, got that working.

Scale - I could see what this would do at http://www.compiz.org/Plugins - tile all my open windows so that each was visible. But how to enable it? what was the key combination? I couldn't find a forum post that made sense to me. Finally I found the answer in gconf itself under compiz/plugins/scale/allscreens/options - the initiate key is ctrl-alt + up (arrow at bottom right of keyboard). Snodger - it's cookin'.

NB - by default, the Ubuntu (or Gnome) setup gives you 4 workspaces. And you need all 4 to work the rotating cube. Sometimes, inexplicably, the workspaces contract to a single one, which disables the cube. You need to then reinstate the 4 workspaces by right-clicking on the workspace icon and resetting to 4 in preferences. Then deselect and reselect the cube effect under 'System/Desktop Effects' from the main menu.

Sat Jun 2 2007 - Installation & Wireless Connection

The road to Ubuntu begins. I am a Windows user and have been since windows 3.1. I've used them all -95, 98, NT, ME, and nothing but. Now however I'm feeling the tug. The word is spreading and the allure is too great. I must try this Ubuntu for myself.

My Inspiron 8600 laptop hardware is unchanged from the day I bought it, bar a memory upgrade to 1.25 GB. But my original 512MB would have sufficed. I also went for the top of the line graphics option at the time, which gives me a 1900x1200 resolution. That'll be interesting. Will Ubuntu detect it? I begin:

I downloaded the .iso image for Feisty Fawn from http://www.ubuntu.com/getubuntu/download. From the local mirror it only took ten minutes or so. Then I burnt it to a single CD using ImgBurn - a free Windows program which burns iso images. Then I labelled the CD, put it in the tray and restarted. As soon as the DELL logo came up, I hit F12 and then chose to boot from the CD ROM drive. Ubuntu logo - I'm away. After a couple of minutes Ubuntu was running from the CD. I didn't tarry long here because I'd already decided to 'keep the thing'. But I did note it had found my resolution OK. I clicked the 'install' icon and then followed all the prompts. It was the usual OS installation stuff - time zones, keyboards layouts, user names etc. The only part worth mentioning here is the disk partition. Most users should simply elect for Ubuntu to do this unguided. Relax - your Windows partition will be resized unscathed and a new partition of sensible size will be created for Ubuntu. I chose to do a manual partition because I wanted to keep it small for apps only. My intention was to store all my music, images and documents on an existing NTFS partition which would be shared with Windows (more on that later). I ended up with a 7GB partition for root (/) and a 2GB (twice your physical memory - is that still the rule?) for swap. I got a little anxious about removing the CD at the end of the install process, but I didn't need to because it ejected the disk automatically when it was ready. I hit enter and the laptop rebooted.

The GRUB boot loader looked a little 'terminal window' and confusing, but I simply waited for Ubuntu to load automatically and it did. I logged in and was soon presented with the caramel 'human' face of Ubuntu. I like it. The computing world has enough blues.

First thing I wanted to do was set up my wireless connection to our home's router. I saw a network connection icon in the top right system tray and clicked it. Bonzer - it had found mine and my neighbour's wireless networks. I selected mine and in the ensuing dialogue box entered my WEP key. There was some confusion here - was my key 'passphrase' or '40/104-bit hex'? Trial and error taught me it was the latter in my case. I was in! A tooltip notification told me I was connected. Yay. Now for the lesson I then learned - don't cancel the request by the 'key-ring' prompt to record a password to use with you wireless connection. I know. It seemed strange to me too. I've just entered my connection's WEP key. Why does Ubuntu want another password? But enter one - anything, even 'boo' will do, because if you don't, you'll have to find your WEP key and enter it again next time you log on. That's what I found out.

And then I tweaked Firefox - small icons, no bookmarks toolbar, add tab icon. And I read some news online. My first day with Ubuntu was done.