Tag Archives: Apple

Prevent BBedit to open last documents

Since MacOS X Lion (10.7.x) we are “blessed” by the general option that documents we have worked on the last time are automatically opened the next time we start up an application.

While we can argue if that is a boon or not, I personally don’t like this “feature”. Especially, when the last opened document has had errors or crashed the application.

Today, I was not able to open a document in BBedit and it crashed completely. But sure enough, the next time I opened BBedit again it tried to open the same file again, resulting in crashing again.

After some trial and error I figured that holding down the shift key during the startup of BBedit it will disable loading of previous documents. I hope this helps someone else out there.

Yes, I know there are ways to disable this globally. But in case one does not want to disable this feature globally.

Prevent high CPU usage on MacOS X Lion

Since upgrading to MacOS X 10.7 Lion and its update to 10.7.1, I’ve have had my fan coming on a lot of times. Something I have hardly every experienced with Snow Leopard. It seams that many are also experiencing this issue as the Apple discussion boards prove.

One of the “solutions” that have worked for me is to disable spotlight (I really don’t need it) with the following command (issued in the terminal):

sudo mdutil -a -i off

Another one was to remove any spotlight plugins that applications like Microsoft Office, Parallels, etc. put into your “/Library/Spotlight” folder. This helped big time.

Last but not least, you can also remove any processes that are being launched during startup which might cause a high CPU usage. In my case, I disable a couple of launchdaemons. The command to do so is:

sudo launchctl unload -w /Library/LaunchDaemons/{application}

Say, you want to remove the startup parallels daemon you would do a:

sudo launchctl unload -w /Library/LaunchDaemons/com.parallels.desktop.launchdaemon.plist

Hope this helps anybody out there. After all, there is still hope that Apple finally brings the much needed update that helps fix some issues that came up in MacOS X Lion.

 

Fix for running MySQL 5.5.8 under MacOS X 10.6.5 (Snow Leopard)

Oracle recently released the latest MySQL 5.5.x versions. Despite of having tones of fixes and supposedly running much faster and (finally) making InnoDB the default storage engine, it is always good to keep up to date with latest releases.

But, as in the past, MaxOS X users always have to battle with getting it run correctly on their platform of choice. With this release it is no difference. This time, we are hit by permission issues and wrong path settings that prohibits MySQL to start at all and also to make it automatically startup during boot time.

Fixing startup

After installing the preference pane, you should be able to simply click the button to start/stop the MySQL server. Point is that “it should”, but it wont. This is due to a wrong path setting in the startup file. In order to make it work you have to edit a file. Jump into your favorites tool (no, it is not iTunes), but the Terminal application and enter:

nano /usr/local/mysql/support-files/mysql.server

(Nano is a editor in your shell, you can also use “vi” or “emacs”, but I guess “nano” is easy to use)

Then hit “ctrl + W” (for search) and enter “basedir=”, then hit Enter”. This will search for the string entered. Once found, change it to:

basedir=/usr/local/mysql

Once changed, hit “ctrl + W” again and search for “mysqld_pid_file_path=$datadir/`hostname`.pid” and change it to:

mysqld_pid_file_path=$datadir/`/bin/hostname`.pid

After these two changes simply press “ctrl + X” and enter “y” and then enter. This will save the changes you just made and will close the editor.

Fixing Startupitem

During reboot you might have seen the error message:

“Insecure Startup Item disabled. /Library/StartupItems/MySQLCOM has not been started because it does not have the proper security settings.”

This is because the StartUpItem has been installed with the improper permission settings. This can simply be solved with the following commands you have to enter in the terminal:

chown -R root:wheel /Library/StartupItems/MySQLCOM

That’s it. After next reboot the MySQL server will startup as expected and you will also be able to start/stop the server from the preference panel.

Waht’s the difference between Apple and the iPhone 4?

So true :-)

http://geekandpoke.typepad.com/

What do those newspapers think?

Right, so I’ve been on the internet for quite a long time. Like many of you, I most of the time “could” ignore those ads when visiting a newspaper website, but today, while reading the times.com website, I was just simply annoyed. You have to look at the screenshot to understand what I mean:

I mean, what do those editors think when they place an ad like this? Does the newspaper think that we will click on it? As you can clearly see, the ads and navigation takes up around 70% of the screen estate. Never mind the usability of the website, less then me finding my way around.

Thought, this is just one of the examples I’ve seen in recent time, it is clearly the biggest one. Maybe more annoying are the ones that hover on top of the news text and you need to close them or the ones that act on your mouse movements.

Now, I’m not blind and I know that you guys have to make money. But please, find a more decent way to make money. As an example, cooperate with Apple on their iPad offering and place your ads there. Or make a paid subscription model, that makes us readers, a follower of your newspaper instead of one leaving your site immediately (as I did).

If you run out of ideas, I got plenty left and they have proven to work. I’m available at your disposal…

A petition to Apple to drop AT & T

Thought this to be quite useful for my American friends.

Setting the correct Java version under MacOS X

My favorite scripting language is CFML, or as some know it as ColdFusion. I like it because it is very very powerful, easy to use and can do just about everything your xyz language can do.

For many years, ColdFusion was a closed sourced system, where the former Macromedia and now Adobe got the copyright of the code. Luckily, this has changed when OpenBlueDragon (OpenBD) came to play with the first open source CFML application server. So, now the CFML world got a very nice open source CFML language and server. Our very own open source Digital Asset Management – Razuna – runs on OpenBD as well and comes bundled with it.

Anyhow, the reason of this blog post is not CFML, but how to set the correct Java JRE environment under MacOS X. Then why did I mention CFML and OpenBD in the first place, you might ask?

Well, today I downloaded the latest version of OpenBD which runs now on Java 1.6 and is 64 bit. But when I tried to start our server (Tomcat) with the new OpenBD jar I got the following error messages in the log.

at org.apache.catalina.startup.
Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class com.naryx.tagfusion.cfm.application.cfHttpSessionListener)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal (WebappClassLoader.java:1854)

As we can see from the “Bad version number…” in the above line there must be some misconfiguration of the Java runtime going on. But wait, does my execution of “java -version” not state that I’m running the latest Java version? Reading from those lines, you could think so.

java version “1.6.0_13″
Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)

Apparently when one looks into the Java paths of MacOS X we see that the current “JDK” is set to 1.5 and not 1.6. Judging from this, I tend to think that Apple is not setting the JDK right for Java applications. You might say, well then just set it in the “Java Preferences”, right? Wrong, I already did that as the screen below shows).

Java Preferences

So, in order to solve this, I set the correct JRE_HOME variable in my .profile in order for all Java applications to pick up the current JRE. To do that, you simple edit your .profile (with vi ~/.profile) and add the following lines to it:

JRE_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
export JRE_HOME

Save it, open a new terminal window (or close and open one) and start Tomcat. Now Tomcat is picking up the new JRE path and Java application, in my case OpenBD, that depend on the Java 1.6 JRE version will run.

The almost perfect sound and TV setup

I am a huge fan of making my life “simple” and not complicated. After all, life around us is already complicated with all that is going on, so why bother taking it home, right?

That is also one of the reasons, why I use Apple Hardware and, to some extend, Apple Software. Not that I don’t know how to work with Linux or Windows, but Apple has one thing going for them, that is “It simply works”. That is true when it comes down to their Hardware, Operating System and Phone. You could argue, that this and that feature is not there and Apple is mediocre in their feature set (thought, this is mainly true), but I think because their not overloaded with features they have less to worry about and again it boils down that “it simply works”.

In that regard, I set out the other day to get my sound and TV setup right in my house. Something which I thought will take a long time, took merely minutes to get everything up and running. I took a new Mac Mini as the center of my “Hub”, meaning I have iTunes running on it, got it connected to my Apple Airport Extreme (with 2 Airport Express devices on other levels in the house) and have my Stereo connected to another Airport Express device. Then I also hooked up the Mac Mini to my TV Set.

remote_controls20080916Now, the best part of this setup is that I can control iTunes and the Mac Mini from everywhere in my house with my MacBook Pro, or from my wife’s MacBook or from my iPhone. Yes, iPhone!

Did you know that Apple has a great little iPhone app that allows you to control iTunes directly from your iPhone? I didn’t and so I as totally blown away when I found this little gem of software, called “Remote“. Once installed, again it took a minute to install and setup, you can control iTunes and Apple TV right there from your iPhone.

I remember when I was invited by Apple to come over to a MacWorld keynote and I saw Steve Jobs talking on the Apple Hub idea. His vision was that Apple devices become the Hub, the center of your life. Well, I have to say that they achieved it. Well done and thank you.

Apple Mail problems and how to fix it

macosx-desktopUsually, I’m a happy camper with my MacOS X and with the built in applications (not that I use them a lot, but when I do I like how well they are built and “feel”). The only application I use a lot of the built in applications is Apple Mail.

Lately, Apple Mail, has been acting up a lot. As such, that when it tried to sync with my mail server it just hang up and sucked in all available CPU and my MacBook was heating up like anything. The only remedy was to Force Quit Apple Mail (if you don’t know, just press the “Apple Key (cmd) & Alt (option) & Esc and you get a handy dialog to force quit any running application).

