Friday, September 3, 2021

Stop Hotmail/Outlook.live from Asking to "Add Application"

Noticed recently that the tab in Firefox with Hotmail open started displaying an 'add "outlook.live.com" as an application for mailto links?', which is annoying since it keeps coming back on every refresh.
One way to get rid of this (hat-tip to /u/xeq937 via this thread):
  • Open about.config
  • Set network.protocol-handler.external.mailto to false.
  • Refresh the hotmail/outlook tab
Haven't noticed any downsides to doing this as yet.

Friday, January 29, 2021

Fix High CPU/Glitchy PulseAudio in Kubuntu

PulseAudio randomly started glitching out for me yesterday. Audio began to crackle and glitch, and several processes went bunta on the CPU: polkitd, dbus-daemon, kwin_x11 all chugging at least half a core each.

There are various suggestions on the web about how to fix this, but a number of older ones (such as this one on Ubuntu forums suggest deleting the pulse config. And what do you know, that one works.

In Kubuntu 18.04 (and probably many other *buntu variants), the config is in: ~/.config/pulse.

Wednesday, November 29, 2017

Settings for Tree Style Tab in Firefox 57

Firefox 57 changed the plugin API extensively, and all plugins underwent major changes. One of which was Tree Style Tab, which lets you (among other things) display tabs down the side of the page rather than across the top.

In Firefox 57, the default look with Tree Style Tab had a number of issues for me, namely:

  • The regular tabs (across the top) were still visible, even when the tree tab was visible
  • The box to close Tree Style Tab was disproportionately large, and I never turn it off anyway
  • Each tab in the list was much thicker vertically than previously

Scouring around the internet I came up with the following changes to fix all of the above:

  • Add the following to userChrome.css (sourced from this post at /r/Firefox). Create in ~/.mozilla/firefox/<custom>.default/chrome if needed:
  • @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

    /* to hide the native tabs */
    #TabsToolbar {
      visibility: collapse;
    }

    /* to hide the sidebar header */
    #sidebar-header {
      visibility: collapse;
    }

  • Add the following to the "Advanced" section of the Tree Style Tab preferences from within Firefox, which mostly came from the posts at this Hacker News thread:
  • .closebox {
      display: none;
    }

    .tab:hover .closebox {
      display: block;
    }

    :root {
      --tab-height: 24px;
    }

    .tab {
      height: var(--tab-height) !important;
    }

    #tabbar .after-tabs {
      display: none !important;
    }

  • In "Hamburger" menu -> Customize, in the bottom left check "Title Bar" if you want it visible
Update 7 Apr 2020: I noticed in new installs that the visibility options weren't being applied properly. As per this comment from MikeF, you now need to go into about:settings and change toolkit.legacyUserProfileCustomizations.stylesheets to true and restart the browser. Thanks Mike!

Sunday, July 23, 2017

Quick Review: Logitech MK235 Wireless Keyboard/Mouse Combo

Earlier this year I bought a Logitech MK235 mouse/keyboard combo to replace my ageing Rapoo RP-X1800 that lasted longer than I thought it would but in the end succumbed to a thorough trashing from children using it on the HTPC.

Quick thoughts on the MK235:

Pros

  • Battery life so far seems okay. Nearly six months in with daily use, no need to change anything yet.
  • Keyboard layout is pretty close to being standard. In order to be compact a lot of wireless keyboards have a non-standard layout which is immensely frustrating.
  • Wireless receiver is nice and small — can use it plugged into the front USB port without it sticking out precariously.

Cons

  • No LEDs to indicate status (eg caps lock). A common issue with lower end wireless keyboards.
  • Mouse has no forward/back buttons.
  • The biggy: the wireless connectivity is terrible if you're using it as I am in a HTPC situation. It will often lose connection, but will store up those "lost" strokes, and then apply them all at once when it reconnects...if it reconnects soon enough. It makes for a frustrating experience where you're not quite sure if the keypress will be accepted or not at any given time. Compared to the Logitech K400 — which had a crazy-good wireless implementation — this is a bit of a let down. If it's sitting on a desk with good line of site to the receiver it may not be an issue.

Monday, March 20, 2017

Typing Pipe ( | ) in vSphere VM Console

Had a problem the other day where the console for some VMs in vSphere wouldn't type the "pipe" symbol properly. It's pretty important when chaining Linux commands together.

I found this great workaround on superuser.com for VirtualBox, but it works in vSphere too:

Hold down Alt and type 1-2-4 on the numeric keypad.

I've used those alt codes before to type indices and the degrees symbol, but not the pipe.

Friday, January 27, 2017

Linux Boot from Flash Drive for Legacy BIOS

Trying to install Linux on an old (~10 years) computer, the UEFI flash install wouldn't "take".

For these situations, the traditional dd method still seems to work best. I followed these instructions, as the accepted answer for that question didn't work either. Not sure whether the isohybrid and syslinux section was needed, or if just the simple dd command (as per this answer would have been enough.

The core difference between the UEFI setup linked above seems to be using the whole flash drive (eg /dev/sdd) rather than a specific partition (eg /dev/sdd1) when unpacking the ISO.

