SUNWgnome-panel-gnome-about.ksh revision 10931
17400N/A## This script wraps GNOME About, which is called by GNOME Session the first 17400N/A## time that a user logs in, and does some other iniital login tasks: 17400N/A## - Creates a launcher on the user's Desktop to open the Solaris Developer 17400N/A## - Launchs Firefox with the start page. 17400N/A## - For first logon by root launches users-admin tool 17400N/A# The contents of this file are subject to the terms of the 17400N/A# Common Development and Distribution License, Version 1.0 only 17400N/A# (the "License"). You may not use this file except in compliance 17400N/A# See the License for the specific language governing permissions 17400N/A# and limitations under the License. 17400N/A# When distributing Covered Code, include this CDDL HEADER in each 17400N/A# If applicable, add the following below this CDDL HEADER, with the 17400N/A# fields enclosed by brackets "[]" replaced with your own identifying 17400N/A# information: Portions Copyright [yyyy] [name of copyright owner] 17400N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 17400N/A# Use is subject to license terms. 17400N/A## Figure out the base installdir 17400N/A # /bin tends to be a symbolic link, so follow it and do calc basedir off 17400N/A## Define some utility functions 17400N/A# Checks if it's the first time the user is running gnome-about 17400N/A# Looks for the developer guide HTML file. 17400N/A# NOTE: First checks if a localised version exists, otherwise picks the 17400N/A elif [ -r "${DEFAULT_FILE}" ]; then 17400N/A# Attempts to create an launcher on the user's desktop for a pointer to the 17400N/A if [ -r "${XDG_DESKTOP_FILE}" ]; then 17400N/A if [ ! -w "${USER_DESKTOP_DIR}" ]; then 17400N/A mkdir "${USER_DESKTOP_DIR}" || return 1 # If fails return 17400N/A if [ ! -e "${USER_DESKTOP_FILE}" ]; then 17400N/A cp "${XDG_DESKTOP_FILE}" "${USER_DESKTOP_FILE}" || return 1 # If fails return 17400N/A# Launch firefox for the given HTML File 17400N/A if [ -x "${FIREFOX}" -a -n "${1}" ]; then 17400N/A if [ -x "${USERS_ADMIN}" ]; then 17400N/A# Check if the user is NOT root. 17400N/A # 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.