Skip to content

Author: jweisber

Differencing two similar text files

There is a faily brain-dead unix utilitiy for differencing two files:

diff file1 file2

There is a lovely graphical version on linux called kompare. i highly recommend it (jmw).

Its output can be exported as text to send to distant colleagues. Furthermore the following diff command gives similar (text) output – much to be preferred to raw diff:

diff -U 3 -dHrN — file1 file2

(the 3 means it places 3 lines of context around the change to help you visualize it)

–Joel

Thuban reboot issues

Thuban as the server, is more sensitive to rebooting than other machines. Therefore do not reboot thuban unless absolutely necessary.

If it is rebooted, be sure that it has exported all the shared disks for use on other astro net clients. To check that this has successfully happened, log in to another desktop and try cd-ing to various shared disks like /data/psrdata and /docs and so on. If thuban has NOT mounted these disks for sharing, then James Fuller says to enter the following command on thuban:

(as root):# /usr/sbin/exportfs -a

–Joel

supermongo (sm) plotting software

this nice simple plot program is at /usr/share/astro/sm

if you put /usr/share/astro in your path, all you have to do is type sm

list device tells you what graphics devices are set up.  i recommend x11 or postscript, for screen or paper, respectively.

IDL path; IDL help; unix inside IDL

the following are examples of useful commands inside idl:

print, !path will print out the value of the idl path variable

? will start up help browser

?size goes to help browser to find fnc size (it’ll search for closest name to that)

help, /source brings up compiled procedures, compiled functions

help, pola tells you a lot about the variable pola

help, hdr,/st ditto on structure called hdr

print, size(pola) gives a buncha numbers which can be used by idl or deciphered by ?size
doc_library, ‘readcol’ gives documentation of nonnative fncs, like unix man

$ls executes unix ls command

Also see post entitled idl documentation and help commands from drew

IDL customization for Arecibo and GBT: juldaytoLMST.pro

we found that there were two incompatible versions of juldatetoLMST.pro

one is Phil’s arecibo routine, which defaults to arecibo

one is a GBTidl modification to it that defaults to GBT and that has an optional extra parameter.

in order to avoid future confusion, we renamed each routine so that the right version must
explicitly be called:

juldaytoLMSTarecibo.pro

juldaytoLMSTgbt.pro (in /usr/share/astro/gbtidl/pro/toolbox)

NOTE ADDED JUNE 2008:  NOTE THIS IS A GBTIDL INCOMPATIBILITY,

NOT A GODDARD LIBE INCOMPAT!

pgplot compile and link in fortran or c

there are a variety of scripts to do it in /usr/share/astro

note they have names like pglink.f77 and contain lines bringing in pgplot and x11 libraries:

g77 -fno-backslash -o $1 $1.f   -L/usr/share/astro/pgplot -lpgplot -L/usr/X11R6/lib -lX11 -lGL  -xlist

pgplot plotting routines need user to place a directory in path

In your .cshrc, you must add /usr/share/astro to your path if you want to be able to see
plots on screen with /xwin or /xserv windows, because pgplot has to be able to find the pgxwin server in that directory at execution time. Joel linked the pgxwin server from its home in /uasr/share/astro/pgplot into /usr/share/astro to make it more findable.
eg; in Joel’s .cshrc, one finds
set path = ( . $path /usr/share/astro /usr/share/astro/idlshare/gbtidl/)

uncompress

Joel installed uncompress onto Mirzam.

He got the rpm for “ncompress” at

http://rpm.pbone.net/index.php3/stat/4/idpl/2406147/com/ncompress-4.2.4-31.i386.rpm.html

redhat desktop modification: eg thunderbird internet email

OUT OF DATE as of 2008-11-01.

when thunderbird died, from the redhat applications internet menu, Josh showed Joel how to fix it.

As root on /usr/share/applications, fix mozilla-thunderbird.desktop

In this particular case, I had to change  to

Exec=/usr/bin/thunderbird

Icon=thunderbird.png

Configure astro network client

OUT OF DATE as of 2008-11-01.

OUT OF DATE as of 2008-11-01.

Steps to configure an astronomy department linux client computer.

  1. Install Redhat Enterprise Linux AS 4
  2. Install redhat keys from:
    http://rhn.carleton.edu/pub/RedHat/keys.html
  3. Add line to /etc/hosts
    137.22.6.54 algol.physics.carleton.edu algol
  4. Add to /etc/fstab:
    algol:/home /home nfs defaults 1 1
    algol:/etc/secret /etc/secret nfs defaults 1 1
  5. Add computer’s IP address to Algol’s /etc/exports file and then run:
    /usr/sbin/exportfs -a
    on Algol
  6. Install Carleton RPM for LDAP auth:
    rpm -i –force carletonldapauth-1.00-3.es40+fc2.noarch.rpm
  7. Put mntdrives and umntdrives scripts in /usr/local/bin available on /etc/secret/RPMS/mntdrive_scripts (mntdrives.tar.gz)
  8. Make collab scripts runnable:
    chmod u=rwxs,g=rxs,o=rxs /usr/bin/smbmnt
    chmod u=rwxs,g=rxs,o=rxs /usr/bin/smbumount
  9. cp /etc/secret/RPMS/cron_scripts/redhat_update.cron /etc/cron.daily
  10. /etc/cron.daily/redhat_update.cron
  11. cp /etc/secret/RPMS/cron_scripts/get_account_info.cron /etc/cron.hourly
  12. /etc/cron.hourly/get_account_info.cron
  13. Set up printer for computers in Olin 304 and 311 (see separate “printer setup” post)
  14. test