Reset Administrator Password on a Mac / Apple Mac

October 7, 2010

Have tried this on a Tiger OS X

  • Reboot
  • Hold down Apple+S when you hear the chime
  • When you see the Aplle on screen, hit the power button once

You should see the text prompt now

Type:

  • mount -uw /
  • passwd
  • reboot

That’s it.
You should be able to log into the administrator user account with the new password you set now.

You keychain will probably be useless no unless you remember the password for that. I had connectivity issues, the airport would not connect to my wireless networks.

Once I deleted the login keychain, the network issues went away.

To delete the login keychain:

  • Open Applications/Utilities/Keychain Access
  • Click the Login keychain
  • Choose Edit -> Delete

Dos2Unix type conversion on Mac OS

August 23, 2009

Converting the line ending of a file on your Mac from dos or windows format to Mac format is as simple as entering the following command in an iTerm terminal window.

tr '\r' '\n' file-with-mac-newline.txt

I spent quite a while looking for a dos2mac type program, expecting to find dos2unix for the mac, when I came across the tr command that does just what I wanted.


Mac : Open Terminal/iTerm here

August 19, 2009

Using Mac OS X and browsing the file system with ‘Finder’, I often want to open Terminal or iTerm and have the default path set to the current Finder folder.

Firstly Terminal. I found a script called ‘Open Terminal Here’ at http://jo.irisson.free.fr/?p=59

This seems to suffer from an issue where two windows are opened if Terminal was not already running.

Then I started using iTerm, it has a few more/different options than Terminal. For it I found a script ‘Open iTerm Here’ at http://snippets.dzone.com/posts/show/961

This seems to suffer from a similiar issue to above, where two tabs in a new iTerm window are opened if iTerm was not already running. I tried to modify it (my first apple script attempt) but managed only to get two windows open instead of a single window with two tabs.

Then I found an update to the Open iTerm Here script at http://www.danns.co.uk/node/226

This version successfully solves the issue of the two tabs. If you are a Terminal user, I imagine it should be easy to apply the patch to the Terminal Here script, or just use this script and have it invoke Terminal instead of iTerm.

Finally, to use the script  you then need to save it as an executable app. This is fairly straightforward:

  1. Open the Script Editor application
  2. Past in the source
  3. Save it
  4. Then chose save as
  5. Selected File Format of “Application”
  6. Save it again

You can now use QuickSilver or Silverlight to invoke the script.

However, I wanted to find out if I could add a button to Finder that could be clicked to run it. I eventually found out how to do this and here is how. You can simply drag the script .app file onto the top of the Finder application, and a button is created for it there.

So, when looking at a folder, just click the new button you created and a new iTerm is opened at the current path.

Lastly, I wanted to change the icon from the default. I wanted to use the iTerm icon. To do this, follow these steps to copy and paste the icon from the iTerm application:

  1. Go to Applications
  2. Navigate to iTerm
  3. Select the More Info… button
  4. Find your iTermHere.app and do the same
  5. Click the small icon at the top of the iTerm more info window and click cmd-c (apple-c, the shortcut to copy text)
  6. Click the small icon at the top of the iTermHere.app more info window and paste! (apple-v)

That’s it, you now have the script as an app, with a button in the Finder windows, and a nice iTerm icon.

Many thanks to all the folks involved in creating and refining these scripts I found, as linked to above.

Enjoy.


QuickSilver-esque shortcuts application on Ubuntu Debian GNU/Linux

October 6, 2008

Some of my colleagues have Apple Macs and use an application called ‘Quick Silver’ for managing frequently use application/scripts/text files/notes/ims/etc.

I was impressed with what one could do with it and began looking for something similar on Ubuntu.

There is a clone for Gnome called Gnome-Do [ http://www.gnomedo.com ] that lives up to the task pretty well from what I can gather so-far. There are some good updates in the ‘Intrepid Ibex’ release (8.10) that are not in the ‘Hardy Heron’ release (8.04), such as a more complete and useful preferences menu, more plugins and managing them individually through the applications preferences.

Try it out, after installing gnome-do, you need to set it up to launch at gnome login (easily done via the preferences in the intrepid version). Then you can invoke it with the SUPER+SPACEBAR short-cut.


Follow

Get every new post delivered to your Inbox.