Although XQuartz is already installed, NoMachine NX Client (v3.5.0-7) on OS X 10.6 will complain about not being able to find Apple X11 in /Applications or /Applications/Utilities.
You can download and install X11 for OS X 10.6 from here (just not sure if it will install without first uninstalling XQuartz because XQuartz may be newer).
Or, simpler, create a symlink /Applications/Utilities/X11.app to point to /Applications/Utilities/XQuartz.app:
$ sudo ln -s /Applications/Utilities/XQuartz.app /Applications/Utilities/X11.app
Showing posts with label environment. Show all posts
Showing posts with label environment. Show all posts
Wednesday, June 20, 2012
Thursday, January 20, 2011
Installing Ubuntu 10.04 Enterprise Cloud (on Dell PowerEdge R510 using iDRAC6)
This is done as a two step process - first, we need to configure the machine, then we can actually install Ubuntu.
1. The network setup here is that each cluster node has two network cards, a local and a public one, but all of the public traffic is, initially, routed through the cluster's head node. So, in order to access Dell's iDRAC6 on the worker nodes, it is necessary to first setup port forwarding through the head node for HTTPS and VNC:
(local): sudo ssh -L 443:[node IP]:443 -L 5900: [node IP]:5900 -l [head node user name] -N [head node IP]
-u root -p -c [path to Ubuntu ISO on hed node]
1. The network setup here is that each cluster node has two network cards, a local and a public one, but all of the public traffic is, initially, routed through the cluster's head node. So, in order to access Dell's iDRAC6 on the worker nodes, it is necessary to first setup port forwarding through the head node for HTTPS and VNC:
(local): sudo ssh -L 443:[node IP]
2. Open https://localhost:443 and enable Virtual Media -> Status -> Auto Attach under Console/Media -> Configuration. This will allow us to actually mount a CD-ROM as a virtual device to the node.
3. Launch the node's virtual console from the Properties tab and reboot the system; load BIOS and disable internal interfaces, disable memory checking, and enable hardware virtualization
4. On the head node, download and mount bootable FreeDOS ISO as a virtual CD for the node so we can boot off of it:
(head node): sudo vmcli -r [node IP] -u root -p -c [path to FreeDOS ISO on head node]
(head node): sudo vmcli -r [node IP]
5. Boot FreeDOS, through the Virtual Console, select 'Install to hard drive', then run from CD (this will enable networking):
(node): UX_Diag, uediag.exe, -mba 1
Now, the machine is ready to have an OS of choice installed.
6. Mount Ubuntu Enterprise Cloud ISO as a virtual CD from the head node again so we can boot off of it and install:
(head node): sudo vmcli -r [node IP] 7. Reboot from virtual console, enter BIOS and choose CD as the first boot device; boot into Ubuntu configuration screen and install Ubuntu. Subsequent instructions on how to install Ubuntu Enterprise Cloud are available here.
Monday, November 29, 2010
Don't require password for sudo
Simple but forgettable because it's done only once...
$ sudo visudo #add desired username to the file in the following format:
[user_name] ALL=NOPASSWD: ALL
$ sudo visudo #add desired username to the file in the following format:
Wednesday, November 10, 2010
Enable color-coding for diff in TextMate
You can pipe output from diff command as well as pipe the output of a diff from a source control tool directly into TextMate (e.g., diff v1 v2 | mate or hg diff | mate).
However, you may be missing the nice coloring in the newly opened window that is supporte by TextMate by default. As it often is the case, getting this to work is easy but you first need to find how to get there. So, to toggle the coloring, simply press Ctrl+Option+Shift+D (if this does not work on your system, go to Bundles->Bundle Editor->Show Bundle Editor click on Diff bundle. In the Activation text field is the keyboard shortcut you can use to toggle color coding for diff). Enjoy!
However, you may be missing the nice coloring in the newly opened window that is supporte by TextMate by default. As it often is the case, getting this to work is easy but you first need to find how to get there. So, to toggle the coloring, simply press Ctrl+Option+Shift+D (if this does not work on your system, go to Bundles->Bundle Editor->Show Bundle Editor click on Diff bundle. In the Activation text field is the keyboard shortcut you can use to toggle color coding for diff). Enjoy!
Wednesday, September 01, 2010
Profile SGE queues
As root, run the command "qconf -tsm" on your head node. That will cause a one-time scheduler profiling run to be dumped to a text file called "schedd_runlog" in your $SGE_ROOT/ $SGE_CELL/common/ directory. This file can then be examined for any anomalies if things are otherwise not running smoothly.
Tuesday, February 02, 2010
Unable to find a $JAVA_HOME at … on Mac OSX
Every time I would use java on my Mac, I kept getting the following error:
I tried setting the environment variable
I found the following solution here:
First, find out where java actually is:
I noticed a command called java_home in that same directory. Running that command yields the correct java home directory.
To correctly set the my JAVA_HOME environment variable in future, I added the following to my
Restart terminal and enjoy.
>java -version
Unable to find a $JAVA_HOME at “/usr”, continuing with system-provided JavaI tried setting the environment variable
JAVA_HOME=/usr but the error remained when running java.I found the following solution here:
First, find out where java actually is:
>ls -l' `which java`
/usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javaI noticed a command called java_home in that same directory. Running that command yields the correct java home directory.
>/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/HomeTo correctly set the my JAVA_HOME environment variable in future, I added the following to my
~/.profileexport JAVA_HOME=`/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home`Restart terminal and enjoy.
Friday, December 18, 2009
Add folder to Places sidebar in Mac Finder
Very simple, navigate to the folder you desire to have listed under Places in the Finder, select it and press Cmd+T. That's it!
To remove the folder from the list, right click it in the sidebar and select "Remove from sidebar".
To remove the folder from the list, right click it in the sidebar and select "Remove from sidebar".
Saturday, December 12, 2009
Digital Color Meter in OS X
Digital Color Meter in OS X is a built in tool/application that comes with OS X and allows you to pick the color code for any color on the screen.
Wednesday, September 09, 2009
Installing Xen dom0 on Ubuntu 9.04
The overall structure of a 'Xen-enabled' system can be visualized by the following figure:

As shown in the figure, and contrary to my prior belief, Xen hypervisor is represented by another GRUB entry at system boot time (as opposed to simply replacing the OS that it was installed from). As a result, you can choose to boot into original OS without Xen availability or into the Xen system even after you have installed Xen on given system. This was just used to show a high-level picture of system layout...
Following are a set of commands that will install Xen hypervisor. These commands are to be executed within the original OS currently existing on the machine:
$ wget http://http.us.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.26-2-xen-686_2.6.26-19_i386.deb
$ wget http://http.us.debian.org/debian/pool/main/l/linux-2.6/linux-modules-2.6.26-2-xen-686_2.6.26-19_i386.deb
$ sudo dpkg -i linux-modules-2.6.26-2-xen-686_2.6.26-19_i386.deb
$ sudo dpkg -i linux-image-2.6.26-2-xen-686_2.6.26-19_i386.deb
$ sudo apt-get install ubuntu-xen-server
Name ID Mem VCPUs State Time(s)
Domain-0 0 702 1 r----- 312.9

As shown in the figure, and contrary to my prior belief, Xen hypervisor is represented by another GRUB entry at system boot time (as opposed to simply replacing the OS that it was installed from). As a result, you can choose to boot into original OS without Xen availability or into the Xen system even after you have installed Xen on given system. This was just used to show a high-level picture of system layout...
Following are a set of commands that will install Xen hypervisor. These commands are to be executed within the original OS currently existing on the machine:
$ wget http://http.us.debian.org/debian/pool/main/l/linux-2.6/linux-image-2.6.26-2-xen-686_2.6.26-19_i386.deb
$ wget http://http.us.debian.org/debian/pool/main/l/linux-2.6/linux-modules-2.6.26-2-xen-686_2.6.26-19_i386.deb
$ sudo dpkg -i linux-modules-2.6.26-2-xen-686_2.6.26-19_i386.deb
$ sudo dpkg -i linux-image-2.6.26-2-xen-686_2.6.26-19_i386.deb
$ sudo apt-get install ubuntu-xen-server
Then, restart the machine and in the grub loader, Xen should appear as a bootable OS.
After booting up, the following command should tell you that you are in dom0:
$ sudo xm listName ID Mem VCPUs State Time(s)
Domain-0 0 702 1 r----- 312.9
When it comes to installing guest OS's (i.e., domU's), the following websites were helpful:
Wednesday, June 10, 2009
Add 2nd disk in VMware
1. Add a second disk to the guest OS through the VM manager
2. Boot the guest OS and go to Control Panel->Administrative Tools->Computer Management->Disk Management
3. Right click the new partition and initialize it.
2. Boot the guest OS and go to Control Panel->Administrative Tools->Computer Management->Disk Management
3. Right click the new partition and initialize it.
Thursday, April 23, 2009
Quickly toggle tab swap preference for TabMix Plus
Simply press F9 while FF in focus to toggle between tabs being swapped under Last Selected preference or Select Right preference.
Friday, August 29, 2008
Setting up SSH keys for authentication without passwords
1. Log into machine ONE
2. Issue command: ssh-keygen –t rsa
3. Change into ~/.ssh directory
4. Copy contents of file id_rsa.pub from machine ONE to file ~/.ssh/authorized_keys on machine TWO. Note, if this file already exists, simply add a new line to the bottom of it. Furthermore, make sure that the key being copied is all on one line.
5. Change permissions of ~/.ssh/authorized_keys on machine TWO to 700
6. Now, you are able to log in from machine TWO to machine ONE without a password
2. Issue command: ssh-keygen –t rsa
3. Change into ~/.ssh directory
4. Copy contents of file id_rsa.pub from machine ONE to file ~/.ssh/authorized_keys on machine TWO. Note, if this file already exists, simply add a new line to the bottom of it. Furthermore, make sure that the key being copied is all on one line.
5. Change permissions of ~/.ssh/authorized_keys on machine TWO to 700
6. Now, you are able to log in from machine TWO to machine ONE without a password
Monday, June 16, 2008
Getting BioPerf to execute
Upon executing script to start BioPerf, the following error came up:
In order to get passed this, file $HOME/BioPerf/Scripts/Run-scripts/run-bioperf.sh should be edited on line 21 to replace parentheses with curly brackets (or similar or escaped). The same should be done on line 26 because parentheses are used there as well and are not escaped.
$ ./use-bioperf.sh
You can do the following:
[R] Run BioPerf
[I] Install BioPerf on your architecture
(if your architecture is not PowerPc, x86)
[C] Clean outputs in $HOME/BioPerf/Outputs
[D] Display all versions of the installed codes
R
Please specify your architecture
[A] Alpha
[P] PowerPC
[X] x86
[H] Custom. (If you have already ran the install-codes.sh successfully
to completion, you can choose this option to run the binaries installed
on your system)
X
$HOME/BioPerf/Scripts/Run-scripts/run-bioperf.sh: line 21: syntax error near unexpected token `('
$HOME/BioPerf/Scripts/Run-scripts/run-bioperf.sh: line 21: ` echo There is no directory named $HOSTNAME-Binaries (created by install-codes.sh) in $BIOPERF/Binaries '
In order to get passed this, file $HOME/BioPerf/Scripts/Run-scripts/run-bioperf.sh should be edited on line 21 to replace parentheses with curly brackets (or similar or escaped). The same should be done on line 26 because parentheses are used there as well and are not escaped.
Thursday, June 12, 2008
Add color to bash
In order to get syntax highlighting in bash when 'ls' command is executed, add the following line to (bottom of) ~/.bashrc file:
. /etc/profile.d/colorls.sh
Note: Make sure pointed file exists. Below is an example of one:
. /etc/profile.d/colorls.sh
Note: Make sure pointed file exists. Below is an example of one:
$ more colorls.sh
# color-ls initialization
alias ll='ls -l' 2>/dev/null
alias l.='ls -d .*' 2>/dev/null
COLORS=/etc/DIR_COLORS
[ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM"
[ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
[ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM"
[ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
[ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM"
[ -e "$COLORS" ] || return
eval `dircolors --sh "$COLORS"`
[ -z "$LS_COLORS" ] && return
if ! egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null ; then
alias ll='ls -l --color=tty' 2>/dev/null
alias l.='ls -d .* --color=tty' 2>/dev/null
alias ls='ls --color=tty' 2>/dev/null
fi
Tuesday, June 10, 2008
Setting Eclipse Keyboard Shortcut: Ctrl+Tab
Go to:
Window / Preferences / General / Keys
Scroll all the way down to the bottom. About 12th from the BOTTOM you will see category "Next Editor".
Double Click that line. The modify screen for that action will open up.
Set focus to the Key Sequence section, and hit CTRL-TAB, then click the ADD button. You should now see TWO commands for "Next Editor". You can now select the original one, and click Delete. (from here)
Window / Preferences / General / Keys
Scroll all the way down to the bottom. About 12th from the BOTTOM you will see category "Next Editor".
Double Click that line. The modify screen for that action will open up.
Set focus to the Key Sequence section, and hit CTRL-TAB, then click the ADD button. You should now see TWO commands for "Next Editor". You can now select the original one, and click Delete. (from here)
Tuesday, February 05, 2008
BLAST performance analysis configuration
All the files needed for BLAST performance testing (e.g., perl scripts, databases, different versions of BLAST software, ...) are located under my account on everest under ~/BLASTanalysis.
In order to run a BLAST test, a properties file (e.g., propertyFile) needs to be edited/provided. Properties file specifies the following data: database, input file, program, I/O params are specified, number of fragments and threads, and execution host.
Once configured, run run.pl script. This script will split the input file into specified number of fragments, generate LRM scripts, and submit the job:
In order to run a BLAST test, a properties file (e.g., propertyFile) needs to be edited/provided. Properties file specifies the following data: database, input file, program, I/O params are specified, number of fragments and threads, and execution host.
Once configured, run run.pl script. This script will split the input file into specified number of fragments, generate LRM scripts, and submit the job:
perl run.pl {properties file}
Thursday, August 02, 2007
CLASSPATH on Windows with paths including spaces
For example:
javac -classpath ".;C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP\JaCoP.jar" *.java
More info/examples available here.
javac -classpath ".;C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP\JaCoP.jar" *.java
More info/examples available here.
Subscribe to:
Posts (Atom)