Wednesday, 17 December 2014

Jogga's HTPC

Intended design of the HTPC (when I've saved enough money :)

Parts List

  1. CPU: AMD A6-5400K 3.6GHz Dual-Core Processor (£39.99 @ Amazon UK)
  2. Motherboard: ASRock FM2A88M-HD+ Micro ATX FM2+ Motherboard (£46.80 @ Amazon UK)
  3. Memory: G.Skill Ripjaws Series 4GB (2 x 2GB) DDR3-1333 Memory (£35.17 @ Amazon UK)
  4. Storage (Operating System & files): Kingston SSDNow V300 Series 60GB 2.5" Solid State Drive (£32.90 @ Amazon UK)
  5. Storage (Media): Western Digital WD Green 2TB 3.5" 5400RPM Internal Hard Drive (£59.90 @ Amazon UK)
  6. Case: Fractal Design Core 1100 MicroATX Mini Tower Case (£29.99 @ Amazon UK)
  7. Power Supply: Corsair Builder 500W 80+ Bronze Certified ATX Power Supply (£51.50 @ Amazon UK)
  8. Optical Drive: Samsung SH-224DB/BEBE DVD/CD Writer (£10.46 @ Aria PC)

Total: £306.71 (correct as of 17/12/14)

I'm living without a discrete graphics card (unless the build demonstrates a need to reconsider) and I'm recycling an existing TP-Link wireless card for networking. The speakers will probably be my existing DELL setup until I can afford a sound bar and I've already recycled a 1TB hdd from my busted NAS.

Control will be via my existing Logitech K400r wireless keyboard & my Samsung A3 advance smartphone.

The operating system will be Linux Mint 17 (obviously) although I have considered openelec. The media centre will be Kodi (formerly known as XBMC).

Criticism & advice welcome!

Sources & References:

Reconnecting With Your SSH Server after an Upgrade

I recently got around to updating my file server's operating system (from Mint 16 to Mint 17) and, in accordance with the law of unintended consequences, I found that I could no longer access my files using secure shell!

What I did get was an error message telling me that the host key verification [test had] failed. When you think about it, I should have anticipated the problem, after all, the original key was hashed under a different implementation of SSH Server as well as a different operating system! Fortunately, the fix is quite simple, particularly if you're only connecting to one host.

For a Single Host


Navigate to to the .ssh folder in the home/username directory (username will be unique to your circumstances). Remember that the period (full stop) indicates that this is a hidden folder, so you should ensure that you have the Show Hidden Files option enabled in your file browser. Delete the known_hosts file in the .ssh directory.

Now reconnect with your SSH host and a new key will be created following the usual warning that this is a new (and unknown!) host.

For Multiple Hosts

The error message will identify a line number in the know_hosts file; make a note of the number and open a terminal:

gksu gedit /home/username/.ssh/known_hosts

You will be prompted for your password. When the file is opened, delete the offending line, save the file and reconnect with your server. You should be prompted to recreate the key as if this were a first connection.

If you accidentally delete the wrong line (or the whole file, for that matter), fear not, the individual keys will be recreated when you next connect to your SSH server(s).

Sources & Resources:

  • None

Setting Up Yatse Remote Control for XBMC

My recent project to repair and consolidate my music library seems to have taken on a life of its own!

You may recall that back in September, my NAS failed leaving me with a spare 1TB hdd. Having fixed my music library, I decided to back-up my DVD library and build an HTPC around the redundant drive: it's taken months and I'm nowhere near finishing! Last night, the DELL Dimension, the DELL Inspiron, & the Compaq CQ60 were all backing-up movie files.

Designing a PC to fit around the drive has been fun, and I think that I can build a first-class rig for around £300 but money is a real issue at the moment and I've had to make compromises. One consideration is how to control the rig from my sofa: originally, I'd planned to use my Logitech K400r wireless keyboard (from my file server), saving myself a few quid on an IR remote control. However, on yesterday's RSS feed, Maximum PC did a piece on getting started with XBMC and I came across a reference to a smartphone app called Yatse XBMC also offers an official remote, which under test, is just as good but a little more difficult to set up.

Downloading and installing Yatse on your Android phone or tablet is simple (just head over to the Google Play Store & search for xbmc remote or Yatse), the basic app is free. However, getting the app to play nice with XBMC can be a little tricky! When you open the Yatse app, you should be prompted to add a server (called Host in Yatse). The nice thing with this app, is that the wizard does quite a lot of the work for you - you should only need to select the Host, add a username and a password (if you've enabled them in Kodi/XBMC. However, the setup may fail if you're running a firewall on your Linux box.

If you are running a firewall (and you should be!), you'll need to open a couple of ports for Yatse or XBMC Remote to work properly. Open a terminal and do:

sudo ufw allow proto tcp from 192.168.1.0/24 to any port 8080

Followed by:

sudo ufw allow proto udp from 192.168.1.0/24 to any port 9777

You may need to change the ip range to suit your router and, depending on your version of Kodi/XMBC, your tcp port. Unless you've done something very unusual on your system, the udp port should be left at the default value of 9777. In Kodi Gotham, you can check your tcp port under System > Settings > Services > Webserver, but I suspect that it will be a similar route in earlier versions.

Sources & References:

Saturday, 1 November 2014

Quick Tip - Auto Shutdown

I'm currently copying some video files to my network drive so that I can stream them through the house. It's a time consuming business so it makes sense to batch some up to copy overnight. However, being tight, I hate the idea that the system will be idle for hours after the task is finished, needlessly consuming power. The solution is simple; tell the system to shutdown automatically at a set time.

Estimate your shutdown time and open a terminal:

sudo shutdown -h hh:mm

where hh:mm is the time (in 24 hour format). So, to close my system at 03:00am:

sudo shutdown -h 03:00

I type in my password, turn of my monitor (and any other peripherals) and go to bed!

Sources & References:

  • None

Monday, 20 October 2014

Quick Tip: Fixing Album Art

Having recently ripped an album to my file server, I couldn't get the album art to display in xbmc. The solution turned out to be changing the file permissions to read/write for all users & groups.

Sources & References:

  • None

Happy Birthday Ubuntu

Happy birthday to Ubuntu: ten years old today!

I for one am grateful for the adventure.

Sources & References:

Sunday, 19 October 2014

Fixing mp3 Track Duration Errors

I recently converted my music collection to the mp3 format; however, whilst the playback quality is excellent, many of the tracks had erroneous track duration data. This wasn't a particular problem until I copied some of the tracks to my phone which started crashing while playing music and I began to suspect the duration error as the culprit.

Changing duration is not as straightforward as fixing tags (easily achieved using EasyTAG) but there is a great app in the Software Center for doing just that, MP3 Diags.

Track duration errors are caused by missing, incomplete, or corrupt variable bitrate (VBR) headers:

"There are 3 kinds of VBR headers: Xing, LAME, and VBRI. MP3 Diags identifies files having an incorrect or missing VBR header, and allows you to create Xing headers, should you need to." Source: MP3 Diags, MP3 Introduction

Warning, following this advice may corrupt your music files - backup first!

Despite the rather dire warning above, I've experienced no data loss or corruption (at least, none that I've found) and this great app has repaired all of my track duration errors and one or two other issues as well!

If you're using Ubuntu or one of it's derivatives, the best installation option is the Software Center. Open the Software Center and search for mp3diags - don't put a gap between mp3 & diags or you'll only be offered the MP3 Diags documentation. Simply install as usual.

When you open the app you must scan your files for errors. Just click the gear icon (1st on the left of the toolbar) and the browser will open. You can also scan remote files if you have mounted them using SSH: in Mint the route is a little convoluted, try:

run/usr/1000/gvfs/sftp:host=server,user=user/

...and then look for your music directory. Select your directory and then hit the Scan option. This can take several minutes on a single remote directory (album), so patience will be needed if you have a large music library with lots of errors. My repairs took over a week on a modest (3,500 track) library.

If the scan reveals any Xing errors, repair them by clicking the single transformation icon (a hammer with a green arrow) and selecting the Repair VBR data option.

Sources & References: