Tuesday, April 1, 2008

gtm environment variables

I'm using GT.M on Ubuntu.
Just been setting up the environment variables.
I've unzipped / untared the distro to a new folder called '/gtm/dist'.
I have a new empty directory set aside for globals at '/gtm/gbl'.
I have a new empty directory set aside for routines at '/gtm/rou'.
Basically I don't want to have to setup the 4 GT.M environment variables from a terminal before launching a mumps prompt.
Instead I've defined them in my user profile.
At a termial I've open my profile:


user@machine:~$ vim ~/.profile


At the bottom of the file I added the following lines:



gtm_dist=/gtm/dist/
export gtm_dist
gtmgbldir=/gtm/gbl/mumps.gld
export gtmgbldir
gtm_principal=/gtm/filename
export gtm_principal
gtmroutines=". $gtm_dist /gtm/rou/"
export gtmroutines
EDITOR=/usr/bin/vim
export EDITOR


Save the file. Logout of Ubuntu and log back in.


    *** Warning ***
The first time I did this I missed out the closing quotation character.
This prevented my normal logon from working as my profile was then broken.
However if you get the same issue choose the emergency / safe mode startup option in Ubuntu and you can then edit the specific profile for example:


root@machine:~$ vim /home/[username]/.profile

NB: In the above substitute '[username]' with your normal Ubuntu login name.
Correct the profile.
Save and restart Ubuntu.

No comments: