Tuesday, February 20, 2007

Subclipse (OS X) and Samba Shares

If you're having problems connecting to a Samba share (ie switching to a workspace on a Samba share), you may need to disable locking in Eclipse. Yesterday on my iMac, every time I tried to create a workspace on a Samba share I was trying to connect to on the local network, I got errors about the workspace being in use. After a lot of digging around, here's my solution:

You need to edit the eclipse.ini file. On my Mac, Eclipse is in the Applications folder. So,

vi /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini

I added the following line to the end of the file:

-Dosgi.locking=none

After restarting Eclipse I had no more issues with file locking or the workspace being busy.

.perltidyrc According to Perl Best Practices

The following is a valid .perltidyrc file as listed in Perl Best Practices:

-l=78 # Max line width is 78 cols
-i=4 # Indent level is 4 cols
-ci=4 # Continuation indent is 4 cols
-st # Output to STDOUT
-se # Errors to STDERR
-vt=2 # Maximal vertical tightness
-cti=0 # No extra indentation for closing brackets
-pt=1 # Medium parenthesis tightness
-bt=1 # Medium brace tightness
-sbt=1 # Medium square bracket tightness
-bbt=1 # Medium block brace tightness
-nsfs # No space before semicolons
-nolq # Don't outdent long quoted strings
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" # Break before all operators

A Quick Intro

What you'll find here is various bits of trivia that have helped me fix day to day computer issues with Linux machines, Macs etc. When the docs aren't easy to find, it's good to post the little things you've learned in one place. That's my plan here. I'm putting everything here for my own benefit -- I'd like to have a central location for my notes to self, but if it's helpful to someone else, that's great!