Showing posts with label osx. Show all posts
Showing posts with label osx. Show all posts

Thursday, August 21, 2008

Automounting a Drive in OSX

One of my colleagues had an interesting question for me. We needed to auto-mount a Windows drive from a Mac. The Mac was being used to automatically create screenshots of web pages on various Mac browsers. It needed to then upload the screenshots to a shared drive. Thus mounting the drive and just doing a copy seemed like the easiest way to go.

Mounting a Windows drive is very easy with a Mac. Just go to Finder -> Go -> Connect to Server -> and then enter smb://some-windows-machine. Automator seemed like the way to go here. I had actually never used it, but it proved quite easy. Here is what it looked like for me:
As you can see from the screenshot, I used the Actions -> Files & Folders. I first selected the Get Specified Servers action and added the same URL that I normally used to manually mount the drive. I then added a Connect to Servers action. You will want to test it once, so that you can submit your credentials while making sure to add the credentials to your Keychain. Next, you'll want to do Saves As and change the format to Application. Now to get to execute the Application automatically at startup, go to System Preferences -> Accounts -> Login Items and then browse to wherever you saved the application. Re-boot and that's it!

Thursday, January 24, 2008

Some Love for Microsoft

I got Office 2008 for my MacBook, and I have to say, I love it so far. Actually, I should say that I love PowerPoint and Entourage, as those are the two programs I have used a lot so far.

PowerPoint -- This is mostly a case of lowered expectations... A lot of the older bugs I used to experience with PowerPoint have been fixed. It works better (perfectly) with some of the templates I use from work, especially those that involve integration with Excel. This should have been the case with Excel 2004, but it was not (the templates were made with Excel 2003 on Windows of course.) This fact alone gives PowerPoint 2008 a huge edge (for me) over Keynote or NeoOffice. I might still use Keynote if I was making a presentation for a conference or the like, but when doing "work", PowerPoint wins easily.

