Saturday, December 18, 2010

New version 1.0.10 of Dropbox released

Just a couple of days ago, a new version of the online file sync and backup utility Dropbox was released. It now supports selective sync, allowing certain folders only to be synchronised across different PCs, instead of just everything. I've just installed it on two of my Linux machines, with no ill effects. I followed the instructions shown on the Dropbox forums here, with a slight modification as shown here. I'll describe it here as well, in a way that doesn't involve using the command line (if that isn't your bag, baby):

Step 1: Delete the .dropbox-dist directory, found in your home directory. You may have to hit control+h to show the hidden files and directories in Nautilus.

Step 2: Run Dropbox, from the Applications -> Internet -> Dropbox menu

Dropbox will then start, popping up a box asking whether you would like to download the proprietary daemon. Click Yes to that (else it won't work), and it should start up.

I'll be interested to see if it has overcome the problem it had with the previous version on my laptop, where it didn't seem to like the encrypted home directory, and would often crash on startup. I've tried one reboot so far, it came up OK, so I'll keep an eye on it.

Sunday, November 28, 2010

Getting a media centre remote working with LIRC, in Ubuntu 10.10

Recently I bought a new remote control for my PC, to replace the one that came with my TV tuner card. I picked up a Hauppauge Media Center Remote Control Kit, model 335, which has more logically labelled buttons than what I had. It looks a bit nicer, too, an important consideration as I am attempting to finally build a Home Theatre PC to go in the lounge room.

While the previous Technisat remote worked fine in Ubuntu 10.10, I read of some other people having problems with getting remotes to work - namely the Media Centre-compatible versions. When I plugged in my new one, I also noticed the problem.

A bit of trawling around on the internet uncovered a thread at the ever-reliable Ubuntu forums. It turns out that the newer kernel includes a module for the media centre remote (mceusb), that clashes with the lirc_mceusb module you want to use, with LIRC. When the two modules are loaded, neither works.

What has to be done, is make sure only one of them gets loaded. The user uniden9 posted an excellent how-to in that thread linked above, describing two methods that are available - disabling the old lirc one, or disabling the newer, kernel built-in module. Based on other responses in the thread, most people had more luck with the second method - disabling the newer one. I guess the MythTV key bindings etc. would work better with the old version.

I have included the relevant quote from uniden9's post here, in case there is a problem accessing the forums:

2. Blacklist the kernel source drivers and use the old dkms built drivers.
-Well you already have lirc-sources-modules install and probably had this working on 10.04 or older version of ubuntu.
A. Edit /etc/modprobe.d/blacklist.conf , create it if it doesn't exist.
Add>
blacklist mceusb
line to the file and save it.
B. Update initramfs, #sudo update-initramfs -u -k all
C. reboot
D. Reconfigure lirc if its not already working.
#sudo dpkg-reconfigure lirc
On the Remote, Select "Windows Media Center Transceiver/Remote (All)
E. Thats it.
This is the method I chose after wrestling with button repeats on option 1. I use XBMC and could not figure out how to disable Ubuntu treating the remote as a keyboard device.

I used this method as well, and now have the media centre remote working just fine on my system. I'm now just waiting on the arrival of a VGA to Component Transcoder, that will hopefully allow my PC to connect with my older-style TV that has only component inputs. As an aside, although I have a graphics card that has a component-out attachment, it only puts out a 1080i, 60Hz signal. My TV, being made for the Australian, PAL-based market, requires a 1080i, 50Hz input signal. Fingers are crossed that the transcoder will allow it to work - I'll be posting an update when it arrives and I can try it out.

Thursday, November 11, 2010

Getting Ubuntu installed on a laptop

I had managed to score for free from work an old laptop that was past its use-by date, for business use at least. It's an LG S1 Express Dual, with a Core Duo (not Core 2) processor. Previously, to extend its life a little longer I had installed 2GB of memory in it and a faster hard drive - that made a remarkable difference.

Being from around 2006, it had come with Windows XP pre-installed. I wanted to try a newer operating system than that, so initially I put Windows 7 on it. Now for people saying Linux is hard to get driver support for, Windows 7 was an ordeal in itself. First of all, LG have basically stopped making laptops. Drivers for it were not available on their site for windows 7. Some Vista drivers were available, so I had some of those installed. The graphics chip in this machine is an ATI Mobility Radeon X1400. Going to ATI/AMD's site to find a current driver just sends you to a page saying that it's the laptop maker's responsibility - they don't support it any longer.

Even things like network drivers were unable to be found easily. I remember having to scrounge around looking for whatever I could find, on obscure and slightly dodgy driver sites. In the end, Most of it worked. The on-screen display didn't work, some of the special functions didn't work, and got no joy from the included remote control.

One other setback was the BIOS not recognising hard drives over 137GB/128GiB in size. A bit of a setback, since I'd like to make use of all of the 160GB drive that was installed in it. First up, I tried dual booting with Linux, using the space at the end of the drive that BIOS and Windows couldn't see, but was no problem for Linux. Ubuntu booted fine, but Windows would refuse to boot, until I shrank the partitions down to fit under the 137GB limit.

Finally, I decided to just run a complete install of Ubuntu. Taking advantage of the release of version 10.10, I put in the 32-bit install disc (the Core Duo T2400 does not support 64-bit OSes) and nearly everything seemed to work pretty well. Especially networking, which did not work under Win 7.

A bit of tweaking was needed though. Sound wouldn't work. A little digging through the forums revealed the module for the sound card wasn't installed, and the following had to be added to the end of the file /etc/modprobe.d/alsa-base.conf:

options snd-hda-intel model=lg

This loaded the correct module at boot time, and sound now works.

One other problem I had was with the suspend functionality. While the system would go into suspend mode correctly, upon resuming the wired networking would refuse to work. I haven't tested wireless, as I do not have a wireless router yet. A little research revealed it was due to this bug, and that by manually unloading and reloading the network module, it would come back to life again. The commands to do that are:

sudo modprobe -r et131x
sudo modprobe et131x


Thanks to the user P4Man at ubuntuforums.org, a short script has been created, as detailed in this post:

Create a script named /etc/pm/sleep.d/11ethernet, with the following contents:

#!/bin/bash
case $1 in
suspend)
rmmod et131x
;;
resume)
modprobe et131x
;;
esac


