User:Sylvain
crontab on MacOS
- Example
crontab -e 00 20 * * * ctest -S myScript.cmake > myScript.log 2>&1
- Problem:
When I create a cronjob with
crontab -e
I get the error message:
crontab: temp file must be edited in place
- Solution:
Use the 'nobackup' option in VI:
:set nobackup crontab: installing new crontab
Install X11 on MacOS
To install ParaView-2.4.4, you need to install X11.
- Insert 'Mac OS X Install Disc 1'
- Scroll down to 'Optional Installs'
- Click 'Continue', 'Continue', 'Accept'
- Select 'Applications', click on the arrow in front of Applications
- Select 'X11'
- Click 'Upgrade', enter your password, click 'Ok'
Setup CMake for ICC
To configure a project to use the Intel compiler icc, set CC and CXX *before* you run cmake. Type is the terminal:
CFLAGS= CXXFLAGS= CC=/opt/intel_cc_81/bin/icc CXX=/opt/intel_cc_81/bin/icpc
Then run cmake or ccmake.
Headers for Cross-platform Projects
#include <stdio.h> // for sscanf
Install Qt OpenSource for VCExpress (VS2005)
- Install VCExpress AND Platform SDK
http://msdn.microsoft.com/vstudio/express/visualc/download/
- Using Windows Unzip, extract qt-win-opensource-src-4.2.2.zip and acs-4.2.2-patch1.zip to c:/qt/qt-win-opensource-src-4.2.2
http://www.paraview.org/Wiki/Obtaining_GPL'ed_Qt_for_Windows
- Edit C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat
- Add path to Platform SDK bin, include and lib:
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
- Launch Cygwin.exe, and apply the following patch
patch -p1 -i qtwin_patch\msvc_bcc32_42.patch
- Launch Start > All Programs > Visual C++ Express Edition > Visual Studio Tools > Visual Studio 2005 Command Prompt
- cd ..; cd qt; cd qt-win-opensource-src-4.2.2
- Configure Qt and answer yes to all questions
qconfigure.bat msvc2005
- Configure ParaView3 using CMake; Compile using MSVC2005
Install Qt OpenSource for Mac
- Build for Debug
cp -r qt-mac-opensource-4.2.2 ~/qt-4.2.2-debug cd ~/qt-4.2.2-debug ./configure -debug -prefix /usr/local/qt-4.2.2-debug yes make sudo make install
- Build for Release
cp -r qt-mac-opensource-4.2.2 ~/qt-4.2.2-release cd ~/qt-4.2.2-release ./configure -prefix /usr/local/qt-4.2.2-release yes make sudo make install
Change shell in Debian
- Type:
chsh
- Type your password
- Logout and login again.
- Set up the .zshrc file.
Associate hostname with IP address for SSH
- Dynamic way:
Add in /etc/dhcp3/dhclient.conf
send host-name "<your_host_name>";
- Static way: (not as good)
Add IP address and hostname in /etc/hosts (Linux) or C:/WINDOWS/system32/drivers/etc/hosts (Cygwin):
102.54.94.97 rhino.acme.com # source server 38.25.63.10 x.acme.com # x client host
- On Debian, install openssh-server
SSH without password
Add to .ssh/config
Host <remote_host_name> User <your_user_name_on_remote_host>
Debian Setup
Check http://wiki.debian.org/
boot: expert Primary network interface: eth0: ADMtek NC100 Network Everywhere Fast Ethernet 10/100 DHCP single partition Install the kernel linux-image-2.6-686 Debian mirror: France - fr.debian.org Use non-free software Choose software to install: Desktop environment Web server SQL server (forgot to do that one!) Standard system
BuGLe setup on Debian
- Install NVIDIA drivers: http://wiki.debian.org/NvidiaGraphicsDrivers
- Install packages libgtkglext1-dev and nvidia-glx-dev
mkdir ~/.bugle cp ~/bugle-0.0.20070217/doc/examples/filters ~/.bugle
Run bugle:
BUGLE_CHAIN=trace LD_PRELOAD=/usr/local/lib/libbugle.so glxgears
Look at /tmp/bugle.log
Debugger from command line and debugger with GUI:
gldb glxgears gldb-gui glxgears
VI setup
Install package vi-gtk Edit your ~/.vimrc
colorscheme torte
Create a plugin directory if it does not exist:
mkdir ~/.vim mkdir ~/.vim/plugin
Download the a.vim into the plugin directory
http://www.vim.org/scripts/script.php?script_id=31
Restart gvim.
VI Convert tabs to spaces (copied from http://www.gammon.com.au/smaug/vi.htm)
Type a VI command using ':set'
Set tabs to every 2 characters :set ts=2 Convert tabs to spaces in future :set et Do not expand tabs :set noet Fix existing tabs (convert to spaces) :%retab Show tabs visually, and end-of-lines :set list Do not show tabs and end-of-lines :set nolist
Or add those commands to your ~/.vimrc
set textwidth=78 "wrap lines longer than this length set tabstop=2 "tabs stops every 2 characters set shiftwidth=2 "size of a tab set expandtab "tabs to spaces
Building CMake on Debian
Install curses
apt-get install curses5-dev
Debian package for dos2unix
apt-get install tofrodos