HOW TO: Fix “Home” and “End” keys in the Mac Terminal

With MacOS certain simple things can be quite.....perplexing. Like 3 finger middle click on a touchpad, you need an App for that.. Such is the way with many of the seemingly "default" options in MacOS and probably the reason so much is "appified" in that ecosystem. The Apple devs probably just dont worry about such "minutia" that has made its way into other OS system defaults because they can just rely on a swift developer to make an app and try and charge $0.99 in the AppStore to enable something that would otherwise be default. So simple things like keyboard compatibility, or how responsive you want to dock to be, or things like snapping windows to a side of the screen need these weird customization settings. Thats enough ranting through, it is what it is in that ecosystem and Apple does some things pretty well. Their security defaults are solid, especially if you arent someone that is prone to caring much about things like full disk encryption because you simply dont understand it.

Anyhow, not the topic for today. The MacOS terminal isnt bad, comparable to most of the others I have used. But one thing that nagged me about the terminal app is how the Home/End keys basically don't behave.

Heres a quick fix.

Pull up the Terminal Settings and navigate to your default profile and go to the keyboard options. enter image description here

Fill it out like so and hit OK:

enter image description here

Here are some other *nix friendly keycodes:

  • home :: \033OH
  • end :: \033OF
  • F1 :: \033[11~
  • F2 :: \033[12~
  • F3 :: \033[13~
  • F4 :: \033[14~

Source is from an old blog post that seems to have been hijacked to advertise spam. But here is the archive of the post.

Synology Drive Compatibility

Synology Drive Compatibility

Self note:

Have been starting the process of looking at new options for my older Synology units. Within the last year or two I have temporarily gotten an update to an 1815+ with the resistor fix, but frankly have been looking/considering ways to consolidate some of the services a bit (ie: docker).

Along the way you hear about the anti-competitive behavior. At my heart, I despise this move. In a practical sense if theres an easy workaround, it may be easier than re-inventing the wheel. Anyway, this isnt about the business or politics of the issue.

Possible workarounds worth trying:

Option 1

SSH into synology. Become root

sudo -i

Navigate to the folder where the drive list is stored.

cd /var/lib/disk-compatibility

Now if you list the directory you should see some DB files named after your model.

Step 2

We want to edit *_host.db and *_host.db.new and add your drive. In our case we had to add this line to the DB rs2821rp+_host.db and rs2821rp+_host.db.new (Can be done with VIM editor):

{"model":"WD102KRYZ","firmware":"01.01H01","rec_intvl”:[1]},

Some drives in that file don't have a firmware defined, so for you, you could try to copy that entry and add your model number of the drive. Another option is to look in the DB for the expansion unit for your drive, we found our config there. Just make sure "rec_intvl" is set to 1 if you copy the entry. Ours was standard 3 and that didn't work.

Save and quit both files with :wq and then reboot the NAS, if everything is done correctly the NAS should say the disk status is normal.

I hope I can help some people out with this, and I hope Synology will remove this drive "whitelist".

DISCLAIMER: I have no idea how this will work long term or with other drives or NAS'es, I'm just sharing my experience. Try this at your own risk.

Option 2

Does anyone know if this works? https://www.reddit.com/r/synology/comments/tjgba0/comment/i1kalis/?utm_source=share&utm_medium=web2x&context=3

Edit /etc.defaults/synoinfo.conf and change
support_disk_compatibility="yes"
to "no" and reboot. 

Then all drives can be used without error messages.

Roku Shortcut Cheatsheet

  1. System Information - Things like CPU Temps, Clock Speeds etc.

    Press Home x5 > Fast Forward> Down > Rewind > Down > Fast Forward

  2. Wireless Settings - Things like signal strength, drops/retries etc. Can be used to adjust your 2.4 gHz strength to just the right level (anything better than -70 dbm seems optimal)

    Press Home x5 > Up > Down > Up > Down > Up

  3. Limit streaming bandwidth - Handy if you have datacaps and want to manage a heavy streamer etc

    Press Home x5 > Rewind x3 > Fast Forward x2

  4. Random Secret Screens - Disable scrolling ads etc.

    Press Home x5 > Fast Forward x3 > Rewind x2

    Press Home x5 > Up > Right > Down > Left > Up

  5. Developer Options - Webserver to take screenshots of rokus etc.

    Press Home x3 > Up x2 > Right > Left > Right > Left > Right

  6. Force Restart - When you are too lazy to walk up and power cycle it.

    Press Home x5 > Up > Rewind x2 > Fast Forward x2.

How I cut the chord and built my own DVR

This will give a high level overview of how I canceled my cable subscription and rolled my own whole home DVR. I wont get too in the weeds about specifics because, in reality, I have a lot of existing "infrastructure" probably uncommon in most households.

Ultimately I grew tired of haggling with providers to get the same rates they happily give people with not billing history, and ultimately I realized we really only watch stuff that is basically free with a few exceptions.

To get started I needed some basics.

  1. Storage - A NAS, Desktop, heck even a small RaspberryPi COULD work (though i probably wouldnt reccomend it). For me this is a Synology Diskstation 1815+.
  2. Plex Server - A computer with a decent CPU (or even better one that supports Intel QuickSync). This can be a Windows Desktop, Linux, even Mac. It just needs to be running all the time. For me a built a virtual machine that runs on a Dell 7050 SFF
  3. Plex Pass - This is needed to stream and record OTA tv. You can start small at $5/mo and then just get the lifetime if everything works. A lifetime pass was less than 1 month of cable service..
  4. An Antenna - Or in my case, I'm lazy and went with not one, but two indoor models.
  5. A Tuner to convert the Antenna signal something the plex server can talk to.
  6. Rokus for the TVs - AppleTV's, or Firesticks anything that can run Plex will do. I went with Roku because I had one already, had Recently bought a cheap Roku TV AND most importantly, they work with universal remotes.
  7. Universal Remote - Simple and consistent across all TV's in the house. So guests can generally operate it.

Update - I recently move to these remotes for my rokus that were NOT roku TV (TCL brand). They are still consistent and didnt confuse some visitors as much.

Its worth noting you can combine items 1 and 2, especially if this is a new foray and you are buying hardware anyway. Plex has a good document on what NAS models are supported and can do transcoding. And again, you could get any old desktop, even off amazon and install plex and pop some hard drives in. The only real point is you need both something to store files with some bigger drives and something to stream with.

Once you have the hardware the fun begins.

First I setup file shares on the NAS, along with an account with access. The account was simply "plexserver" and it has modify rights to the file shares.

For all intents and purposes I have several shares

  1. DVR for shows I record.
  2. Television share for shows I own and just want to save.
  3. Movies
  4. Kids movies - I dont really want bambi cluttering up my adult movies.

Once I had the shares setup. I spun up linux server in my VMware lab.

I created the folder /plex and then a folder for each share in /plex.

I mounted the shares in /etc/crontab enter image description here

I used a config file in /etc/ to handle the credentials enter image description here Its very simple with only 2 lines. Make sure you set permissions right. enter image description here.

From there install plex, setup your libraries and you are off to the races.

Setting up the DVR and Tuner is also pretty simple, but the harder part (and a major reason i have 2 antennas, is actually getting them aligned.

For this I used TVFool to get a good idea of the general direction of the towers in my area.

You can put in your address and get a decent idea of the relative antenna locations

Additionally you get your relative strength and co-channel interference you may encounter.enter image description here

There is a handy color chart to help you determine the type of antenna you may need.enter image description here

For me, I was able to get by with indoor antennas so no major drilling outside. However two of my towers were about perpendicular to each other. A single large outdoor antenna likely would work better, but the lazy part of me didn't want to run a 15a plug outside for a booster. So I settled with 2 indoor ones, on perpendicular walls.

Alignment I found to be easiest by starting a stream on a channel in plex, then pulling up the HDHomerun tuners page and adjusting the antenna location until you get a suitable strength. Refreshing the page updates the stats.

The details below are about the MINIMUM needed for a solid stream or recording with no breakup.

enter image description here

MIgrating a Synology NAS to BTRFS

I recently upgraded my NAS, and in the process desired a few changes that the simple migration methods didnt support.

Here were the requirements

  1. Migrate to BTRFS from ext4
  2. Upgrade total storage (from 2TB disks to 4TB)
  3. Change the name of the NAS.
  4. Consolidate my increasing segmented media shares

Its also worth noting that I had acquired some new (to me) hardware for this project. Specifically a DS1815+ (with the C2000 cap fix) chock full of 4TB disks. The disks had about 3600 hours on them but were HGST ultrastars with pretty solid reputations.

Because I wanted to migrate the filesystem from ext4 to BTRFS, the the Synology Migration Assistant was not an option.

Because i wanted a new name, backup and restore wasn't really an option. And because i needed to take time (1 week or so) to make the transition. It wasn't terribly feasible either.

Ultimately I used Shared folder sync to migrate the bulk of the fileshare data. This is easy enough.

  1. Turn on rsync on the destination by going to Control Panel>File Services>rsync
  2. At the source go to Control Panel>Shared folder sync>Task List>Create

Things to note with Shared Folder Sync:

  • While the syncing is running, you cannot edit/write to the destination. Any changes made there will be wiped.
  • Use the original shares for new changes until the time you cut over
  • You can STILL move any services that read from the shares (ie: Plex) during the transition.
  • You CAN fix any share permissions and test them at the destination

For the last point. I have a mix of shares setup on fairly legacy versions of DSM (ie: 4.3, 5.0, 5.1 etc). I did have to go through and edit some share permissions.

Specifically some of the older shares had an extra settings options in

Control Panel>Shared Folder>Edit

enter image description here

In the Advanced section these shares had some extra options that merely needed them to be unchecked in the "Advanced Share Permissions"

These options no longer appear on new shares that are created, but are akin to the Windows "Share Permissions" section on a Microsoft file server. Best I can surmise, there used to be a TON of forums questions on why smb shares wouldnt work and 9/10 the share permissions werent set. Samba has had plenty of changes over the years and now it appears Synology structures new shares to just work off the NTFS acls on a folder.

enter image description here

Once sync's were complete it was a matter of simply updating places that I had shares mapped. Group Policy, user accounts for home drives etc.

I also went ahead and rebuilt the Synology Cloud Sync tasks to backblaze B2. And allowed for them to re-upload. This did take some time thanks to Comcasts data caps.