Archive for the “Apple” Category
After fixing the OS X Terminal’s keyboard shortcuts, I wanted to conquer the annoying functionality that keeps Terminal open after the last terminal tab is closed. I normally exit a shell by typing the command “exit”. However, you can also exit a shell by closing the Terminal tab using Cocoa methods (red close button, CMD+w). Between these two methods, things happen in a different order. (Using “exit” causes the user to logout and exit the shell, but the actual tab or window stays open until the processes end. On the other hand, using one of the window closing methods closes the window before the user logout and the processes end).
The general approach is to first watch for the EXIT signal to be sent to a shell (this happens regardless which way the Terminal is closed), then do some handling to determine if the user is exiting the last Terminal tab. However, this got rather cumbersome because of the behavior outlined above. (Sometimes when the final EXIT signal is caught there is still a tab open, other times there is no tab open when the final EXIT signal is caught). So anyway, this is how I did it.
Read the rest of this entry »
Tags: Apple, AppleScript, Bash, Command Line, computer, How-To, Mac, Macintosh, OSX, Snow Leopard, Terminal
No Comments »
The OSX Terminal.app has come a long way. I had been using iTerm exclusively ever since I started using the Mac, but recently switched over to using the default Terminal.
I have become reliant on using Home and End to move to the beginning or end of the line at the command line. The behavior is different on the OSX Terminal though, they scroll to the top and end of the buffer. (Actually, I would settle for being able to use CMD+← and CMD+→ like you would for Cocoa apps if that worked, but it doesn’t). Actually, the shortcuts that move to teh beginning and end of a line in the Terminal are CTRL+A and CTRL+E
Additionally, the PageUp and PageDown keys navigate through the buffer by default which is rather annoying if you are trying to edit config files (such as with Nano) and want to move through the file quicker. (The default to do a normal PgUp and PgDn is Shift+PgUp and Shift+PgDn).
Read the rest of this entry »
Tags: Apple, Bash, Commnd Line, computer, How-To, Keyboard, Macintosh, OSX, Shell, Shortcuts, Snow Leopard, Terminal
No Comments »
I recently switched to the Mac for my work computer (with Windows XP in parallels… I have some VBA macros that are necessary to do my job. Over time, I expect to replace most of it with AppleScript.)
The other day, I noticed some weird emails in my Sent Items Folder in Entourage. They did not have a sender or a subject. If I opened them up, I could see all the headers and any html tags(if any). under the displayed headers, I could see that it was indeed emails that I was sending, but they were somehow becoming corrupted. Today, I figured out that they were emails being sent with my iPhone using my exchange account. I did a little searching and found out that there is a bug that adds some junk to the email header. Outlook on the PC doesn’t get the bad headers because of the way it connects to the server or it just ignores the bad header (it wouldn’t suprise me if the latter was the case).
Fortunately, it is just a simple added three lines at the top of the email and this should be correctable with a script. Since I am trying to learn AppleScript anyway, I thought I would take my chances. After reading a view discussions and blog posts on the issue with some suggested fixes and scripts, I came across an AppleScript made to correct the problem that I decided to examine. Unfortunately, this script didn’t work at all for me, but from looking at the script, it appeared this was mainly due to how it was attempting to detect the “bad email”. Pretty much every “solution” I found required the user to select one or more messages in Entourage and running a script from the Entourage Script menu. Not a very elegant solution, in my opinion. On top of that, it appears that Entourage does not allow AppleScripts to directly modify the email and save it back anyway. Well, I need better detection, and the ability to link the script to an Entourage Rule (and maybe still maintain the ability to run it from the script menu if I wanted.) So, I did and here you go:
Download:
FixSentFromiPhone_1.2.scpt.zip
Here is how I setup my Rule in Entourage to make it run automatically when new message arrive in my sent items folder:
Execute If all criteria are met
If
Folder Is Sent Items
Specific Header Subject Does not exist
Then
Run AppleScript FixSentFromiPhone.scpt
UPDATE: I found that there is a much easier way to do a portion of the script I wrote and updated it.
UPDATE2: It appears my script needs to be made more flexible in order to handle messages with multiple recipients (at least it didn’t work correctly when I did a “reply to all”). I am thinking about it and may update soon.
UPDATE3: Since I had not gotten around to it yet, a reader modified my script and sent me the changes he made to handle messages that had been sent to multiple destinations. I then took his changes and integrated them into the script. Everything seems to work well for me. The download above has been updated. Thanks!
Tags: ActiveSync, Apple, AppleScript, Email, Entourage, Exchange, iPhone, Office
10 Comments »
Slightly adventurous Intel-based Mac owners seem to often be afraid or confused about installing Ubuntu along side OSX, but it is actually quite simple. There are some oddities that make it different from installing on a PC (but if it was the same, it wouldn’t be a Mac now would it?). Because of this, I am going to outline my easy install method that will leave you with a dual-boot system with OSX and Ubuntu (Those out there that want a Triple-Boot setup will require a bit more complication and I suggest just checking at ubuntuforums.org).
Intro / Setup
For the purposes of this article, I will be assuming that you have OSX Leopard (10.5) installed on your Mac (with some additional details for those with OSX < 10.5), and you would like to install Ubuntu 8.10 Intrepid Ibex along side it. This should cover most users at the time of this writing.
Read the rest of this entry »
Tags: Apple, Dual Boot, Easy, Installation, Intel, Linux, Mac, Mactel, Ubuntu
No Comments »
On my aluminum Apple Keyboard I prefer to have the F1 – F12 keys operate as the F1 – F12 keys by default, and access the brightness, expose, and other extras in combination with the Fn key. The is the opposite of the way they function in OSX. In OS X, you very rarely ever need to use the F1-F12 key unless you are using some professional software that uses them for shortcuts, so it is not that big of a deal. In Linux, however, I use these keys a lot to switch to virtual consoles and access gnome shortcuts. Previous to Intrepid, it was recommended to install pommed to enable the functions of many of these special keys. pommed’s config file had the option to swap the way the Fn key works, requiring you to use Fn in order to change the brightness, etc. Now, in Intrepid (8.10) most of the functionality of pommed has been implemented into hal and pommed simply creates conflicts. So how do we swap the function of the Fn key?
First edit /etc/modprobe.d/options
sudo nano /etc/modprobe.d/options
and make sure it has the line
options hid pb_fnmode=2
Then save and exit. Lastly, we need to update ramfs:
sudo update-initramfs -u -v -k `uname -r`
Then just reboot!
Tags: 8.10, Apple, Fn, iMac, iMac5.1, Intrepid, Keyboard, mactel-support, pommed, Ubuntu
9 Comments »
I decided to do a complete reinstall with Intrepid on my iMac. Everything went quite well, so I decided to share the steps that I took to do the install. Note that in the end, I want to dual-boot OS X and Ubuntu on my iMac with no other partitions. You will need to adjust your install for any custom setup you might want to have.
- Download the Ubuntu 8.10 x64 Desktop iso and burn to a CD with Toast at the slowest possible speed.
- Use DiskUtility to resize the OSX partition and make space on the hard drive for Ubuntu. Select your hard drive on the left side, and on the partition tab, click the “+” to add a partition to the disc. You can make this partition any format as it will just be removed later. Right now, we are just allocating space for the install.
- I already had rEFIt installed, but if you do not have it yet, now is a good time to do it.
- Make sure that the Ubuntu CD is in the drive and shutdown the iMac. Start it up again, and this time you should see the rEFIt menu on startup instead of the grey and white Apple logo screen. If you still boot directly into OS X, then you might need to perform the manual installation of rEFIt.
- Once you have rEFIt working, you will be able to select the Ubuntu CD to boot. Eventually, you will get to the Ubuntu desktop.
- Once there, go to System > Adminstration > Partition Editor. This will start gParted. In this application, you will see a graphical representation of the partitions on your hard drive similar to how DiskUtility does in OSX, except this will show ALL the partitions (even ones that Apple tries to hide) and free space on the disc too.
- Near the Right end of the bar at the top, the partition that was created with DiskUtility will show. There will likely be a tiny bit of free space before and after this partition as well. At the beginning of the disk, there will be a EFI partition (don’t touch!) and the OS X partition (shows as an HFS+ filesystem). Select the FAT32 partition created in DiskUtility and delete. This will leave a bunch of free space on your hard drive for Ubuntu. When you are ready, click “Apply” and the partition will be deleted.You can now quit gparted.
- Now, start the installer with the icon on the desktop. Choose your language and then Timezone. (I chose English and the Central Time Zone [Chicago]). Why in Linux do we always have to choose a city for the time zone? I just want to specify the name of the time zone I am in!!
- On the next screen select the Macintosh variant of your language’s keyboard. (I chose USA-Macintosh. This variant has always worked for me on my older White Apple Keyboard as well as my newer Aluminum Keyboard).
- On the next screen, choose to install to the largest continuous free space on the hard drive. This will allow the installer to create a root and swap partition in the free space you left on the drive.
- Next you will setup your user account and password. (I also chose to enable auto-login as I am the only person that uses this machine.)
- On the final screen, click the Advanced button and choose to install GRUB to /dev/sda3. This is the Ubuntu root partition. Click OK for that and back at the summary screen, click Install to start the installation.
- During the install play a little Tali or Tetravex
. After the install is complete reboot the machine.
That is it for the basic installation. After the reboot I went to System > Admin > Hardware Drivers and enabled the “Broadcom STA driver” (not the B43 driver) to get the WiFi working. 3D Acceleration and “Extra” desktop effects worked with the default open source driver, but there seems to be an issue when using 3D graphics while desktop effects are enabled (to test this, you can enable the “Extra” desktop effects and then run ‘glxgears’ from the commandline). Turning off the desktop effects will fix the issue. Enabling the Proprietary ATI driver in the same place where you enabled the Broadcom driver will probably help that situation.
After all that, you can install any updated packages with the update manager and reboot. WiFi should now work. Stay tuned for other tweaks that I make to my machine to get things working the way I want.
Tags: Apple, iMac5.1, Installation, Intrepid, Linux, Mac, rEFIt, Ubuntu. iMac
No Comments »
There has been a bit of confusion on how to get the iSight working on many of the Intel Macs recently. Fortunately, the newer MacBooks coming out have a working iSight out-of-the-box without needing to do anything, but for older iSights, firmware loading is still required. They changed the firmware loading back to the kernel out of userspace, so all you have to do is get the firmware and place it in the correct location in the filesystem. Let’s do it step by step.
- First you need to get the firmware out of a particular file located on your OSX install. You can copy it to a USB drive or other location so that you can acess it from Ubuntu. It is located in
/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/
AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport
- Boot into Ubuntu and install isight-firmware-tools
sudo apt-get install isight-firmware-tools
- Go ahead and place the AppleUSBSupportVideo file in /lib/firmware
sudo cp AppleUSBSupportVideo /lib/firmware/
- Now, extract the iSight firmware from the file
sudo ift-extract -a /lib/firmware/AppleUSBVideoSupport
This should place a file called isight.fw in the /lib/firmware directory. It would be a good idea to save a copy of this file somewhere so that you can find it again later and not need to extract it from the AppleUSBVideoSupport file. In the future, you just need to place the isight.fw file in /lib/firmware/.
When all this is done, you need to shutdown your Mac and Start it up again (not reboot!!). Completely shutting down will reinitilize the hardware and allow the firmware to load while starting Ubuntu.
Tags: 8.10, Apple, IFT, Intrepid, iSight, isight-firmware-tools, Mactel, mactel-support, Ubuntu
15 Comments »
Posted by Ricky in iPhone

Finally got an iPhone. I love it. Jailbroken too. It is really cool that the package management for all those non-AppStore apps is based on apt. I installed a terminal and can even do stuff like ‘apt-get update’ from the commandline. Right at home for me.
It was also a saving grace for me since my work email quit working correctly on my old Palm T|X (with VersaMail 3.5+). I had to downgrade VersaMail back to 3.1 in order to receive mail again, and that version is really bad since contacts and such doesn’t sync that way. I have to say that the contacts management is huge with the iPhone. I now have my Google Contacts, iPhone, AddessBook (in OSX), and Outlook (work) contacts all in sync. That was painful before. It apparently can sync with yahoo too, but I don’t use yahoo anymore, so I haven’t tried that.
Read the rest of this entry »
Tags: Apple, Contour Showcase, GPS, iPhone, iPhone 3G, Jailbroken, Palm, review, VersaMail
2 Comments »

It was recently announced that ath9k, the newest of the open Atheros Linux drivers, is now available. This is great news for Mac folks, as a majority of the MacBook and MacBook Pros out there have one of the newer 802.11n cards that is not really supported with madwifi, but this new driver supports.

Of course, it is Ubuntuforums user, volanin, to the rescue again who took it upon himself to backport the wireless-testing portion of the kernel to the 2.6.24-19 (and -20) kernel currently used in Ubuntu Hardy Heron and packaged this ath9k driver into a nice little deb file so that Ubuntu-On-Mac users will have easy access to use it on their machines without having to go through the trouble of compiling a custom kernel. Of course, this is not limited only to Mac users, but rather, any user with an up-to-date install of Hardy Heron will have the benefit of using this driver. A link to the download and full instructions can be found at the following thread. Enjoy!
http://ubuntuforums.org/showpost.php?p=5545069&postcount=5
Now, if only Broadcom could realize that they need to release an open driver driver just to keep up…
Tags: ath5k, ath9k, Atheros, Linux, madwifi, openhal, Ubuntu, WiFi
No Comments »

Update: A new kernel driver has been created that adds the multi-touch functionality to the Linux kernel rather than through a daemon. A version has already made its way into the vanilla kernel source.
New kernel driver for the BCM5974 touchpad (Macbook Air, Penryn)
I regular the Ubuntu Apple Intel forum and had the pleasure meeting a user, tannewt. He had just obtained a new Macbook Pro (with the multi-touch trackpad) and was very helpful in getting some of the first information about the new hardware into the forums. He also started hacking on the touchpad to make it a bit more useful since the new hardware was quite limited with the current available software
Read the rest of this entry »
Tags: Apple, Broadcom, Gestures, Linux, Mac, multitouch, touchpad, trackpad, Ubuntu
No Comments »
|