LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File pantheon of Package gnome-session (Project home:awissu:branches:X11:Pantheon:Testing)

#!/bin/bash
#
# This is not the original pantheon-session but a start script
# to install some preconfiguration for Pantheon
# and some variables to check.
#
# For feedback on this script please use
# https://bugzilla.novell.com/
#

# Define directory that we use to store migration state
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

# Use pantheon-applications.menu instead of applications.menu: its
# structure is more appropriate.
export XDG_MENU_PREFIX=pantheon-

# Some actions that are specific to the LiveCD
if test "$IS_LIVE_IMAGE" = "yes" ; then
  ## 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)

  if test -f /etc/xdg/menus/${XDG_MENU_PREFIX}applications.menu -a ! -f "${XDG_CONFIG_HOME}/menus/${XDG_MENU_PREFIX}applications.menu"; then
    # Add live installer to the system tools menu
    mkdir -p -m 0700 "${XDG_CONFIG_HOME}"
    mkdir -p "${XDG_CONFIG_HOME}/menus"
    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
  fi

  ## Other tweaks

  # setup session to not care about updates
  gsettings set pantheon.wrap.gnome.settings-daemon.plugins.updates active false
fi

exec /usr/bin/pantheon-session ${session} $*