SUNWgnome-panel-gnome-about.ksh revision 9464
## This script wraps GNOME About, which is called by GNOME Session the first ## time that a user logs in, and does some other iniital login tasks: ## - Creates a launcher on the user's Desktop to open the Solaris Developer ## - Launchs Firefox with the start page. # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # See the License for the specific language governing permissions # and limitations under the License. # When distributing Covered Code, include this CDDL HEADER in each # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. ## Figure out the base installdir # /bin tends to be a symbolic link, so follow it and do calc basedir off ## Define some utility functions # Checks if it's the first time the user is running gnome-about if [ -x "${GCONFTOOL}" ]; then test "${value}" != "true" if [ -x "${GCONFTOOL}" ]; then # Looks for the developer guide HTML file. # NOTE: First checks if a localised version exists, otherwise picks the typeset LANG_FILE="${SOLDEVEX_ROOT}/${LANG}/${SOLDEVEX_FILE}" if [ -r "${LANG_FILE}" ]; then elif [ -r "${DEFAULT_FILE}" ]; then # Attempts to create an launcher on the user's desktop for a pointer to the if [ -r "${XDG_DESKTOP_FILE}" ]; then if [ ! -w "${USER_DESKTOP_DIR}" ]; then mkdir "${USER_DESKTOP_DIR}" || return 1 # If fails return if [ ! -e "${USER_DESKTOP_FILE}" ]; then cp "${XDG_DESKTOP_FILE}" "${USER_DESKTOP_FILE}" || return 1 # If fails return # Launch firefox for the given HTML File if [ -x "${FIREFOX}" -a -n "${1}" ]; then ${FIREFOX} "${1}" & # Needs to be run in the background # Check if the user is NOT root. # Needs a little more work to get the UID. if [ -n "${USER_ID}" -a "${USER_ID}" -ne 0 ]; then # See if we have the Solaris Developers Guide somewhere. # Try copy the Desktop entry over to users Desktop dir. # Now try to launch Firefox with Dev Guide, but not for root # Now that we've finished, don't forget to remember this. # Finally, just run the GNOME About application, with params, if any.