Skip to main content

Posts

Showing posts with the label Macintosh

How to make java point to right version of java on your Mac ?

A usual problem on mac where the even after upgrading or installing the latest version of Java, when queried in command line for java version it still refers to the old version of java. something like below : $ java -version java version "1.7.0_79" Java(TM) SE Runtime Environment (build 1.7.0_79-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode) This is because the /usr/bin/java is pointing to   /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java on the system.    $ ls -la `which java` /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java This is because  Oracle's installer puts java inside the   /Library/Internet Plug-Ins/JavaAppletPlugin.plugin . And it doesn't overwrite  /usr/bin/java. So to fix this we have remove the existing soft link to old java and point it to new java binary. which can be done by performing following steps. ...

How to fix broken python module easy_install on mac ?

           Easy Install is a python module ( easy_install ) bundled with  setuptools  that lets you automatically download, build, install, and manage Python packages. Sometimes due wrong installations easy_install might get corrupted and fail to install any package afterwords. You might see errors like below when you try to install any modules Traceback (most recent call last):   File "/usr/local/bin/easy_install", line 7, in     from setuptools.command.easy_install import main   File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 12, in     import setuptools.version   File "/Library/Python/2.7/site-packages/setuptools/version.py", line 1, in     import pkg_resources   File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in     import packaging.requirements   File "/Library/Python/2.7/site-packages/packaging/requireme...

What is com.apple.Dont_Steal_Mac_OS_X (7.0.0) kext is doing on OS X systems ?

When you run kextstat command to see the list of kernel extensions loaded in the system, you might come across kext named com.apple.Dont_Steal_Mac_OS_X (7.0.0) being loaded all the time. You might me wondering what is the role of this kernel extension.  com.apple.Dont_Steal_Mac_OS_X  prevents OS X from being used on non approved Intel hardware – as OS X is licensed only for use of approved Apple Intel hardware. This kext is used to control software piracy of OSX on non Apple supported hardwares. Hence its role is to detect and fail the OSX installation on non apple certified hardwares. 

How to add tab completion in Apple OS X

Tab completion in Linux is a very useful feature. On OS X the tab completion can be enabled as well. The tab completion can be enabled on OS X by adding few lines to .inputrc file. Method: Open Terminal.app Go to your home directory such as  /Users/user. Open vim to create .inputrc file in home directory by running following command. vim .inputrc Add following lines to the file set completion-ignore-case on set show-all-if-ambiguous on TAB: menu-complete Save the file using "esc + :wq" in vim. Now open another tab to see the changes to tab completion in bash shell.

How to erase Filevault encrypted volume in case system fails to boot or you just want to format disk and re-install OSX on the system.

             There might be situation with FileVault where the OSX might not be booting normally or sometimes OS X does not allows you to erase or turnoff the encryption ( Performed using Disk Utility.app available with OS X installer ). This can be a problem with FileVault 2-encrypted volume which will not let you either unlock or decrypt it. In such cases the following method will help you in deleting the core storage( FileVault encrypted) volumes on the system. To perform this : Connect the OS X installer USB/Disk to Mac. Power on the Mac. Hold option key on keyboard and boot into OS X Installer. Open the Terminal.app from Utilities in OS X installer application. Run the following command to get the details about the FileVault encrypted volume.            diskutil cs list           This will show detailed information about the core storage volume available on the syste...