How I got my Apple Mail running healthy again? Here are the following steps I did;

  1. Repair Permissions
    Actually, repairing permission should be done at least once a month. It just keeps your system healthy and rules out any problems. What “Repair Permissions” does, is to simply correct all permissions on files that system owns and needs to run smoothly. To repair permissions lunch the Disk Utility application, select your startup disk and click on “Repair Permissions”.
  2. Remove the cache files of Apple Mail
    If you see a problem with syncing and updating the cache directory within Mail it could be that the cache files are corrupt. Go to your home Library folder, then to the Mail folder and remove the “DefaultCounts”, “Envelope Index” and the “LSMMap” files. Some have reported that removing the “MessageUidsAlreadyDownloaded3″ as well. So you will have to experiment a bit.

The next time you start up Apple Mail it should ask you to reimport all messages and it will rebuilt the index. Hopefully, you are back up and all is well.

Stay in Sync with Google, iPhone and your Mac

The other day I posted about “Exchange, Kerio, Zimbra and Google or the Quest for the perfect Collaboration Tool“. In that post, one of the main goals was how to keep all your eMails & Calendar entries up to date on different devices. Today, I want to share my experience with Google Apps (eMail & Calendar), the iPhone and my MacBook Pro and keeping all of them in sync.

Let’s start with Google. Google has this great service called Google Apps. When you sign up with Google Apps you not only get a (almost perfect) eMail service, Calendar and Contact manager, but you also get Google Docs, Google Video and Google Sites. Google Apps allows you to use your own domain, meaning you won’t have a eMail address of “mail@gmail.com”, but instead you can have your very own “mail@mydomain.com”. Best of it all, it is free of charge, that is up to 50 email accounts with each 7GB limit. If you want more you can sign up for Google Apps professional which gives you for $50 for each user/year, that’s an almost unlimited edition.

gogglemailNow, back on your Mac it is easy to use the Google Mail service within your favorite Mail application, be it Entourage or Apple Mail. But in order to be able to use Google Mail as a POP or IMAP service you will need to enable it first in your Google account. For that simply go to your “Settings” and under “Forwarding and POP/IMAP” enable/disable the POP and/or IMAP settings.

After you have done that you can access your Google Mail account with your client. Many clients are supported. To get a current list of supported client visit their Help Center. Also make sure you follow the Guidelines for using your Mail client with Google Mail.

Now on your iPhone you can add the Google Mail account as well. One very important note on iPhone and Google is that you should NOT use the “GMail” button when you set up the eMail account on your iPhone if you want to use IMAP. The “GMail” button uses POP and not IMAP. Detailed instructions on how to setup your iPhone with Google is here.

I have found that using Google Mail with Apple Mail and iPhone is quite reliable and fast. Some things are different then with other mail servers, also somethings don’t work as expected. Those are;

  1. You get a folder called [GMail] in your account. There are many places on the net describing what this folder is.
  2. Actions on your messages are handled different with Google Mail. Google put up a document on these IMAP Mail actions here.
  3. Google Mail does not the concept of folders. Every message gets a label. This might be a paradigm shift for some users.
  4. Within Apple Mail I see that the read cound on my “InBox” is different then the one on the “All Mail” mailbox. After you wait for some time, sometimes up to 10 minutes, the read count gets synced.
  5. The “Trash” folder has a unread mail count on it, even thought that those messages have been read.

All in all, keeping your mails in sync is not a hard thing to do as IMAP has become quite the “standard” and each mobile device has a decent eMail application available.

Calendar & Address Book Syncing

Recently, Google released, in Beta of course, the Google Sync for iPhone option. With Google Sync you can syncronize your Calendar & Address book with your Google account and your iPhone. Thought the idea is good there are two main flaws with Google Sync;

  1. All your Calendar & Contacts entries are deleted on the first run (thought this is more a problem of the ActiveSync protocol then Google’s fault)
  2. You will need a iPhone for Googly Sync and of course only the iPhone and the Google Apps are syncronized.

So, what to do if you want to sync your local Mac, your iPhone and your Google Apps?

For your iPhone you simply follow the instructions for the iPhone as outlined by Google. In short, you setup a Exchange Account, but don’t sync mail, only Calendar and Contacts.

For your local Mac, there is SpanningSync. With SpanningSync you simply enter your GMail account and your Mac, iPhone and Google Apps will stay syncronized all the time. SpanningSync is installed on your Mac and runs in the background. There are a couple of options on how and when to sync, but all in all, the application simply works. The application is based on an annual payment of $25 or a one time fee of $65. Thought, you can save $5 on SpanningSync with my discount code now.

Here you go. You got a perfect work flow system where all your Mail, Calendar and Contact entries are in sync with your iPhone, your Mac and Google.