dfbills.com blog

Setting up Pine for Gmail with IMAP

I just got IMAP Gmail for my domain working with pine.  Here’s how I did it:

In the .pinerc:


user-id=myusername@mydomain.com

user-domain=mydomain.com

smtp-server=smtp.gmail.com:587/tls/user=myusername@mydomain.com

inbox-path={imap.gmail.com:993/ssl/novalidate-cert/user=myusername@mydomain.com}INBOX

incoming-folders=myusername@mydomain.com {imap.gmail.com:993/novalidate-cert/ssl/user=myusername@mydomain.com}

folder-collections=“myusername@mydomain.com” {imap.gmail.com:993/ssl/user=myusername@mydomain.com}[]

I’m still getting the “unable to validate certificate” message when viewing folders (starred) items, but it isn’t that big of a deal.  The prefix and novalidate-cert probably need to be set in an additional area that I haven’t identified yet.

comment on this | posted in: News Tips Unix

Safari single window mode

To enable Mac Safari single window mode: (available starting in Safari 3.1)

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

comment on this | posted in: Mac Tips Webdev

Getting started with “screen”

I’ve been wanting to to get into using “screen” ever since Drew Raines introduced me to it last year.  Here’s the great tutorial by Bjørn Hansen that finally got me going using it.

To get started:

screen

Now, you can run your app.  Press ctrl-a, then d to detach.

When ready to reconnect, type:

screen -x

You can get a list of all screen sessions:

screen -ls

Simply type the PID to select a particular screen.

Three other handy commands:

ctrl-a, then c to create a new screen
ctrl-a, then n to go to the next screen
ctrl-a, then p to go to the previous screen

comment on this | posted in: Tips Unix

Does Time Machine keep you up at night? (updated)

Does Apple’s excellent Time Machine backup software make your hard drive grinding away every hour?  Well of course it does!  And that’s a problem when you can hear it while trying to sleep.

It turns out that you can adjust these settings as they are controlled entirely by launchd.  Instead of my usual command-line approach, I decided to use the graphical Lingon app.

Launch the app and find the com.apple.backupd-auto file under system daemons and adjust the “Run it every” setting.  I set mine to 12 hours- now Time Machine runs on my laptop when I plug in my external drive and every 12 hours after.  Perfect for a good night’s sleep!

Update: Unloading and reloading the LaunchDaemon will enable your new settings:

sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
sudo /bin/launchctl load -w /System/Library/LaunchDaemons/com.apple.backupd-auto.plist

Note: these settings are reset to system default after most system updates.  Simply re-apply to fix.

comment on this | posted in: Mac Tips Troubleshooting

Essential iPhone 1.1.3 apps

iPhone 1.1.3 is one finicky beast. I suggest the following apps for installation.. and in this order:

ZiPhone- for the jailbreak

BSD Subsystem- required for many 3rd party apps

openSSH- to get simple external access to the iPhone

BossTool- allows you to move Applications off of 300MB the root partition to your large partition, follow instructions and move all three categories

comment on this | posted in: iPhone Tips

Setting password in iPhone 1.1.3

For some reason the utility for changing the password in iPhone 1.1.3 is broken. You cannot use passwd to change password or you will have to restore the system. I found a great workaround online which uses perl.

perl -e 'print crypt("PASSWORD", "XX")."\n"'

Simply replace "PASSWORD" and the two character hash "XX". Then, take the resulting hash and replace the "alpine" password hash in /etc/master.passwd for both "root" and "mobile".

comment on this | posted in: iPhone Tips Troubleshooting Unix

Respring via terminal

To respring the iPhone via terminal:

launchctl stop com.apple.SpringBoard

comment on this | posted in: iPod Tips Troubleshooting Unix

Finding an app preventing disk eject

This command will help you find which app is preventing a disk from ejecting.

lsof | grep YourDriveName

comment on this | posted in: Mac Tips Troubleshooting Unix

My friend build_hd_index (updated 4x)

Since I’m on a bit of a performance tuning hunt this week, I decided to find out why my hard drive was grinding away this morning.  (With a load average of 2.6)

Turns out, it was my old friend build_hd_index.  This horrible little app is part of Apple Remote Desktop.  It is designed to index the hard drive at a default time of midnight on all systems that are managed by Remote Desktop. Seems innocuous enough- that is until you hear it churning away late at night on several computers.

So now we have Spotlight, locate, Time Machine and build_hd_index indexes of the hard drive and they all grind away at all hours of the day and night.  The unfortunate thing is that only Spotlight is away of the “special” status of Time Machine’s Backups.backupdb database.  All the others just thrash away.

So without further ado- here’s how to disable build_hd_index:

sudo chmod a-x /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/build_hd_index


Keep your friends close and your enemies even closer.

update: A few people have written me to say that turning off the “generate reports” option in the Sharing/Remote Management panel will keep this from happening but this seems to have no effect on my system.

update 2: A better fix: manually reset the data collection policy by removing the file com.apple.ARDAgent.plist file in /Library/Preferences as Apple recommends.  (This does not seem to always do the trick)

sudo rm /Library/Preferences/com.apple.ARDAgent.plist

update 3: laptopleon pointed out that nulling the privileges can break macosx server system updates.  I’ve updated the chmod command to simply remove execute privs.

update 4: Apple has posted a Knowledge Base article: “Apple Remote Desktop: How to disable build_hd_index.”  Not sure that this is a definitive solution.

(6) comments | posted in: Mac Tips Troubleshooting Unix

Monitor spotlight

Ever wonder what is spotlight working on right now?  This command will query the filesystem for you.

lsof | grep mdworker

comment on this | posted in: Mac Tips Troubleshooting Unix
« First  <  6 7 8 9 10 >  Last »