View | Details | Raw Unified | Return to bug 8563
Collapse All | Expand All

(-)xinitrc-2.4.23/install/etc/X11/prefdm (-1 / +1 lines)
Lines 1-7 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
2
3
HOME=/root
3
HOME=/root
4
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
4
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin
5
export HOME PATH
5
export HOME PATH
6
6
7
# We need to source this so that the login screens get translated
7
# We need to source this so that the login screens get translated
(-)xinitrc-2.4.23/install/etc/X11/xdm/GiveConsole (-1 / +1 lines)
Lines 8-12 Link Here
8
# causing serious grief.
8
# causing serious grief.
9
#
9
#
10
chown $USER /dev/console
10
chown $USER /dev/console
11
/usr/X11R6/bin/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp" \
11
/usr/bin/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp" \
12
	-x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
12
	-x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
(-)xinitrc-2.4.23/install/etc/X11/xdm/TakeConsole (-1 / +1 lines)
Lines 5-9 Link Here
5
#
5
#
6
chmod 622 /dev/console
6
chmod 622 /dev/console
7
chown root /dev/console
7
chown root /dev/console
8
/usr/X11R6/bin/sessreg -d -w "/var/log/wtmp" -u "/var/run/utmp" \
8
/usr/bin/sessreg -d -w "/var/log/wtmp" -u "/var/run/utmp" \
9
	-x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
9
	-x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
(-)xinitrc-2.4.23/install/etc/X11/xdm/Xsetup_0 (-3 / +3 lines)
Lines 13-22 Link Here
13
#      /usr/bin/kdmdesktop
13
#      /usr/bin/kdmdesktop
14
# Commented above line and added next line because of kdedesktop issues 
14
# Commented above line and added next line because of kdedesktop issues 
15
# fixes background.
15
# fixes background.
16
      /usr/X11R6/bin/xsetroot -solid "#666699"
16
      /usr/bin/xsetroot -solid "#666699"
17
else
17
else
18
      /usr/X11R6/bin/xsetroot -solid "#666699"
18
      /usr/bin/xsetroot -solid "#666699"
19
      /usr/X11R6/bin/xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail
19
      /usr/bin/xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail
20
fi
20
fi
21
21
22
ExecIfExecutable /etc/X11/xinit/fixkeyboard
22
ExecIfExecutable /etc/X11/xinit/fixkeyboard
(-)xinitrc-2.4.23/install/etc/X11/xinit/fixkeyboard (-9 / +9 lines)
Lines 9-39 Link Here
9
sysmodmap=/etc/X11/xinit/Xmodmap
9
sysmodmap=/etc/X11/xinit/Xmodmap
10
sysxkbmap=/etc/X11/xinit/Xkbmap
10
sysxkbmap=/etc/X11/xinit/Xkbmap
11
# backward compatibility
11
# backward compatibility
12
oldsysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap
12
oldsysmodmap=/usr/lib/X11/xinit/.Xmodmap
13
13
14
# to be sure to have xdpyinfo and xmodmap
14
# to be sure to have xdpyinfo and xmodmap
15
PATH=/usr/X11R6/bin:$PATH
15
PATH=/usr/bin:$PATH
16
16
17
XKB_IN_USE=
17
XKB_IN_USE=
18
18
19
if xdpyinfo | grep XKEYBOARD > /dev/null 2>&1; then
19
if /usr/bin/xdpyinfo | grep XKEYBOARD > /dev/null 2>&1; then
20
    XKB_IN_USE=yes
20
    XKB_IN_USE=yes
21
fi
21
fi
22
22
23
# merge in keymaps
23
# merge in keymaps
24
#if [ -n "$XKB_IN_USE" -a -r $sysxkbmap ]; then
24
#if [ -n "$XKB_IN_USE" -a -r $sysxkbmap ]; then
25
#    setxkbmap `cat $sysxkbmap`
25
#    /usr/bin/setxkbmap `cat $sysxkbmap`
26
#fi
26
#fi
27
27
28
if [ -n "$XKB_IN_USE" -a -r $userxkbmap ]; then
28
if [ -n "$XKB_IN_USE" -a -r $userxkbmap ]; then
29
    setxkbmap `cat $userxkbmap`
29
    /usr/bin/setxkbmap `cat $userxkbmap`
