Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use scripts to improve install process for Lotus Notes Apps
For those of us who must use Lotus Notes (LN) on Mac OS X, it is the bane of our existence. The installer is basically broken, and it's not configured for multi-user setup. But today, all that changes! I have devised a series of procedures to make LN easier to install, and also to make it "multi-user aware." These notes are known to work with LN 7.0.3, but may work with any R7 flavor, and may be able to be altered for 6.5.6, which is the last 6.5x version for OS X.

Some of the problems with the LN installer :
  1. Sometimes LN does not ask for authorization
  2. Running as a non-admin user does not work correctly
  3. Only installs the templates and seed files (referred to as seed files) to the directory of the account that installed it.
The third one is really a problem. The installer assumes that the person who is going to use LN is the same person who installed it, and to install it, you need to be an admin. Read on to see how I fixed this mess...

A successful install of LN consists of three "parts:"
  1. The Notes.app in /Applications
  2. The "seed" files in $HOME/Library/Application Support/Lotus Notes Data
  3. Preferences (Notes Preferences -- plain text dropped by the installer -- and com.ibm.notes.plist -- made by the app after user setup, and safe to ignore).
To get this to work you need to just zip up the app, seeds and prefs, but as with any hint, there are some tricks, too.

Create a folder called Lotus Notes Data, and copy the contents of the seed folder. It is safe to delete modem files and any languages you aren't going to use from the dic folder. Create a custom Notes Preferences file with the following contents:
[Notes]
SharedDataDirectory=/Library/Application Support/Lotus Notes Data
The installed Notes Preferences file is loaded up with lots of junk, mostly things that the application will recreate later during user setup. The new directive will tell the client to look in the specified path for any templates it needs, instead of assuming it's in the path the installer dropped it in -- this is critical for this to work.

Zip up that folder in Terminal, as using the Finder's zip will add a bunch of metadata that will cause the script later on to flake out. Call it ln_current_seed.zip. While in Terminal, also zip up the Notes.app in /Applications and call it ln_current_app.zip. Put these two files up on your favorite internal web server for later deployment.

The next secret is the deployment. To outline:
  1. Download, unzip the files and maint seeds to /Library » Application Support, and the application to /Applications.
  2. Drop Notes Preferences to default user, and maint to /System » Library » User Template » English.lproj » Library » Preferences.
  3. Clean up.
Here's the script to do all that; it contains some error checking:
#!/bin/bash


USER_PREFS="0"
GOOD_SHARED_DIR="0"
MAJ_VER="0"

# get OS kernel version

#VERSION=$(sysctl -n kern.osrelease)
MAJ_VER=$(sysctl -n kern.osrelease | cut -d . -f 1)

if ! [ "$MAJ_VER" -ge "8" ]
then
	echo "Lotus Notes 7 requires Mac OS X 10.4.X or later."
	read -p "Press any key to exit"
	exit
fi

# does the user have LN prefs?
if  [ -e ~/Library/Preferences/Notes\ Preferences ]
then
	USER_PREFS="1"
fi


if [ -e /Library/Application\ Support/Lotus\ Notes\ Data/Notes\ Preferences ]
then
	GOOD_SHARED_DIR="1"
fi




cd /var/tmp

#get files
#need to suppress progress
echo "Retrieving files"
curl -O http://your.web.server/ln_current_app.zip

if  [ "$GOOD_SHARED_DIR" -ne "1" ]
then
	#Cleanup bad setup
	sudo rm -rf /Library/Application\ Support/Lotus\ Notes\ Data
	#get files
	curl -O http://your.web.server/ln_current_seed.zip
	
	#uncompress seeds 
	echo "Installing templates"
	unzip -o ln_current_seed.zip -d /Library/Application\ Support/
	
	echo "Correcting permissions"
	sudo chmod -R 755 /Library/Application\ Support/Lotus\ Notes\ Data
fi


#drop prefs for all new users
echo "Installing multi-user prefs for new users"
sudo mkdir /System/Library/User\ Template/English.lproj/Library/Application\ Support/Lotus\ Notes\ Data
sudo cp -f /Library/Application\ Support/Lotus\ Notes\ Data/Notes\ Preferences /System/Library/User\ Template/English.lproj/Library/Preferences/Notes\ Preferences

