Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > efab0889861377768d39f75e98881cd4 > files > 4

gnome-session-3.14.0-6.mga5.src.rpm

#!/bin/sh

if [ "$MGA_MENU_STYLE" = "upstream" ]; then
	if  [ -z "$XDG_CONFIG_DIRS" ]; then
 	    export XDG_CONFIG_DIRS="/etc/xdg/gnome:/etc/xdg"
	else
	    export XDG_CONFIG_DIRS="/etc/xdg/gnome:$XDG_CONFIG_DIRS"
	fi
else
	if  [ -z "$XDG_CONFIG_DIRS" ]; then
 	    export XDG_CONFIG_DIRS="/etc/xdg:/etc/xdg/gnome"
	else
	    export XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:/etc/xdg/gnome"
	fi
fi

#clean up old sockets if any
[ -x /usr/bin/linc-cleanup-sockets ] && /usr/bin/linc-cleanup-sockets 2> /dev/null > /dev/null

SESSION_ARGS=
if [ "$GNOME_CLASSIC" = 1 ]; then
  SESSION_ARGS="--session gnome-fallback --disable-acceleration-check"
  unset GNOME_CLASSIC
fi

# (tmb) hack to debug if gdm failed 3d acceleration check
# hardcoded from /etc/init.d/functions (to be faster and dash compliant)
strstr() {
  [ "${1#*$2*}" = "$1" ] && return 1
  return 0
}

cmdline=$(cat /proc/cmdline)
if strstr "$cmdline" no3dcheck; then
    exec /usr/bin/gnome-session $SESSION_ARGS --disable-acceleration-check
else
    exec /usr/bin/gnome-session $SESSION_ARGS
fi