Wednesday, December 18, 2013

Easiest method for creating OSX Mavericks USB Installer

Here is the easiest method to create your OSX Mavericks installer:

sudo "/Applications/Install OS X Mavericks.app/Contents/Resources/createinstallmedia" --volume "/Volumes/Untitled" --applicationpath "/Applications/Install OS X Mavericks.app" --nointeraction

If that's what you were looking for, then you really don't need to read any further.  If you're a newcomer and need a little more information, read on:

Before the above command will work for you, you need to plug in your USB stick and format it using Disk Utility.  You'll need a minimum of 8GB, or it will not work.   Partition it and format it using Mac OS Extended (Journaled).   Then run the above command, adjusting the path after --volume to the path to your mounted USB stick (NOT /Volumes/Macintosh HD or whatever your system drive is!).

The second thing you need to do is to download the app through the Mac App Store.  You can do this even if you have already installed OSX Mavericks;  once the installer has downloaded and launched the welcome screen, hit ⌘Q to quit from the actual installer (Or Menu -> Quit).  The files will still be at /Applications.

Once you're done (it took me around 20 minutes for the creation process to complete), plug it into another system and reboot, holding Option to bring up the disk selection.  Select the disk and you should be off to installing OSX Mavericks from USB.

Tuesday, December 17, 2013

Do you have mouse lag issues in Mac OSX?

There has been reports of strange mouse lag with Apple OSX;  it's far more noticeable if you're coming from Windows for the first time. The way the mouse responds and moves across the screen on OSX looks and feels different than on Windows or Linux.  It seems from system to system, and even from mouse to mouse.  I've had more success with wired Logitech mice than anything, and of course, the trackpad doesn't seem to suffer from much lag at all.

When I moved to OSX almost exclusively about 3 years ago, I was driven mad by the mouse lag.  I almost switched back!  Over time, I have gotten more or less used to it.

There were various work-arounds, like BetterTouchTool and MagicPrefs but I've never found them to be sufficient.  They were great for adding functionality and gestures to the Magic Mouse/Trackpad, though.  The responsiveness has gotten better over the last few OSX releases (particularly Mountain Lion and Mavericks) in my opinion.

 For you newcomers, there is fortunately a new solution that I've been testing for a few weeks now:  SmoothMouse

It installs as a System Preferences item.  You can set the acceleration to be more Mac-like or Windows-like, and even the ability to disable mouse acceleration altogether. One of the things I've noticed is a lower overall lag in mouse responsiveness, especially while moving windows around.  I highly recommend it for people coming from the Windows universe, as it will make your mouse more or less feel like it does in Windows.

Monday, December 16, 2013

.htaccess file for LDAP and IP restriction

I get asked to setup "secure" directories on a daily basis, for various individuals.  It ranges from restricting access by IP address to specific usernames and sometimes a combination of things.  Here is my "skeleton" access snippet that I use so I don't have to memorize it or keep hitting Google for it.

Order deny,allow
Deny from all
#AuthName "Authentication"
#AuthType Basic
#AuthBasicProvider ldap
#AuthLDAPBindDN "cn=binduser,cn=Users,dc=institute,dc=com"
#AuthLDAPBindPassword "changeme"
#AuthLDAPURL "ldaps://ldap:686/cn=Users,dc=institute,dc=com"
#Require ldap-attribute someattribute=somevalue
#Require valid-user
Allow from 192.168.1.0/24
Satisfy Any

I save this in a text file and I copy/paste it whenever I need to.  (OSX terminal shortcut:  `cat filename | pbcopy`)  In an httpd.conf file, it needs to be enclosed by a <Directory "/path/to/secure"> </Directory>.  Uncomment or comment out the sections you need.

If you want the authentication to be secure, you'll need to redirect the non-HTTPS page to an HTTPS page, then include the directive on the ssl.conf (or whichever vhost you've setup for SSL connections :443).  Otherwise, anything entered in the password prompt will go across the wire in the clear.