Sunday, 28 September 2014

SSH - Sharing Privately

Apart from loving the look and feel of the Cinnamon desktop, Mint 17 has another attraction over some other Ubuntu derivatives such as Lubuntu: Secure Shell (SSH) has native support from the file manager GUI.

Many of my posts over the last four years have been about networking & file sharing using Ubuntu and I have used (and promoted) Samba as the solution to my particular circumstances. However, recently I have become increasingly aware that Samba is not without its problems, particularly read/write permissions and lock files on the remote server. These problems aren't terribly serious and there are ways to work around the issues; but I want my file server to be just that and I don't want to find workarounds for simple file sharing on a private network.

As an example, you may know that I spend much of my free time in the mountains of North Wales and take some of my pictures on my mobile (cell) phone. Rather than slip the ssd out of the phone and into a card reader (meaning that I have to stop the card and disassemble the phone) I normally use Bluetooth and set up a personal area network (PAN) to transfer the files to a laptop or desktop. Using Samba, I find that I can't simply copy the new files to my pictures directory on the server because I don't have the necessary permissions. Try as I might, I can't seem get the read/write access right. I've also had problems with GnuCash, meaning that I have to use the program on the server to update my finances - not ideal!

Using Secure Shell to connect to my server resolves all of these permission issues at a stroke and, for all intents and purposes, it behaves exactly the same as accessing local files. It has the additional advantage in that directories on the server do not need to be shared in the conventional sense and that makes them accessible only to me (or anyone that steal my login credentials).

To access your files you need only to invoke the Connect to Server... dialog from Nemo (File > Connect to Server...) and provide the necessary details.

