Friday, January 15, 2016

HTPC OS Upgrade

My HTPC was running off a non-LTS distro for a while, finally got around to reinstalling. The process wasn't without hiccups, but overall wasn't too bad.

The two primary applications I run are Kodi (aka XBMC) and MythTV. The Kodi reinstall was easy, MythTV a little trickier to get right. These are the steps I followed:

Initial Install/Setup

  • Reinstall the new OS. I used LinuxMint 17.3 with Cinnamon as I'd been using Mint 15 previously. I also partitioned the existing SSD so that the old install is still available.
  • Set up standard stuff like web browser, terminal config, graphics drivers, etc.
  • Set system audio to appropriate device — as I was using audio over HDMI, the default sound device wasn't the right one.
  • Probably want to turn off the screen saver.

Kodi Install

  • Install Kodi
    sudo apt-get install kodi
  • Copy old ~/.xbmc/userdata directory to new install. Kodi data is stored in ~/.kodi.
  • Start Kodi. User settings like which videos you've watched should be retained. May need to configure the audio settings, I did as I was using HDMI.

MythTV Install

  • Boot back into the old OS install and follow the MythTV database backup procedure. I used:
    /usr/share/mythtv/mythconverg_backup.pl --directory <path_to_shared_drive>
  • Boot back into new OS install.
  • Install MythTV (this will install dependencies like MySQL).
    sudo apt-get install mythtv
  • Recreate the database. Note that this will create the database with a default username and password of "mythtv", which caused problems for me when restoring the database backup in the next step.
    mysql < /usr/share/mythtv/sql/mc.sql
  • Restore the database. Could not get the preferred method to work — it kept failing with a "could not connect to database" error. Could not get mythconverg_restore.pl to connect. At first I thought it was a password issue, but setting the correct password in /home/mythtv/.mythtv/config.xml didn't help. In the end I found this post, which gave the command to manually paste the database backup back. As the mythconverg_backup.pl script gzips by default, I did the gunzip on the backup file before running the following:
    mysql -umythtv -pmythtv mythconverg < backup_filename.sql
  • Run mythtv-setup. I needed to add the TV tuner adapters and sources — so I guess this wasn't part of the backup — and scan for channels. Also add the existing hard drive paths as storage directories.

I had to unplug the tuner (DigitalNow TinyTwin) to get it to appear — not sure why, but other than that the OS upgrade went pretty seamlessly.

Saturday, December 12, 2015

What Can Twenty Bucks Buy You These Days?

What can $20 buy you these days? In the second hand "box of random IT stuff" department, it seems like quite a lot.

I'd been looking around for a cheap low profile graphics card for a while to get an old PC up and running again. Eventually found one offered on the much-maligned-but-often-useful site gumtree.

I found a guy listing a GT220 along with a box of "random stuff" for $20. So I went to pick it up, and was amazed at what I found in this treasure trove. Among the items (keep in mind I really only wanted to graphics card) I discovered:

  • The GT220 graphics card (of course)
  • USB TV tuner with aerial and coax adapter
  • Brand new unopened Display Port cable
  • DVI and VGA cables and adapters
  • PCI wireless card (54Mbps — old and slow, but whatever)
  • SATA/Molex adapter cables
  • Case fan and other 3/4-pin fan adapters
  • Coax splitter and cable
  • AEC power cables
  • Various USB adapters and extenders
  • RJ45 network cables
  • Modem/telephony/RJ11 cables and adapters
  • A smattering of modular power supply cables (from an unknown power supply ;)
  • IDE cables (blastus from the pastus)
  • A whole bunch of audio cables
  • A whole bunch of audio adapter like 3.5mm <-> 6.5mm adapters)
  • A UPS (wtf?). Probably bad battery, but still
  • A label maker (again...wtf?)
  • Random RAM sticks of various (old and most likely useless) denominations
  • A whole bunch of other stuff I couldn't even identify
$20 trove

The trove...some of it at least, already nabbed the best parts

Now, I probably won't ever use much from this smorgasbord of geek hardware wet dream. The funny thing is that many of the parts — like the DP cable, coax cable, USB tuner, USB extension, coax splitters, etc. — I've actually bought previously. So I know they're useful. Just don't know if they'll be useful to me again. Pot luck at its best though!

Maligned because while you get the occasional good transaction (like I did in this case) you also get a lot of time wasters, low-ballers, overpriced, over-bearing, clueless kind of people on both the buyer and seller side.