Changing the “et131x” value to whatever the network module is. That is what the module is on this LG laptop.
Save file and make it executable:

sudo chmod 755 /etc/pm/sleep.d/11ethernet

Now, when the laptop goes into suspend mode, the network module gets unloaded, and upon waking up, the module gets reloaded. Networking works!

Boot up time is nice and quick with 10.10 as well - quicker than windows 7 which itself was no slouch. A far cry from its original state, with a slow old hard drive, Windows XP and a bajillion little programs that started on boot. All in all, it's a nice machine. Now I just have to buy a battery for it that works...

Tuesday, October 26, 2010

Latest Ubuntu conkyForecast update fix

(Updated 27 October, added recommended ln command, see below)
Today's update to conkyForecast, the program that enables the current weather conditions and a four-day forecast to be displayed on the screen, came with an unexpected downside. It stopped working. A bit of searching around for others with similar problems prompted me to look at the .xsession-errors file, in my home directory. From there, the message:

/usr/bin/conkyForecast: 3: /usr/bin/python2: not found

kept repeating. Having a look for the file /usr/bin/python2 showed that yes, that file was indeed non-existent. This was puzzling. I opened up the file /usr/bin/conkyForecast, to see where it was mentioned. It is only a short file of a couple of lines, but one of them did call python2. This is a link in the /usr/bin directory, pointing to python2.6.

There are two fixes to this. One, I edited the file /usr/bin/conkyForecast and changed python2 to python. This fixed it - the forecast was displaying on screen again, but further updates to the script would overwrite this, meaning you'd have to do it again. Therefore, I'd recommend the following method.

The other, recommended, way to fix it is to re-create the python2 link in /usr/bin: I just restored it from a backup made a few days ago (Yay for backintime!), but you could just create a link to python2.6 with the ln command, as below:

sudo ln -s /usr/bin/python2.6 /usr/bin/python2

As an update, a little further searching revealed this post on the Ubuntu forums. This is a known issue with Ubuntu 10.10, where there is no link to python2. ConkyForecast was updated to point to python2, in preparation for later versions of Python.

Saturday, October 16, 2010

Upgrade to Maverick Meerkat - version 10.10 worked!

I am writing this from my newly-upgraded Ubuntu 10.10 system! This has been the second time I upgraded the installation, rather than start afresh. I was a little nervous, to be honest, but backups were made before the upgrade so there was an escape plan.

There were only a few issues that were pretty easily fixed, and I may, just may, have fixed the hanging on boot problem I had with version 10.04.

One problem I had was the Hard drive temperature reporting in Conky - it stopped displaying a temperature. This was because the hddtemp command could only be run as root - Conky doesn't run with those privileges, and I didn't want to start doing so. A quick search revealed a single line command to allow hddtemp to be run as a regular user:

sudo chmod u+s /usr/sbin/hddtemp

After doing that, the disk temperature re-appeared and all was good.

Fixing the boot screen

