Tuesday, 23 April 2013

Seeing Clearly

My refurbished PC is up and running but I wanted to share my screen using a VGA switch. This had a disastrous effect on Ubuntu's appearance as the OS didn't seem to be able to detect the screen's native resolution through the switch although it had no problems when I plugged the cable directly into the video card.

There's a fair few solutions on the web, but I couldn't seem to make any work, so I cobbled together a fix which, although not particularly elegant, does work (for me). Simply put, I automate a command at startup that adds the desired resolution and forces Ubuntu to adopt it as the default.
There are a couple issues with my solution:
  • The script runs at startup not at boot, so I'm stuck with a low-res login screen.
  • The script (initially) runs too early giving me some weird video effects until the resolution had been reset.
  • This will only work for my login
As I'm the only user, I don't have to worry about multiple fixes. Moreover, I've fixed the second issue and resolved to live with the first. Here's how I solved the problem:

First of all, ascertain the monitor's native resolution. I just Googled mine, but if you have the manual, the information is probably in there. My resolution is 1280x1024 with a refresh rate of 60Hz. Now create the resolution in Ubuntu. Open a terminal and type:

sudo cvt 1280 1024 60

Change the values to suit your monitor (horizontal, vertical, and the refresh rate). The output of this command will look similar to that below.

# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync


We're interested in the second line (the one starting Modeline): we'll be using this information in our script later.

Next, determine the Output Port Name (aka monitor designation). In your terminal, type:

sudo xrandr -q

The output of this command gives you information about your monitor and how it's connected to the PC. The output will depend on the video driver in use; for my analogue connection, the port name is VGA-0. If you're uncertain which designation is correct, look here (under Output Port Names) to see which is the most likely.
Now prepare the script that will run at startup. Open a text editor such as Gedit with:
sudo gedit /home/username/.resfix
Then:
#!/bin/bash
      # Fix screen resolution at boot via VGA switch
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA-0 1280x1024_60.00
xrandr --output VGA-0 --mode 1280x1024_60.00


Change the values (in red) to suit and then save and close your file. Next, make the file executable. In a terminal:

sudo chmod a+x /home/username/.resfix

Now add the script to the startup routine. The easiest way to do this is via the shutdown button - just select Startup Applications... from the dropdown menu. In the Startup Applications Preferences dialog, click Add. Now complete the Edit Startup Program:
  • Name: anything you want!
  • Command: /home/username/.resfix
  • Comment: something useful!
One last thing to do and that's to delay the script so that it minimizes the weired video. In a terminal:

sudo gedit /home/username/.config/autostart/.resfix.desktop

At the end of the file, add the following:

X-GNOME-Autostart-Delay=15

The number is the time in seconds that you want to delay your script: change yours to suit. Reboot for your changes to take effect.

Sources &References:

Sunday, 21 April 2013

I Wasn't Expecting That

You recall the generic hard drive that I ordered for my refurbishment project?

Well, it turned up on Thursday and it turned out to be a Western Digital device (WD1600AVJS)! Now I wasn't expecting that.

Sources & References:

Wallpaper of the Month


This is Llyn Y Cwn (SH 637 584) taken yesterday. You can just about see Moel Eilio on the horizon (centre).

I had a fabulous day on the Glyerau, starting with the North Ridge of Tryfan (including North Tower), onto Dexter Gully (I kid you not!) on Bristly Ridge, Castell Y Gwynt (just for a little exercise), and bagged Y Garn just to finish off. The weather was glorious and I am always happiest when I'm in the Ogwen Valley.

Sources & References:

  • None

Raring to Go?

Canonical releases 13.04LTS (Raring Ringtail) on 25th April 2013. Joey-Elijah Sneddon (of OMG! Ubuntu!) gives a nice summary of what we can expect from the latest release.

I'll try it on the 6400 to see if Canonical has fixed the virtual file system issues and then think about upgrading my desktop and file server. However, there's no urgency, support for 12.04 runs until April 2017.

Sources & References:

Tuesday, 16 April 2013

Mending & Making Do

I'm in the process of refurbishing a spare pc for my new workshop. It's only going to be used for driver downloads, Google, and lightweight stuff such as email which is just as well: this puppy is ancient.

But, and here's the thing, it already runs Ubuntu 12.04 without breaking a sweat!

The Motherboard is an ASrock P4i65G so replacing the 40GB IDE hard drive is no problem because the board supports SATA. So, I've chosen the cheapest hard drive I could find: a 160GB generic device from Amazon for the paltry sum of £23.99 with free shipping.

I'm also upgrading the RAM from it's current 512MB (yes, you did read that right! Two un-matched 128MB sticks that can only be working as SIMM) to the maximum allowed on the board, 2GB DIMM. Again, nothing fancy and as cheap as chips: 2 x 1GB generic memory sticks by Komputerbay (whoever they are).

I needed a SATA cable (obviously!) and a Molex/SATA power adapter: all told, the total was less than £60.00.

Refit time is around fifteen minutes and installing Ubuntu will take an hour or so with update - that's pretty sweet.

Sources & References:

Thursday, 11 April 2013

WiFi Speed Tip

I love my little appartment, but I've been thinking for a while now that I need to add a wireless access point to my network in order to improve WiFi reception in my lounge. After all, I don't want to be sat in my home office all the time!

However, whilst reading December's back issue of Maximum PC magazine, I was reminded the there are cheaper options to try before getting out your credit card. Ok, so it's no huge revelation that you can change your WiFi channel, but sometimes the obvious just passes you by: inSSIDer is a utility designed for Windows (and Mac1) but you can also download it for Android from Google Play.

So, I downloaded it to my Samsung Galaxy Advance, sat in my lounge and looked for the best channel to use. The performance improvement was substantial, so I may spend more time on my couch from now on!

Notes:

  1. There is a version for Linux, but reports about its efficacy are mixed. I just found it easier to load onto my mobile phone and analyze my network that way.

Sources & References:

Wednesday, 10 April 2013

Value Writ Large

For both personal and professional reasons I've been reacquainting myself with the various Windows operating systems recently and I chose Mike Meyers' tome for no other reason than it offered broad coverage of XP, Vista, and 7. However, this book proved to be far more than a Windows instruction manual and it has become one of the few books that, when I finished it, I immediately started re-reading!

I have previously been guilty of complaining that computer books are over-priced but this is clearly an exception. With a rrp of £40.99, each page (excluding Appendices & index) costs just 2.8 pence. Given the information density, illustration quality, and the fact that you are unlikely to pay the list price, this represents superb value for money.

Myers keeps the language accessible and eschews the gratuitous use of intensifiers that can make reading (and understanding) technical literature such a chore. This makes this an enjoyable (yes, enjoyable) read! Criticism is limited to Myers occasionally forgetting that the world stretches beyond the borders of the USA and a little too much advertising for his Company. Nonetheless, even if you have no intention of taking the CompTIA A+ exams, this an outstanding introduction to computing for aspiring techs or enthusiastic amateurs alike and I have no hesitation in rating it a five star publication.