Friday, December 11, 2015

Grub: Boot from Previous Selection

If you run a dual or multi-boot setup with grub, setting "remember previous boot" is really easy and (I find) convenient as it tends to fit my usage patterns.

Couple of useful references at askubuntu and the grub manual, but all you need to do is make the following changes to /etc/default/grub:

# GRUB_DEFAULT=0
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

Then run sudo update-grub

Sunday, November 15, 2015

Skylake i5 Power Consumption Tests

Put together a new machine today, and ran a quick power consumption test to see what to expect from the total draw.

System specs: i5-6500, Asrock H170M-ITX/ac, 2x4GB DDR4, 1x240GB SSD, Corsair CX-430, Coolermaster Elite 110. Power measurements were made from the wall (240V AC) with a PowerMate Lite.

Machine StateConsumption (W)VAPFC
Off0.75 W33.50.02
Idle17 W420.4
Prime 95
(Large FFTs, 4 threads)
71 W860.825

In Prime95 the power fluctuated a little, the above entry is a typical value. Peak recorded draw was 73.5W. Maximum temperature hit was 58°C. HwMon recorded individual cores at 3.6GHz, but under Prime95 load they all stuck around 3.3GHz.

You could happily run this machine on a 90-100W power supply. The smallest commonly available PSUs retail tend to bottom out at 350W, which is massive overkill in a system without a dedicated GPU.

(Also, the PFC of the CX-430 — ouch!)

Sunday, November 8, 2015

HTC M8S Versus Samsung Galaxy S3

TL;DR: Fixes some of the issues I had with the S3; not without its flaws.