30
fi
30
fi
31
31
32
if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
32
if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
33
    if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
33
    if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
34
	xkbsymbols=`sed -n -e 's/^[ 	]*XkbSymbols[ 	]*"\(.*\)".*$/\1/p'`
34
	xkbsymbols=`sed -n -e 's/^[ 	]*XkbSymbols[ 	]*"\(.*\)".*$/\1/p'`
35
	if [ -n "$xkbsymbols" ]; then
35
	if [ -n "$xkbsymbols" ]; then
36
	    setxkbmap -symbols "$xkbsymbols"
36
	    /usr/bin/setxkbmap -symbols "$xkbsymbols"
37
	    XKB_IN_USE=yes
37
	    XKB_IN_USE=yes
38
	fi
38
	fi
39
    fi
39
    fi
Lines 42-56 Link Here
42
# xkb and xmodmap don't play nice together
42
# xkb and xmodmap don't play nice together
43
if [ -z "$XKB_IN_USE" ]; then
43
if [ -z "$XKB_IN_USE" ]; then
44
    if [ -r $oldsysmodmap ]; then
44
    if [ -r $oldsysmodmap ]; then
45
	xmodmap $oldsysmodmap
45
	/usr/bin/xmodmap $oldsysmodmap
46
    fi
46
    fi
47
47
48
    if [ -r $sysmodmap ]; then
48
    if [ -r $sysmodmap ]; then
49
	xmodmap $sysmodmap
49
	/usr/bin/xmodmap $sysmodmap
50
    fi
50
    fi
51
51
52
    if [ -r $usermodmap ]; then
52
    if [ -r $usermodmap ]; then
53
	xmodmap $usermodmap
53
	/usr/bin/xmodmap $usermodmap
54
    fi
54
    fi
55
fi
55
fi
56
56
(-)xinitrc-2.4.23/install/etc/X11/xinit/xrootwarn (-1 / +1 lines)
Lines 14-20 Link Here
14
14
15
[ "$XROOTWARN" != no ] || exit 0
15
[ "$XROOTWARN" != no ] || exit 0
16
16
17
/usr/X11R6/bin/xsetroot -solid "#FF8000"
17
/usr/bin/xsetroot -solid "#FF8000"
18
18
19
[ "$LANG" = POSIX -o "$LANGUAGE" = POSIX ] && SourceIfNotEmpty /etc/sysconfig/i18n ||:
19
[ "$LANG" = POSIX -o "$LANGUAGE" = POSIX ] && SourceIfNotEmpty /etc/sysconfig/i18n ||:
20
20
(-)xinitrc-2.4.23/install/etc/X11/xinit/xrootwarn.real (-1 / +1 lines)
Lines 15-18 Link Here
15
to the system.
15
to the system.
16
"
16
"
17
17
18
exec /usr/X11R6/bin/xmessage -font fixed -center -buttons Continue:0,Exit:2 -default Exit "$message"
18
exec /usr/bin/xmessage -font fixed -center -buttons Continue:0,Exit:2 -default Exit "$message"
(-)xinitrc-2.4.23/install/etc/X11/xinit/xserverrc (-1 / +1 lines)
Lines 1-5 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: xserverrc,v 1.1 2003/10/14 11:47:21 ldv Exp $
2
# $Id: xserverrc,v 1.1 2003/10/14 11:47:21 ldv Exp $
3
3
4
usr_X11R6_bin_X=/usr/X11R6/bin/X
4
usr_X11R6_bin_X=/usr/bin/X
5
exec "$usr_X11R6_bin_X" -nolisten tcp "$@"
5
exec "$usr_X11R6_bin_X" -nolisten tcp "$@"
(-)xinitrc-2.4.23/install/etc/X11/xinit.d/Mod_Meta_L_Disable (-2 / +2 lines)
Lines 7-12 Link Here
7
7
8
if [ -f /etc/sysconfig/keyboard ];then
8
if [ -f /etc/sysconfig/keyboard ];then
9
    if grep -q "REMOVE_MOD_META_L=yes" /etc/sysconfig/keyboard;then
9
    if grep -q "REMOVE_MOD_META_L=yes" /etc/sysconfig/keyboard;then
10
	xmodmap -e 'remove mod4 = Meta_L'
10
	/usr/bin/xmodmap -e 'remove mod4 = Meta_L'
