Categories
General

Custom sudo in macOS

This is a little macOS quality of life thing I recently learned and documenting here for my future self.

Like many other command line junkies, I use a custom sudoers file to make sudo more convenient. However unlike in previous years, I’ve noticed the past few times I upgrade macOS, both minor/point updates and the recent Big Sur beta, my sudo customizations (i.e. the sudoers file) get swallowed, and I have to manually restore.

Now in fairness macOS is at least polite enough to move the file into this ‘Relocated Items’ folder instead of deleting it outright. But still a hassle to manually patch.

TIL it seems you can simply drop in sudoers customizations into a new file inside
/private/etc/sudoers.d

As far as I can tell sudo config customizations placed here will survive macOS upgrades, which means one less manual chore for me next time. Less churn = happier me.

Categories
Handy Technical

Reference: screen sharing in Snow Leopard

Posted originally for my personal reference, but since my Mac tips get lots of Google hits hope this is useful to you too.

Screen Sharing on Mac OS X Snow Leopard – very convenient to have built-in*, and I use it to logon to my Ubuntu server when the CLI doesn’t cut the mustard – infrequent, but it happens.

If you’re like me, you occasionally get an unexpected blank or white screen when you connect to your other computer. It turns out the mouse and keyboard pass through just fine but the display is all white. Fix it by getting info on Screen Sharing.app and ticking the ‘Open in 32-bit mode’ box.

* Technical addendum: I would be remiss to sing accolades of the VNC-based Screen Sharing without mentioning Microsoft’s [Citrix] Remote Desktop. It’s significantly faster than VNC due to some sweet implementation differences – to my knowledge when you connect to the Windows host it switches to a special display driver that sends small drawing instructions over the tubes that are subsequently recreated on your client. VNC, while open source and commensurately ubiquitous in Unix/Linux/Mac land, is not so smart and blindly sends a compressed image of the screen. Just sayin guys – Remote Desktop is awesome.