#drop app & fix perms
echo "Installing Application"
unzip -o ln_current_app.zip -d /Applications/
echo "Correcting permissions and ownership"
sudo chown -R root:admin /Applications/Notes.app/
sudo chmod -R 775 /Applications/Notes.app/

#cleanup
echo "Cleaning up"
rm ln_current_app.zip
rm ln_current_seed.zip

exit


#drop prefs for current user
if [ "$USER_PREFS" -ne "1" ]
then
	echo "Dropping multi user prefs for current user"
	mkdir ~/Library/Application\ Support/Lotus\ Notes\ Data
	cp /Library/Application\ Support/Lotus\ Notes\ Data/Notes\ Preferences ~/Library/Preferences/Notes\ Preferences
	echo "Launch the Notes application and preceed with normal configuration."
fi

read -p "Press any key to exit"
exit
This is great for a brand new deployment, because new users will get the files they need to just run the app and you (the tech) can do the setup. But if you are putting this out on a system in which users already exist, you need also run the following script. This will prep the profile for the currently logged in user.
#!/bin/bash

USER_PREFS="0"
GOOD_SHARED_DIR="0"
MAJ_VER="0"

# get OS kernel version

#VERSION=$(sysctl -n kern.osrelease)
MAJ_VER=$(sysctl -n kern.osrelease | cut -d . -f 1)

if ! [ "$MAJ_VER" -ge "8" ]
then
	echo "Lotus Notes 7 requires Mac OS X 10.4.X or later."
	read -p "Press any key to exit"
	exit
fi

# does the user have LN prefs?
if  [ -e ~/Library/Preferences/Notes\ Preferences ]
then
	USER_PREFS="1"
fi


if [ -e /Library/Application\ Support/Lotus\ Notes\ Data/Notes\ Preferences ]
then
	GOOD_SHARED_DIR="1"
fi


if  [ "$GOOD_SHARED_DIR" -ne "1" ]
then
	echo "Lotus Notes is not yet set up correctly. Contact CSS."
	echo "ERROR - Shared directory not set up"
else

	echo "Multi user setup appears correct"
	
	#drop prefs for current user
	if [ "$USER_PREFS" -ne "1" ]
	then
		echo "Dropping multi user prefs for current user"
		mkdir ~/Library/Application\ Support/Lotus\ Notes\ Data
		cp /Library/Application\ Support/Lotus\ Notes\ Data/Notes\ Preferences ~/Library/Preferences/Notes\ Preferences
		defaults write com.apple.dock persistent-apps -array-add '<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Notes.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>'
		killall -HUP Dock
		echo "Launch the Notes application and preceed with normal configuration."
	fi
fi

read -p "Press any key to exit"
exit
Notes:
  • Replace http://your.web.server with the path to where you stored the LN files on your own server.
  • Both scripts in their current state must be sourced.
  • The installer script must be run as superuser (sudo).
  • The user script must be run as the user intending to use LN.
[robg adds: I haven't tested this one. Please note there are some sudo rm -rf... commands in the scripts -- please triple-check the code before using!]
    •    
  • Currently 2.75 / 5
  You rated: 3 / 5 (4 votes cast)
 
[11,535 views]  

Use scripts to improve install process for Lotus Notes | 5 comments | Create New Account
Click here to return to the 'Use scripts to improve install process for Lotus Notes' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use scripts to improve install process for Lotus Notes
Authored by: jerobins on Nov 20, '08 08:26:26AM
This is the sole reason why VirtualBox exists.

http://www.virtualbox.org/

---
James E. Robinson, III
http://blog.robinsonhouse.com/

[ Reply to This | # ]

Use scripts to improve install process for Lotus Notes
Authored by: MrLint on Nov 20, '08 12:57:31PM

Well a VM is great and all but 1) its useless on PowerPC Macs. 2) Mac users arent going to typically pop for a Windows license 3) As bad as LN is, I'm not big on trying to teach Mac users how to use a broken email program *in windows*, particularly when they need to attact or detach files.