Entourage -- This is the really big winner. This beast works flawlessly with Exchange. I put in my email address and said "use Exchange". It prompted me for my domain and password, and everything just worked. All of the features of Outlook that I use work fine. Many of the features are much better on Entourage. Case in point, auto-complete on addresses. Our Exchange server stores names like Galpin, Michael. So if you start to type "Michael" then "Galpin, Michael" will be a hit on the "M" but not on "Mi" etc. Entourage 2008 is definitely smarter than Outlook 2003 (haven't used Outlook 2007 enough to say about it.)

I generally use Word and Excel more than PowerPoint and Entourage/Outlook, so I will definitely be giving them a workout soon. Finally, as for the UI... I like the switch to the metal look that is the de facto on OSX now. I actually like the ribbon in Office 2007, so I was a little disappointed that it was not used. However, there is very nice consistency between Office 2008 and Office 2004.

So kudos to Microsoft for making a great product for the Mac.

Wednesday, December 05, 2007

Wednesday, November 28, 2007

Mo' Ram

I've been working some lately with DB2. The worst thing about DB2, at least for a Mac-totin' developer, is that DB2 is not (yet) available for OSX. So what to do? I already had Vista installed on my MacBook via Boot Camp. So I installed DB2 on there and ... developed under Windows. Ugh. Running DB2 and Eclipse at the same time often resulted in not only a slow computer, but Eclipse stack overflows and out of memory errors. Funny how I never had such problems on OSX.

Once that project was done, I decided to upgrade the memory on my MacBook. The max it handles is 2GB (I had the 1 GB that was stock) so I went with that. So where to get the 2GB? Well there is always Apple @$300. Ouch. A better choice is Newegg, of course. For a change though, I found an equally good deal at Fry's, just up the road from my office. 2x1GB sticks of Patriot RAM for $65.

Now it was time to install the RAM. I am always quick to tell people that I am a software guy, not a hardware guy. However, Apple makes it really easy to install RAM on the MacBook. It took me like ten, maybe fifteen minutes total to upgrade the RAM. It could not have gone smoother.

The extra memory has inspired me to give Parallels a try. So far the results are mixed. Every time it launches, I get a message form Parallels saying it is installing Parallels Tools. Then Windows crashes (blue screen.) It reboots and seems ok, but it's still aggravating that it does this every time...

Monday, October 29, 2007

Mac Java 6

There's been a lot of developers upset that Leopard does not include Java 6. Does this make the Mac a poor choice of Java developers? No, it doesn't, not yet at least.

First of all, I fully expect that Apple will release an update to Leopard that will include Java 6 before the end of the year. But it doesn't matter too much because Java 6 was mostly a performance release for Sun. There's some nice things in the Swing implementation included on Hot Spot. Neither one of these things is even relevant for Apple. There are some language features (debugging, StAX parser) but these are pretty minor.

So to me it doesn't matter too much that there is no Java 6 for the Mac. Oh, but there actually is, or was. I personally had some problems with it, so I wasn't too surprised that it's no longer available from Apple.

Things only become problematic if Apple takes a long time to support Java 7 when it comes out, especially if you assume there will be a lot of language changes in Java 7. If that happens, then it could be conceivable that developers won't be able to use OSX. Others have pointed out that a major litmus is Eclipse. If Eclipse will run on OSX, then all is well. Eclipse 3.3 was released just a few months ago and was the first version of Eclipse to require Java 5... Eclipse is obviously important for Java developers, but also for Flex developers and even PHP developers.

Tuesday, October 16, 2007

Leopard

Am I going to buy Leopard? Take a look at this desktop...



Yep, I think I need stacks.

Wednesday, August 01, 2007

Tomcat 6 on OSX

I needed to run Tomcat, so I decided to use Tomcat 6 for a change. I got an all too familiar when I tried to start things with catalina start:

The BASEDIR environment variable is not defined correctly

Grrr... I've had this error before, but I couldn't remember at first what the deal was. Then I remembered it... The shells scripts in $CATALINA_HOME/bin aren't executable by default...

cd $CATALINA_HOME/bin
chmod +x *.sh
./catalina.sh start
Using CATALINA_BASE: /Users/michael/dev/apache-tomcat-6.0.13/
Using CATALINA_HOME: /Users/michael/dev/apache-tomcat-6.0.13/
Using CATALINA_TMPDIR: /Users/michael/dev/apache-tomcat-6.0.13//temp
Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home

Ahh, much better!

Tuesday, July 24, 2007

FlashTracer

If you're doing Flash/Flex development, FlashTracer is a great Firefox plugin. It simply monitors your Flash log file and pumps its content to the Firefox sidebar. Very simple, but useful. The only problem I've had with it has been on my MacBook. But I got it to work. Here's how.

From the command line...
cd ~/Library/Preferences/Macromedia/"Flash Player"
mkdir Logs
cd Logs
touch flashlog.txt

Open up FlashTracer and click on Options. In the Select Output File enter Macintosh HD:Users::Library:Preferences:Macromedia:Flash Player:Logs:flashlog.txt
Obviously replace with your username (short name). Restart Firefox, and it should work!

Oh yeah, obviously you need to have the debug version of the Flash Player installed...

Friday, July 20, 2007

The OSX Update from Hell

Thursday I installed an update on my MacBook that included QuickTime 7.2. I installed while I was watching a DVD during my lunch. I installed it using Software Update, of course. No big deal, I install updates like that all the time.

Friday morning I needed to do some edits to a document I had been working on for work. This was a Microsoft Word document, so naturally I've been using Office 2004 for things like that on my MacBook. I double clicked the document, and Word started. Then it stopped. Abruptly. I tried to open Word directly and the same thing. I tired launching Excel or PowerPoint -- same thing.

I noticed that there was an update for Office 2004 (11.3.6) available. So I downloaded it and tried to run it. It did the same thing.

At this point I knew that something in that update from Apple had crippled Rosetta. It was the only thing that made sense. I did some research. I found one thing that suggested reinstalling the most recent major update from Apple. So I did that. No luck.

I did some more research, and found that the problem stemmed from the presence of Java 6 Developer Preview on my MacBook. To uninstall that, here's what I did:

sudo lsbom -s -f /Library/Receipts/JavaSE6Release1.pkg/ContentsArchive.bom > /tmp/files

I edited /tmp/files and chagned all the spaces to "\ " (backslash and a space) and then changed ./ to rm /. This changed the bindings file to remove the Java 6 bindings to OSX. So I now I just needed to execute this magic file.

sudo bash /tmp/files

Now I could delete Java 6.

rm -r /Library/receipts/JavaSE6Release1.pkg

Now I could rebind Java to OSX.

sudo update_prebinding

I actually deleted Java 5 (rm /Library/Receipts/JavaForMacOSX10.4Release5.pkg) also, and then re-installed it, but I probably didn't have to do that last step. Rosetta and thus Office were now back!