This commit is contained in:
parent
1d4fe5e077
commit
771becffda
217
gnome
217
gnome
@ -1,210 +1,77 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This is not the original gnome2-session but a startscript
|
||||
# This is not the original gnome-session but a start script
|
||||
# to install some preconfiguration for GNOME2
|
||||
# and some variables to check.
|
||||
#
|
||||
# For feedback on this script please see
|
||||
# http://www.suse.de/feedback
|
||||
# For feedback on this script please use
|
||||
# https://bugzilla.novell.com/
|
||||
#
|
||||
# set a background until the gnome-session becomes visible
|
||||
#xsetroot -cursor_name watch -solid "#6a83be"
|
||||
#
|
||||
# Help GNOME2 guessing where KDE resides on the filesystem
|
||||
export KDEDIR=/opt/kde3
|
||||
#
|
||||
# We use a cascaded KDE configuration while in GNOME,
|
||||
# to preconfigure some utilities better suited for GNOME
|
||||
export KDEDIRS=/usr/share/dist/kde-preconf
|
||||
#
|
||||
#
|
||||
# Manage GTK1 themes with gnome-theme-manager
|
||||
export GTK_RC_FILES=/etc/opt/gnome/gtk/gtkrc:$HOME/.gtkrc-1.2-gnome2
|
||||
#
|
||||
# Set STYLE variable for other applications.
|
||||
|
||||
# Set STYLE variable for other applications (e. g. xmms).
|
||||
STYLE="$(gconftool-2 --get /desktop/gnome/interface/gtk_theme 2>/dev/null)"
|
||||
export STYLE="${STYLE:-Default}"
|
||||
#
|
||||
#
|
||||
# If gconfd 1 is still running, shut it down now
|
||||
if [ -e /opt/gnome/bin/gconftool-1 ]
|
||||
then
|
||||
/opt/gnome/bin/gconftool-1 --shutdown
|
||||
fi
|
||||
#
|
||||
#
|
||||
# make sure .skel is available
|
||||
mkdir -p $HOME/.skel
|
||||
|
||||
# If user still uses default wallpaper, update it:
|
||||
OLD_WALLPAPER=$(gconftool-2 --get /desktop/gnome/background/picture_filename 2>/dev/null)
|
||||
if [ -z "$OLD_WALLPAPER" -o\
|
||||
"$OLD_WALLPAPER" != "${OLD_WALLPAPER#/usr/share/wallpapers/default}" ] ; then
|
||||
|
||||
#
|
||||
# use_gnome2_default_no_settings: Same as use_gnome2_default without
|
||||
# the wallpaper and fonts
|
||||
function use_gnome2_default_no_settings {
|
||||
# do this only one time
|
||||
[ -e $HOME/.skel/gnome2-run ] && return
|
||||
|
||||
# run possibly available addon-scripts
|
||||
if [ -d /usr/share/dist/addon-scripts ] ; then
|
||||
for scr in /usr/share/dist/addon-scripts/*; do
|
||||
[ -r "$scr" ] && . "$scr"
|
||||
done
|
||||
DIMENSIONS=$(xdpyinfo | sed -n 's/^ *dimensions: *\([^ ]*\) .*$/\1/p')
|
||||
X=${DIMENSIONS%x*}
|
||||
Y=${DIMENSIONS#*x}
|
||||
# Select normal or wide angle wallpaper:
|
||||
GNOME_WALLPAPER="default-1600x1200.jpg"
|
||||
[ $((($X * 10) / $Y)) -ge 15 ] && GNOME_WALLPAPER="default-1920x1200.jpg"
|
||||
GNOME_WALLPAPER="/usr/share/wallpapers/"$GNOME_WALLPAPER
|
||||
if [ -e "$GNOME_WALLPAPER" -a "$GNOME_WALLPAPER" != "$OLD_WALLPAPER" ] ; then
|
||||
gconftool-2 -s /desktop/gnome/background/picture_filename --type string $GNOME_WALLPAPER
|
||||
gconftool-2 -s /desktop/gnome/background/picture_options --type string stretched
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# add compatibility and default settings for GNOME1
|
||||
# (set help browsers to epiphany & nautilus)
|
||||
if [ ! -d ~/.gnome ] ; then
|
||||
mkdir -p ~/.gnome
|
||||
cp /usr/share/dist/gnome1/* ~/.gnome/
|
||||
fi
|
||||
if [ ! -e ~/.gtkrc ] ; then
|
||||
cp /usr/share/dist/gnome1/gtkrc ~/.gtkrc
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# we are done, set the flag
|
||||
touch ~/.skel/gnome2-run
|
||||
}
|
||||
|
||||
#
|
||||
#
|
||||
# use_gnome2_default: if the default preconfiguration is used,
|
||||
# some modifications need to be done to setup correct wallpapers
|
||||
#
|
||||
function use_gnome2_default {
|
||||
# do this only one time
|
||||
[ -e $HOME/.skel/gnome2-run ] && return
|
||||
# and only if no wallpaper is already set (or other background
|
||||
# option)
|
||||
[ -e $HOME/.gconf/desktop/gnome/background/%gconf.xml ] && return
|
||||
mkdir -p ~/.gconf/desktop/gnome/background
|
||||
# determine X-Resolution
|
||||
X=$(xdpyinfo |grep dimensions:|head -1|cut -d " " -f 7 |cut -d "x" -f 1)
|
||||
Y=$(xdpyinfo |grep dimensions:|head -1|cut -d " " -f 7 |cut -d "x" -f 2)
|
||||
# set default wallpaper to 1600x1200
|
||||
GNOME_WALLPAPER="default-1600x1200.jpg"
|
||||
[ $((($X * 10) / $Y)) -ge 15 ] && GNOME_WALLPAPER="default-1920x1200.jpg"
|
||||
GNOME_WALLPAPER="/usr/share/wallpapers/"$GNOME_WALLPAPER
|
||||
# check if a wallpaper is actually available
|
||||
if [ -e $GNOME_WALLPAPER ] ; then
|
||||
gconftool-2 -s /desktop/gnome/background/picture_filename --type string $GNOME_WALLPAPER
|
||||
gconftool-2 -s /desktop/gnome/background/picture_options --type string stretched
|
||||
fi
|
||||
|
||||
|
||||
# run possibly available addon-scripts
|
||||
if [ -d /usr/share/dist/addon-scripts ] ; then
|
||||
for scr in /usr/share/dist/addon-scripts/*; do
|
||||
[ -r "$scr" ] && . "$scr"
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# add compatibility and default settings for GNOME1
|
||||
# (set help browsers to epiphany & nautilus)
|
||||
if [ ! -d ~/.gnome ] ; then
|
||||
mkdir -p ~/.gnome
|
||||
cp /usr/share/dist/gnome1/* ~/.gnome/
|
||||
fi
|
||||
if [ ! -e ~/.gtkrc ] ; then
|
||||
cp /usr/share/dist/gnome1/gtkrc ~/.gtkrc
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# we are done, set the flag
|
||||
touch ~/.skel/gnome2-run
|
||||
}
|
||||
|
||||
function fix_wallpapers_on_update {
|
||||
|
||||
# we do that only the first time
|
||||
[ -e $HOME/.skel/gnome2-run-9.2 ] && return
|
||||
|
||||
# we change to the new distribution wallpapers
|
||||
# if the 9.1 generation wallpapers are no longer
|
||||
# available
|
||||
WALLPAPER=$(gconftool-2 -g /desktop/gnome/background/picture_filename)
|
||||
WALLPAPER=$(echo $WALLPAPER | cut -b -30)
|
||||
if [ $WALLPAPER="/usr/share/wallpapers/suse9.1-" ] ; then
|
||||
# determine X-Resolution
|
||||
X=$(xdpyinfo |grep dimensions:|cut -d " " -f 7 |cut -d "x" -f 1)
|
||||
# if no config fits, use 1024x768
|
||||
GNOME_WALLPAPER="suse10-1027x768.jpg"
|
||||
[ $X -gt 799 ] && GNOME_WALLPAPER="suse10-800x600.jpg"
|
||||
[ $X -gt 1023 ] && GNOME_WALLPAPER="suse10-1024x768.jpg"
|
||||
[ $X -gt 1279 ] && GNOME_WALLPAPER="suse10-1280x1024.jpg"
|
||||
[ $X -gt 1399 ] && GNOME_WALLPAPER="suse10-1400x1050.jpg"
|
||||
[ $X -gt 1599 ] && GNOME_WALLPAPER="suse10-1600x1200.jpg"
|
||||
GNOME_WALLPAPER="/usr/share/wallpapers/"$GNOME_WALLPAPER
|
||||
# check if a wallpaper is actually available
|
||||
if [ -e $GNOME_WALLPAPER ] ; then
|
||||
gconftool-2 -s /desktop/gnome/background/picture_filename --type string $GNOME_WALLPAPER
|
||||
gconftool-2 -s /desktop/gnome/background/picture_options --type string stretched
|
||||
fi
|
||||
fi
|
||||
|
||||
# done, set the flag
|
||||
touch ~/.skel/gnome2-run-9.2
|
||||
|
||||
}
|
||||
|
||||
function use_sled10_default {
|
||||
# do this only for SLED 10
|
||||
([ -e /etc/SuSE-release ] && grep "SUSE Linux Enterprise Desktop 10" /etc/SuSE-release) || return
|
||||
# do this only for SLED 10
|
||||
([ -e /etc/SuSE-release ] && grep "SUSE Linux Enterprise Desktop 11" /etc/SuSE-release) || return
|
||||
|
||||
# do this only one time
|
||||
[ -e $HOME/.skel/sled10-run ] && return
|
||||
# do this only one time
|
||||
[ -e $HOME/.skel/sled10-run ] && return
|
||||
|
||||
# dump the existing config for backup
|
||||
PANEL_BACKUP=panel-settings-backup-`date '+%m%d%y%H%M%S'`.xml
|
||||
gconftool-2 --dump /apps/panel > $PANEL_BACKUP
|
||||
# dump the existing config for backup
|
||||
PANEL_BACKUP=panel-settings-backup-`date '+%m%d%y%H%M%S'`.xml
|
||||
gconftool-2 --dump /apps/panel > $PANEL_BACKUP
|
||||
|
||||
# unset the current panel configuration
|
||||
gconftool-2 --recursive-unset /apps/panel/default_setup
|
||||
gconftool-2 --unset /apps/panel/general/toplevel_id_list
|
||||
gconftool-2 --unset /apps/panel/general/applet_id_list
|
||||
gconftool-2 --unset /apps/panel/general/object_id_list
|
||||
gconftool-2 --recursive-unset /apps/panel/profiles/default
|
||||
gconftool-2 --recursive-unset /apps/panel/toplevels
|
||||
gconftool-2 --unset /apps/metacity/general/num_workspaces
|
||||
# unset the current panel configuration
|
||||
gconftool-2 --recursive-unset /apps/panel/default_setup
|
||||
gconftool-2 --unset /apps/panel/general/toplevel_id_list
|
||||
gconftool-2 --unset /apps/panel/general/applet_id_list
|
||||
gconftool-2 --unset /apps/panel/general/object_id_list
|
||||
gconftool-2 --recursive-unset /apps/panel/profiles/default
|
||||
gconftool-2 --recursive-unset /apps/panel/toplevels
|
||||
gconftool-2 --unset /apps/metacity/general/num_workspaces
|
||||
|
||||
# we are done, set the flag
|
||||
touch ~/.skel/sled10-run
|
||||
# we are done, set the flag
|
||||
touch ~/.skel/sled10-run
|
||||
}
|
||||
|
||||
|
||||
# set up an arbitrary icon path for nautilus, accessing YaST Icons and, if installed, common KDE icons
|
||||
KDE_CRYSTAL_32=/opt/kde3/share/icons/crystalsvg/32x32
|
||||
KDE_CRYSTAL_48=/opt/kde3/share/icons/crystalsvg/48x48
|
||||
GNOME_DEFAULT_32=/usr/share/icons/gnome/32x32
|
||||
GNOME_DEFAULT_48=/usr/share/icons/gnome/48x48
|
||||
YAST_ICONS=/usr/share/YaST2/theme/current/icons/48x48
|
||||
|
||||
export GNOME_ICON_PATH=/usr/share/images:$YAST_ICONS/apps:$KDE_CRYSTAL_32/apps:$KDE_CRYSTAL_32/devices:$KDE_CRYSTAL_32/mimetypes:$KDE_CRYSTAL_32/filesystems:$KDE_CRYSTAL_32/actions:$KDE_CRYSTAL_48/apps:$KDE_CRYSTAL_48/devices:$KDE_CRYSTAL_48/mimetypes:$KDE_CRYSTAL_48/filesystems:$KDE_CRYSTAL_48/actions:$GNOME_DEFAULT_48/apps:$GNOME_DEFAULT_32/apps:/usr/share/pixmaps:/opt/gnome/share/pixmaps
|
||||
|
||||
|
||||
# start up the gnome2 session
|
||||
|
||||
# reset the SLED 10 UI only if upgrading from NLD9/SLES9, anything newer we
|
||||
# ignore (like SL 9.3), the logic here is redundant but its low risk
|
||||
# Remove this code after SLED11:
|
||||
mkdir -p $HOME/.skel
|
||||
TRY_SLED10=1
|
||||
if [ ! -e $HOME/.skel/gnome2-run ] || [ -e $HOME/.skel/gnome2-run-9.2 ] ; then
|
||||
TRY_SLED10=0
|
||||
fi
|
||||
|
||||
fix_wallpapers_on_update
|
||||
use_gnome2_default
|
||||
if [ $TRY_SLED10 -gt 0 ] ; then
|
||||
use_sled10_default
|
||||
use_sled11_default
|
||||
else
|
||||
touch ~/.skel/sled10-run
|
||||
fi
|
||||
|
||||
|
||||
# Uncomment after SLED12, remove after SLED14:
|
||||
#rm -f ~/.skel/gnome2-run ~/.skel/gnome2-run-9.2 ~/.skel/sled10-run
|
||||
|
||||
exec /usr/bin/gnome-session
|
||||
|
10
gnome-session-bug_255906.patch
Normal file
10
gnome-session-bug_255906.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- configure.in
|
||||
+++ configure.in
|
||||
@@ -13,7 +13,6 @@
|
||||
AC_PROG_CC
|
||||
AC_STDC_HEADERS
|
||||
AM_PROG_LIBTOOL
|
||||
-AC_PATH_PROGS(PATH_TO_XRDB, "xrdb")
|
||||
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
|
||||
|
||||
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 4 14:57:58 CEST 2007 - sbrabec@suse.cz
|
||||
|
||||
- Session start script (gnome) cleanup (#254439).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 3 23:20:19 CEST 2007 - jhargadon@suse.de
|
||||
|
||||
- specfile cleanup (#255906)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 19 19:19:54 CET 2007 - jpr@suse.de
|
||||
|
||||
|
@ -13,11 +13,10 @@
|
||||
Name: gnome-session
|
||||
BuildRequires: CASA-devel control-center2-devel gnome-common gnome-desktop-devel gnome-keyring gnome-patch-translation hicolor-icon-theme intltool libglade2-devel libnotify-devel perl-XML-Parser tcpd-devel update-desktop-files
|
||||
# for xrdb resp. rsh checks:
|
||||
BuildRequires: rsh xorg-x11
|
||||
License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL)
|
||||
Group: System/GUI/GNOME
|
||||
Version: 2.18.0
|
||||
Release: 1
|
||||
Release: 6
|
||||
Summary: Session Tools for the GNOME 2.x Desktop
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: gnome
|
||||
@ -40,6 +39,7 @@ Patch29: gnome-session-wm-switch.patch
|
||||
# FIXME: This doesn't apply. Somebody should go through it and
|
||||
# make it apply.
|
||||
Patch30: gnome-session-tile-ui.patch
|
||||
Patch31: gnome-session-bug_255906.patch
|
||||
URL: http://www.gnome.org
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Autoreqprov: on
|
||||
@ -88,6 +88,7 @@ gnome-patch-translation-prepare
|
||||
%patch29
|
||||
# %patch30 -p1
|
||||
%endif
|
||||
%patch31
|
||||
gnome-patch-translation-update
|
||||
|
||||
%build
|
||||
@ -95,8 +96,7 @@ autoreconf -f -i
|
||||
# needed for gnome-session--2.17.91:
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
%configure\
|
||||
--with-reboot-command=/sbin/reboot\
|
||||
--with-halt-command=/sbin/poweroff\
|
||||
--with-rsh-command=/usr/bin/rsh \
|
||||
--with-at-spi-registryd-directory=%{_prefix}/lib/at-spi
|
||||
make %{?jobs:-j%jobs}
|
||||
|
||||
@ -138,6 +138,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Apr 04 2007 - sbrabec@suse.cz
|
||||
- Session start script (gnome) cleanup (#254439).
|
||||
* Tue Apr 03 2007 - jhargadon@suse.de
|
||||
- specfile cleanup (#255906)
|
||||
* Mon Mar 19 2007 - jpr@suse.de
|
||||
- Update to 2.18.0
|
||||
* Drop legacy http_proxy support entirely since it is causing too
|
||||
|
Loading…
Reference in New Issue
Block a user