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.