.
Showing posts with label os x. Show all posts
Showing posts with label os x. Show all posts

Install command line developer tools in OS X

Install command line developer tools in OS X

If you need access to programming tools on your Mac, there are several ways to go about installing them.
Install command line developer tools in OS X
Part of OS X is its powerful command-line interface, where a competent or even novice programmer can make use of a number of tools for configuring and customizing the system, and make programs and scripts

While OS X ships with a number of common commands, by default Apple does not include those that are used for checking out, compiling, and otherwise managing code for developing applications.

If you need these tools for some reason, then there are three ways you can get them on your Mac. The first is to install Apple's XCode developer suite, which is available via the Mac App Store for free. However, installing this will also include XCode itself, and despite its benefits, some people may not wish to have the entire Xcode suite installed on a system.
Command Line Tool downloads for OS X
The command line tools are available as standalone installer packages from the Apple Developer Web site. Screenshot by Topher Kessler/CNET
The next option is to download the latest command line tools from Apple's developer page. To do this, you simply need to log into the downloads section of the Apple developer site using an Apple ID. Here you can search for "Command Line Tools" to view all versions of the tools from Lion through Mavericks. These can then be downloaded as .dmg disk images and mounted, and you can then run the enclosed installer.
The last option is perhaps the easiest, which is to use the system's ability to install the command line tools on demand. This is done by an application in the Macintosh HD > System > Library > CoreServices folder called "Install Command Line Developer Tools." However, this program cannot be launched independently. To run, this program must be invoked by a service or application that calls for the use of the developer tools.
Command line developer tools install prompt in OS X

Install command line developer tools in OS X

In most cases, standard developer commands like "make," "gcc," "cc," "svn," "git" or Apple-specific tools like "xcode-select" or "xcodebuild" or "xcrun" will require these tools, so running these in some form will spur the system to launch the "Install Command Line Developer Tools" program.
Therefore, to install these tools, simply open the Terminal, type "make" or any desired common developer command, and press Enter, and then when prompted you can install the developer tools (an approximate 100MB download from Apple), and be up and running.

When installed, the developer tools will be placed in the Macintosh HD > Library > Developer directory, which you can peruse to see what exactly has been installed. To uninstall these tools, simply remove the "Developer" folder from the Macintosh HD > Library directory.

Quick Mac

Quick Mac prank for April Fools' Day

If someone you know uses his or her Mac regularly, then you can tackle the system with a quick change that might give you a chuckle or two this April Fools' day. Simply take a screenshot of the display, and then set it to be a full-screen image in Apple's Preview program.

Granted this trick is nothing new, but can easily be done in OS X, in the event you need to jump in, perform the prank, and jump out without being detected:
    Quick Mac
  1. Take a full-screen screenshot
    First, press Shift-Control-Command-3 to save a screenshot of the display to the clipboard.
  2. Make a new image in Preview
    Open the Preview application (Press Command-Space and search for it in Spotlight), and then press Command-N to make a new image.
  3.  Set the image to be full-screen
    Press Control-Command-F to toggle full-screen mode on the current image (the screenshot).
With this setup, the display will look the way they left it, but nothing on screen can be clicked or moved. Instead, the mouse cursor will turn into a crosshair and click-dragging will create a selection box. Of course, the person will find out the issue when they try to access menus and the real menu bar drops down from the top of the display, but until then it may be fun to see the confusion ensue.

How to save to hidden directories in OS X

 How to save to hidden directories in OS X


Accessing a hidden folder from within an application may be tricky, but can be overcome using a simple Finder trick.

How to save to hidden directories in OS X
How to save to hidden directories in OS X


While in standard uses there may be little reason to save files to a hidden directory in OS X, there are sometimes cases when you might want to do this. The operating system contains numerous hidden directories, such as the Library folder in your user account, a number of system folders that contain configuration files and programs, as well as the ability to manually hide specific folders on your system which, for fun or otherwise, can be used to keep items relatively hidden.
If you would like to access a hidden folder on your system, you might find that accessing them can be a bit of a burden. One approach is to regularly unhide the folders, either by changing their finder flags or by setting the Finder itself to show hidden directories.
Another approach is to open a program under the root account, since this account has full access to the entire file system, and should therefore be able to access any directory. This can be done by opening Terminal and targeting the desired application's executable using the "sudo" command, such as the following for TextEdit:

sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit

While this might seem logical, unfortunately it will be met with the same restrictions and you will still not be able to see a hidden folder in the Finder. This approach is good for editing files that can only be accessed by root, but will not overcome the inability to see a hidden folder.

If you would instead like to keep files hidden in the Finder but still access them in a program you are using (be it run under your account or under root), then you can use a technique in the Finder to access it.

Simply choose Go To Folder from the Finder's Go menu, and then enter the path to the hidden directory in the field (note that this field supports tab-completion of file and folder names). Then press Enter to open the folder, which will show in the Finder slightly grayed out. You can drag this folder to the Open or Save dialogue box in any application, which will point that application to the contents of this folder.

From here you can open or save files, and the program will treat the folder as any other you can save files to.
Note that some applications, such as BareBones' TextWrangler, which are built for viewing and editing hidden directory contents, may have options in their Open and Save dialogue boxes that allow you to reveal hidden items. In this cases, these options will be far easier to use.

How to save to hidden directories in OS X

tags: How to save to hidden directories in OS X, ios x, computers, mac, ios