11
    fi
11
    fi
12
fi
12
fi
(-)xinitrc-2.4.23/install/etc/X11/Xsession (-9 / +9 lines)
Lines 78-88 Link Here
78
78
79
if [ $# -ge 1 ]; then
79
if [ $# -ge 1 ]; then
80
	# Clean up after xbanner.
80
	# Clean up after xbanner.
81
	RunIfExecutable /usr/X11R6/bin/freetemp
81
	RunIfExecutable /usr/bin/freetemp
82
else
82
else
83
	# ALT default background and cursor.
83
	# ALT default background and cursor.
84
	/usr/X11R6/bin/xsetroot -solid "#666699"
84
	/usr/bin/xsetroot -solid "#666699"
85
	/usr/X11R6/bin/xsetroot -cursor_name left_ptr
85
	/usr/bin/xsetroot -cursor_name left_ptr
86
fi
86
fi
87
87
88
if [ -n "$LANGUAGE" ]; then
88
if [ -n "$LANGUAGE" ]; then
Lines 96-102 Link Here
96
Xrdb()
96
Xrdb()
97
{
97
{
98
	if [ -s "$1" ]; then
98
	if [ -s "$1" ]; then
99
		/usr/X11R6/bin/xrdb -merge "$1"
99
		/usr/bin/xrdb -merge "$1"
100
		return 0
100
		return 0
101
	else
101
	else
102
		return 1
102
		return 1
Lines 143-149 Link Here
143
	local n
143
	local n
144
	for n in "$@"; do
144
	for n in "$@"; do
145
		if n=`absolute "$n"`; then
145
		if n=`absolute "$n"`; then
146
			export BROWSER="/usr/X11R6/bin/xvt -e $n"
146
			export BROWSER="/usr/bin/xvt -e $n"
147
			break
147
			break
148
		fi
148
		fi
149
	done
149
	done
Lines 204-221 Link Here
204
204
205
# See if desktop manager has asked for a specific environment.
205
# See if desktop manager has asked for a specific environment.
206
if [ $# -ge 1 ]; then
206
if [ $# -ge 1 ]; then
207
	exec /usr/X11R6/bin/runwm "$@"
207
	exec /usr/bin/runwm "$@"
208
else
208
else
209
	# Try user defined action.
209
	# Try user defined action.
210
	ExecIfExecutable "$HOME/.xsession"
210
	ExecIfExecutable "$HOME/.xsession"
211
	ExecIfExecutable "$HOME/.Xclients"
211
	ExecIfExecutable "$HOME/.Xclients"
212
212
213
	# Try WM Selector.
213
	# Try WM Selector.
214
	ExecIfExecutable /usr/X11R6/bin/wm-select
214
	ExecIfExecutable /usr/bin/wm-select
215
215
216
	# Try WM Manager.
216
	# Try WM Manager.
217
	ExecIfExecutable /usr/X11R6/bin/wmselect
217
	ExecIfExecutable /usr/bin/wmselect
218
218
219
	# Try default from runwm.
219
	# Try default from runwm.
220
	exec /usr/X11R6/bin/runwm default
220
	exec /usr/bin/runwm default
221
fi
221
fi
(-)xinitrc-2.4.23/install/usr/bin/runwm (+145 lines)
Line 0 Link Here
1
#!/bin/sh -e
2
#
3
# $Id: runwm,v 1.5 2005/09/29 23:00:38 ldv Exp $
4
# Copyright (C) 2002, 2005  Dmitry V. Levin <ldv@altlinux.org>
5
#
6
# Executes window manager using wm.d database.
7
#
8
# This program is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
12
#
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
21
#
22
23
PROG="${0##*/}"
24
WM_DIR=/etc/X11/wmsession.d
25
26
Usage()
27
{
28
	[ "$1" = 0 ] || exec >&2
29
	cat <<EOF
30
Usage: $PROG <window manager> [args]
31
       $PROG --print <window manager> [args]
32
       $PROG --list
33
       $PROG --help
34
EOF
35
	[ -n "$1" ] && exit "$1" || exit
36
}
37
38
[ "$1" != '--help' ] || Usage 0
39
40
print_only=
41
if [ "$1" = '--print' ]; then
42
	print_only=1
43
	shift
44
fi
45
46
if [ $# -lt 1 ]; then
47
	Usage
48
fi
49
50
wm=`printf %s "$1" |tr '[:upper:]' '[:lower:]'`
51
shift
52
53
try_exec_wm()
54
{
55
	local f
56
	for f in "$@"; do
57
		if [ -x "$f" ]; then
58
			exec "$f" ||:
59
		fi
60
	done
61
}
62
63
exec_wm()
64
{
65
	if [ -n "$print_only" ]; then
66
		printf '%s\n' "$*"
67
		exit
68
	else
69
		exec "$@"
70
	fi
71
}	
72
73
is_safe_config()
74
{
75
	[ -f "$1" -a -r "$1" -a -s "$1" ] || return
76
}
77
78
found_default=
79
scan_wm_dir()
80
{
81
	local wm="$1" && shift
82
	local d
83
84
	for d in "$WM_DIR/default" "$WM_DIR"/*; do
85
		is_safe_config "$d" || continue
86
87
		local n=${d##*/}
88
89
		# skip files with names containing dot
90
		[ -n "${n##*.*}" ] || continue
91
92
		# if found default, skip file named "default"
93
		[ -z "$found_default" -o "$n" != default ] || continue
94
95
		# fetch pathname for later execution
96
		local exec=`sed -ne 's,^EXEC=\(/.\+\)$,\1,pg' "$d" |tail -1`
97
98
		if [ -x "$exec" ]; then
99
			# fetch WM name
100
			local name0=`sed -ne 's,^NAME=\(.\+\)$,\1,pg' "$d" |tail -1`
101
			[ -n "$name0" ] || continue
102
103
			# canonicalize WM name
104
			local name=`printf %s "$name0" |tr '[:upper:]' '[:lower:]'`
105
106
			# if in list mode, print and continue
107
			if [ "$wm" = '--list' ]; then
108
				printf '%s\n' "$name0"
109
				[ "$name" != default ] || found_default=1
110
				continue
111
			fi
112
113
			# if found WM, execute
114
			if [ "$wm" = default -o "$wm" = "$name" ]; then
115
				exec_wm "$exec" "$@"
116
			fi
117
		fi
118
	done
119
}
120
121
if [ "$wm" = failsafe ]; then
122
	if [ -n "$print_only" ]; then
123
		echo "/usr/bin/xterm -geometry 100x25+0+0 $@"
124
	else
125
		/usr/bin/xterm -geometry 100x25+0+0 &
126
		try_exec_wm /usr/bin/icewm-light /usr/bin/twm
127
	fi
128
	exit
129
fi
130
131
prefdm_config=/etc/sysconfig/desktop
132
if [ "$wm" = default ] && is_safe_config "$prefdm_config"; then
133
	prefdm="$(sed -ne 's/^[[:space:]]*\([^#[:space:]]\+\)[[:space:]]*$/\1/p' "$prefdm_config" |
134
			head -1 |tr '[:upper:]' '[:lower:]')"
135
	[ -z "$prefdm" ] || scan_wm_dir "$prefdm" "$@"
136
fi
137
138
scan_wm_dir "$wm" "$@"
139
140
if [ "$wm" != '--list' ]; then
141
	printf '%s: window manager "%s" not found.\n' "$PROG" "$wm" >&2
142
	exit 1
143
fi
144
145
[ -n "$found_default" ] || echo default
(-)xinitrc-2.4.23/install/usr/bin/xscreenlock (+52 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $Id: xscreenlock,v 1.3 2005/09/29 23:00:38 ldv Exp $
4
# Copyright (C) 2003, 2005  Dmitry V. Levin <ldv@altlinux.org>
5
#
6
# Wrapper for xscreensaver and xlockmore.
7
#
8
# This program is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
12
#
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
21
#
22
23
unset n XSCREEN_CUSTOM XSCREEN_SERVER XSCREEN_CLIENT XSCREEN_SERVER_1 XSCREEN_CLIENT_1 XSCREEN_XLOCK ||:
24
XSCREEN_CUSTOM="$HOME/.xscreenlock"
25
XSCREEN_SERVER="/usr/bin/xscreensaver"
26
XSCREEN_CLIENT="/usr/bin/xscreensaver-command"
27
XSCREEN_SERVER_1="/usr/bin/xscreensaver"
28
XSCREEN_CLIENT_1="/usr/bin/xscreensaver-command"
29
XSCREEN_XLOCK="/usr/bin/xlock"
30
31
if [ -x "$XSCREEN_CUSTOM" ]; then
32
	exec "$XSCREEN_CUSTOM" "$@"
33
fi
34
35
if [ -x "$XSCREEN_SERVER_1" -a -x "$XSCREEN_CLIENT_1" ]; then
36
	XSCREEN_SERVER="$XSCREEN_SERVER_1"
37
	XSCREEN_CLIENT="$XSCREEN_CLIENT_1"
38
fi
39
40
if [ -x "$XSCREEN_SERVER" -a -x "$XSCREEN_CLIENT" ]; then
41
	if ! "$XSCREEN_CLIENT" -version >/dev/null 2>&1; then
42
		"$XSCREEN_SERVER" -nosplash </dev/null &
43
		for n in `seq 1 5`; do
44
			"$XSCREEN_CLIENT" -version >/dev/null 2>&1 && break
45
			usleep 100000
46
		done
47
	fi
48
	"$XSCREEN_CLIENT" -lock
49
elif [ -x "$XSCREEN_XLOCK" ]; then
50
	"$XSCREEN_XLOCK"
51
fi
52
(-)xinitrc-2.4.23/install/usr/sbin/update_wms (-1 / +1 lines)
Lines 19-25 Link Here
19
# along with this program; if not, write to the Free Software
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
21
21
22
runwmlist="$(/usr/X11R6/bin/runwm --list)" || exit 1
22
runwmlist="$(/usr/bin/runwm --list)" || exit 1
23
[ -n "$runwmlist" ] || exit 1
23
[ -n "$runwmlist" ] || exit 1
24
24
25
# KDM
25
# KDM
(-)xinitrc-2.4.23/install/usr/X11R6/bin/runwm (-145 lines)
Lines 1-145 Link Here
1
#!/bin/sh -e
2
#
3
# $Id: runwm,v 1.5 2005/09/29 23:00:38 ldv Exp $
4
# Copyright (C) 2002, 2005  Dmitry V. Levin <ldv@altlinux.org>
5
#
6
# Executes window manager using wm.d database.
7
#
8
# This program is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
12
#
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
21
#
22
23
PROG="${0##*/}"
24
WM_DIR=/etc/X11/wmsession.d
25
26
Usage()
27
{
28
	[ "$1" = 0 ] || exec >&2
29
	cat <<EOF
30
Usage: $PROG <window manager> [args]
31
       $PROG --print <window manager> [args]
32
       $PROG --list
33
       $PROG --help
34
EOF
35
	[ -n "$1" ] && exit "$1" || exit
36
}
37
38
[ "$1" != '--help' ] || Usage 0
39
40
print_only=
41
if [ "$1" = '--print' ]; then
42
	print_only=1
43
	shift
44
fi
45
46
if [ $# -lt 1 ]; then
47
	Usage
48
fi
49
50
wm=`printf %s "$1" |tr '[:upper:]' '[:lower:]'`
51
shift
52
53
try_exec_wm()
54
{
55
	local f
56
	for f in "$@"; do
57
		if [ -x "$f" ]; then
58
			exec "$f" ||:
59
		fi
60
	done
61
}
62
63
exec_wm()
64
{
65
	if [ -n "$print_only" ]; then
66
		printf '%s\n' "$*"
67
		exit
68
	else
69
		exec "$@"
70
	fi
71
}	
72
73
is_safe_config()
74
{
75
	[ -f "$1" -a -r "$1" -a -s "$1" ] || return
76
}
77
78
found_default=
79
scan_wm_dir()
80
{
81
	local wm="$1" && shift
82
	local d
83
84
	for d in "$WM_DIR/default" "$WM_DIR"/*; do
85
		is_safe_config "$d" || continue
86
87
		local n=${d##*/}
88
89
		# skip files with names containing dot
90
		[ -n "${n##*.*}" ] || continue
91
92
		# if found default, skip file named "default"
93
		[ -z "$found_default" -o "$n" != default ] || continue
94
95
		# fetch pathname for later execution
96
		local exec=`sed -ne 's,^EXEC=\(/.\+\)$,\1,pg' "$d" |tail -1`
97
98
		if [ -x "$exec" ]; then
99
			# fetch WM name
100
			local name0=`sed -ne 's,^NAME=\(.\+\)$,\1,pg' "$d" |tail -1`
101
			[ -n "$name0" ] || continue
102
103
			# canonicalize WM name
104
			local name=`printf %s "$name0" |tr '[:upper:]' '[:lower:]'`
105
106
			# if in list mode, print and continue
107
			if [ "$wm" = '--list' ]; then
108
				printf '%s\n' "$name0"
109
				[ "$name" != default ] || found_default=1
110
				continue
111
			fi
112
113
			# if found WM, execute
114
			if [ "$wm" = default -o "$wm" = "$name" ]; then
115
				exec_wm "$exec" "$@"
116
			fi
117
		fi
118
	done
119
}
120
121
if [ "$wm" = failsafe ]; then
122
	if [ -n "$print_only" ]; then
123
		echo "/usr/X11R6/bin/xterm -geometry 100x25+0+0 $@"
124
	else
125
		/usr/X11R6/bin/xterm -geometry 100x25+0+0 &
126
		try_exec_wm /usr/X11R6/bin/icewm-light /usr/X11R6/bin/twm
127
	fi
128
	exit
129
fi
130
131
prefdm_config=/etc/sysconfig/desktop
132
if [ "$wm" = default ] && is_safe_config "$prefdm_config"; then
133
	prefdm="$(sed -ne 's/^[[:space:]]*\([^#[:space:]]\+\)[[:space:]]*$/\1/p' "$prefdm_config" |
134
			head -1 |tr '[:upper:]' '[:lower:]')"
135
	[ -z "$prefdm" ] || scan_wm_dir "$prefdm" "$@"
136
fi
137
138
scan_wm_dir "$wm" "$@"
139
140
if [ "$wm" != '--list' ]; then
141
	printf '%s: window manager "%s" not found.\n' "$PROG" "$wm" >&2
142
	exit 1
143
fi
144
145
[ -n "$found_default" ] || echo default
(-)xinitrc-2.4.23/install/usr/X11R6/bin/xscreenlock (-52 lines)
Lines 1-52 Link Here
1
#!/bin/sh
2
#
3
# $Id: xscreenlock,v 1.3 2005/09/29 23:00:38 ldv Exp $
4
# Copyright (C) 2003, 2005  Dmitry V. Levin <ldv@altlinux.org>
5
#
6
# Wrapper for xscreensaver and xlockmore.
7
#
8
# This program is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
12
#
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
21
#
22
23
unset n XSCREEN_CUSTOM XSCREEN_SERVER XSCREEN_CLIENT XSCREEN_SERVER_1 XSCREEN_CLIENT_1 XSCREEN_XLOCK ||:
24
XSCREEN_CUSTOM="$HOME/.xscreenlock"
25
XSCREEN_SERVER="/usr/X11R6/bin/xscreensaver"
26
XSCREEN_CLIENT="/usr/X11R6/bin/xscreensaver-command"
27
XSCREEN_SERVER_1="/usr/bin/xscreensaver"
28
XSCREEN_CLIENT_1="/usr/bin/xscreensaver-command"
29
XSCREEN_XLOCK="/usr/X11R6/bin/xlock"
30
31
if [ -x "$XSCREEN_CUSTOM" ]; then
32
	exec "$XSCREEN_CUSTOM" "$@"
33
fi
34
35
if [ -x "$XSCREEN_SERVER_1" -a -x "$XSCREEN_CLIENT_1" ]; then
36
	XSCREEN_SERVER="$XSCREEN_SERVER_1"
37
	XSCREEN_CLIENT="$XSCREEN_CLIENT_1"
38
fi
39
40
if [ -x "$XSCREEN_SERVER" -a -x "$XSCREEN_CLIENT" ]; then
41
	if ! "$XSCREEN_CLIENT" -version >/dev/null 2>&1; then
42
		"$XSCREEN_SERVER" -nosplash </dev/null &
43
		for n in `seq 1 5`; do
44
			"$XSCREEN_CLIENT" -version >/dev/null 2>&1 && break
45
			usleep 100000
46
		done
47
	fi
48
	"$XSCREEN_CLIENT" -lock
49
elif [ -x "$XSCREEN_XLOCK" ]; then
50
	"$XSCREEN_XLOCK"
51
fi
52

Return to bug 8563