Installing single-user MetaEdit+ on Unix for multiple users

Although MetaEdit+ has a multi-user version specifically designed for multiple simultaneous users, in some situations - for instance teaching - it may be more appropriate to have a single-user version for each user. Note that the evaluation or Linux Non-Commercial licenses do NOT allow this: educational institutions should contact MetaEdit+ to obtain an appropriate license.

To use MetaEdit+, each user should have read and execute access to the MetaEdit+ directory, its visual file, and read access to its mep4mwb.im file. By default, this is already so. Each user should make a copy of the metaedit, metahelp, metarun, metaedit.ini, artbase.roo and database files under their own home directory (e.g. in a 'metaedit' directory). Users should always run MetaEdit+ with this directory as their current directory.

As root

  1. cd /usr/local/mep4mwb
  2. Start MetaEdit+ with ./metaedit
  3. Change path settings (press 'down arrow' button, Options, Paths page)
    1. Manual root: /usr/local/mep4mwb/manuals
  4. Press 'Save as Defaults', and exit

As each user

Each student should then make a copy of the MetaEdit+ scripts, metaedit.ini file, artbase.roo file and relevant database directory in a directory under their home directory, setting the permissions so that other users cannot accidentally log in. You can run the lines below, or save it to a metasetup script and run it with source metasetup (the source is needed to make the path setting apply in the current shell).

#!/bin/sh
# Copy the per-user files from the installation directory mesource 
# to the current user directory metarget.

mesource=${METAHOME:-/usr/local/mep4mwb}
metarget=~/metaedit

mkdir $metarget

cp $mesource/{artbase.roo,metaedit,metarun,metahelp,metaedit.ini} $metarget
cp -R $mesource/{reports,demo} $metarget

chmod -R go-rwx $metarget
export PATH=$PATH:$metarget

Now each user can start MetaEdit+ by changing to their ~/metaedit directory, and typing metaedit.

Variations

If you use a windowing manager that supports it, you could make a shortcut that starts MetaEdit+ in the right directory, even checking and if necessary installing MetaEdit+ with a script similiar to the above one.

If you want more security and control, one way is to make a group, metaedit, and make all MetaEdit+ users members of this group. You can then make the group the owner of the shared files, and remove permissions from other users. Do this after installation and before the users make their copies.

  1. Add a group 'metaedit' to /etc/group, with every MetaEdit+ user (including root) as a member (users currently logged in must log out and in again to see this change)
  2. cd /usr/local/mep4mwb
  3. chown -R .metaedit .
  4. chmod -R o-rwx .

If all users execute a shared login script, e.g. /etc/.bashrc, it should be possible to use the 'groups' command to see if they are members of the 'metaedit' group, and if so add $HOME/metaedit to their path.

Backups of each user's databases can be made centrally with a scheduled process (e.g. cron) that checks the members of the metaedit group, and for each user backs up their metaedit directory (or then just the databases there: each subdirectory tree containing a manager.ab file). Backups should only be taken when the user is not logged in.