The essential command may simply be this:

dd if='/path/to/file.iso' of=/dev/sdX bs=8M

Saturday, January 21, 2017

List of Linux Hardware and System Monitoring Tools

  • dmidecode
  • hwinfo
  • lscpu
  • lshw
  • lspci (lspci -v | grep -A 10 for graphics driver info)
  • lsblk
  • blkid (Like lsblk, but gives UUID without extra params required)
  • /proc/cpuinfo
  • /proc/meminfo
  • free -m
  • hdparm -i /dev/sdX
  • hdparm -Tt /dev/sdX (Quick hard drive read speed test)
  • df -h Disk usage on mounted drives
  • du -h -d1 (Disk usage from current dir down, but only output one level)
  • mount -l (Show all mount points, also cat /proc/mounts)
  • top
  • iotop / iostat
  • jenttop / iptraf
  • netstat

Monday, January 16, 2017

NSK2480B and Asrock H170M-Pro4: Not Ideal

I recently had to change the motherboard in my HTPC. The case is an Antec NSK2480B, a horizontally aligned case that fits up to micro-ATX motherboards.

I picked up an Asrock H170M-Pro4 to put in along with appropriate CPU and RAM. Didn't think there would be an issue as the Pro4 is a micro-ATX motherboard, matching the case. No issue, right?

Unfortunately, the Pro4 is a full sized micro-ATX board, larger on the "width" axis than most of the mATX boards going around these days. It physically fits in the case, but four of the six SATA ports are arranged so that the plugs go in parallel to the board — as shown in this pic:

The Asrock H170M-Pro4 side-mounted SATA ports

In a normal case this would be okay, but the NSK2480B has a solid metal divider that runs in between the motherboard area and the drive/PSU area. The side-mounted SATA ports on such a wide board do not fit. I managed to get two 90-degrees connectors in before mounting the motherboard, but the other two ports just can't be used. The pic below shows the mounting (bit hard to see due to the other cabling):

The Pro4 mounted in the Antec NSK2480B

The wall the SATA cables are pushing against is a solid piece riveted in to the case. Other than grinding out a chunk, I can't see any way to get access to those bottom two ports.

So...a full sized micro-ATX board with side-mounted SATA ports is not a good match for this case.

Wednesday, November 23, 2016

Fix "Cinnamon Just Crashed" on Linux Mint 17.3

A recent update in Linux Mint included the nVidia 367 driver. Even though my HTPC was using integrated graphics, having the driver installed causes Cinnamon to crash with the error message:

Cinnamon just crashed. You are running in fallback mode.

A fix is to remove the nVidia 367 driver completely:

sudo apt-get purge nvidia-367

Reboot and Cinnamon should be running okay again.

Saturday, September 17, 2016

Image Stacking in reveal.js

A while back I posted on image overlays in reveal.js. That technique seemed promising but has a problem in practice as it messed with the scaling at different resolutions.

A technique that I ended up using was to split an image section off to one side rather than overlay it on top of the text, with a link to the image original so that you could fullscreen it if desired. Multiple images can be stacked on top of one another by offsetting to top left coords.

Here's a snippet of the code:

<section id="slide-1">

  <h2>Slide Heading</h2>

  <div class="image-float">
    <p style="position: relative; left: 0; top: 0;">
        <a href="image1.jpg"><img src="image1.jpg" height="700vh"/></a></p>
    <p class="fragment" data-fragment-index="2" style="position:absolute; left:20px; top:20px;">
        <a href="image2.jpg"><img src="image2.jpg" height="700vh"/></a></p>
    <p class="fragment" data-fragment-index="4" style="position:absolute; left:40px; top:40px;">
        <a href="image3.jpg"><img src="image3.jpg" height="700vh"/></a></p>
  </div>

  <div class="content-aside">
    <p class="fragment fade-down" data-fragment-index="1">Text 1</p>
    <p class="fragment" data-fragment-index="1">Text 2</p>
    <p class="fragment" data-fragment-index="3">Text 3 (after image 2)</p>
    <p class="fragment" data-fragment-index="5">Text 4 (after image 3)</p>
  </div>
</section>

And the css for the custom classes:

.image-float {
   float: left;
   position: relative;
   top: 0;
   left: 0;
}

.reveal .content-aside {
   margin-top: 1em;
}

This technique was okay, but still not perfect, as the stacked images to offset on the left side but scaled so the right hand side sat flush on each one...something for another day.

Saturday, August 13, 2016

Things to Look for in a New TV, Beyond the Usual Ones

At some point I'll have to upgrade my TV. My current one is "non-smart", and works fine but is getting old. Since you can't practically get a dump TV any more, I'll have to accept that will come with the package.