This was a problem that I had in the previous version, 10.04, as well as in 10.10. It is to do with running the Nvidia proprietary drivers, and switching to different video modes. Basically, there are some steps to try at this site, which I did. It involves setting some video modes in the boot loader. I initially tried 1680x1050 (about the best that was supported by my card, even though it runs at 1920x1080 once at the desktop) and got a comically large ubuntu logo during boot. A later change to 1280x1024 yielded a much better result.

So far, the boot and shutdown screens look much better, and I haven't yet had it hang on me. I am hesitant to call it truly fixed until a few more weeks have passed.

Edit January 7, 2011: If you do these changes and then switch back to the open source driver (nouveau), you have to undo the changes to be able to set the proper resolution for your screen(s).

Monday, October 11, 2010

Adding the new Ubuntu fonts to your existing installation

With the release of version 10.10 comes a new set of fonts, named Ubuntu. If you're not ready to upgrade to the new version just yet, you can install just the new fonts by downloading them here.

Just double-click the downloaded file to run the installer. You'll have to change the fonts used under System -> Preferences -> Appearance -> Font; change The Application, Document and Desktop fonts to "Ubuntu", the Window title font to "Ubuntu Bold".

If you're using Google Chrome, you can install this extension to use the new fonts. You will probably have to change the default fonts under the preferences menu.

Friday, October 8, 2010

My list of tweaks - what I change and add after a fresh install

With the release of version 10.10 in a few days, this post partly serves as a reminder to myself what I have installed on my machine, and how it is set up. It will probably also make pause and reconsider doing a clean installation, when I look at the amount of configuration I would have ahead of me!

Programs not in Ubuntu repositories:

Crashplan - for backing up user data such as documents, music, photos. Not so much for system data - I use backintime for that.

Dropbox - for syncing some of my data between computers - e.g. between home and work PC.

A whole bunch of Google programs - Google Earth, Chrome, Picasa and Desktop. They probably now know more about me than I do...

conkyforecast - a part of Conky that supplies weather forecast info on the desktop, along with a bunch of other system stats that allow me to keep tabs on what's happening on the PC. One of the programs I consider essential. Working without it is like driving a car with no dashboard.

Photography/Image editing:

Flickr Uploader - I initially downloaded this because I stopped using F-Spot, as it was too damn buggy. When I was trying other programs, none of them had a way to upload photos to my flickr account. This utility is pretty handy, letting you tag photos individually or as a group.

DigiKam - I thought for a while before installing this, as it is a KDE program. Choosing to install this requires also installing a bunch of the KDE framework. If you are interested in keepiing a lean system, maybe this isn't for you. However, I was looking at some sort of photo management and editing software. Bibble and Adobe Lightroom are the main contenders. Bibble is a paid app, as is Lightroom, which has the downside of being Mac and Windows only. I thought, what the hell, digiKam is free, so I'll try this one first. So far, it has worked pretty well. It isn't quite as polished as the other two, but my wallet says it is just fine.

Music:

Rubyripper - an open-source equivalent of Exact Audio Copy for windows.

Other:

Bleachbit - does a similar job to what CCleaner does in Windows.

Virtualbox - for running virtual machines, testing other operating system installs. Good to tinker and learn things.

Deluge Bittorrent client. I prefer it to Transmission (which is installed by default).

HDParm: a later version, which includes a copy of the wiper script that performs garbage collection on solid state hard drives, marking sectors as deleted. The new version of Ubuntu should have this included by default (as well as the 2.6.35 kernel, that supports the TRIM command).

Tweaks:

Since I have a solid state hard drive in my system (and I highly recommend them for anyone looking to upgrade their PC) there are a few SSD-specific tweaks you can do to get the best out of them. This site has an excellent guide. I didn't do all of them, just enabled the noop disk scheduler and mounted filesystems with the noatime flag.

There are a number of things to be done with regards to MythTV, one of which is setting up LIRC for the remote control to work. One thing I noticed with a bit of early tinkering with a later kernel was that the remote ceased to work with that kernel - that's a concern I have with moving to the new version.

Enabling the medibuntu repositories to allow MP3 playback, DVDs and a few other restricted formats. Version 10.10 apparently has an option to enable all of these at install time, which is welcome.

That's just a few things I've changed, no doubt I'll think of many more, especially if I do a reinstall from scratch. I'll let you know how I go: if I do an upgrade (quick, convenient, chance of hosing the system), fresh install (time consuming with all the re-configuring and reinstalling, but will be a nice fresh system), or staying with 10.04 (quickest of all, but missing out on new toys). I might hold out for a little while, but I'm sure I'll succumb to the allure of new and shiny...