Thursday, July 29, 2010

Ubuntu Upgrade - The Plan

Well once again it's time to upgrade my Ubuntu install. OK, so I'm a bit late to be upgrading from Karmic to Lucid, but I've been busy!

Clearly I don't want to lose all that I've built up over the past year or so on this machine, but I have decided that I want to do a clean install. There are a number of reasons for this, the main one is that I haven't done so yet on this machine, and this Lucid is an LTS. Not that this means that I won't upgrade again in November, but it does provide an extra impetus to do it. The upshot here is that I'm going to need to generate a backup of my settings etc. so that I can restore them in Lucid.

User files

Thankfully my /home directory is in fact another partition, which makes it easier to keep, and provides a nearby backup location for all the other files that I've modified that don't live there.

Installed packages:

Thankfully apt remembers which packages the user installed, and which were installed as dependencies. Thus, after much forum searching, I've come up with the following line to grab all the manually installed packages:

aptitude search '~i!~E' | grep -v "i A" | cut -d " " -f 4 | sort | uniq > manual

This searches for all installed (~i) not-Essential (!~E) packaages, removing (-v) those that were installed automatically ("i A"). The descriptions are then removed (cut) and the list sorted and made unique. Since this is quite a big list (and I want to keep it so I can install them back) I threw this into a file.

I plan to run the same line in the new install, and then just ignore any packages already there. I'll probably take the opportunity to re-evaluate what I have installed too.

Config files

Modified config files are so easy to overlook. I expect that everyone's modified a config file somewhere, probably the apache config? These are somewhat harder to find unless you know what you've modified. If you've used gedit to modify them then remembering that it makes backup copies of the files it mods by appending a ~ to the name can give a clue. Beyond that I've not found a foolproof way to locate them, If anyone finds one let me know!

Application Data

Also (sort-of) in this category are things such as any LDAP or MYSQL databases that you might have lying around that you may want to keep.

Extra Repos

I forget to have a look at what repos I had added to my defaults, damn. Be sure you don't!

Tuesday, May 11, 2010

Laptop Keyboards

I was about to email Engadget with this as an `Ask Engadget` (I have anyway), and figured that this was probably a good place to re-post my gripe.

I've been looking for a new laptop for, well, ages and anything that's about the size that I want (13") seems to have a stupid keyboard unless I pay > £600. And even them most of them seem to suck.

The issue I'm talking about is exemplified by the image from one of their recent posts, where it's clear that more thought has gone into the look of the keyboard (though even there they failed) than the usability. The key issues (pun not intended) is that the keys are in the wrong places. As someone used to the good old style of laptop keyboards (that being basically a desktop keyboard slightly shrunk, no numpad, the arrows moved to beneath the return key, the inset/home/etc. 6 being arranged in a column next to the return key) I can't get used to this new craze to put the backslash above a flat return key. This seems the silliest place possible for it. Not only is it out of reach when you want it (as a massive command line user that's a lot of the time) but it's liable to get hit when you swipe for the enter key (probably the most used on the entire board).

Hence I'm wondering if there's a good reason that these keys are being moved around, and if there's any way we as a user community (please tell me I'm not the only one with this opinion!?) can let the manufacturers know that they're being silly?

In the mean-time if anyone can recommend a good, portable, (hopefully affordable) 13" laptop with a sane keyboard layout I'd much appreciate it. (I'm aware of the ViewSonic VNB131 and very tempted by it, though even that's not perfect)

Monday, June 22, 2009

Microsoft ClearType

I had mixed feelings about ClearType on XP - it seemed to be an addon that didn't achieve much. In Vista I didn't realise until recently that it is a default part of the OS and actually without it stuff looks weird. The system fonts seem to go bold, but making them bold/unbold doesn't make much difference.

In fact this change is the source of a number of forum posts akin to 'my fonts have gone bold, help!'. I myself spent a long time searching for a solution to this 'problem' - last time it occurred I ended up re creating my user account from scratch! I'm not sure why or how but this time it occurred to me to look up ClearType - I guess I saw it on one of the forums that discusses the issue.