After moving from the Samsung Galaxy S2 to the S3 a few years ago, I was disappointed that in a lot of ways the "upgrade" was most definitely a downgrade. Primary issues were lack of FM Radio (didn't even think to check!) and MTP support was so flaky on Linux I could barely copy files onto the phone — Samsung made it that you could no longer treat the S3 as a plain old USB device, MTP being the only option.

The HTC M8S "infinite selfie" selfie

So this time round I've jumped to HTC, and while I really wanted to like it, there are definitely pros and cons.

M8S advantages:

  • Copying files to the phone from a Linux machine just works.
  • Side-by-side the speaker in the M5S is much clearer. The S3 is distorted in comparion — this is a two-year-old phone though, so this is likely from wear and tear.
  • FM Radio. I had this in the Galaxy S2 and liked the option. We pay a premium for data in Australia, so streaming radio over the internet isn't as practical as it might be in other places. So the radio option was really handy for casual listening, missed it in the S3, glad it's in the M5S.
  • The setup wizard seemed pretty user friendly, offering to transfer content from the old phone and to set up various accounts. Since I like to start fresh and don't really do "social" whatevers, I didn't use any of it, but hey, the thought was nice HTC.

Negatives of the M8S:

  • No physical access to the battery. Not sure what you're meant to do if there are any problems with the stock battery.
  • The default camera settings seem...awkward. Difficult to get decent focus and "nice" looking shots — never really found a phone that was good for photos/video though, could just be user error.
  • The USB tethering option on the S3 would switch itself off once unplugged. On the M8S it stays on so if you plug it into another computer it'll activate the tethering again. Not what you want if you (as I do) go from the machine I want to tether to a desktop that has an ethernet connection.
  • Switching between vibrate, silent and audible sound profiles is hidden away in the Settings menu system. The S3 had that as an option on the main shutdown/reset screen.
  • Auto correct when typing seems pretty aggressive. So far I haven't worked out how to keep the suggestions (which can be useful) but hold off on the actual correction.
  • Background data is turned on by default — again, in our expensive data environment this is bound to annoy people when their quotas are sucked dry by stuff they're not even using. Turning it off is hidden away in the data settings, and then there's a constant notification to say "background data restricted" — haven't found how to get rid of the notification. I know it's off, I turned it off. The damn phone doesn't need to constantly remind me.
  • In general the phone is notification happy: notifications all the time, with seemingly no control over acknowledging them. The notification system feels pretty all-or-nothing in that regard.
  • The power button is on top rather than on the side. Muscle memory needs time to adapt :|

The M8S fixes a number of the sore points I had with the S3, but brings its own annoyances. So overall...it's good (in the sense that all modern phones are marvels of technology) but not great I guess.

Monday, November 2, 2015

How to Choose a Replacement Socket 1155 Motherboard

In another what I assume is a soon-to-be-deleted superuser question, due to the affectations of the moderator squad there, a user asked:

"I have a socket 1155 motherboard (P67 chipset with i5-2400) that died. What do I need to consider for a replacement?"

Here's my answer (extended a little here to try and cover all bases), in case it helps anyone else going through the same process:

The i5-2400 will work with pretty much any socket 1155 motherboard, so you can look at the boards that were released with SandyBridge CPUs — for example, H61, H67, Z68 — as well as those that were released for IvyBridge CPUs, such as B75, H77, Z77.

Most board manufacturers have a CPU compatibility list for each board, so if you find a particular board, you should be able to confirm by searching for the make/model.

Given that they're not made any more, finding a "good" replacement might be tricky. As long as the motherboard has all the ports and sockets you need, it should do the job. In the general case, some of the factors that should be considered:

  • What sized case do you have? Physical size is imperative: An ATX motherboard won't fit in a micro-ATX sized case, for example. A board that is otherwise suitable must fit the case, otherwise it is pointless to consider it.
  • Number of and/or combination of PCI and PCIe slots required. All current motherboards have at least one PCIe x16 slot for a graphics card, and keep in mind that most graphics card take up at least two slots.
  • Number of RAM slots required. Some low-end boards only have 2 RAM slots — if you have more sticks than that it might mean you either have to reduce your amount of RAM, or buy a new kit with larger size per stick.
  • Number of SATA ports. Most drives (hard drives, DVDs, and SSDs) around in the socket 1155 timeframe used SATA as the connector type. Make sure the motherboard has enough SATA ports for all your drives.
  • Number of USB ports required. In addition the ports on the motherboard, consider what USB ports your case has. Any USB 3 ports will most likely require a USB 3 header on the motherboard, which are physically different sizes to USB 2 headers.
  • Number and type of onboard graphics ports. If not using a dedicated GPU, consider what types of onboard graphics connectors you need.
  • Number of fan headers. Required for case fans
  • Chipset matching to avoid confusing your operating system. You may want to attempt to match the existing board — by chipset and/or manufacturer — in order to reduce the risk of your operating system from "rejecting" the change.
  • Overclocking support. If overclocking with a 'K' CPU, choose a 'Z' chipset

Most DDR3 RAM will work with any board, but you can also try and confirm RAM compatibility either with the motherboard or RAM manufacturer's compatibility lists.

The i5-2400 which has limited overclocking potential is a little easier to source a replacement that for an overclockable 'K' CPU. In the latter case, the Z68 or Z77 boards are the best choice as they support overclocking.

2nd hand is most likely a cost-effective option if you can find one. Some socket 1155 boards are still available at online stores, so you could check Newegg, Amazon, and similar places. Alternatively, you could call a few local computers stores to see if by chance they've got old stock.

As an example of the process: here's a listing for the Gigabyte B75M-D3H at Amazon. The CPU support list shows that the i5-2400 is supported. It has 4 RAM slots, and after the GPU is in will have a PCI and PCIe slot free. It is only micro-ATX sized, so should fit all but the smallest cases.

When replacing, if you change the make and model of the board, you may have difficulty booting your OS with the updated board. This depends what OS you're using, and how different the replacement board is as far as drivers go. Windows traditionally hates hardware being replaced, and may refuse to boot; if you were using, say, Linux it would most likely just work. So keep that in mind that some recovery — or worst-case, a reinstall — of the OS might be required. Finding an exact model motherboard should avoid this issue; finding a similar chipset should reduce the risk of boot issues (but licensing issues may still need to be dealt with).

During the replacement process, after removing the heatsink, clean existing thermal paste from the CPU and heatsink using isopropyl alcohol. Reapply fresh paste before putting the cooler back on the CPU when it's installed in the new motherboard.

(As an aside, confirming that a motherboard fault is the problem — and not something else like a dead power supply — is a worthwhile activity to go through first).

Wednesday, October 21, 2015

Goat Simulator and GoatZ on Xubuntu

A family member had been running Goat Simulator on an old Q6600 + HD7770 machine, but found that the GoatZ DLC add-on just wouldn't work. It continually crashed with the dreaded "goatgame-win32-shipping.exe" error.

None of the suggested fixes I could find (verify cache; update graphics drivers; reinstall; tweak some shader settings) had any effect. Although Vista is still officially supported, it may have been something to do with that. Since the machine was dual-booting with Linux, and Goat Sim now has a Linux target, I just installed it on there.

Ran fine using the current AMD fglrx drivers in Xubuntu 14.04. Bit of glitchiness in the water rendering, but nothing that couldn't be ignored.

Really the only issue was the mouse sensitivity in-game. I've found this with other games based on the Unreal Engine, the mouse speed goes way down. I fixed this by tweaking the mouse speed in the desktop using xset:

$ xset m 4/1 0

(Basically, followed the advice from this thread).

Sunday, October 4, 2015

GUI Markdown Editor/Viewer

Markdown is a common format for writing readme files on hosting sites like github and bitbucket. Browsers don't have a notice in-built rendering yet though, so I was looking for something to preview the files rather than having to push-to-test on github or bitbucket.

This answer on Unix & Linux Stack Exchange suggested ReText, and I found it was pretty close to what I needed. Ctrl-L shows a live side-by-side preview of the markdown being edited.

On Debian-based distros it can be installed with:

sudo apt-get install retext

Thursday, August 13, 2015

Conky With a Vengeance

Yet another little tinker update on the Conky config since the last one.

Here's the full .conkyrc. Of course blogger munges the output, so I've noted long lines with the character; there should actually be no line break on those lines:

background no
font Sans:size=8
use_xft yes
xftalpha 0.9
update_interval 5.0
total_run_times 0
own_window yes
own_window_type normal
own_window_argb_visual true
own_window_argb_value 196
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 220 1200
maximum_width 220
draw_shades yes
draw_outline no
draw_borders no
border_inner_margin 5
#border_inner_margin 20
draw_graph_borders yes
default_color CDE0E7
default_shade_color black
default_outline_color green
alignment top_right
gap_x 12
gap_y 0
no_buffers yes
uppercase no # set to yes if you want all text to be in uppercase
cpu_avg_samples 2
override_utf8_locale no

TEXT
${voffset 1} ${voffset -1}

${color gray}${font Sans:size=10}${voffset 5}${time %d-%b-%Y}${font}
    ${font Sans:size=12}${voffset -5}${alignr}${time %I:%M %p}${font}

${color white}SYSTEM ${hr 1}${color}
Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
MB Temperature: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Physical id 0'|awk '{print $4}'}${iconv_stop}
CPU Temperature 0: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 0'|awk '{print $3}'}${iconv_stop}
CPU Temperature 1: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 1'|awk '{print $3}'}${iconv_stop}
CPU Temperature 2: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 2'|awk '{print $3}'}${iconv_stop}
CPU Temperature 3: ${alignr}${iconv_start UTF-8 ISO_8859-1}
    ${exec sensors|grep 'Core 3'|awk '{print $3}'}${iconv_stop}
Fan 1: ${alignr}${hwmon 1 fan 1} RPM
Fan 2: ${alignr}${hwmon 1 fan 2} RPM
GPU Temp: ${alignr}${exec nvidia-smi | grep '. ..\% ..C'|
    awk '{print $3}'}${iconv_start UTF-8 ISO_8859-1}°${iconv_stop}C
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg

${color yellow}CPU LOAD ${hr 1}${color}
${color b0b000}CPU Frequency: ${alignr}${freq} MHz
CPU1 ${alignr}${cpu cpu1}%
${cpubar cpu1}
${cpugraph cpu1 000000 ffffff}
CPU2 ${alignr}${cpu cpu2}%
${cpubar cpu2}
${cpugraph cpu2 000000 ffffff}
CPU3 ${alignr}${cpu cpu3}%
${cpubar cpu3}
${cpugraph cpu3 000000 ffffff}
CPU4 ${alignr}${cpu cpu4}%
${cpubar cpu4}
${cpugraph cpu4 000000 ffffff}
${color b0b040}CPU All
${cpugraph cpu0 000000 ff0000}${color}

${color 30b030}RESOURCE USAGE ${hr 1}${color}
${color 30b030}RAM ${alignr}$mem / $memmax ($memperc%)
${membar 4}
Swap ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}${color}

