Skip to content

Mounting NFS shares on Mac OS

When trying to mount a NFS share that is exported by a Linux NFS server (the kernel implementation), I got a "Permission denied" error. There are lots of explanations around in the internet that recommend to use the resvport mount option like

$ sudo mount -t nfs -o resvport,rw kepler:/home/bwalle /Volumes/kepler

However, I didn't want to change the settings on the client but on the server. This has the advantage that I can still use Finder to mount NFS which isn't able to provide special mount options.

The solution was to use insecure in /etc/exports like

/home/bwalle *(rw,no_subtree_check,insecure)

What is insecure about that option? Well, the check comes from the early days of Unix where only the system administrator had the root password. So only applications running as root can open TCP connections with privileged source ports (below 1024). However, nowadays everybody knows that NFS in its versions 2 and 3 are insecure by design and removing the check for the source port doesn't make it more insecure.

Swap Alt and Windows key in Windows

I use VirtualBox on Mac OS. Windows guest, Mac OS host. On the Mac, the keyboard layout is a bit different: While on the PC the three first keys in the last row on the keyboard are Ctrl, Windows and Alt, the Mac has Ctrl, Alt and Command. From the key code perspective, Command and Windows are the same.

The problem is now that the Windows guest gets the key codes, i.e. Alt and Windows are swapped. Of course the label stays, the same, but if you type blind, this doesn't matter. So to use Alt+Tab (to switch between different windows) one needs to press the second key, not the third key. Maybe some people like that behavior, but I don't. There are feature requests, but VirtualBox developers don't want to implement it.

So I decided to look for a solution inside the VM. There are many tools in Windows to swap keys, but most of them are way too overloaded. Searching around in the web, I found a much simpler solution which consists only of adding a value in the registry.

There's a so-called Scan-code mapper for keyboards described in the MSDN documentation. All you need to do is to add a value called HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map with following value:

00 00 00 00  00 00 00 00 
03 00 00 00  38 00 5b e0
5b e0 38 00  00 00 00 00

After that, just reboot. No need to install tools, no autostart. If you want to get rid of the behavior, just delete the registry key and you're done.

Using a dark background with CoIDE

At work I had to develop some firmware for two different ARM micro controllers (LPC and STM32). Although I don't like IDEs in general, after some search I've chosen CoIDE for that task.

It works well with Segger JLink, supports a broad list of micro controllers (including the ones our hardware had)  and it's free (in terms of beer, not speech). Well, it only works on Microsoft Windows, but as long as I only have to work under Windows and not for Windows, that's okay for a while. "Using a dark background with CoIDE" vollständig lesen