I still have no idea what actually causes the change to happen but here's how to undo it:
  1. Open the control panel set called Personalization (right click on the desktop > Personalization)
  2. Click 'Window Color and Appearance' then 'Open classic appearance properties for more color options' which is at the bottom
  3. In the new dialogue box click 'Effects'
  4. In the next new dialogue box tick 'Use the following method to smooth edges of screen fonts' and set the drop-down to be 'ClearType'
  5. Click OK on both dialogue boxes to close them, applying the changes

Sunday, June 7, 2009

WinXP on netbooks

So Microsoft are again dictating to hardware manufacturers what they can and cannot use in their products if they want to have Windows XP on them. It doesn't matter if this decision is later reversed, or the story is true or not as it should never have been considered. (this goes for any company, in any market, that tries to restrict others in a similar fashion too).

The restrictions on what hardware you can use to run certain products should be purely technical ones. Just imagine if you bought a DVD or Blu-ray player only to find that it didn't work with your TV not because you needed some connector you didn't have but because it was too big! You'd be furious right?

Thankfully this situation will improved when Windows 7 gets released, but even that OS has restrictions if you use the very lowest end licence version.

The other issue here is that these limits do affect people who buy the non-Windows versions as these machines probably have the same hardware as their Windows counterparts, just a different OS installed.

Wednesday, April 29, 2009

Automatically mounting drives in Ubuntu

I know there's a number of guides out there that show you how to do this, but I always seem to end up combining a number of them to actually get what I want. What I want is the drive to be mounted once I'm logged in (I don't really care when, so long as it's instantly usable).

Here's how I do it

  1. Use sudo blkid to get info about the drive you want to be mounted.

  2. Make the folder that it's going to be mounted in. I normally put a folder in /media/ which has the same name as the drive. This keeps things simple and won't break any symlinks already in place. You do, however, need to unmount the drive first, and of course to make a new folder in /media you'll need to either be root or use sudo.

    I usually do this with:

    sudo mkdir /media/Data

  3. Edit /etc/fstab (you'll need to be sudo) to add the following lines:

    UUID=$DRIVE-ID $FOLDER $TYPE defaults,umask=000 0 0

    This line specifies where to find the drive where to mount it and how. You need to replace $DRIVE-ID with the UUID number for the drive you got from blkid, replace $FOLDER with the full path to the folder you want the drive to be mounted in and $TYPE with the type of filesystem used on the drive, which you can also get from blkid.

    I usually add a comment line, so I know what's happening, then this becomes:

    # /dev/sda5 - Data
    UUID=4820-8D15 /media/Data vfat defaults,umask=000 0 0

That's it. Now whenever you start Ubuntu your drive will already be mounted. If you want to mount it now without rebooting then you can tell Ubuntu to mount everything in the fstab now by using:

mount -a

Wednesday, April 15, 2009

Opening files via WINE in Ubuntu

As a windows user I enjoyed the power of Notepad2 (a lightweight yet powerful notepad replacement), and while the features of gedit are useful they're not what I'm useful. Indeed a number of what I would regard as essential features are in a secondary plugin set that you have to track down in the repos (gedit-plugins), hence I wanted to use Notepad2 in Ubuntu. Thankfully Notepad2 worked immediately under WINE, removing any troubles that I might have incurred there, though I still needed a way to directly open files into the program, preferably via a simple double click.

I investigated using a custom wine command, with a number of various symbols after the path to Notepad2, searching for the one that would pass the filename in a manner that it could understand, but without much luck. Google, however, had some answers and I found this post.

The solution is to call a small bash script which then generates a link file within WINE which points to the file you want. This works fine except that the program inside WINE doesn't get to see the original filename (this isn't a problem when saving, but is annoying when using programs that display the filename in the title bar and elsewhere). To resole this I made a couple of changes to the script such that the link file uses the name of the original file, rather than a pre-defined static one, these mods are in my reply to that thread.

Wednesday, March 25, 2009

Using network computer names on a local network in Ubuntu Linux

This is something that works straight off in Windows, yet I just spent a while struggling with it in Ubuntu.

The solution is remarkably simple:

If the other computer is running windows and you can't ping it using its NT network name (and you'd like to) then you might need winbind, or to add wins to your /etc/nsswitch.conf file. Here is the guide I followed.

If the other computer is running Ubuntu then you might need to add .local to the computer's name - if the remote computer is called mydesktop then mydesktop.local or mydesktop.home is probably the network name you need, depending on how your router is setup. This is known as Zero configuration networking.