Archive for the ‘switching’ Category

Upgrading to Snow Leopard - Part 1 Upgrading Parallels to 4.0

Saturday, December 5th, 2009

I saw that Snow Leopard was only going to be $29 and I was so ready to jump on that bandwagon until the day they released it. Rumors went around that Parallels 3.0 does not work on Snow Leopard. This doesn’t work for me because I have a windows XP drive set up with parallels 3.0 which I use when some clients require me to use Windows or to test web pages on IE. Some people recommended I use a different VM but I spent a long time just setting up the windows on parallels that I don’t want to do that all over again.

Just when I quit on the idea of upgrading to snow leaopard, I found this site that has a large list of application compatibility with Snow Leopard:

http://snowleopard.wikidot.com/o-t

That’s where I found out that Parallels 4.0 works with Snow Leopard, so I decided to upgrade. I just spent $56.98 to upgrade to 4.0.

Installation is pretty straight forward. I downloaded a .dmg file from Parallels, double click on the file and you get a window that has the installation package. Just double click the installation package and follow the instructions. I just went with all the defaults without changing anything.

Before starting parallels 4.0 up, remember to first back up your windows installation just in case something goes horribly wrong. I’m using time machine and will be forcing it to do a backup right before I start it up. If you don’t have time machine set up then you could just as easily go to where you installed your windows VM and you should find two files. The first is a .pvs file, should be a small file that just has the VM configuration (mine is called “Microsoft Windows XP PRO.pvs”). The second file is the actual virtual hard drive (yeah I said actual virtual!) with a .hdd extension (mine is called winxp.hdd). You can also save the .fdd file (the floppy drive) but I don’t think that’s necessary but why not just back that up as well.

After installation, I ran the windows vm configuration by double clicking on it. I got a prompt that asked me to upgrade the VM to the new version with a warning to back up before doing so. Because we’ve already backed everything up, I just went ahead with the upgrade process. After a few minutes, parallels 4 started normally. The only problem I’ve been having is an issue with the floppy drive not being recognized which I don’t really care about because I don’t use it, everything else is working.

Useful Macbook Keyboard Shortcuts

Wednesday, October 22nd, 2008

While using the macbook I’ve picked up a few keyboard shortcuts that I now use all the time. Here is a list of them:

  1. Command+tab: to switch between different applications. This is similar to window’s alt+tab. You can hold down the command button and press/release tab and a prompt will come up to show you all the currently open programs. If you press and release the tab button it will then go to the next program and so on until you find the one you want and you let the command button go. This is extremely useful when you have multiple applications open and switching between them often. The biggest difference between windows and linux is that you switch between different application and not different windows of an application. For example if you have three different windows of firefox open comman+tab will not switch between those windows whereas alt+tab on other systems will. Mac OS X has a different keyboard shortcut to accomplish just that and it’s the next on the list.
  2. Command+~: Switching between different windows of the same application. Just as the case specified above, when you have three windows of firefox open and you want to switch between then, you just use the command+~ shortcut.
  3. Command+C: Copy.
  4. Command+V: Paste.
  5. Command+X: Cut.
  6. Command+Q: Quit the current application. This is similar to pressing Alt+F4 on a windows machine but the greatest difference is that with Alt+F4 you only close the current window or instance of that application you are looking at, whereas with Command+Q you are quitting the whole application. If we continue our example of having three firefox windows open, on a windows machine Alt+F4 will close the current window and when you are at the last window it will quit the whole application. On a macbook Command+Q will wuit the application closing all three windows at once. Just like Command+Tab there is a window specific shortcut and that is next.
  7. Command+W: Close only the current window of an application. This key is what is probably the closest to Alt+F4 on a windows machine because it will close the current window of the application you are on. Unlike windows’ shortcut though it will not quit the application if you close the last window. You will notice that the application is still showing as active in the Dock as well as the menu bar showing up at the top. If we follow the firefox example, closing the last window will still keep firefox open and you could open firefox again very fast because it’s still running in memory. You could use the next shortcut to open the new widnow.
  8. Command+N: Open a new window of the application. This is application specific.
  9. Command+Space: Open the spotlight prompt. You can use spotlight to find any files or even start up an application for you. Once you get used to this you will see that you rarely use finder or even the Dock to start your application. you want to open up firefox, just press Command+Space and then start typing the name “fire” you won’t even need to finish it and you’ll see firefox come up in the list. Use the arrow keys to go up and down the list to highlight the firefox Application and press enter.
  10. Command+Shift+3 and Command+Shift+4: Take a screenshot. For more information look at our screen capture post.
  11. Shift+Fn+Left Arrow: Home. This works in different ways on different application. I use terminal a lot and in terminal it will be like pressing “Home” on a keyboard and go to the beginning of the command. In other applications I’ve seen it go to the top of the text (like this input box in the browser jumps to the first character). In other applications you also don’t need to press the Shift key but you do in terminal.
    (Edit: Peter Morgan recently posted a comment pointing out that point 11, 12 and 13 do not need the Shift key to work if you are using Mac OS X 10.5.6. Thank you Peter for the info )
  12. Shift+Fn+Right Arrow: End. Works the same way as the home button.
  13. Shift+Fn+Up Arrow or Down Arrow: Page Up and Page Down respectively. Works the same way as the home button
  14. Fn+Delete: Delete. The way the delete button alone works is more commonly known as backspace in other systems, it will delete the text found right behind (to the left of) the cursor. To delete the text found in front (to the right of) the cursor you need to press Fn+Delete.
  15. Fn+FX where X is a number between 1 and 12: Issues that function key as pressed. You will notice that the Function keys (F1, F2, … F12) have other uses like dimming the screen, controlling the speaker, starting spaces or expose and so on. Sometimes though you just want to press the F1 button, in those cases you need to use it in conjunction with the Fn key.
  16. Ctrl+Eject: Brings up the shutdown prompt to easily issue a shutdown or restart command.
  17. Command+Home: Go to beginning of the line.
  18. Command+End: Go to end of the line.
  19. Command+Up Arrow (Page Up): Go to beginning of file.
  20. Command+Down Arrow (Page Down): Go to end of file.