${color gray}Highest CPU $alignr CPU% MEM%${color}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${top name 3}$alignr${top cpu 3}${top mem 3}

${color gray}Highest Memory $alignr CPU% MEM%${color}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3}${top_mem mem 3}

${color white}FILE SYSTEM ${hr 1}${color}
Root: ${alignr}${fs_used /} / ${fs_size /}
${fs_bar 4 /}
Files: ${alignr}${fs_used /files} / ${fs_size /files}
${fs_bar 4 /files}

${color white}NETWORK ${hr 1}${color}
Eth0: ${addr eth0}
Down ${downspeed eth0} k/s ${alignr}Up ${upspeed eth0} k/s
${downspeedgraph eth0 25,107} ${alignr}${upspeedgraph eth0 25,107}
Total ${totaldown eth0} ${alignr}Total ${totalup eth0}

Friday, August 7, 2015

Superuser, Moderation, and Should I Bother

I just noticed tonight that an answer I did on superuser.com has been moderated into oblivion. It had 17 up votes, earning a "Nice Answer" badge, so some people at least felt it was useful.

While I can understand the intention behind the aggressive pruning that occurs, it's just...really disheartening having put some effort into answering as best I could in a precise, useful way, only to have it shitcanned. Especially when to my way of thinking there were a number of things in the answer that would have more longevity than other questions that survive just fine on SU.

