OS X: Time Machine preventive maintenance

TMDiskIt was one of those moment when many things went wrong and the only way out was to restore the entire Mac from the Time Machine backup. But, before starting the process, I ran a file system check and… surprise, the file system was broken and repairs were needed. Several hours later the file system was repaired, the install performed and the machine was up and running without any (visible) problems. But the lesson was learned: Time Machine is great, but disks need some attention.

Read more of this post

Advertisements

OS X: Install package with administrative rights

There are some packages that can be properly installed only with administrative rights. If you are like me, and run your account with regular rights, you might face some installation failures with poorly build packages.

Read more of this post

OS X: Where do various programs store licensing information?

Have you wondered where some programs store the licensing data, or various information to account for time limited or to count for limited demo/test licenses?

Well, these files should be shared between all users. Then… take a look at /Users/Shared!

With the default configuration, Finder will probably not show you what you expect, but open a Terminal window and type

ls -lA /Users/Shared

You’ll probably notice some hidden files, with names starting with dot. Deleting some might even reset your demo licenses!

Enjoy!

OS X: Shell path helper

The shell path is set in /etc/profile by calling /usr/libexec/path_helper, a program that uses the files in /etc/paths.d to compose the shell PATH. So for extending the path, individual packages do not need to edit a file, but just add a file in the /etc/paths.d folder. Elegant.

Running shell scripts from Finder

Clicking on shell scripts in Finder does not run them, but most probably open them for edit.

Setting the execute flag and changing the extension to *.command informs the Finder to run the script in a Terminal window. On script completion the terminal window needs to be manually closed.

A similar effect can be obtained by manually setting the property Open With: Terminal.app for the given script.

Setting the PATH for graphical applications

Setting a custom PATH for all graphical applications is possible by adding a PATH entry in $HOME/.MacOSX/environment.plist. By default this file is not present and needs to be created.