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