Fixing slow SMB shares in Finder

Hmm.  That’s quite a geeky title.  Maybe I should expound a little bit…

SMB stands for Server Message Block, which is a networking protocol used for accessing files and stuff on a Windows server.  It’s proprietary to Microsoft, so the rest of the world has developed their own ways of using it, more specifically with a technology called Samba.  Apple made use of Samba in OSX until 10.7, where they replaced it with their own version.  The good thing about all this is that, basically, a Mac is able to connect to a Windows file share right out of the box.  The bad thing is that Apple’s implementation of SMB is not altogether nor entirely wonderful.  In fact, it has the tendency to be a bit slow and unreliable.

At school we are still using a Windows server for file sharing, which means that all the Macs access the shared drives using SMB.  But recently the unreliability has become increasingly annoying: taking ages just to browse the contents of files, being unable to delete or move files (because Finder kept complaining that the file in question was already in use by someone else), and not being able to edit files.  Not great.

The options were to buy another Mac server and use that for file sharing (because it could share via SMB, AFP and WebDAV)).  Or try and find a solution on the Internet.

Thankfully, the Internet (via macosx.com) has answered.

I found that if I edited the /etc/nsmb.conf file as follows:

echo notify_off=yes >> /etc/nsmb.conf

it seemed to fix it.  Yay!

AppleTV Revisited

Today I helped run some iMovie training for teachers at school, which was fun.  Part of that involved rigging up a MacBook Pro to a projector in our training room, which also has an AppleTV connected to it. I was presenting Keynote slides, but also wanted to occasionally mirror an iPad to demo how to use apps like Educreations to do basic storyboarding.  I was using Reflector to set up an AirPlay receiver, but it struck me that I should just use the AppleTV instead.  After all, Mountain Lion lets you mirror your Mac’s screen to an AppleTV.

My problem with AppleTV from before was that the aspect ratios seemed to go a bit wrong when mirroring 4:3 content vs 16:9.  I tried fiddling with the projector’s aspect ratio and putting it on some sort of widescreen zoom mode made a difference.  However, I then installed an update on the AppleTV and set the projector to good old 4:3 (rather than ‘auto’) and it all seemed to work!  Mirrored 4:3 iPads filled the screen, but also Keynote slides too!

So maybe AppleTV works better than I originally thought!

Making the ICT Suite more iPad-like

Over half term we had the fun job of upgrading our Mac server to Mountain Lion and then fiddling around with user accounts to make the Macs play nicely with our new ADSync setup.  As part of this process, I decided to change the way that the ICT Suite worked.

The old setup had children logging in with a class login, which allowed for a shared ‘documents’ on the server.  However, you would have to be logged in with those credentials to see the files, which would be annoying for teachers wanting to access work elsewhere in the school.  Entering a password to login was also rather tricky for the younger children, wasting a substantial part of ICT lessons early on just with logging in.  Also, because iMovie projects were saved locally to a machine, children would have to go back to the same machine with the same login to continue with their video.  This generally worked well, but if a child didn’t check that the Mac was logged out before starting work, they may have no idea what login to use to go back to it in a later lesson.

Instead, I set up the ICT Suite as follows:

  • A local account, without a password
  • The login screen showing the local non-adminstrator account as a ‘badge’, rather than a text field for username and password
  • When children log in, a shared drive is mounted via Managed Preferences, which has the username and password build into the URL (e.g. smb://username:password@pathtoserver/sharepoint).  This shared drive is a subfolder of the shared drive that teachers use across the school, meaning teachers can see children’s work but children can’t see all of the teachers’ work.
  • A login script runs which renames ~/Documents to ~/MacDocuments and then creates a symbolic link to the mounted shared drive and calls that ‘Documents’.  This little manoeuvre tricks Finder into putting that shared drive into the sidebar where Documents used to be, and also makes it the default save position

The upshot of all of this is that it makes the ICT Suite have much more of an iOS-like experience; instead of typing in usernames and passwords, you just click and go.  Popping into the ICT Suite today, teachers and children certainly liked the change!