[ Reply to This | # ]
There is nothing wrong with the standard install process for Lotus Notes
Authored by: rbsandkam on Nov 20, '08 06:40:53PM

My experience with Lotus Notes 7.03 has been very normal, and I have found that nothing unusual or non-standard is necessary to install, configure, and run Lotus Notes on Mac OS X. Even for multiple users.

The installer is not broken. It runs fine every time, without problems. I have performed several hundred installs, under both 10.4 and 10.5.
The installer *will* prompt you for admin rights during the installation, but I rarely run an installer without being prompted for admin credentials. If I wasn't prompted for them, then I would be worried.

I have never had the installer not prompt me for administrator credentials. It does so, and upon entering them, the installer proceeds normally, just like every other installer I have ever run under Mac OS X.

I have never had any trouble running the Lotus Notes installer under a Standard (non-admin) account. It will prompt you for valid administrator credentials, but once you enter them the installer proceeds normally, just like every other installer I have ever run under Mac OS X.

It is true the installer only installs the "seed" files into the Library of the account from which you are running the installer.

*** But, you can run the installer again, under as many other accounts as you wish***

Running the installer again under other accounts will place the necessary "seed" files for that account, and does not effect the Lotus Notes configuration that has been performed in previous accounts.

So, the procedure I use for installing Lotus Notes is this:
log in to first user account.
run installer.
launch notes and perform notes account configuration
log in to second user account.
run installer.
launch notes and perform notes account configuration
repeat for as many users as necessary.

I recognize that the scripts presented in this hint can bring some automation to the process, and that is great to know about.
But, I felt that the tone of the post was quite misleading.

I have found the Notes installation process to be quite standard for a Mac OS X application, in every respect. It uses the standard Mac OS X installer routines (including prompting you for admin credentials). It places it's support files in ~/Library/Application Support (even Adobe doesn't do that). And it respects the multi-user environment of Mac OS X (a welcome change from the 6.5.x client, and something that can not be said of the Windows client - to the best of my knowledge).

It would be better if Notes automatically installed the "seed" files, when launched in an account and they are found to be missing. But the fact that it does not do this is hardly indicative of a poorly behaved, non-standard application. I see this kind of thing all the time, with all kinds of applications.

--
Bob Sandkam
MacOS
Client Support/Server Administration/Application Specialist/Database Management/Cable Wrangler
VCUarts Computer Center
School of the Arts
Virginia Commonwealth University



[ Reply to This | # ]
Use scripts to improve install process for Lotus Notes
Authored by: repro on Nov 20, '08 11:54:13PM

I agree with rbsandkam, the Notes installer is not broken. I have made several hundred installations over the past few years and have been met with very few problems. If you would like to make a multiple user installation, just follow the first two steps and change the third.

A successful install of LN consists of two"steps:"

1. Run the Notes installer
2. Copy the "seed" (I call it the Notes Data folder) to the same location in the "User Template" folder and when a new user is created, Notes is ready to run for every new user added to the machine.



[ Reply to This | # ]
Use scripts to improve install process for Lotus Notes
Authored by: MrLint on Nov 21, '08 12:39:05PM

I'm sorry but obviously I disagree with you. I *have* had problems, repeatedly. Particularly when upgrading from 6.5.x. As for the being broken, while its not so much broken in the sense that I guess it does what it intends to do. It just does things wrong.

1) I can't think of any other app that the admin would install, that the user would need to run the installer again to make it functional. And as LN falls into the 'Groupware' category of software, this problem is even more stark.

2) The installer has no multi-user setup. I don't know why is was designed this way. But it's not on parity with the installer for windows of the same version.

3) The mere fact that the "SharedDataDirectory" directory works on the Mac, but the setup has no way to leverage it (which is does for 7.0.x on windows), seems to indicate that it wasn't intended to be used by more than one person per machine.

4) As LN create the needed databases from the template files and doesn't actually change the templates in anyway, putting a full set up templates, (including foreign language dictionaries and modem definition scripts) in each user's profile, [more than 135M] is just bad design. Design this bad I consider broken.

5) This setup can be used to drop/update LN via ssh. You wouldn't have to visit the user. It also gets around the installer script OS version check. (7.0.2 would not install on 10.5)

As a note, 6.5.4 of LN for windows had a multi user install setup and honors the SharedDataDirectory.



[ Reply to This | # ]