2006-12-27 12:49:58 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2007-04-06 00:16:55 +02:00
|
|
|
# This is not the original gnome-session but a start script
|
2011-07-07 13:41:42 +02:00
|
|
|
# to install some preconfiguration for GNOME
|
2006-12-27 12:49:58 +01:00
|
|
|
# and some variables to check.
|
|
|
|
#
|
2007-04-06 00:16:55 +02:00
|
|
|
# For feedback on this script please use
|
|
|
|
# https://bugzilla.novell.com/
|
2006-12-27 12:49:58 +01:00
|
|
|
#
|
2007-04-06 00:16:55 +02:00
|
|
|
|
2011-07-07 13:41:42 +02:00
|
|
|
# Define directory that we use to store migration state
|
2011-02-21 23:57:49 +01:00
|
|
|
if test "x$XDG_CONFIG_HOME" = "x"; then
|
|
|
|
XDG_CONFIG_HOME="$HOME/.config"
|
|
|
|
fi
|
|
|
|
SUSE_DIR="$XDG_CONFIG_HOME/suse"
|
|
|
|
|
|
|
|
if test -e /usr/share/applications/YaST2/live-installer.desktop; then
|
|
|
|
IS_LIVE_IMAGE="yes"
|
|
|
|
else
|
|
|
|
IS_LIVE_IMAGE="no"
|
|
|
|
fi
|
|
|
|
|
2011-07-07 13:41:42 +02:00
|
|
|
# Use gnome-applications.menu instead of applications.menu: its
|
|
|
|
# structure is more appropriate.
|
|
|
|
export XDG_MENU_PREFIX=gnome-
|
2006-12-27 12:49:58 +01:00
|
|
|
|
2009-10-06 01:32:08 +02:00
|
|
|
# Some actions that are specific to the LiveCD
|
2011-02-21 23:57:49 +01:00
|
|
|
if test "$IS_LIVE_IMAGE" = "yes" ; then
|
2011-07-07 13:41:42 +02:00
|
|
|
## Make live installer icon more visible. Note that we can't simply put it on
|
|
|
|
## the desktop, since the desktop is not managed by nautilus anymore (by
|
|
|
|
## default)
|
2009-10-06 01:32:08 +02:00
|
|
|
|
2011-09-27 13:24:09 +02:00
|
|
|
if test -f /etc/xdg/menus/${XDG_MENU_PREFIX}applications.menu -a ! -f "${XDG_CONFIG_HOME}/menus/${XDG_MENU_PREFIX}applications.menu"; then
|
2011-07-07 13:41:42 +02:00
|
|
|
# Add live installer to the system tools menu (this is nice to have, and also
|
|
|
|
# required for the favorite app change below)
|
|
|
|
mkdir -p -m 0700 "${XDG_CONFIG_HOME}"
|
2011-09-27 13:24:09 +02:00
|
|
|
mkdir -p "${XDG_CONFIG_HOME}/menus"
|
2011-07-07 13:41:42 +02:00
|
|
|
cat > "${XDG_CONFIG_HOME}/menus/${XDG_MENU_PREFIX}applications.menu" << EOF
|
|
|
|
<Menu>
|
|
|
|
<Name>Applications</Name>
|
|
|
|
<MergeFile type="parent">/etc/xdg/menus/${XDG_MENU_PREFIX}applications.menu</MergeFile>
|
|
|
|
<Menu>
|
|
|
|
<Name>System</Name>
|
|
|
|
<Include>
|
|
|
|
<Filename>YaST2-live-installer.desktop</Filename>
|
|
|
|
</Include>
|
|
|
|
</Menu>
|
|
|
|
</Menu>
|
|
|
|
EOF
|
2011-09-27 13:24:09 +02:00
|
|
|
fi
|
2007-09-21 15:22:36 +02:00
|
|
|
|
2011-09-27 13:24:09 +02:00
|
|
|
# Add live installer as favorite application to gnome-shell dash
|
|
|
|
FAVORITES=`gsettings get org.gnome.shell favorite-apps`
|
|
|
|
if test $? -eq 0; then
|
|
|
|
echo ${FAVORITES} | grep -q YaST2-live-installer.desktop
|
|
|
|
if test $? -ne 0; then
|
2011-07-07 13:41:42 +02:00
|
|
|
FAVORITES=`echo ${FAVORITES} | sed "s:^\[:\['YaST2-live-installer.desktop', :"`
|
|
|
|
gsettings set org.gnome.shell favorite-apps "${FAVORITES}"
|
|
|
|
fi
|
2007-09-21 15:22:36 +02:00
|
|
|
fi
|
2011-07-07 13:41:42 +02:00
|
|
|
|
2011-09-27 13:24:09 +02:00
|
|
|
# FIXME: we need to add a launcher for gnome-panel (fallback mode)
|
|
|
|
|
2011-07-07 13:41:42 +02:00
|
|
|
## Other tweaks
|
|
|
|
|
|
|
|
# setup session to not have a lock-enabled screensaver
|
|
|
|
gsettings set org.gnome.desktop.screensaver lock-enabled false
|
|
|
|
# setup session to not care about updates
|
|
|
|
gsettings set org.gnome.settings-daemon.plugins.updates active false
|
2007-09-20 14:00:26 +02:00
|
|
|
fi
|
|
|
|
|
2007-04-06 00:16:55 +02:00
|
|
|
# Uncomment after SLED12, remove after SLED14:
|
|
|
|
#rm -f ~/.skel/gnome2-run ~/.skel/gnome2-run-9.2 ~/.skel/sled10-run
|
2006-12-27 12:49:58 +01:00
|
|
|
|
2011-07-26 00:00:52 +02:00
|
|
|
exec /usr/bin/gnome-session $*
|