Overview
So, I’ve sold my much beloved Alienware M14xr2 in late 2015, that quad core hell of a power machine, opting for something much lighter and sleeker – as I do foresee a lot of travelling around in the near future. This is my note on my Macbook Air 11″ 2015, and I’ll be updating it as I go along.
I’ll dub this the “OSX Missing Manual”
These are added on reverse chronological order
Put iTunes to sleep and use alternative (simpler) music player
For whatever reason, in case you disliked iTunes (like I did), you can always put it to sleep as follows:
First: Open your iTunes and clean your libraries. This will free up space. For me, I have my source files backed up elsewhere so I can safely remove the music library.
Once you are ready, pop in below command:
1 2 3 4 |
# create tmp folder to hibernate itunes ... mkdir -p ~/tmp-itunes # kill all itunes process, and move the app out of the app dir into our tmp folder killall iTunes; killall "iTunes Helper"; sudo mv /Applications/iTunes.app ~/tmp-itunes |
iTunes will be moved out of the application folder into ~/tmp-itunes. I take it one step further and .zip / archive the file and deleted the .app file.
What do I use to play my music? I use nightingale. Not fancy, but that’s the whole point. It does the basic stuff right.
Enable NTFS
https://www.hackintosh.zone/file/506-ntfs-driver-for-mac-os-x/
Simply, the missing NTFS driver for your mac. Now you can write to NTFS drives – and have it used between windows and mac!
Converting m4a to mp3
Similar to JPG to PNG, except we will be using ffmpeg
1 2 3 4 5 |
# how to install imagemagick with homebrew homebrew install ffmpeg # get ffmpeg to do the work ffmpeg -i <inputfile>.m4a <outputfile>.mp3 |
Converting JPG to PNG
Mac only accept PNG for background. So if you download wallpapers from the web, you need to convert them. if you have imagemagick this is very easy, if not you can homebrew it.
1 2 3 4 5 6 7 8 |
# how to install imagemagick with homebrew homebrew install imagemagick # how to use imagemagick to convery jpg to png convert file.jpg file.png # converting all jpg into png in current dir for f in *.jpg; do convert "$f" "$f.png"; done |
MS Office: Changing file save location to Desktop
- open Excel.
- On menu, go to Excel > Preferences > General. At Startup, open all files in: …. (Select your folder location, in which case I use my Desktop ).
Then, Close & re-open.
Stopping the Photos app from launching when a media device connected
I guess for enabling it again you put a NO…
Just a little terminal command, will do the trick:
1 |
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES |
Yum / Apt-Get on OSX? HOMEBREW
Aug 2016
I missed the package management of Linux distro (like Yum or Apt-get), it annoys me that there are no straightforward package management bundled with OSX out of the box. But by now I noticed how things work on OSX-land, and sure enough – I stumbled on Homebrew.
Once installed, package installation is as easy as brew install <pkg_name>
Example, to install imagemagick (which enables commands like mogrify and convert), simply type:
1 |
brew install imagemagick |
Managing Dual monitor Wallpapers (*.jpg->*.png)
Aug 2016
I had dual-monitor display, but it is quite hard to find good quality dual monitor wallpapers. Fortunately, Dual Monitor Background existed. Unfortunately, their default format is .jpg, and OSX only accepts .png.
Enter ImageMagick – if you have it installed, the mogrify command can mass-convert all jpg in a given folder to another format (like png)
1 2 |
# convert all *.jpg into png format mogrify -format png *.jpg |
Closing Lid, but keeps OSX awake!
Aug 2016
Sometimes, you wanted to close the MBA lid, but not have it fall asleep. Maybe y ou are moving between meeting rooms, maybe you want to watch a movie but your charger is on a different desk. The app you need is INSOMNIAX (http://semaja2.net/projects/insomniaxinfo/)
An aptly named app, insomnia is when you try to sleep but you can’t fall asleep. This app will keep your osx awake even when you close the lid! (a gesture asking OSX to sleep/hibernate)
Dual Display from MBA & Managing Dual-Display Wallpaper
Jun 2016
But not that straightforward:
- For left display, I used Thunderbolt->HDMI cable.
- And on the right display, I used USB3->HDMI adaptor, which is rather pricey. Basically, it is
Why does the USB3->HDMI Adaptor so expensive? Because it is effectively an external mini graphic card connected via USB3
How does the USB3->HDMI Adaptor perform? It’s OK for static rendering, but you can’t watch movie or play games on it. The display can’t keep up the same rate over the USB3->HDMI connection at least on the one I had (it’s around 100 AUD!). Maybe if you splurge on a really expensive one, you could – but I use this mostly for editors, terminals, and browser (when coding). So for movies, and more dynamic content, I use the left screen, which uses the Thunderbolt to HDMI route.
Position Window with Cmd+Left or Cmd+Right
May 2016
As a windows user, you’ll be so familiar with win+left or win+right. Sadly even with el capitan, this is still not available in mac! Found an open source software that does the trick. Bit sad that this still have to be done via an app, instead of being natively built into the OS – and to make it run I need to give the app special permission to make changes on my OS. Not cool, apple… not cool.
App’s called ShiftI, downloadable from https://github.com/fikovnik/ShiftIt/release
Display Flicker issue & Resetting System Management Controller
Jan 2016
One morning, I open my mac to find that the screen is flickering. It looked like the refresh rate on the display is set incorrectly, but there is no way to set this refresh rate. After a bit of googling, it looked like the issue could stem when external display is being connected/disconnected and there are reports of this happening with El Capitan.
Quick call to Apple land me on the hint, and my hunch was right.. resetting SMC is the way to go. According to Wikipedia record for Apple SMC (System Management Controller) [ref: https://en.wikipedia.org/wiki/System_Management_Controller]:
The SMC has roles in controlling thermal and power management, battery charging, video mode switching, sleep and wake, hibernation, and LED indicators. It also enables enforcement of the Mac OS X End User License, allowing it to identify when it is running on non-Apple hardware.[2]
Apple releases occasional model-specific updates to SMC firmware which correct bugs and defects in the system.[3]
The instruction to reset it can be found here: https://support.apple.com/en-us/ht201295
For convenience, below are the steps, quoted from above link:
Mac notebook computers that have a battery you should not remove include: MacBook Pro (Early 2009) and later, all models of MacBook Air, MacBook (Late 2009), and MacBook (Retina, 12-inch, Early 2015).
To reset the SMC:
- Shut down the computer.
- Plug in the MagSafe or USB-C power adapter to a power source and to your computer.
- On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
- Note: I hold this for about 10 seconds just in case, 10 secs work for me
- Release all the keys and the power button at the same time.
- Note: On releasing this simultaneously, the magsafe charger LED blinks green once – as a confirmation that SMC reset is done successfully.
- Press the power button to turn on the computer.
On boot, the display has gone back again to normal! I’d say SMC reset can be used to sort out issue related to the area that it manage: “Controlling thermal and power management, battery charging, video mode switching, sleep and wake, hibernation, and LED indicators.”
Rainmeter = Ubersicht
Dec 2015
If you like Rainmeter (or Conky for Linux) you will like Ubersicht. This is a pic of my desktop, and that’s what you can get with the Ubersicht Widgets. You won’t find the below widget on widget gallery because I made them myself – I will upload it once I am done with it.
Multiple Desktop / Dexpot = Mission Control Spaces
Nov 2015
Mission control can create new desktop. Keyboards shortcut to jump to desktop # can be set in keyboard.
OSX by default reorder desktop based on frequency of use, which is really confusing. To fix the desktop number and prevent OSX from reordering, go to mission control preference and untick “Automatically rearrange Spaces…”
Using USB ThumbDrive on both Mac OSX and MS Windows
Oct 2015
Windows is on NTFS and Mac is on Apple HFS – so on what file system should you format your USB Drive?
Short answer is: use exFAT (read more) – when purchasing a thumbdrive, more often than not the manufacturer will format it in FAT32 – which is a most accessible file system format, as it can work even with older version of Windows. However, chances are you don’t need to go FAT32 as you either don’t have to deal with older Windows, or don’t have Windows at all. In which case, use exFAT
Benefit:
- This allows file larger than 4Gb to be stored in the thumb drive
- It is still readable by Windows 7 or higher, so you shouldn’t be missing out that much
- Mac OSX will detect file size / capacity of the thumb drive properly – df -h on a FAT32 partition always shows 100% capacity, not sure why (?)
How?
- Start Disk Utility > Select partition > format as exFAT – it’s that simple.
Changing Hostname
Oct 2016
System Preference > Sharing > Computer Name
Changes are not completely set, ping succesful but hostname display in terminal remains the same even after quitting the terminal process. So did a computer restart for good measure, hostname is reflected correctly on terminal prompt.
Using ‘default’ command
Sep 2015
Apparently default is a command used to read write config parameter, concept is akin to a command line version of the Windows Registry Editor, or a quick mode of select config file in Linux /etc/*. A quick man default shows:
1 2 3 4 5 6 7 8 9 10 |
DEFAULTS(1) BSD General Commands Manual DEFAULTS(1) NAME defaults -- access the Mac OS X user defaults system SYNOPSIS ... defaults [-currentHost | -host hostname] write domain { 'plist' | key 'value' } |
To see all configurable items, use: defaults read | less
Taking screenshots quickly, saving it to custom location
Sep 2015
- Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop
- Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
- Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
- Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
- Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard
- Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard
To change location of the screenshot output folder:
1 2 3 |
defaults write com.apple.screencapture location NEW_LOCATION #followed by: killall SystemUIServer |
For more info, see OSX Daily article on this topic.
Reducing delay in Dock Autohide/Show
Sep 2016
I noticed that the initial delay set by Apple is way too slow and you can’t set this in the GUI, which sucks. A quick google found code snippets that uses system commands, which can be triggered in the terminal:
1 |
defaults write com.apple.Dock autohide-delay -float 0 && killall Dock |
The above command writes the configuration of com.apple.Doc and set autohide-delay to zero (no delay), it is then followed by killing the Dock process.
OSX handles the process killing & respawning very gracefully: all Windows that is running didn’t just drop / disappears – instead all minimized windows is restored, and the new dock respawns almost immediately. Gracefully handled by the OS.
Specs
Sep 2016
Purchased on 29 Nov 2015 from Apple in Ginza, Tokyo. They had
- 1.6GHz dual-core Intel Core i5 processor
- Intel HD Graphics 6000
- 4GB memory
- 256GB PCIe-based flash storage1
- For more see Apple Macbook Air Early 2015 11 Inch Technical Spec
- On 12/31 upgraded to El Capitan with little issue (so far)