macos

Installing Mac OS X in VMWare Workstation on Windows 8

I created Mac OS X Virtual Machine on VMWare. It wasn’t simple process, so I decided to share this experience. I was following this article. Here is an outline:

  1. Download and install VMWare Workstation. But to do that, you need to disable Hyper-V first.
  2. Download VMWare unlocker and run windows/install.cmd script. It allows to choose Mac OS X system during VM creation later on.
  3. Convert Mac OS X image (Mountain Lion in my case) from .dmg to .iso (using dmg2img).
  4. Create VM for Mac OS X and choose created Mac OS X .iso file in new VM settings -> hardware -> CD/DVD (SATA) -> Use ISO image file
  5. Run Virtual Machine and install Mac OS X (described in mentioned article).
  6. Install VMWare tools (also described in mentioned article).

Once Mac OS X is installed and running I updated Mountain Lion to Mavericks. That was easy and went smoothly. Additionally I recommend to do following:

  1. Enable shared folders (they are located in /Volumes/VMWare Shared Folders/NAME_OF_FOLDER)
  2. Install TotalFinder
  3. Install iTerm 2
  4. Install Witch
  5. Install SublimeText 3
  6. Install Xcode (not only for iOS development, it contains e.g. gcc compiler)

Linux (Ubuntu) installation is much easier. You just download Ubuntu iso and create VM on VMWare workstation using downloaded .iso file. That’s it.


MacBook External Display resolution problem

MacBook 3 monitors

Today I wasted 2 hours trying to adjust resolution on external monitor connected to my MacBook.

I work with two external Monitors (Sun 24″). One through miniDP/VGA, second: through USB/DVI.

Yesterday, I connected MacBook to 42″ TV, with miniDP/VGA port. Today I connected it with Sun Monitor as usual and…I got black screen. I tried to change resolution, but…1920×1200, which I am usually working with, was not available. Even more: when I set ‘Best for display’ I got 800×640! Maximum available was 1600×1200, but it was wrong ratio! The Sun 24″ monitor has 16:10 ratio, not 4:3!

I tried deleting preferences, reseting PRAM etc. It didn’t help. Finally I tried to use miniDP/DVI (instead of miniDP/VGA) and I got 1920×1200. Then, when I connected miniDP/VGA again, I got 1920×1200 as well.

What I did wrong? I connected it when MacBook was in sleep mode. That is most likely cause of the issue. Probably MacBook thought it is still connected to 42″ TV. Thus, changing port helped. Probably, if I connect it to another device, it would help as well.

In the past I already had issues when I was disconnecting monitors in sleep mode. Since that time, I was always connecting/disconnecting displays when MacBook was on. Except today 🙂


Customize Terminal in Mac

Mac (UNIX) users use to be working with Terminal a lot. There is a few tips, which can make your life easier. First of all, if you are working on Mac – install iTerm2 and use it instead of standard Terminal. It is just more powerful. There is many features not available in standard Terminal. I find very useful the possibilities to search with CMD+F and copy entire path with double click by mouse (when you double click in standard Terminal it copies only one word). Another cool thing is ‘split terminal’ view. You can have multiple panes in one window.
iTerm2 - multipane

Second improvement to work faster is creation some aliases for commonly use commands. E.g. ls, clear or la -ls. You might also want to customize command prompt. I don’t like the standard one with Machine and user name (I always know in which Machine I am, and which user I am using – in case of doubts I can use whoami). To do add aliases and change default command prompt you need to modify your ~/.bashrc file. There is my .bashrc:

alias dir='ls -lap'
alias l='ls'
alias p='pwd'
alias c='clear'
alias o='open'
alias tree="ls -R | grep \":$\" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e '\s/^/   /' -e 's/-/|/'"
export PS1="[\W]$ "

Here you can find a list of various options to customize your command prompt.

To load this settings automatically each time you run Terminal, you also need to add below command to ~/.profile file:

source ~/.bashrc

After above improvements my terminal looks like that:

iTerm2

Hint: when you are playing with your command prompt (or aliases), you can simple run command source ~/.bashrc from terminal to check the result of changes you made.

And of course I use black terminal with green font color.

We are Hackers


.NET Developer on Mac

I am PC person. I have never used Mac until I start my work as Research Assistant in SAnToS lab (Kansas State University). Now I am using it almost half year and I would like to summarize my experience.

I am using MacBook Pro (i5 2.4GHz, 8GB RAM and 128GB SSD) with Mac OS X 10.8 Mountain Lion.

MacBook Pro

First of all, I noticed missing features (which are available on PC/Windows):

  • Click on app icon in dock (dock is equivalent to taskbar in Windows) does not hide application. It can only move the app to the top. The only way to hide the app is to click minimize button.
  • Lack of good alternative for Total Commander, which is not available on Mac. There is muCommander (no tabs) and double commander (less functional), but both are way behind TC.
  • No Shift-Delete to permanently remove files. You need to move them to trash first, and then empty the trash.
  • No ‘cut’ in context menu (after right click). To have this luxury you need to install e.g. Total Finder (beyond the ‘cut’ option it also provides the possibility to have tabs and some other useful features).

Now, a few differences between Mac OS and Windows:

  • The default file manager is called Finder instead of Explorer.
  • In general, when you would use CTRL+KEY in Windows, then in MacOS you need to use CMD+KEY.
  • To change file name you need to click RETURN(ENTER) instead of F2(in Windows).
  • To open the file you need to click CMD+O, instead of ENTER (in Windows).
  • DELETE key is working like PC’s RETURN (delete character on the left side of the cursor).
  • Instead of HOME key you have CMD+LEFT_ARROW, and instead of END key – CMD+RIGHT_ARROW.

I use OneNote a lot. One of my favorite features is WIN+S, which allows me to make a screenshot of selected area in desktop. On Mac OS this feature is provided along with the operating system. CMD+SHIFT+4 saves the photo into Desktop, and CMD+OPTION+SHIFT+4 saves it into clipboard. Very useful feature. However I think Apple should consider to create some two-key shortcut like CMD+4 or CMD+F4, because clicking 4 keys in the same time is quite a challenging.

Another nice feature is possibility to use country specific letters like ę, ń, ś, ć, ä, ö even when you have english version of the system. You just need to hold the key and then there is small tooltip showing possible special letters. You can choose the letter with mouse or using keyboard (by picking the number).

MacBook special letters

The last thing I would like to mention is my favorite: the trackpad (touchpad). It is just awesome! Maybe it is not strict part of operating system, but the gestures are implemented in it. You can see the demo of the gestures here. The MacBook Pro trackpad is also well made. Much better than touchpad in all notebooks I have used before.

When you are working on Mac, you use Terminal a lot (when you are developer). In that case it will be nice to have ‘Open Terminal here’ option in finder, which open the Terminal in directory you have clicked on. That is just my wish to Apple 🙂

I think it took me about a month to become comfortable with using Mac.

EDIT: There is one more nice feature I just find out: you can past text without formatting by clicking CMD+ALT+SHIFT+V. And again…4 keys in the same time. But in this case I can’t push them all with one hand 🙂 Maybe CMD+SHIFT+V would be more user friendly?