Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!stanford.edu!agate!usenet.ins.cwru.edu!ncoast!nshore!steve From: steve@nshore.ncoast.org (Stephen J. Walick) Newsgroups: comp.mail.elm Subject: Re: default elmrc? Message-ID: <1991Mar18.211537.20993@nshore.ncoast.org> Date: 18 Mar 91 21:15:37 GMT References: <1991Mar14.013734.2473@agate.berkeley.edu> <1991Mar14.040124.29379@DSI.COM> <1991Mar14.122727.11861@cs.dal.ca> Reply-To: steve@nshore.ncoast.org (Stephen J. Walick) Followup-To: comp.mail.elm Organization: Nshore Hacking and Salvage Lines: 261 As quoted from <1991Mar14.122727.11861@cs.dal.ca> by silvert@cs.dal.ca (Bill Silvert): +--------------- | In article <1991Mar14.040124.29379@DSI.COM> syd@DSI.COM writes: | >et@ocf.berkeley.edu (Eric Thompson) writes: | >>When people who haven't used ELM before type "elm", it asks if it should | >>set up their .elm/ and Mail/ directories for them. They also get a default | >>elmrc. | >No, they don't get a default elmrc. That file is only created when | >the user does a save of the options from the options screen. | > | >>I know that some of the defaults for this standard elmrc come from | >>Configure, and I'm not worried about those. The other settings, however, | >>don't seem to be settable to a default anywhere. | >Their is no global elmrc, but the docs (especially the config doc) | >talk about changing the code for changing the defaults. A global | >elmrc has been discussed, but is not on the schedule, for now its | >up to the installed to change those in the code. | | I think that Eric's idea is excellent. This would be very useful for | systems with lots of novice users. Using code that is already present | in ELM it sould be possible to set up an elmrc file that is a copy of a | default one stored by the system administrator, but with the name and | paths corrected with information from the passwd file. | | I've been meaning to set up a script to do this, but give it a thought? +--------------- I just passed along a script that I had written some time ago and use on a rather regular basis. As I was replying to Eric ('E-mail'), I got another batch of "news" from my feed with had more followups to his posting, so I thought I'd post that reply for those interested.... ** [ ...much preliminary text omitted... ] ** +--------------- | Otherwise I'm going to have to pre-create everyone's .elm/ and elmrc so | they get decent default options... bleech. +--------------- I have asked all users (our 'shell' users) to initiate the 'Elm' utility for themselves which, as they will see, will create two sub-directories for themselves, viz., < $HOME/.elm > and < $HOME/Mail >. I inform them that the < $HOME/Mail > directory will be deleted (I see it as useless junk) and that their 'Mail' directory will be < $HOME/.elm >. I also ask them to press the `` o '' key ( for the yet invisible 'o)ptions' to them ) to create the < ~/elmrc > file. I also tell them that this file, as well as some other parameters will be changed for them as soon as I can get around to it. I show them, in the same set of instructions, a "sample" < $HOME/.elm/elmrc > that will be used to replace the basic < $HOME/.elm/elmrc > file that they had just created.... << begin edited "$HOME/.elm/elmrc" file >> ------------------------------------------ # # .elm/elmrc - options file for the ELM mail system # # Saved automatically by ELM 2.3 PL11 for [user_name] # # For yes/no settings with ?, ON means yes, OFF means no # where to save calendar entries calendar = $HOME/.Agenda ** [ ...more text omitted... ] ** << end edited "$HOME/.elm/elmrc" file >> ------------------------------------------ ...And then, after a "new user" has created their new < $HOME/.elm > directory, I run this script -- << begin script that the "sysop" can run >> ------------------------------------------- : use /bin/sh # usage: [script] [user_real_name] # MSG0="\n[script]: must run in the foreground by root\n" sysop="`who am i | awk '{print $1}'`" [ "$sysop" != "root" -a "$sysop" != "" ] && { echo "$MSG0"; exit 1; } MSG1="\nSorry -- no such user account \"$*\"; check < /etc/passwd > usage: [script] [user_real_name]\n" MSG2="\nSorry -- the file < \$HOME/.elm/elmrc > not yet created usage: [script] [user_real_name]\n" NAME=$* [ ! "$NAME" ] && { echo "$MSG1"; exit 1; } grep "$NAME" /etc/passwd >/dev/null 2>&1 [ $? -ne 0 ] && { echo "$MSG1"; exit 1; } FILE="`grep "$NAME" /etc/passwd | cut -d: -f6`/.elm/elmrc" [ ! -f $FILE ] && { echo "$MSG2"; exit 1; } XDIR="`grep "$NAME" /etc/passwd | cut -d: -f6`/Mail" EDIR="`grep "$NAME" /etc/passwd | cut -d: -f6`/.elm" [ -d $XDIR ] && rmdir $XDIR [ $? -ne 0 ] && { mv $XDIR/* $EDIR; rmdir $XDIR; } copy -om ${FILE} ${FILE}.old echo "\ # # .elm/elmrc - options file for the ELM mail system # # Saved automatically by ELM 2.3 PL11 for $NAME # # For yes/no settings with ?, ON means yes, OFF means no # where to save calendar entries calendar = \$HOME/.Agenda # what editor to use (\"none\" means simulate Berkeley Mail) editor = /bin/vi # the character to use in the builtin editor for entering commands escape = ~ # The full user name for outbound mail fullname = $NAME # where to save received messages to, default file is \"=received\" receivedmail = \$HOME/.elm/last_read_mail # where to save my mail to, default directory is \"Mail\" maildir = \$HOME/.elm # where to place temporary files, default directory is \"/tmp\" tmpdir = /tmp/ # program to use for displaying messages ('builtin' is recommended) pager = builtin+ # prefix sequence for indenting included message text in outgoing messages... prefix = >_ # how to print a message ('%s' is the filename) print = /bin/cat %s | /usr/bin/lp # where to save copies of outgoing mail to, default file is \"=sent\" sentmail = =sent # The shell to use for shell escapes shell = `grep \"$NAME\" /etc/passwd | cut -d: -f7` # local \".signature\" file to append to appropriate messages... localsignature = \$HOME/.loc.signature # remote \".signature\" file to append to appropriate messages... remotesignature = \$HOME/.rem.signature # do we want dashes above signatures? (News 2.11 compatibility and convention) sigdashes = ON # how to sort folders, \"Mailbox\" by default sortby = Reverse-Mailbox # should the default be to delete messages we've marked for deletion? alwaysdelete = ON # should the default be to store read messages to the \"received\" folder? alwaysstore = ON # should the default be to keep unread messages in the incoming mailbox? alwayskeep = ON # should we use the \"->\" rather than the inverse video bar? arrow = OFF # should the message disposition questions be displayed(ON) or # auto-answered(OFF) with the default answers when we resync or change folders? ask = ON # would you like to be asked for Carbon-Copies information each msg? askcc = ON # attribution string for replies ('%s' is the author of original message) attribution = # automatically copy message being replied to into buffer? autocopy = ON # threshold for bouncing copies of remote uucp messages... # zero = disable function. bounceback = 0 # save a copy of all outbound messages? copy = ON # save outbound messages by login name of sender/recipient even if the # associated folder doesn't already exist? forcename = ON # do we want to be able to mail out AT&T Mail Forms? forms = OFF # should we keep folders from which all messages are deleted? keepempty = ON # are we running on an HP terminal and want HOME, PREV, NEXT, etc...? keypad = OFF # should we display the three-line 'mini' menu? menu = ON # when using the page commands (+ - ) change the current # message pointer...? movepage = OFF # just show the names when expanding aliases? names = ON # when messages are copied into the outbound buffer, don't include headers? noheader = OFF # start up by pointing to the first new message received, if possible? pointnew = ON # prompt for a command after the external pager exits? promptafter = ON # emulate the mailx message increment mode (only increment after something # has been 'done' to a message, either saved or deleted, as opposed to # simply each time something is touched)? resolve = ON # save messages, incoming and outbound, by login name of sender/recipient? savename = ON # are we running on an HP terminal and want softkeys available too? # (this implies \"keypad=ON\" too) softkeys = OFF # Set the main prompt timeout for resynching... timeout = 60 # display message title when displaying pages of message? titles = ON # are we good at it? 0=beginner, 1=intermediate, 2+ = expert! userlevel = 2 # tell us about addresses to machines we can't directly get to? warnings = ON # enable the weedout list to be read? weed = OFF # what headers I DON'T want to see, ever. weedout = \"*end-of-user-headers*\" " >${FILE} exit << end script that the "sysop" can run >> ------------------------------------------- To me, this makes it all very simple!! Edit the above as you wish -- you're on your own from here! Regards.... Steve Walick -- Stephen J. Walick, Asst Sysop of the < XBBS > program at NCoast.ORG {uunet|backbone}!ncoast.org!nshore!steve nshore!steve@ncoast.org