Wednesday, November 18, 2009

Samba Unix Extensions and Following Symlinks with OSX Leopard and Ubuntu Hardy

Sorry for that title - just trying to help the Google bot help the future.

So here's the problem. When we upgraded the bulk of the Macs at work to Leopard, symlinks on the Samba share quit working. They still worked in Windows, and on Hardy clients, but not Leopard.

If you created an 'alias' in Leopard, then the Macs could follow it, but the Linux boxes not.

Lots of people have the same or similar issues -
A B C D E F

Turns out Leopard is the first OSX client to support Unix extensions in CIFS.
So the client ends up trying to follow symlinks *locally* rather than on the server. 'Dumber' clients like Windows or Gnome Nautilus smb:// don't do Unix extensions, so the server resolves the symlinks for you.

The 'fix' is to set 'unix extensions = no' globally in the smb.conf file.
Now the OSX clients won't get the unix info either, and the server will go back to resolving symlinks for them.

The drawback to this fix as I understand it is that SMB with unix extensions on is a complete replacement for NFS in that the full range of unix permissions can be provided to unix clients - it's not limited anymore. You would need some external system to keep UID/GIDs syncronized, but NFS has that issue too.

What I still don't understand is how to get symlinks to resolve to the correct spot on the server when unix extensions *is* on. E.G. if I was using a 'smart' linux client (like mount.cifs and the /etc/fstab file?) how do I get symlinks to work? Comments appreciated, as I've spent too much time on this issue at the moment anyway.

Brian

PS - I also found out that when you create an 'alias' in OSX on a SMB share, the file it creates is actually in Minchell and French format - see this page that talks about creating symlinks on Windows servers. That's what OSX does on a linux server as well. Weird the linux client doesn't follow it!

Monday, September 14, 2009

Adding Java apps to the Motorola K1m For Free

I've got a Motorola K1m running on the President's Choice Financial pay as you go program. (It's resold Bell Mobility services) Cheap and reliable!

It has a built in browser that works ok for some things, but won't cooperate with the identi.ca microblog I post to.

I tripped over an interesting pair of applications that looked like they might work from the Substance Of Code blog. Mobidentica and Twim. Now how the heck can I install those on my phone? It's a somewhat locked down system. :-)

Turns out the latest version of Bitpim (1.06) for Leopard will actually talk to my phone. I'd tried with earlier versions and had no luck, but this time I was able to get a working connection.

Since Bitpim won't automatically discover the phone, what I found to work was this - use a USB cable, plug it in, and under preferences you'll have to manually specify the K1m and pick a COM port. Go for the one marked 'modem' - in my case it was /dev/cu.usbmodem5d11

Now, under the 'View' menu turn on the 'View File System' option. Pick the new 'File System' entry on the left side of the main window pane and start twisting the little triangles next to the '/' entry. Confusingly only files show in the next column, sub directories only appear under the '/' entry AFTER you twist the triangle. Harder to explain than do - just try it.

Navigate to /brew/mod/jbed/preinstall Don't worry about the hacky looking path, that's really what's already there. Right click in the last column and 'add files' to add the .jad and .jar files you download from the Substance Of Code site. You'll see the progress on the bottom right as it uploads the files to your phone. Quit Bitpim, and start Java on your phone. It will discover and compile the programs, quit Java and then restart on it's own. Now your application is available along with the sample games etc.

See this post for most of the info I've just provided here.

I'm sure this will apply to other Java phone applications too. I'll be keeping an eye out for more possibilities! Hope that helps someone.

Brian

Friday, September 4, 2009

Opening up an Intel iMac 17"

I just replaced the hard drive on a 17" Intel iMac. (Last one before the grey and black models). It's amazing how unfriendly it is to disassemble compared to the iMac G5. If this is your first time disassembling stuff, don't start with this model iMac. :-) If doing stuff like this is normal for you then don't be scared of it, just be careful.

What isn't clear from the pictures and movies I saw on the internet is how to release the casing around the iSight camera. One video I saw said "shake it and it'll come loose". Ummm... NO.

Here's the picture you need to see.




The two top clips are actually spring loaded hooks. Lift the thick part of the metal and they unhook.

FYI
Brian