These are the most common keyboard shortcuts that I use and can think of right now. Let me know if you have a favorite one and I’ll add that to the list.

Playing AVI and WMV videos on macbook (Mac OS X)

Thursday, August 16th, 2007

I thought this was going to be hard but there’s a company out there called flip4mac which provides a program that allows you to play avi and wmv files inside quicktime. What’s really good about that is that you can watch those videos in front row too.

To download the free player, go to Microsoft’s page describing the flip4mac product and offering a free download link.

If you want to convert your wmv videos to be able to play them on your iPod, then you’ll have to buy the home version of flip4mac wmv from their site.

Cool Mac OS X Feature: Zooming

Friday, June 15th, 2007

Here’s a feature I didn’t know the macbook had until I saw someone using it and asked them how they did it. One of the accessibility features of the macbook is zooming. I’ve seen this in other operating systems where a box comes up next to the mouse with a zoomed in view around the mouse pointer. On the macbook, if you have accessibility turned on, you can zoom into the desktop by pressing and holding the “CTRL” key and then using two fingers on the trackpad, next to each other, move your fingers up towards the monitor. You will immediately notice the screen has now zoomed in. Unfortunately, taking a screenshot doesn’t really show the zoomed in effect properly.

Once you have zoomed in, moving the mouse/trackpad will make it seem like you are dragging the entire screen. And when you don’t need to be zoomed in anymore, press “CTRL” key and with both fingers on the trackpad move down (away from the monitor) until the screen is back to normal.

You can enable and disable the zooming feature by going to System Preferences -> Universal Access and change the Zoom setting to off. You can also change which keys will zoom in and out and even have a hot key to turn zooming on or off.

Sourcing .bashrc at terminal startup (Mac OS X)

Thursday, June 14th, 2007

I discussed this briefly in my post on installing subversion but I think it deserves a post of it’s own mostly because I forgot how to accomplish this task and couldn’t find it again as easily.

If you are a windows user, .bashrc may be completely unfamiliar to you. It’s basically a file that you place in your home directory (that would be /Users/your_username on macbook) where you can define environment variables and command aliases. You can actually run any bash command int hat file since it would be a bash script that runs on startup.

The macbook though does not startup with that file sourced automatically. You need to configure it to get it working.

Mac OS X sources /etc/profile when terminal starts off, so all you need to do is add the following line to your /etc/profile file:

[ -r $HOME/.bashrc ] && source $HOME/.bashrc

This will source your ~/.bashrc file on startup and the next time you open terminal all your commands in .bashrc will have run.

I like to have the following settings in my .bashrc:

alias ll=’ls -l’

This line creates an alias for the command ll (that’s two Ls). This should be familiar to many linux users. ls -l is probably the most typed command and shortening it to ll makes life mch easier.

