-Shaun
K.S. Bhaskar wrote:
Ben --
The best advice I was ever given when learning to play pool was to call my shots, "Watch this." How could I possibly live up to the expectations set by a statement like "Your best information will be coming from Bhaskar soon?" 8-]
Shaun --
If what you are trying to do is create a user who can do nothing on the system other than run VistA, what Ben has is an excellent example of how to set up a user who does nothing other than run VistA. As soon as s/he logs in, s/he runs VistA, and as soon as s/he exits VistA, s/he is logged off the computer.
The only suggestion I would have is to trap signals and prevent the user from getting to the shell, with something like
trap exit SIGINT SIGTERM SIGQUIT SIGHUP
and prevent a SIGSUSP with something like
stty susp \000
Put these right at the beginning of the shell script.
GT.M by itself is not designed to be a login shell, and I am amazed that it even partially worked for you.
I am not sure I like Ben's choice of /usr/local/gtm/log for $gtm_log. I would keep /usr/local/gtm and everything under it unchanged, and point $gtm_log somewhere else, such as /var/log/gtm or /var/log/gtm/<version> (remember to create it first with mkdir).
If you are concerned about users pressing ^C when running VistA, the recommended way is to trap it in M application code. If this is not permitted, then instead of starting VistA with mumps -run ^ZU, start it with mumps -run ^xyz where xyz.m is something like:
xyz Use $P:(NoCEnable) Do ^ZU Quit
If between Ben and me we have not answered your question, please ask it again.
Regards -- Bhaskar
On Mon, 2004-10-11 at 18:13, Benjamin Irwin wrote:
Your best information will be coming from Bhaskar soon, but I have included my start up information in the following two files.
I have a user named "vista". The .bash_profile follows: ---------------------------------------------------------------
# .bash_profile
# Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH unset USERNAME
/usr/local/gtm/VISTA exit
---------------------------------------------------------------
Note the "exit" at the very end of the ".bash_profile" this is the Unix command that is performed when the user is done running the script "/usr/local/gtm/VISTA".
The "/usr/local/gtm/VISTA" script follows. ---------------------------------------------------------------
#!/bin/bash # export gtm_dist=/usr/local/gtm export gtm_log=/usr/local/gtm/log export gtmgbldir=/usr/local/gtm/vista/g/mumps.gld export gtm_vista=/usr/local/gtm/vista export PATH=$PATH:$gtm_dist # export gtmroutines="$gtm_dist($gtm_dist) /home/biskate/swa(/home/biskate/swa) $g tm_vista/o($gtm_vista/r/A $gtm_vista/r/B $gtm_vista/r/C $gtm_vista/r/D $gtm_vist a/r/E $gtm_vista/r/F $gtm_vista/r/G $gtm_vista/r/H $gtm_vista/r/I $gtm_vista/r/J $gtm_vista/r/K $gtm_vista/r/L $gtm_vista/r/M $gtm_vista/r/N $gtm_vista/r/O $gtm _vista/r/P $gtm_vista/r/Q $gtm_vista/r/R $gtm_vista/r/S $gtm_vista/r/T $gtm_vist a/r/U $gtm_vista/r/V $gtm_vista/r/W $gtm_vista/r/X $gtm_vista/r/Y $gtm_vista/r/Z $gtm_vista/r/_)" # mumps -run ^ZU
---------------------------------------------------------------
The last line in this script starts MUMPS and runs the ^ZU routine. Any exit from the VISTA software (^ZU) will cause the script to end and return to the calling Unix startup script. That causes the Unix "exit" command to run and ends the users Unix session returning the user to the Unix username and password.
Hope this helps.
Ben
***************************************************************************
This electronic mail transmission contains confidential and/or privileged information intended only for the person(s) named. Any use, distribution, copying or disclosure by another person is strictly prohibited.
***************************************************************************
NOTE: Ce courriel est destine exclusivement au(x) destinataire(s) mentionne(s) ci-dessus et peut contenir de l'information privilegiee, confidentielle et/ou dispensee de divulgation aux termes des lois applicables. Si vous avez recu ce message par erreur, ou s'il ne vous est pas destine, veuillez le mentionner immediatement a l'expediteur et effacer ce courriel.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Hardhats-members mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hardhats-members