Scrolling with a external mouse on MacOS

If you have used a Mac with an external mouse you know there is something funky about this. In MacOS you can not individually select the scroll direction for a external mouse vs the trackpad. The trackpad when you want to scroll down a page you basically drag trough it and it’s a very natural motion, this however means that the scroll wheel on your external mouse will go the opposite way, whoever came up with this should work on a chair with nails for a few years.

It’s a totally unnatural way to scroll up on the mouse-wheel when you want to go down on the page, I mean, WTF.

Anyway, as always some nice folks created an app (I really wish I could do this in the operating system like any other decent operating system but no, it’s an app) to reverse the scrolling. You can set it to reverse the trackpad as well but I guess then you could just have the normal setting for the mouse and the trackpad would be the opposite. Anyway, let’s not get stuck on this.

I wanted my mouse-wheel to scroll properly as I switch between Windows, Linux and Mac all the time and I really can’t get my muscle memory to work this way.

Hallelujah, the fix is here, Scroll Reverser. You can either download it from the the link or if you, like me, use Homebrew you can just run:

$ brew cask install scroll-reverser

Screenshot 2019-12-03 at 23.15.16

It’s a really really simple app but it makes my life worth living again as I can scroll up and down the way you should be able to do.

If you do get this and, like me, feel it’s an essential tool to be able to work with an external mouse (and no, I will not get an external trackpad), then do not forget to drop the developers a donation. After all, they made life worth living again.

MacOS black screen after sleep

Yesterday I decided it was time to upgrade my MacBook Pro 2018 from Mojave to Catalina. Easy update but in the future if someone tells you Windows 10 upgrades are slow, ask them to try it on a Mac. I can update all Windows devices in my house one by one faster than my Mac from 10.14 to 10.15.
Anyhow, this was not a post to beat down my Mac, I do still like parts of you 😀

After the installation was done all was well with my applications, homebrew kept working and everything appeared to be just fine. Until this morning, like most mornings I pulled my Mac and opened the lid waiting for the screen to light up, but no. Touchbar (the worst idea ever by the way) was active but the screen was black. After my first meetings of the day it was time to test if this still happened. And yes, it did.

Some digging on the web and someone even had a fix to re-install the operating system… What the … I’m not going to re-install. Haven’t reinstalled any of my other computers either and hopefully the Mac is not this unstable that you have to re-install just for an upgrade when the Windows installations are fine after years and years of upgrades and Linux installations even more so.

The one common thing I found was that most fixes were deleting .kext files, kernel extensions. Some even mentioned the specific files to delete, I however did not have any of them but what I did have on my Mac was the DisplayLink software as I use it with my Lenovo USB-C docking station. All is fair in war and computer issues so:

Step 1; go to your applications folder and look up DisplayLink, then run the Uninstaller.

It will ask you to reboot so you should, once done go find the latest driver from Displaylink.com . Install it, reboot and your black screen should be gone. This of-course assumes you had DisplayLink installed in the first place :D.

As always the writing here is mostly notes for myself. If you had success with the above, enjoy and you are welcome.

MacOS unhide dock faster

As I’ve stated I more or less cross paths almost on a daily basis with all the major operating systems. Most of the time my main driver is the 2018 MacBook Pro which is with me whenever I leave the comfort of the home-office.

Although the resolution is good on this device the dock at the bottom takes up a bit of space. I must say I’m not a heavy dock user, I’ve learnt long ago to use CMD+Space to find my applications, just like I use the Windows key in Windows 10 and MOD+D in my i3wm on Arch Linux. In my normal configuration I keep the dock hidden and if you keep the default values you, for a split second, wonder if it’s coming out at all. So, tweaking it to appear faster felt like a good idea. Three commands later and we are done. As always, this blog is mostly so I don’t have to search information on this again and try to find my personal sweetspot
Open a terminal and run the following commands, in the following order:


$ defaults write com.apple.dock autohide-delay -float 0
$ defaults write com.apple.dock autohide-time-modifier -float 0.5
$ killall Dock

Now it does not feel like the Dock is stuck in mud somewhere, it actually appears fast enough the few times I really need it.

Hey, where’s my Yubikey?

This post is just for myself to remember this as it was behind so many clicks on the oh so phenomenal ArchWiki.

For many years I have been using multifactor authentication where possible. SMS in the beginning and today mostly authenticator application(s) or the Yubikey(s). These together with a decent password manager make me feel at least a bit more secure with all the accounts and passwords I need to remember. If you are looking for a password manager to help make your life a bit laid back when it comes to password management I recommend you take a look at BitWarden.

Problems…

Some nights ago I decided to install Arch Linux on one of my workstations. Easy and fast installation with a very customizable system, what’s there not to like 😀

Since the system is so highly customizable, you need to read. And I do really love learning something new, I just have an issue remembering a week down the line what I did. So that’s why this post is here. This way I can find it fast the next time I need it.

So, the problem was that my Yubikey did not show up in Firefox. First thing first you always check dmesg to make sure the device is even recognized. And so I did,


usb 1-2: new full-speed USB device number 5 using xhci_hcd
usb 1-2: New USB device found, idVendor=1050, idProduct=0120, bcdDevice= 5.02
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-2: Product: Security Key by Yubico
usb 1-2: Manufacturer: Yubico

And there it was. At least my system knew about it. Some duckduckgo.com:fu later I found an article on ArchWiki Fido U2F authentication pointing me to the libu2f-host package. Easy as 1,2,3 fire up pacman install the package and restart the browser and my Yubikey is back in business.


$ sudo pacman -S libu2f-host
resolving dependencies...
looking for conflicting packages...

This as stated above is not meant to be a guide on MFA or the Yubikey, just a placeholder for me to remember what I did if I ever run into it again.

Nixadmins.net back from hiatus

I can’t believe it’s now 7 years since I was actively posting content. Why? I started as a Field Engineer at Microsoft and could not find the time nor energy to keep creating quality content. It’s now a year since I changed my role starting as an Architect designing the device journey with all that comes with it. With this role in mind my posts in the future will be different, the content will be wider than before, meaning I will create posts about the design journeys and the architectural view as well. But, as I am still me, and deep inside a geek who loves to tinker with things from A-Z the content will also reflect this.

In my daily life I’m now more or less in multiple platforms, using Windows, MacOS and Linux in my daily life. Some posts will be deep in a technology sense while others might offer you high level views on services I am working on in my daily life.

I will not commit to a schedule as this site still mostly notes on my personal ramblings and trying to answer questions I get in my daily life.

First up will be recreation of some of the former posts as I have lost my backups from my previous site in 2013. Some of them were extremely popular and I still haven’t found a good  replacement for them.

//Mats