As every Mac user does I often open System Preferences. I don't like to use either track pad or mouse. So I made my own shortcut. First, open up System Preferences, then Keyboard, Keyboard shortcuts. Select Application Shortcuts in the left pane. Then click on + to add the short cut. Select the application in the dialogue box that has popped up and give it a name. Finally, next to Keyboard shortcut just press the entire keyboard sequence you want to have it as a shortcut. For example, I pressed <lat> + <command> + <single quote> at the same time. As soon as you are done pressing the keys you'd see the sequence in the box. Click add and you are done. See the pic below to see what I'm talking about. I guess pics make things easier.
By the way, the reason behind choosing chose alt + command + ' for the system preferences is that every application preferences on Mac can be accessed with keyboard shortcut of command + '. Hence I've just added alt to it. Makes sense I guess.
Monday, August 22, 2011
Sunday, August 21, 2011
selection of form fields uisng tab on Mac
By default, form field selection on Mac using tab doesn't work. To do this go to System Preferences ---> keyboard ---> and then select "All Controls" for "Full keyboard access: In windows and dialogues, press Tab to move keyboard focus between:".
By default Text boxes and lists only is selected as shown in the picture below. Just select "All controls" and then you'd be able to use Tab and Space bar combination to focus and select equivalent to moving mouse onto the option and left clicking.
In the picture below you can see that cancel option is focused and you can hit the space bar to select this option to cancel deleting the song from iTunes.
By default Text boxes and lists only is selected as shown in the picture below. Just select "All controls" and then you'd be able to use Tab and Space bar combination to focus and select equivalent to moving mouse onto the option and left clicking.
In the picture below you can see that cancel option is focused and you can hit the space bar to select this option to cancel deleting the song from iTunes.
Getting rid of annoying document images under places on finder window on mac
For longest time, on my mac, I had these annoying document names under places on every finder window. I tried to delete them by changing the sidebar preferences. Nothing happened. The other day I was trying to find solution online and someone posted this simple and beautiful trick.
While holding the command key try to drag the icons you want to get rid of on to desktop. That's it. You don't see them anymore. Sometimes, small tricks like this are life savers :)
While holding the command key try to drag the icons you want to get rid of on to desktop. That's it. You don't see them anymore. Sometimes, small tricks like this are life savers :)
Thursday, August 18, 2011
Installing DJVIEW4 on Mac OS X for viewing .djvu files
First make sure that you've installed xcode. xcode 3 is free. Means, xcode 4 is not. You can download it from Apple.
Then, download dvulibre from here http://djvu.sourceforge.net/.
DJVIEW 4 can be downloaded from http://djvu.sourceforge.net/djview4.html.
Note: Always, don't go for latest versions. Most of the time they are unstable and don't work well. Just go for the version just before the latest. For example, I had problems with pkg-config latest version 0.26. But 0.25 worked beautifully without any problems. For some reason djviewlibre didn't work with tiff library. I didn't have time to fix that either. So I used ./configure --without-tiff and it worked for me. I didn't install pdflib too. But the minimum works for me well.
Then, download dvulibre from here http://djvu.sourceforge.net/.
$ cd Desktop $ open http://ftp.gnu.org/gnu/wget/wget-1.13.tar.gz $ tar xzvf wget-1.13.tar.gz $ cd wget-1.13 $ ./configure --without-ssl $ make $ sudo make install $ cd .. $ wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz $ tar xzvf jpegsrc.v8c.tar.gz $ cd jpeg-8c/ $ ./configure $ make $ sudo make install $ cd .. $ wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz $ tar xzvf pkg-config-0.25.tar.gz $ cd pkg-config-0.25 $ ./configure $ make $ sudo make install $ cd .. $ wget http://downloads.sourceforge.net/djvu/djvulibre-3.5.24.tar.gz $ tar xzvf djvulibre-3.5.24.tar.gz $ cd djvulibre-3.5.24 $ ./configure $ make $ sudo make install $ cd ..Then download QT4 (google search term is "downloading qt4") and install it. It's a standard package for mac and so there is no need to do it from terminal.
DJVIEW 4 can be downloaded from http://djvu.sourceforge.net/djview4.html.
$ wget http://downloads.sourceforge.net/djvu/djview-4.8.tar.gz $ tar xzvf djview-4.8.tar.gz $ cd djview-4.8 $ ./configure QMAKE=$HOME/QtSDK/Desktop/Qt/473/gcc/bin/qmake $ make $ sudo make install $ cd .. $ djview filename.djvuYou should see a window opening with your ebook on it. I needed to install this to read one of the ebooks I found online.
Note: Always, don't go for latest versions. Most of the time they are unstable and don't work well. Just go for the version just before the latest. For example, I had problems with pkg-config latest version 0.26. But 0.25 worked beautifully without any problems. For some reason djviewlibre didn't work with tiff library. I didn't have time to fix that either. So I used ./configure --without-tiff and it worked for me. I didn't install pdflib too. But the minimum works for me well.
Enabling X11 Forwarding on Mac OS X
By default, X11 forwarding is not enabled on Mac Leopard. To enable it you need to have a line like "X11Forwarding yes" in the file /private/etc/sshd_config. Just do this command from the terminal.
Make sure that you check Remote Login under Sharing in System Preferences.
For the xeyes you should see the eyes on your screen. For the xclock it's clock. On our clusters we are not allowed to be idle for more than certain time and so I use xclock to keep it active all the time.
$ sudo echo "X11Forwarding yes" >> /private/etc/sshd_config Enter the password when prompted.
Make sure that you check Remote Login under Sharing in System Preferences.
$ ssh -X username@remotehost $ xeyes & $ xclock &
For the xeyes you should see the eyes on your screen. For the xclock it's clock. On our clusters we are not allowed to be idle for more than certain time and so I use xclock to keep it active all the time.
Apple shortcut to highlight apple icon on top left corner
Have you ever tried to select the apple icon on the top left corner using keyboard? I often use it and so started looking into finding a shortcut. I think almost 3 to 4 years back I search online for a while to find the shortcut without any success. Then I kept on pressing different keys together and finally found the shortcut. I'm sure there might be another simple shortcut but what I found was lifesaver for me. Here it is ...
<fn> + <control> +<F2>
That is pressing function, control and F2 keys together highlights the apple symbol and from there using arrow keys take you to other options like software update, restart and shutdown.
<fn> + <control> +<F2>
That is pressing function, control and F2 keys together highlights the apple symbol and from there using arrow keys take you to other options like software update, restart and shutdown.
Wednesday, August 10, 2011
Performance Analysis Tools: MPE2, mpiP and libunwind Installation on Linux
I have built all these tools on our clusters using Intel compilers. Location of all the executables like icc, ifort, icpc, mpicc, etc have already been added to the path. The locations of intel, mpi libraries are appended to LD_LIBRARY_PATH. If you haven't done it yet then you can do that using export PATH=$PATH: and export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. Better add these two lines to your ~/.bashrc.
First, I had to build libunwind so that mpiP can be built using this. It can be downloaded at http://www.nongnu.org/libunwind/.
First, I had to build libunwind so that mpiP can be built using this. It can be downloaded at http://www.nongnu.org/libunwind/.
Building libunwind
$ ./configure CC=icc CFLAGS="-g -O3 -fPIC -align -Zp8 -axP -unroll -xP -ip" CXX=icc \ CCAS=icc CCASFLAGS="-g -O3 -fPIC -align -Zp8 -axP -unroll -xP -ip" \ LDFLAGS="-L$PWD/src/.libs" --prefix=/home/manchu/libunwind/ \ --exec-prefix=/home/manchu/libunwind/ --enable-cxx-exceptions --enable-debug $ make $ sudo bash $ make installProfiling tool mpiP can be downloaded at http://mpip.sourceforge.net/.
Building mpiP
$ ./configure --prefix=/home/manchu/mpiP/ --exec-prefix=/home/manchu/mpiP/ \ CC=mpicc CFLAGS="-O2 -fPIC -align -Zp8 -axP -unroll -xP -ip" F77=mpif77 \ FFLAGS="-O2 -fPIC -align -Zp8 -axP -unroll -xP -ip" --with-cxx=mpic++ \ CXXFLAGS="-O2 -fPIC -align -Zp8 -axP -unroll -xP -ip" --enable-demangling=GNU \ --enable-fortranweak --enable-getarg --with-libunwind=/home/manchu/libunwind/lib/ \ --enable-collective-report-default $ make $ sudo bash $ make installYou can download the profiling cum tracing tool MPE2 here. If you're installing MPICH2 then don't bother about this as it comes with this package.
Building MPE2
$ ./configure --prefix=/home/manchu/mpe2/ --exec-prefix=/home/manchu/mpe2/ \ CC=icc CFLAGS="-O2 -fPIC -align -Zp8 -axP -unroll -xP -ip" MPI_CC=mpicc \ MPI_CFLAGS="-O2 -fPIC -align -Zp8 -axP -unroll -xP -ip" F77=ifort \ FFLAGS="-O2 -fPIC -align -Zp8 -axP -unroll -xP -ip" MPI_F77=mpif77 \ MPI_FFLAGS="-O2 -fPIC -align -Zp8 -axP -unroll -xP -ip" --enable-collchk \ --enable-wrappers --enable-checkMPIwtime --enable-g $ make $ sudo bash $ make installIf you see any problems with finding libraries then I recommend you add LDFLAGS as well as CPPFLAGS, etc. Do ./configure -help to see more options.
Subscribe to:
Posts (Atom)
PBS Script Generator: Interdependent dropdown/select menus in Javascript
About Me
- My Knotty Mind - Labyrinth
- LA, CA, United States
- Here I write about the battles that have been going on in my mind. It's pretty much a scribble.


