Thursday, November 22, 2007

Gtk2::GLext install

Ok, I wanted to have
gtkglext
gtkglextmm
Gtk2::GLext all installed.
let us get latest one of them all
first two use
./configure --prefix=/usr
to get to right debian locations
then for the last guy
need to edit Makefile.PL
to move line
mkdir 'build', 0777;
above the line for the pod that enables compilation
got 2 errors
unrecognized argument in LIBS ignored: '-Wl, --export-dynamic'
unrecognized argument in LIBS ignored: '-pthread'
then did make
make test
make install

Friday, November 16, 2007

mac os upgrade dual boot setup

Ok I have a dual boot mac g4. i wanted to upgrade to leopard
so i noted that the hard drive partition setup is
/dev/hda1 Apple_partition_map
/dev/hda2 bootstrap yaboot
/dev/hda3 swap
/dev/hda4 Linux / 15.6G
/dev/hda5 Mac OsX 11.8G


so then i booted into new leopard installer disk, wiped out old Tiger, reinstalled from scratch to mac partition
then i did
power on
hold down apple,option, o,f buttons (yes 4 buttons)
then at > prompt type
>boot hd:2,yaboot

here 2 is /dev/hda2 ie yaboot bootstrap partion
then type
>Linux
then

Login to linux system
run as root
fdisk -l
and look to what the macosx partition is

ON my system it changed from /dev/hda5 to /dev/hda6!!! with the new install, wasting a good 120M of space on the drive...

Then edit /etc/yaboot.conf to set
macosx=/dev/hda6 or whatever

then as root run
ybin
this will reinitialize the boot sector to boot to yaboot and
choose Linux as default or Leopard.

Then install OsiriX to MacOsX partition :)

ecb and semantic-cache files

i may want to get rid of ecb, but while it is on my system:

Emacs and semantic.cache

How can i prevent contaminating each directory with a file semantic-cache?
Set semanticdb-default-save-directory to a directory, by putting the following in your emacs init file (usually .emacs in your home directory):

(setq semanticdb-default-save-directory “~/.semantic”)
(replace ~/.semantic with a different directory, if you wish.)

From http://ecb.sourceforge.net/docs/FAQ.html

Saturday, November 3, 2007

browse over ssh

ssh -ND 8080 you@yourserver.com
sign in
then set up firefox to use socks host : localhost 8080
and you are done.

need to also set up

Set your proxy server to resolve DNS requests instead of your computer; in Firefox's about:config area, set network.proxy.socks_remote_dns = true.

then you cant be traced by your dns queries.....

Thursday, November 1, 2007

emacs commands

1. how to turn on syntax hylighting

M-X font-lock-mode

2. how to indent code?

C-M-\


3. how to comment out code in region? select region then
M-x comment-region
M-x uncomment-region

4. comment on line
M- ; (ie alt-; or esc then ;) creates a comment on the line
M-j then creates another comment line
remove comment on line ??



4. To move the cursor to a specific line:
M-x goto-line
when prompted in the minibuffer
Goto line:

Friday, October 26, 2007

pgplot5

Just for posterities sake, in case you need to compile pgplot on debian,
the makefile created does not point to the right location for
the includes for
pndriv.o : /usr/include/png.h /usr/include/pngconf.h /usr/include/zlib.h /usr/include/zconf.h

so you correc them to that.
also the problem with tcl and tk is due to the lack of
symlinks
libtk.so -> libtk8.5.so.0
and
libtcl.so -> libtcl8.5.so.0
in
/usr/lib/

once i added them the compilation was fine.

however i then found pgplot in non-free repository so this is not neccesary.

pdl and perl and pgplot5 and dh-install-perl

To use PDL the perl data language with graphics, you need to

1) install pgplot5 the plotting package ( Fortran! amazing)
which is located in debian non-free.

apt-get install pgplot5

2) install PGPLOT, the cpan module for working with pgplot5
it is currently not in Debian (it fell out a while ago... :( ).

Thus you need to download the PGPLOT module
from CPAN.

But we want a debian package for it!
It will be called libpgplot-perl_2.20-1_amd64.deb

so:

apt-get install dh-install-perl

this will enable us to make a debian package for PGPLOT

then create a directory to work in

mkdir libperl-pgplot
cd libperl-pg-plot
dh-install-perl --cpan PGPLOT
then
dh-install-perl --build PGPLOT-2.20
then
dpkg -i libpgplot-perl_2.20-1_amd64.deb

Of course you will have gotchas along the way :)

When dh-install-perl makes an error in the build,
say because you are missing say g77 or
libextutils-f77-perl,

so you have to delete the debian created directory
rm -rf PGPLOT-2.20/debian
so that you can recompile the binaries.
then you run
dh-install-perl --build PGPLOT-2.20
again.

Of course you could just do
dh-install-perl --install --cpan PGPLOT
which should do it all, but is fun to do it step by step.