Category Archives: El Capitan

Installing GNU Emacs

I choose to install GNU Emacs using Homebrew.

The El Capitan (10.11.2) OS X version has Emacs 22 builtin but I wanted some GUI integration.

At the command line I ran this command:

brew install emacs --HEAD --use-git-head --cocoa --srgb

I let if finish and then to integrate a nice icon to start Emacs from the applications menu I ran this command:

brew linkapps

I wanted to be able to easily run both Emacs 22 and Emacs 25 from the command line in addition to the GUI GNU Emacs 25.

Check if their is a .bash profile.

In the Terminal enter:

ls -al ~

If no .bash_profile and .bashrc the do the following to create them.

In the Terminal and enter:

touch ~/.bash_profile
touch ~/.bashrc

To edit the file(s) use:

nano ~/.bash_profile
nano ~/.bashrc

To the .bashrc add:  [ -r ~/.bash_profile ] && source ~/.bash_profile

To the  .bash_profile add:

alias emacs25="/Applications/ -nw"
alias emacs22="/usr/bin/emacs"

These alias allow me to run emacs in the terminal for either version. in the terminal by adding the version number to the end of emacs (’emacs22′ or ’emacs25′). To get the GUI version don’t add the version number ’emacs’.

To immediately enable any changes in the file .bash_profile use source:

source ~/.bash_profile

Freshen up rsync

I wrote about rsync in 2009 in a previous post when the OS X was Leopard (10.5).

Generally, I have been pleased with the performance of the version that ships with each successive OS X version. As of the writing of this post I am using El Capitan (OS 10.11.1) on my Mac Air 11″ and as usual the version of rsync works. Now I want to use the latest version to take advantage of better memory management and faster performance.

I want to leave the rsync (version 2.6.9) that ships with the OS in place so that if anything is dependent upon it things won’t break. I simply want to add the new version.

If the package manager Homebrew is installed it is easy to add the newer rsync (3.1.1 in this case). If Homebrew is not installed then install it. Simply paste the following into the terminal prompt.

brew tap homebrew/dupes

brew install rsync

Then edit /private/etc/paths to put /usr/local/bin before /usr/bin

nano /private/etc/paths

That is it. To run the older version of rsync the entire path must be explicitly stated.



Viewing hidden files in OSX Finder

To view hidden files in Finder go to the Spotlight and enter Terminal. The Terminal app should be the first choice.

Start Terminal and at the command prompt enter:

defaults write AppleShowAllFiles -boolean true
killall Finder

Now when you return to Finder the lighter grey file names are files that are normally hidden and are now visible. Generally, it is not prudent to delete these files unless you have investigated the implications of deleting these files.

The difficulty now is that thereafter the hidden files will show in the Finder. To make the files hidden to the finder again, enter the following at the command prompt in Terminal:

defaults delete AppleShowAllFiles
killall Finder

While this is a bit techie, I do have need of this from time to time. Mostly, in user mode, we don’t want to be bothered with seeing these files.

However, sometimes I am communicating with users who live in the Microsoft Windows Operating System world and they are confused when they see hidden files in shared folders. This is especially true of some of the shared cloud folders for collaborations. It those cases, I can sometimes simple state that the files preceded by a ‘dot’ are to be left alone.

Sometimes, I must go further to satisfy their curiosity, or to convince them to leave those files alone, and then I explain that the prepending ‘dot’ hides the files in the BSD, UNIX, and LINIX operating systems. Generally, I don’t have to go farther than that, but occasionally, it helps to point out specific examples and to name a file that they are seeing in there ‘explorer’ that is/are to be left alone.

Perhaps the quickest way for me to see the hidden files to point out an existing example file they are seeing, is to enter the Terminal app and list the folder in question using the command

[Machine_Name]:[Path_to_Folder] [User_Name]$ ls -al

Where I have navigated to the folder [Path_to_Folder] in question.

I have found that when we are looking at the screen of my Mac together, the Windows user can be severely intimidated by the command line. They seem to simply stop processing anything that is said when the terminal is open. Not their fault! They might have never seen the power and majesty of the way computers really work (and they probably never saw the first Tron movie either).

Therefore, the above method of revealing the hidden files in the Mac OSX Finder has, in my experience, been a ‘less jarring’ experience for them.
Though you might have to envok a little ‘wizard of OZ “pay no attention to the man behind the curtain” while you run the command to reveal the hidden files. (Hint: you can have a stickie that has the command at the ready to paste in at the command line)

Do you have a favorite Apple Mac OS X terminal command?