So, for posterity, here's my answer. The question was regarding any potential issues with the asker's new PC build, which included common parts like an i5-4570, Gigabyte B85M-D3H, Kingston RAM, GT610, WD Green, and a fairly crappy looking case/PSU combo.

There are a couple of general rules of thumb you should follow when speccing your machine:

  • Don't cheap out on the power supply. I have no idea what is included in that case (specs are not forthcoming), but the price is so much cheaper than many budget cases that come with no power supply, I'm inclined to think that it is very low quality. Unless you are in dire need to save money, look for a separate PSU like a Seasonic. Many Antec or Corsair PSUs are good, as are some Coolermaster or Thermaltake. If you need to get a case/PSU combo due to budget, look for something like the Thermaltake Versa series.

  • Current onboard graphics (which is built into the CPU and accessed via the ports on the motherboard) is better than a low-end GPU like the GT610. Age of Empires doesn't need much graphics power, so I think you'll be fine with onboard graphics. The disclaimer is perhaps you want a cheap GPU for experimentation purposes, targeting your software to particular graphics card or something.

  • The CPU and the GPU are the two biggest parts that determine what kind of power supply you need. The system as specced above will use <150W even at maximum load. A good quality 350-450W PSU is where you should be looking, unless you want to support upgrade to a high-end gaming graphics card in the future — if so, look for 500-600W.

  • The motherboard you have chosen can only run RAM at 1600MHz, so the 1866MHz will clock back to that anyway. You could get a 1600MHz with CL9 timings (lower the better for timings), only a very minor difference in performance though.

  • Most modern consumer CPU/motherboard use dual channel RAM, you will get a mild performance boost by getting 2x4GB of RAM.

  • Get an SSD if you can and install the OS/applications on it. Use the HDD for storage. SSDs are awesome, particularly if you do dual-boot, as they reduce boot times and application load times significantly.

  • If you can't get an SSD due to budget, don't use a 5400RPM hard drive like the Caviar Green as your boot drive, they are very slow. A WD Caviar Blue (for example) is a better option.

  • Consider a Virtual Machine for doing the Linux development if dual-booting gets annoying. Unfortunately VMs are bad for games, so you can't really do it the other way around. Alternatively, you could consider running the games under wine in Linux. AoE III for example appears to have pretty reasonable support. Dual-booting is pretty annoying in my experience if other options are available.

Edit:

  • Since it's your first time putting one together too, I'd suggest watching a few videos on how to do it (search youtube for "how to build a computer" or similar). Will give you a feel for how everything fits together.

The whole thing is still available in the google cache in case anyone is particularly interested.

Saturday, June 13, 2015

Retro Reviews: Logitech G105 and K290

I got these keyboards nearly two years ago but only just found my notes on them, thought I'd post it anyway.

G105 Initial Thoughts: It's a rubber dome keyboard, so the keys are a little bit "squishy", but not too bad overall. It has LED backlighting if you want it — the LEDs are not very bright though. Lots of keys for gaming macros or whatever. The position of the keys down the left-hand-side was somewhat annoying at first until I got used to them.

The G105 has survived nearly two years of gaming use without fault, so its longevity seems reasonable. A lot of my other Logitech peripherals have failed at or before this period, so I'm a bit wary of the brand at the moment but this particular keyboard seems okay. The feel of the keys is not really any better than a $20 keyboard, so you have to balance up whether the extra macro keys and backlighting (and potentially the longevity) is worth a $50 keyboard.