If you've set up Samba to recognize netbios names, then it's pretty straightforward: the port default for SSH is 22 (and will only change if you've changed it!). Once connected, you can access your files and directories from Nemo's GUI and use them locally. This may be overkill on a private network, but using SSH also resolves another irritating problem: file lock. Using Samba, if an application wasn't closed before shutting down the client pc, the file lock would remain on the server (effectively making the file, read only): SHH seems to resolve this problem because Nemo is closed down as part of the normal shutdown sequence.

One final tip, if you're having trouble connecting to your server, check that ufw is allowing incoming traffic on port 22:

sudo ufw allow proto tcp from 192.168.0.0/24 to any port 22

Sources & References:

Friday, 26 September 2014

CQ60 - Reminted

It wasn't long before the new Presario CQ60 ran into problems: despite managing to achieve stable graphics using Mint 17 Mate, I couldn't seem to maintain a persistent WiFi link. Often, the hardware button wouldn't work and, even when it did, it rarely made a difference as to whether or not the laptop connected to my network. Issuing the terminal command:

rfkill list

would show the hardware blocked and the command:

rfkill ublock all

had no effect. It was sometime before I realized that this is by design! It was clear that I had to find a way to make the hardware switch work if I wanted this laptop to be more than a vanity project.

Having read some comment online that Lubuntu had a more reliable wireless platform, I installed the latest version (14.04 LTS) of the Ubuntu derivative to see if it made any difference: it did, effectively ruling out hardware as the source of the problem. Had I merely wanted a functioning laptop I could easily have left the lightweight operating system in place but, whilst this is undoubtedly a viable solution, the truth is that I'm not terribly keen on Lubuntu and I really love Mint Cinnamon. There are also some practical networking reasons for preferring Mint over Lubuntu (specifically, native SSH support) and I want to migrate from SAMBA to manage my network, so the research effort began!

This problem with the Presario is not entirely unknown and it seems that there is no single solution. Nonetheless, there does seem to be an online consensus that replacing the ath5k driver for the Atheros chipset for the ath9k driver is the most successful fix and I resolved to give it a try. However, fate intervened to scupper my plans.

At some time on Wednesday of this week I lost my WAN connection: this makes testing a WiFi connection problematic! It was twenty-four hours before the restoration of my connection and I didn't get around to reinstalling Mint until late yesterday afternoon. I decided to go for Mint 17 Cinnamon and, as always, the WiFi connection was flawless on the live disk but, more importantly, it was also flawless after installation to the ssd and I have no idea why! This condition has persisted beyond the initial (307MB) software updates and countless reboots (both restarts & cold boots), so I'm assuming that the problem is resolved. I can only identify two candidate processes that may have influenced this change in fortune:

  1. I didn't format the /home partition during installation but used the existing partition that I set up when I installed Lubuntu.
  2. I had to reset my hybrid router yesterday in order to re-establish a link to the WAN when my connection came back up.

It's not clear if either or both of these changes had the desired effect, but I remain connected a day after installation!

Having also had some unpleasant experiences with the graphics drivers during previous implementations of Mint, I decided to install the nvidia-304 legacy driver right off the bat and it has proved to be a good decision. Sure, the boot sequence isn't as pretty as it would be using the default nouveau driver, but, with the improved boot time delivered by the new ssd, who cares? Moreover, there is absolutely no flicker or distortion during operation and I now have a stable (as well as, connected) Mint 17 Cinnamon installation.

This little laptop has exceeded expectations although it has proved to be quite a challenge to get it running the Mint OS. The irony is that, despite learning a great deal about networing drivers in Ubuntu, I can offer no explanation as to why the problem has been rectified but I'm thrilled that they have been.

Sources & Reference:

  • Ubuntu Manual Pages: rfkill (see ublock)
  • Lubuntu: Home

Saturday, 20 September 2014

Compaq Presario C60 - Minted

Well, this is my first post from the Compaq Presario CQ60 found in a dumpster a week ago! It's been an interesting repair project and one that has had me scratching my head a couple of times: but I think I finally know why the previous owner abandoned this cracking little machine: dust!

OK, first the low-down on the specs (and I use the word loosely). This is no speedball (even when it was new): it was originally designed to run Microsoft Vista and one wonders how well it managed that! The processor is an AMD Sempron SI-42 - so no records broken there even with 3GB of memory! That said, the previous owner loved this machine and there is very little damage. Moreover, the 15.6" screen is superb.

My daughter Lozzy installed the new hard drive; a 60GB Corsair ssd that I picked up for less than £40. The battery was as cheap as I could find (around £12) and I really don't expect it to last very long. So, all ready to install an operating system. This is where the problems started: this laptop hated Mint Cinnamon and the graphics stack crashed on every boot regardless of the driver I installed - on to Plan B.

We had much more success with Mint Mate and, after loading the legacy NVidia driver, even the graphics stack behaved. Now, if we could only solve the problem of the system running hot (and I do mean hot!) we'd have a nice little system. The heat problem was a real issue with bottom of the case almost too hot to touch just a few minutes after booting. There's no fine fan control in the bios and eventually I was forced to strip the machine to clean the cooling system. I've seen worse but there was quite a build up of dust and lint and cleaning it has resulted in an almost silent case fan: that's better for battery life and performance.

The new battery is giving surprising performance with a couple of hours per charge and the ssd gives a boot time of less that 50 seconds. It's not a stunning performance, but it 's not bad for £50.

Sources & References:

  • None

Thursday, 18 September 2014

Inspiron 6400 - Wallpaper of the Month

A stunning day in Snowdonia National Park yesterday has prompted an early change in my desktop's wallpaper!

This is taken on my phone (a Samsung Galaxy S3 Advance). The view of Snowdon (in the distance) is taken from the Nantlle Ridge looking (roughly) north east over Mynydd Drws-y-coed.

Sources & References:

  • None

Tuesday, 16 September 2014

Rotten Apple - Your Data & The Cloud

Something for nothing is good right? Well, not always. Apple's recent decision to interfere with users' cloud accounts without permission has caused a little controversy: notwithstanding the Company's dreadful taste in music, foisting music on customers who didn't ask for (and who don't want) it demonstrates utter disregard for customers' privacy (not to mention the associated security implications).

Following the public outcry, Apple has subsequently released a way to delete the offending album, but the affair highlights a bigger issue: if you give your data to a third-party to look after, you no longer control you data! Hand it over at your peril.

Sources & References:

Friday, 12 September 2014

Another Careless Owner!

Last year I reported on finding an old Compaq C700 in the recycling skip: well, I've just found another in the same skip! This one's a Compaq Presario CQ60 & I managed to recover a working charger at the same time.

My first thought was that this would be suffering from a shot screen (all too common with Compaq laptops), but it's not and I can find absolutely nothing wrong with this little beauty. Apart from needing a new battery (I couldn't find the original) and hard drive (sensibly removed by the original owner), this laptop is perfectly operational right down to the webcam. There's no damage to the case aside from the marks and scuffs associated with normal wear & tear. That is, if you ignore the missing rubber bumper on the bottom of the case!

I've gone for a cheap battery (I don't expect it to last more than twelve months) but a 60GB solid state hard drive - I really do want to see how much of a performance improvement an ssd will deliver and I have no need for a massive hard drive. Total repair costs are circa £50.00 and it's a project for my daughter, Lozzy to cut her teeth on!

We won't be restoring the original operating system (Microsoft Vista) and the AMD Sempron processor probably isn't man enough to run Win7, so we'll run Mint 17 and keep this as a play thing.

Sources & References:

  • None

Sunday, 7 September 2014

NAS Woes

Some years ago I made the mistake of buying a Western Digital network drive - there's a reason that they're cheap! Anyway, this week the hard drive failed (or so I thought) and this morning I took the enclosure apart only to find that it was the capacitors that had given up the ghost.

blown capacitors in WD network drive
What's All that Goo?

Because the drive uses hardware encryption, the data is unreachable: I can't even mount the drive to attempt a recovery. Assuming that the drive is still healthy (smartctl -H results in an access denied error message), I'm faced with several options:

  • Try to recover the data by finding a replacement enclosure with the same model number (yeah, good luck with that!)
  • Try to recover the data by repairing the pcb (replace the burned capacitors)
  • Sacrifice the data and reuse the drive building my own NAS

Most (but not all) of the data is already safely on my file server. I've lost some video but everything else is either duplicated or replaceable so, option 3 is looking favourite! I'm toying with the idea of a low-powered box running FreeNAS or perhaps even a Intel's NUC. I even looked into using a Raspberry Pi!

I've accepted that the data is gone and that I should probably format the drive, but I really can't decide on (or afford) a replacement. I'll mull it over but, in the meanwhile, my advice is to avoid Western Digital drives if you value your data.

Sources & References:

  • None