Other than the usual specs like screen size, resolution, refresh rate, colour reproduction, there are a few things I want to look at when buying any new TV:

  • Turn on time from cold start. The time it takes some TVs to turn on these days is really annoying.
  • Channel change time. Likewise, changing channels for some reason can take a ridiculous length of time.
  • Input lag. Good to know in case the TV is ever used for gaming.
  • What firmware is the "smart" bit based on? Is it an open source or community supported firmware, so that when the manufacturer gets bored of supporting that model you can still get updates? If I don't want to agree to the T&Cs of an update, will it stop playing any specific media formats? Can I be held hostage to the manufacturer in order to play content?
  • 4K refresh rate. Does the 4K refresh rate match the advertised rate, or it that a sneaky "only at lower resolutions" thing?
  • HDCP. Given I run my own HTPC, this is a really important one. Will the TV's HDCP implementation work via the HDMI connection on a laptop? Will it work with a desktop GPU connection? I'll take a laptop when looking at TVs to test this.

Thursday, August 11, 2016

Internode Ping Spikes While Playing CS:GO

This is a typical ping log just now while playing CS:GO. I'm using ADSL2 and relatively close to the exchange (<500m). I've used an Asus RT-AC68U and a TP-Link Archer D9 and I get similar responsiveness with both:

64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=242 ttl=59 time=1119 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=243 ttl=59 time=1233 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=244 ttl=59 time=1249 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=245 ttl=59 time=644 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=246 ttl=59 time=91.9 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=247 ttl=59 time=712 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=248 ttl=59 time=1076 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=249 ttl=59 time=1222 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=250 ttl=59 time=1254 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=251 ttl=59 time=1291 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=252 ttl=59 time=1304 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=253 ttl=59 time=1274 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=254 ttl=59 time=520 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=255 ttl=59 time=24.4 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=256 ttl=59 time=24.2 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=257 ttl=59 time=25.2 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=258 ttl=59 time=114 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=259 ttl=59 time=451 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=260 ttl=59 time=898 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=261 ttl=59 time=1234 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=262 ttl=59 time=1296 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=263 ttl=59 time=1272 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=264 ttl=59 time=1285 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=265 ttl=59 time=1281 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=266 ttl=59 time=1437 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=267 ttl=59 time=1481 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=268 ttl=59 time=1235 ms
64 bytes from pubweb.internode.on.net (150.101.140.197): icmp_seq=269 ttl=59 time=564 ms

All I can say is...gg.

Sunday, July 24, 2016

PSU Status Summary

Following along from the SSD summary, the powers supplies I've used myself or for family/friends over the past few years:

My PSUs:

Make/ModelPurchasedPurposeIssues
Powerman IP-P410Q3-2
410W
2008 (approx)General use/Gaming PCPower warnings when logging into Linux on the machine; unsure if it's the PSU or not, but it's getting a bit old. No obvious issues with it though.
Antec Neo Eco 520Dec 2012General use/gaming PC
Antec EarthWatts 380Mar 2013HTPCMachine occasionally "turns itself off" for no apparent reason, could be the PSU <- cleared of fault by the TPC-450 below
Corsair VS450Aug 2013General use
Corsair VS3502014General use
Antec EarthWatts 3802014 (2nd hand)General use
EVGA SuperNova G2 750W2014Gaming PC
Antec TPC 450 GoldJul 2016HTPC
Corsair CX550MJul 2016General use/gaming PC

Other PSUs:

Make/ModelPurchasedPurposeIssues
Thermaltake LitePower 500W (x3)2013-2014General use
Antec HCG 5202014Gaming PC
Antec Neo Eco 450C2014General use
Seasonic G-6502015Gaming PC
Antec TPC 550 Gold (x2)2015, 2016General use/Gaming PC
Corsair CX-4302016General use

Saturday, July 23, 2016

Trying to Evaluate the Thermaltake LitePower Gen 2

I noticed that Thermaltake have release another LitePower power supply, this one labelled the "Gen 2".

The way Thermaltake uses the LitePower for branding is frustrating, as there have been dozens of them over the years, by five different OEMs, and of markedly different quality. In general they're a last resort kind of PSU, so I was interested to see if this new one might have improved.

Unfortunately it was pretty difficult to find out anything useful. The awesome RealHardTechX database currently doesn't list a Gen 2, and no one appears to have reviewed it yet. The specs are also lean on detail (which is sadly normal for most PSU brands). The addition of 2x6+2 pin connectors on even the 450W model is much more promising than the previous OEM versions of the LitePower.

I asked Thermaltake for a bit more detail on 19th July 2016 — as yet there has been no response, but I'll update if anything comes through.

Thursday, July 21, 2016

Turning Off Wake-On-LAN on Linux Laptops

I noticed my Dell Latitude laptop running Kubuntu 16.04 that even after shutting down completely, the battery was still being drained. The problem is that wake-on-lan is generally turned on by default. Unless you need WOL for some reason — turn it off.

Andi Dittrich has a great article on how to disable wake-on-lan in post 15.10 Ubuntu systems (you need to use a different method if still using versions older than 15.10).

The core method is to create a file named wol.service in /etc/systemd/system/ with:

[Unit]
Description="Disable WOL"

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s wol d

[Install]
WantedBy=multi-user.target

Then run: sudo systemctl enable wol.service

Run sudo ethtool and check it shows "Wake-on: d" after reboot to ensure it has worked.