K290 Initial Thoughts: Has a fairly hard, angular wedge shape. The bright blue USB cable doesn't look very good. The feel of the press on the "low profile" keys is difficult to get used to. It's difficult to describe, but the keys feel gritty or chalky to press, like you're pushing them through a crumbly layer of dried mud.

Appearance and feel aside, the thing I like least about the K290 is that to use the function keys (F1, F2, etc), you need to hold down the Blue "FN" key. Really awkward when on the vast majority (all?) keyboards the F keys are the default. This is the most difficult thing to get used to when swapping between other keyboards.

While the K290 has worked fine so far, I wouldn't buy it again due to the negatives I found while using it.

Don't have a pic of the K290 unfortunately, the above image and link is to the Logitech product page

Saturday, June 6, 2015

Review: Deepcool Tesseract

Recently used this case in a general purpose machine for a friend. At only A$49 it's at the budget end, but for what you get it's pretty good value. With 165mm CPU and 310mm GPU clearance it'll fit most setups.

For whatever reason, the Tesseract listing on Deepcool's website doesn't show the windowed version of the case, only the regular version.

Positives
  • Lightweight, but doesn't feel too flimsy.
  • The fans have both 3-pin and 4-pin molex connectors. Handy if you need it, but could be a negative if you only want the 3-pins as the molex connector is quite bulky.
  • Even when plugged into via the 4-pin, the fans were pretty quiet.
  • Lots of screws, cable ties and an onboard speaker for troubleshooting. (No rubber mounting grommets for hard drives or anything, but you can't have everything in such a cheap case).
  • Internal USB and case button cables are quite long.
  • Plenty of drive bays and room internally.
  • Cutout behind the motherboard to mount a CPU cooler if needed.
  • Large window to show off to show off your insides.
Negatives
  • "Punch out" PCI expansion slots, rather than ones held in place with screws.
  • No cut out at the top of the case for the 4/8 pin ATX power cable, so you need to route around the motherboard. (This is pretty common in cases in this range).
  • The short fan cable on the front-of-case fan would be tricky to reach the 3-pin header on an ATX motherboard.
  • The blue LEDs on the fans and the "power on" at the front of the case are all quite bright (could be considered a good or bad thing, depending on how much you like blue LEDs ;)
  • Not a whole lot of cable routing room at the back.
  • The connectors on the front of the case work okay, but do look a little cheap.
Summary

A good budget case where the value proposition and positives easily outweigh the negatives.

Friday, June 5, 2015

Image Overlays in reveal.js

reveals.js is a fantastic little library for creating web-based presentations.

While putting a presentation together I was trying to work out how to quickly throw up images as overlays over the presentation text at the start of a slide, and then disappear to reveal the text.

With the help of a colleague, we worked out a couple of techniques you can apply using the reveal.js "fragment" and "current-visible" option combined with an absolute position.

Option 1 simply overlays the image and has it disappear as the next action in the presentation:

<img class="fragment current-visible" src="image.jpg"
style="position:absolute; left:210px; top:100px;"/>

For Option 2, I added a link so you can get the full-sized image if you want:

<p class="fragment current-visible"
style="position:absolute; left:120px; top:100px;">
<a href="image.jpg"><img src="image.jpg" width="1024"/></a></p>

The way reveal.js scales a presentation to a nominated size in the configuration means the absolute positioning isn't as bad to work in as it would be in a "normal" web page, you only have to get the position right once for the desired image width and it will work due to the scaling factor. It may not be the most elegant way, but it works pretty well.

Okay, let's be honest, my colleague worked it all out, I just watched. Thanks GD!

Prevent Service Autostart on Linux

I installed JIRA last year but haven't ended up using it a lot, so I thought I'd stop it from starting automatically at boot. This wasn't immediately obvious how to do as the service command doesn't have that option.

This seems like a pretty definitive answer, but I ended up going with sysv-rc-conf as it seemed kind of easy to use and visualise everything that's going to be started.

The initial state for JIRA looked like this:

By unchecking everything, it no longer starts up by default:

Sunday, May 3, 2015

Canon MG-6250 Scanning in Kubuntu 14.04

Had to scan something today (first time in a long while), and wondered if I'd have to go through the process I needed to last time on Xubuntu 12.10.

Turns out the MG-6250 works out of the box with Skanlite on Kubuntu 14.04. No configuration required, it searched the network and found the printer, click Scan -- go.