3 # This file has bitrotted badly. Someone needs to clean this up.
6 if [ -f /etc/xdg/menus/gnome-applications.menu ] ; then
7 export XDG_MENU_PREFIX=gnome-
10 for errfile in "$HOME/.gnomerc-errors" "${TMPDIR-/tmp}/gnomerc-$USER" "/tmp/gnomerc-$USER"
12 if ( cp /dev/null "$errfile" 2> /dev/null )
15 exec > "$errfile" 2>&1
21 # You should modify the paths here to fit your distro
22 # If you need to do so, send me (jirka@5z.com) a patch
23 # and I'll try to make the script detect the distro stuff
26 userresources=$HOME/.Xresources
27 usermodmap=$HOME/.Xmodmap
28 userxkbmap=$HOME/.Xkbmap
30 sysresources=/etc/X11/Xresources
31 sysmodmap=/etc/X11/Xmodmap
32 sysxkbmap=/etc/X11/Xkbmap
34 rh6sysresources=/etc/X11/xinit/Xresources
35 rh6sysmodmap=/etc/X11/xinit/Xmodmap
37 if [ -x "$HOME/.gnomerc" ]; then
38 command="$HOME/.gnomerc"
39 elif [ -x /etc/X11/gdm/gnomerc ]; then
40 command="/etc/X11/gdm/gnomerc"
42 # as fallback in case the config is screwed
43 command=`which gnome-session`
47 if [ -f "$rh6sysresources" ]; then
48 xrdb -merge "$rh6sysresources"
51 if [ -f "$sysresources" ]; then
52 xrdb -merge "$sysresources"
55 if [ -f "$userresources" ]; then
56 xrdb -merge "$userresources"
60 if [ -f "$sysxkbmap" ]; then
61 setxkbmap `cat "$sysxkbmap"`
65 if [ -f "$userxkbmap" ]; then
66 setxkbmap `cat "$userxkbmap"`
71 # Eeek, this seems like too much magic here
73 if [ -z "$XKB_IN_USE" ] && [ ! -L /etc/X11/X ]; then
74 if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
75 xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config`
76 if [ -n "$xkbsymbols" ]; then
77 setxkbmap -symbols "$xkbsymbols"
83 # xkb and xmodmap don't play nice together
84 if [ -z "$XKB_IN_USE" ]; then
85 if [ -f "$rh6sysmodmap" ]; then
86 xmodmap "$rh6sysmodmap"
89 if [ -f "$sysmodmap" ]; then
93 if [ -f "$usermodmap" ]; then
100 # run all system xinitrc shell scripts.
101 if [ -d /etc/X11/xinit/xinitrc.d ]; then
102 for i in /etc/X11/xinit/xinitrc.d/* ; do