Home    Search    Reference Manuals    Return   




Initialization of GENSYS




Search Path

The scripts in GENSYS are using an environment variable named $gensys, this variable must point to the directory where the GENSYS programs are installed. So before anything else can be defined in the $HOME/.profile_gensys-file the user must add the following line in $HOME/.profile_gensys-file:

#                                                                                   
 export gensys=<The complete address to the directory where GENSYS is installed>     
#                                                                                   

The $PATH variable must be updated with the $gensys/bin directory. In your file $HOME/.profile_gensys please add the following line:

#                                                                                   
 echo $PATH  | grep $gensys/bin > /dev/null || PATH=$PATH:$gensys/bin
#                                                                                   

Environment variables

In GENSYS the user has the possibility to define a number of environment variables which controls the behavior of the program. Preferable these variables are defined in file $HOME/.profile_gensys. Below is a list of environment variables which GENSYS uses:

gensys
Address to the directory where the Gensys is installed.
gendel
Address to where deleted files shall be moved.
genedit
In environment variable $genedit the user can choose his/hers favorite editor. If variable $genedit is undefined, editor Nedit will be used.
genhomepage
Address to the Users Manual files.
genhtml
Environment variable $genhtml controls which web-browser shall be used when reading the GENSYS manual pages. If variable $genhtml is undefined GENSYS will search for the following web-browsers:
firefox, konqueror and msedge
genverif
Address to Gensys verification directory
genkpf
Address to the directory that keeps common .kpfr files.
gentrc
Address to the directory that keeps common .trax and .trax_wdesign files.
LPDEST
Sets the name of the default printer. On some systems variable $PRINTER is used.
PS1
Sets the command line promter.


Example of a $HOME/.profile_gensys-file.

Please copy the following lines to your $HOME/.profile_gensys-file


# Included from .profile and .bashrc with command:
# test -f ~/.profile_gensys && . ~/.profile_gensys

# On new files, don't set write permission for group and others
umask u=rwx,g=rx,o=rx

#
# User specific aliases and functions
#
 alias cp='cp -i'
 alias grep='grep --color=auto'
 alias egrep='egrep --color=auto'
 alias ls='ls -C --color=auto --quoting-style=shell-escape --time-style=long-iso'
 alias mv='mv -i'
 alias rm='rm -i'
 alias cd..='cd .. && \pwd'
 alias "c=xclip"                          ;# echo "abc123" | c     # Copy  to   XA_PRIMARY
 alias "v=xclip -o"                       ;# echo `v`              # Paste from XA_PRIMARY
 alias "cc=xclip -selection clipboard"    ;# echo "abc123" | cc    # Copy  to   XA_CLIPBOARD
 alias "vc=xclip -o -selection clipboard" ;# echo `vc`             # Paste from XA_CLIPBOARD

#                                                                                                               
#      Defining environment variables for GENSYS                                                                
#                                                                                                               
 export gensys=/opt/gensys/gensys.           ;# Define the address to program GENSYS
 export gendel=/tmp/gensys_trash                 ;# Send deleted files here
 export genhomepage=$HOME/gensys/homepage        ;# Location of Users Manual
 export genverif=$HOME/gensys/verif              ;# Gensys verif directory
 export genkpf=$genverif/kpf/kpfr                ;# Directory for common wheel-rail geometry files
 export gentrc=$genverif/track/ver_data          ;# Directory for common track irregularity files

 echo $PATH  | grep $HOME/bin   > /dev/null || PATH=$PATH:$HOME/bin     ;# Add $HOME/bin to your path
 echo $PATH  | grep $gensys/bin > /dev/null || PATH=$PATH:$gensys/bin   ;# Add $gensys/bin to your path
                                                                                                                
#                                                                                                               
# Set the promter in a xterm-window
#                                                                                                               
 if [ "$TERM" = "linux" ]; then
  export PS1="\[\e[31m\]\u@\H \$? \[\e[0m\]"
 else
  export PS1="\[\e]1;\W\a\e]2;\w\a\e[31m\] \$? \[\e[0m\]"
 fi
 export PROMPT_DIRTRIM=3
                                                                                                                



Pre defined options for the programs in GENSYS

To the scripts in the GENSYS package, many command line options can be given. Values for these options can be stored in a file named gen_conf or .gen_conf. If not a local file can be found, Gensys will look for file $HOME/.gen_conf. If not file $HOME/.gen_conf can be found, Gensys will read file $gensys/bin/gen_conf.


Release numbers

The release number of the GENSYS package is a part of the name of the program, for example: gensys.. The reason for doing so is that several releases of GENSYS can be installed simultaneously. This open up the possibility for different users to run different releases of Gensys in the same computer cluster.