export PS1=”\[\e[1;34m\]\u@\H:\[\e[0m\]\[\e[1;36m\]\w\[\e[0m\]\n\[\e[1;34m\]\t->\[\e[0m\]“

This is my favorite configuration for the prompt on the command line. It will produce the following:

smadenian@serge-madenians-computer.local:/usr/local/maven-2.0.4/bin
11:36:38->

What I like about this prompt is that it shows me which computer I’m working on (good when you ssh into other servers/machines). It shows me my full path. It is plit to two lines (anyone who has gone down a long path and reached the end of the line while typing a command will appreciate that). And finally there’s the time which helps me know when I ran a command and when it finished.

I’ve also created other aliases and path configuration that may not be as useful as the above mentioned items.

Installing programs: Subversion

Thursday, May 24th, 2007

For my development I use Subversion (SVN) as my preferred source control. Since this is a new macbook, there are almost no dev tools installed on here. I sometimes forget that I don’t have any of these basic tools and just type svn in the terminal.

So I went online to find the most painless way of installing SVN on my laptop. I found a extremely easy installation of SVN made by Martin Ott at http://www.codingmonkeys.de/mbo/ you can download it from his page or just click here. His installation is in the form of a .pkg file that opens up an installation dialog box, just follow the instructions and you’re set.

Opening up my terminal, I typed in svn co with my repository url but the OS complained that svn is not a valid command. It looks like svn is not in my path. I went searching for it and found that it was installed in /usr/local/bin. That’s weird since I thought I had already placed /usr/local/bin in my PATH in my .bashrc file on my home directory. I went checking and it was there:

export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:$PATH

It looks like OS X does not automatically source my .bashrc file. So I needed to add the source command to either my .profile which will source the .bashrc only for my user or I could change the /etc/profile file to make the change global for all users. Geoff sent me the following line to add to my /etc/profile to do just that:

[ -r $HOME/.bashrc ] && source $HOME/.bashrc

You can add that line to the bottom of the file. This will source .bashrc for all users when they log in. You will need to use sudo to edit the /etc/profile.

Now to try it out, I closed my terminal session and opened a new one, typed svn and it went through just fine.

Installing programs: Firefox

Wednesday, May 23rd, 2007

Another completely foreign process for linux and windows users on the mac is installation of new programs. The first program I wanted to install was Firefox. going to http://www.mozilla.com/en-US/firefox/ shows you the download link for the mac OS X. You’ll notice that the file extension is DMG which means that file is a mac OS X disk image. Most mac applications come as a disk image and so they are completely self contained. when you double click on a .dmg file you will see a new disk appear on your desktop. You can actually run applications directly off that disk image but it’s a hassle to load a disk image every time. It’s better to install locally.

Since I’m new to macs I didn’t know any of this and installation on a mac is very different than other operating systems. When you double click on the firefox dmg file you will be presented with an end user license agreement . Pressing accept on the license agreement brings up the following window:

Firefox Instllation window

I was staring at this window for quite some time and just couldn’t figure out what I’m supposed to do. The reason being that I’ve never installed anything on a mac before and firefox just has non descriptive icons and no instructions on what to do. after doing some research I figured out that I need to open up the “Applications” folder on the mac and drag and drop that big firefox.app icon on the left into applications. Doing so copies the complete firefox application locally. That’s all you have to do to install on a mac, copy the .app folder to applications. The process itself is one of the easiest installation processes I’ve seen, unfortunately it isn’t really explained anywhere at all and that is why it makes it hard to figure out. Uninstalling, then, becomes just as easy. All you need to do is delete the .app folder from the applications folder and the app is uninstalled.

Now that firefox is installed you can eject the firefox disk image by going to the desktop, right clicking on the disk image and chose eject. The other method of ejecting a disk image or even a CD is to go to your desktop click and drag the image towards the trash can. You will notice that the trash can icon has switched to an eject icon:

Ejecting Firefox Disk Imge

Just drag the image to that eject icon and drop it there and the image is ejected. Now you can delete the .dmg file and firefox is installed on your system.

Total loss of CTRL

Tuesday, May 22nd, 2007

Using the macbook for the first time you immediately realize the CTRL key doesn’t control much. I use keyboard shortcuts most of the time, it saves me a lot of time that would be wasted moving my right hand to and from the mouse. The most common of those shortcuts are: ctrl-C, ctrl-V, ctrl-D, ctrl-Z, ctrl-Y. Taking out the mac for a test drive your instinct tells you to use CTRL-C to copy something but nothing happens. Next step was to figure out what the shortcuts are. I used the mouse to go to the menu and check out the shortcuts next to each item. I noticed that everything uses that key with the apple logo and a weird symbol on it.

Edit Menu

It’s called the command key and all the windows and linux shortcuts are pretty much the same except you use command instead of CTRL. so copying would be command + C and so on.

I also went digging a little more online to find other shortcuts. In windows you can press Alt+F4 to close windows and when all windows are closed it brings up the “shut down computer” dialog. Command-F4 didn’t do anything. The following page helped me a lot in learning shortcuts:

Mac OS X keyboard shortcuts [Apple]

to bring up the shutdown dialog box you need to hold down Control + Eject for a second or two. What I cannot figure out yet is how to move between the different choices in a dialog box.

Shutdown dialog box
In the image above, shut down is selected and if I press the enter key, the computer will shut down. What if I wanted to restart? on linux and windows you can use the arrow keys or the tab key to switch focus. I haven’t been ablet o figure out how to do that on Mac OS X. If anyone knows, please post a comment.

Why Macbook?

Tuesday, May 22nd, 2007

I think a good first post would be to explain why I chose to get a mac or a macbook at that. My only interaction with a mac before I bought the macbook was a very long time ago and it was not pretty.

A friend of mine had a mac (pre OS X) and was away from his computer and asked me to check something on it. By that time I was already very familiar with windows, had a base working knowledge of linux and a lot of experience with hardware. What my friend asked for was a simple task that should have been easy for even a not so computer savvy person. To my surprise, and eventual frustration, I couldn’t figure anything out and crashed his computer. I had sworn not to touch another mac.

What made me change my mind was a combination of things. First off, I had since then worked with linux a lot more and had much more experience. I have had linux as my desktop machine at work for the past 3 years (windows at home only because of gaming). All my work is linux based and so even on a windows machine all I did was use putty to connect to a linux machine and work. Windows had just become a shell instead of the operating system I do my work in. Apple switched their OS to use Unix since OS X which made it easier for me to understand and get to the root of errors when they arise. This eased my fears of not knowing how to even do the simplest tasks.

The second point was that I needed a laptop to work on. I didn’t want to just have another shell computer where I used it to then connect to a remote server where I did my actual work. With a laptop, I might be somewhere that I have no connection to the internet and want to continue working. My initial though was to buy a laptop and just install linux on but I haven’t had much luck with that in the past. I have a Dell Inspiron 9100 and installing linux to properly work on there (with full audio, video and wireless support) was a major headache. I was still ready to put up with that headache though if it meant I would now be able to work directly on local machine instead of connecting remotely.

While I was researching which laptop would be best suited for linux, a friend/coworker, Geoff (and an avid mac user), pointed out that macs were now based on unix. He brought his powerbook to work every day and with it I was able to get some first hand experience using the new operating system. I was now more at ease with mac OS X. Finally he made the argument that with the latest macbooks running on unix and being Intel based I could easily compile and use most of the open source tools I use on linux (apache, perl, mysql and so on), I also wouldn’t have hardware incompatibility issues and running out trying to find drivers like I would when installing linux on another laptop and finally with all the UI tools on the mac, other than work I could use my laptop for things like watching a movie or listening to music without much hassle.

I was sold. Now I needed to find the model that best suits my needs. I didn’t want to have a big laptop. I had the inspiron 9100 before and that thing is HUGE. You can’t carry it without sustaining a shoulder injury. I wanted a smaller, more portable laptop. macbook pros only come in 15 and 17 inch displays so I opted to go with the macbook.

One last thing I had to wait for was that back then macbooks still used core duo processors while macbook pros had already moved to core 2 duo. I wasn’t in a hurry and waited for core 2 duo to be released on macbooks.
I’ve been using the macbook for a few months now and I can say that I am not disappointed by the move.

More on initial OS shock soon…

Procrastination must end sometime

Monday, May 21st, 2007

I registered this URL when I had just ordered my macbook hoping to have a day to day analysis of my initial OS shock. I had a lot of things that took precedence over this project though and so I have been putting it off. I did keep notes of the issues I was having and how I resolved them so I’ll be posting those along the way.

I won’t be talking only about going from a linux environment to a mac. I’ve been a windows user for a long time and I will try and discuss using a mac from both OS viewpoints. Of course it was a lot easier for me knowing linux, since OS X is based on Unix.