Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37402326
en ru br
Репозитории ALT
S:2.4.47-alt3
5.1: 2.4.34-alt1
4.1: 2.4.29-alt1.M41.1
4.0: 2.4.27-alt1.M40.1
3.0: 2.4.22-alt1
www.altlinux.org/Changes

Группа :: Система/X11
Пакет: xinitrc

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

xinitrc-2.4.39/000075500000000000000000000000001211576746600133065ustar00rootroot00000000000000xinitrc-2.4.39/install/000075500000000000000000000000001211576746600147545ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/000075500000000000000000000000001211576746600155275ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/X11/000075500000000000000000000000001211576746600161005ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/X11/Xsession000075500000000000000000000105301211576746600176400ustar00rootroot00000000000000#!/bin/bash -login
#
# Copyright (C) 2002-2006 Dmitry V. Levin <ldv@altlinux.org>
#
# Traditional X session start script.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

PROG="${0##*/}"

if [ -z "$DISPLAY" ]; then
echo "$PROG: \$DISPLAY undefined." >&2
exit 1
fi

# Emulate which(1) internally.
absolute()
{
local WHICH

[ -n "$1" ] || return 1
WHICH="$(type -p "$1")" || return 1
[ "$WHICH" != "${WHICH##/}" ] || return 1
[ -x "$WHICH" ] || return 1

printf %s "$WHICH"
}

SourceIfNotEmpty()
{
local f="$1"
shift
[ -s "$f" ] && . "$f" "$@"
}

RunIfExecutable()
{
local f="$1"
shift
f="$(absolute "$f")" && [ -x "$f" ] && "$f" "$@"
}

ExecIfExecutable()
{
local f="$1"
shift
f="$(absolute "$f")" && [ -x "$f" ] && exec "$f" "$@"
}

f="$HOME/.xsession-errors"
[ -z "${DISPLAY##:*}" ] && f="$f$DISPLAY" || f="$f-$DISPLAY"

# Redirect errors to a file.
for errfile in "$f" "$HOME/.xsession-errors"; do
if install -m600 /dev/null "$errfile" 2>/dev/null; then
exec &>"$errfile"
break
fi
done

unset f

echo "Running $PROG[$$] $*"

if [ $# -ge 1 ]; then
# Clean up after xbanner.
RunIfExecutable freetemp
else
# ALT default background and cursor.
xsetroot -solid "#666699"
xsetroot -cursor_name left_ptr
fi

if [ -n "$LANGUAGE" ]; then
try_lang="$LANGUAGE"
elif [ -n "$LANG" ]; then
try_lang="$LANG"
else
try_lang=
fi

Xrdb()
{
if [ -s "$1" ]; then
xrdb -merge "$1"
return 0
else
return 1
fi
}

MergeResources()
{
local f
for f in "$@"; do
Xrdb "$f"
local found=
local n
for n in `printf %s "$try_lang" |tr : ' '`; do
n1="${n%.*}"
n2="${n1%_*}"
Xrdb "$f.$n2" && found=1
Xrdb "$f.$n1" && found=1
Xrdb "$f.$n" && found=1
[ -z "$found" ] || break
done
done
}

# Merge in defaults and keymaps.
MergeResources /etc/X11/Xresources "$HOME/.Xresources" "$HOME/.Xdefaults"

/etc/X11/xinit/xrootwarn || exit

TryXBrowser()
{
local n
for n in "$@"; do
if n=`absolute "$n"`; then
export BROWSER="$n"
break
fi
done
return 0
}

TryTextBrowser()
{
local n
for n in "$@"; do
if n=`absolute "$n"`; then
export BROWSER="xvt -e $n"
break
fi
done
return 0
}

# We need to set default browser.
# Window manager may redefine this setting.
if [ -z "$BROWSER" ] || [ ! -x "$BROWSER" ]; then
TryXBrowser xbrowser mozilla firefox konqueror
fi

if [ -z "$BROWSER" ] || [ ! -x "$BROWSER" ]; then
TryTextBrowser browser links lynx
fi

if [ -z "$BROWSER" ] || [ ! -x "$BROWSER" ]; then
export BROWSER=
fi

export HELP_BROWSER="$BROWSER"

# Source shell scripts from system /etc/X11/profile.d/
for f in /etc/X11/profile.d/*.sh; do
# Don't run *.rpm* and *~ scripts
[ "${f%.rpm*}" = "$f" -a "${f%\~}" = "$f" ] || continue

SourceIfNotEmpty "$f" "$@"
done

# Source shell scripts from user ~/.xprofile
SourceIfNotEmpty "$HOME"/.xprofile "$@"

# Run system scripts from /etc/X11/xinit.d/
for f in /etc/X11/xinit.d/*; do
# Don't run *.rpm* and *~ scripts
[ "${f%.rpm*}" = "$f" -a "${f%\~}" = "$f" ] || continue

if [ -x "$f" ]; then
"$f" &
fi
done

# Run user scripts from ~/.xsession.d/
for f in "$HOME"/.xsession.d/*; do
# Don't run *.rpm* and *~ scripts
[ "${f%.rpm*}" = "$f" -a "${f%\~}" = "$f" ] || continue

if [ -x "$f" ]; then
"$f" &
fi
done

unset f

RunIfExecutable /etc/X11/xinit/xrandrrc
RunIfExecutable /etc/X11/xinit/fixkeyboard
RunIfExecutable /etc/X11/xinit/XIM

# Try custom user WM.
ExecIfExecutable "/etc/X11/xsession.user.d/$USER"

# See if desktop manager has asked for a specific environment.
if [ $# -ge 1 ]; then
exec runwm "$@"
else
# Try user defined action.
ExecIfExecutable "$HOME/.xsession"
ExecIfExecutable "$HOME/.Xclients"

# Try WM Selector.
ExecIfExecutable wm-select

# Try WM Manager.
ExecIfExecutable wmselect

# Try default from runwm.
exec runwm default
fi
xinitrc-2.4.39/install/etc/X11/prefdm000075500000000000000000000030651211576746600173070ustar00rootroot00000000000000#!/bin/sh

HOME=/root
PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
export HOME PATH

# We need to source this so that the login screens get translated
HOME=/var/empty . /etc/profile.d/lang.sh

# Try nodm and autologin first if configured.
for name in nodm autologin; do
AUTOLOGIN_EXE="/usr/sbin/$name"
AUTOLOGIN_CFG="/etc/sysconfig/$name"
if [ -x "$AUTOLOGIN_EXE" -a -s "$AUTOLOGIN_CFG" ]; then
EXEC_ARGS=
. "$AUTOLOGIN_CFG"
trap 'kill -TERM $!; exit 143' HUP INT TERM
"$AUTOLOGIN_EXE" $EXEC_ARGS &
wait $!
trap - HUP INT TERM
break
fi
done

finddm() {
which "$1" >/dev/null 2>&1
}

preferred=
log=
rundm() {
[ -n "$preferred" ] && finddm "$preferred" ||
return 0
[ -n "$log" ] &&
exec "$preferred" >/dev/null 2>&1 $@ ||
exec "$preferred" $@
}

# Run preferred X display manager

if [ -s /etc/sysconfig/desktop ]; then
while read name; do
case "$name" in
AnotherLevel) preferred=xdm ;;
E17) preferred=entrance ;;
GNOME) preferred=gdm ;;
KDE) preferred=kdm log=1 ;;
LDM) preferred=lightdm ;;
LXDE) preferred=lxdm ;;
MATE) preferred=mdm ;;
WindowMaker) preferred=wdm ;;
*) continue ;;
esac
break
done < /etc/sysconfig/desktop
rundm $@
log=
fi

if finddm kdm; then
preferred=kdm
log=1
elif finddm gdm; then
preferred=gdm
elif finddm mdm; then
preferred=mdm
elif finddm wdm; then
preferred=wdm
elif finddm lxdm; then
preferred=lxdm
elif finddm lightdm; then
preferred=lightdm
elif finddm entrance; then
preferred=entrance
elif finddm xdm; then
preferred=xdm
fi

rundm $@
exit 1
xinitrc-2.4.39/install/etc/X11/xdm/000075500000000000000000000000001211576746600166705ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/X11/xdm/GiveConsole000075500000000000000000000007561211576746600210430ustar00rootroot00000000000000#!/bin/sh
# Assign ownership of the console to the invoking user
# $XConsortium: GiveConsole,v 1.2 93/09/28 14:29:20 gildea Exp $
#
# By convention, both xconsole and xterm -C check that the
# console is owned by the invoking user and is readable before attaching
# the console output. This way a random user can invoke xterm -C without
# causing serious grief.
#
chown $USER /dev/console
sessreg -a -w "/var/log/wtmp" -u "/var/run/utmp" \
-x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
xinitrc-2.4.39/install/etc/X11/xdm/TakeConsole000075500000000000000000000005401211576746600210240ustar00rootroot00000000000000#!/bin/sh
# Reassign ownership of the console to root, this should disallow
# assignment of console output to any random users's xterm
# $XConsortium: TakeConsole,v 1.2 93/09/28 14:30:29 gildea Exp $
#
chmod 622 /dev/console
chown root /dev/console
sessreg -d -w "/var/log/wtmp" -u "/var/run/utmp" \
-x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
xinitrc-2.4.39/install/etc/X11/xdm/Xaccess000064400000000000000000000036701211576746600202120ustar00rootroot00000000000000# $XConsortium: Xaccess,v 1.5 91/08/26 11:52:51 rws Exp $
#
# Access control file for XDMCP connections
#
# To control Direct and Broadcast access:
#
# pattern
#
# To control Indirect queries:
#
# pattern list of hostnames and/or macros ...
#
# To use the chooser:
#
# pattern CHOOSER BROADCAST
#
# or
#
# pattern CHOOSER list of hostnames and/or macros ...
#
# To define macros:
#
# %name list of hosts ...
#
# The first form tells xdm which displays to respond to itself.
# The second form tells xdm to forward indirect queries from hosts matching
# the specified pattern to the indicated list of hosts.
# The third form tells xdm to handle indirect queries using the chooser;
# the chooser is directed to send its own queries out via the broadcast
# address and display the results on the terminal.
# The fourth form is similar to the third, except instead of using the
# broadcast address, it sends DirectQuerys to each of the hosts in the list
#
# In all cases, xdm uses the first entry which matches the terminal;
# for IndirectQuery messages only entries with right hand sides can
# match, for Direct and Broadcast Query messages, only entries without
# right hand sides can match.
#

* #any host can get a login window

#
# To hardwire a specific terminal to a specific host, you can
# leave the terminal sending indirect queries to this host, and
# use an entry of the form:
#

#terminal-a host-a


#
# The nicest way to run the chooser is to just ask it to broadcast
# requests to the network - that way new hosts show up automatically.
# Sometimes, however, the chooser can't figure out how to broadcast,
# so this may not work in all environments.
#

* CHOOSER BROADCAST #any indirect host can get a chooser

#
# If you'd prefer to configure the set of hosts each terminal sees,
# then just uncomment these lines (and comment the CHOOSER line above)
# and edit the %hostlist line as appropriate
#

#%hostlist host-a host-b

#* CHOOSER %hostlist #
xinitrc-2.4.39/install/etc/X11/xdm/Xresources000064400000000000000000000020731211576746600207570ustar00rootroot00000000000000! $XConsortium: Xresources /main/8 1996/11/11 09:24:46 swick $
xlogin*login.translations: #override\
Ctrl<Key>R: abort-display()\n\
<Key>F1: set-session-argument(failsafe) finish-field()\n\
Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
<Key>Return: set-session-argument() finish-field()
xlogin*borderWidth: 3
xlogin*greeting: CLIENTHOST
xlogin*namePrompt: login:\040
xlogin*fail: Login incorrect
#ifdef COLOR
xlogin*greetColor: CadetBlue
xlogin*failColor: red
xlogin*Foreground: black
xlogin*Background: #fffff0
#else
xlogin*Foreground: black
xlogin*Background: white
#endif

XConsole.text.geometry: 480x130
XConsole.verbose: true
XConsole*iconic: true
XConsole*font: fixed

Chooser*geometry: 700x500+300+200
Chooser*allowShellResize: false
Chooser*viewport.forceBars: true
Chooser*label.font: *-new century schoolbook-bold-i-normal-*-240-*
Chooser*label.label: XDMCP Host Menu from CLIENTHOST
Chooser*list.font: -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
Chooser*Command.font: *-new century schoolbook-bold-r-normal-*-180-*

Xcursor.theme: jimmac
xinitrc-2.4.39/install/etc/X11/xdm/Xservers000064400000000000000000000011241211576746600204320ustar00rootroot00000000000000# $XConsortium: Xserv.ws.cpp,v 1.3 93/09/28 14:30:30 gildea Exp $
# $XFree86: xc/programs/xdm/config/Xserv.ws.cpp,v 1.1.1.1.12.2 1998/10/04 15:23:14 hohndel Exp $
#
# Xservers file, workstation prototype
#
# This file should contain an entry to start the server on the
# local display; if you have more than one display (not screen),
# you can add entries to the list (one per line). If you also
# have some X terminals connected which do not support XDMCP,
# you can add them here as well. Each X terminal line should
# look like:
# XTerminalName:0 foreign
#
:0 local /etc/X11/xinit/xserverrc
xinitrc-2.4.39/install/etc/X11/xdm/Xsession000075500000000000000000000001041211576746600204240ustar00rootroot00000000000000#!/bin/bash -login

exec /etc/X11/Xsession $*

# Xsession ends here
xinitrc-2.4.39/install/etc/X11/xdm/Xsetup_0000075500000000000000000000012371211576746600203300ustar00rootroot00000000000000#!/bin/sh
# (C) MandrakeSoft
# Chmouel Boudjnah <chmouel@mandrakesoft.com>

# Source function library.
. /etc/init.d/functions

SourceIfNotEmpty /etc/profile.d/kde.sh
SourceIfNotEmpty /etc/sysconfig/xinitrc

[ -n "$KDEDIR" ] || KDEDIR=/usr
[ -n "$XSETROOT" ] || XSETROOT='xsetroot -solid #666699'
[ -n "$XCONSOLE" ] || XCONSOLE='yes'

if [ -x $KDEDIR/bin/kdmdesktop ];then
# /usr/bin/kdmdesktop
# Commented above line and added next line because of kdedesktop issues
# fixes background.
$XSETROOT
else
$XSETROOT
is_yes "$XCONSOLE" &&
xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail
fi

ExecIfExecutable /etc/X11/xinit/fixkeyboard
xinitrc-2.4.39/install/etc/X11/xdm/xdm-config000064400000000000000000000016371211576746600206550ustar00rootroot00000000000000! $XConsortium: xdm-conf.cpp /main/3 1996/01/15 15:17:26 gildea $
DisplayManager.errorLogFile: /var/log/xdm-error.log
DisplayManager.pidFile: /var/run/xdm.pid
DisplayManager.keyFile: /etc/X11/xdm/xdm-keys
DisplayManager.servers: /etc/X11/xdm/Xservers
DisplayManager.accessFile: /etc/X11/xdm/Xaccess
! All displays should use authorization, but we cannot be sure
! X terminals will be configured that way, so by default
! use authorization only for local displays :0, :1, etc.
DisplayManager._0.authorize: true
DisplayManager._1.authorize: true
! The following three resources set up display :0 as the console.
DisplayManager._0.setup: /etc/X11/xdm/Xsetup_0
DisplayManager._0.startup: /etc/X11/xdm/GiveConsole
DisplayManager._0.reset: /etc/X11/xdm/TakeConsole
DisplayManager._0.startAttempts: 1
!
DisplayManager*resources: /etc/X11/xdm/Xresources
DisplayManager*session: /etc/X11/Xsession
DisplayManager*authComplain: false
xinitrc-2.4.39/install/etc/X11/xinit.d/000075500000000000000000000000001211576746600174555ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/X11/xinit.d/Mod_Meta_L_Disable000075500000000000000000000006631211576746600227730ustar00rootroot00000000000000#!/bin/sh
# -*- Mode: shell-script -*-
# Copyright (C) 2000 by Chmouel Boudjnah <chmouel@mandrakesoft.com>,
# MandrakeSoft. Redistribution of this file is permitted under the
# terms of the GNU Public License (GPL)
## description: Remove the MOD_META_L identifier mainly for xemacs

if [ -f /etc/sysconfig/keyboard ];then
if grep -q "REMOVE_MOD_META_L=yes" /etc/sysconfig/keyboard;then
xmodmap -e 'remove mod4 = Meta_L'
fi
fixinitrc-2.4.39/install/etc/X11/xinit/000075500000000000000000000000001211576746600172335ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/X11/xinit/XIM000075500000000000000000000017131211576746600176200ustar00rootroot00000000000000#!/bin/sh

# read the user (~/.i18n) or system-wide (/etc/sysconfig/i18n) i18n settings
. /etc/profile.d/lang.sh
if [ -z "$XIM_PROGRAM" -a -z "$XIM" ]; then
locale=C
if [ ! -z "$LC_ALL" ]; then
locale=$LC_ALL
elif [ ! -z "$LC_CTYPE" ]; then
locale=$LC_CTYPE
elif [ ! -z "$LANG" ]; then
locale=$LANG
fi
case $locale in
zh_TW*)
export LC_CTYPE=zh_TW.Big5
XIM=xcin
;;
zh_CN*)
export LC_CTYPE=zh_CN.GB2312
XIM=xcin-zh_CN.GB2312
;;
ja*)
XIM=kinput2
;;
ko*)
XIM=Ami
;;
*)
XIM=none
;;
esac
fi
if [ -z "$XIM_PROGRAM" ]; then
case "$XIM" in
xcin*) XIM_PROGRAM=xcin ;;
kinput2) XIM_PROGRAM=kinput2 ;;
Ami) XIM_PROGRAM=ami ;;
# or "wmami" for WindowMaker, or "ami_applet" for Gnome
# can we know the WM/Desktop used here ?
*) XIM_PROGRAM=/bin/true ;;
esac
fi
[ -z "$XMODIFIERS" -a -n "$XIM" ] && export XMODIFIERS="@im=$XIM"

if which $XIM_PROGRAM >/dev/null 2>/dev/null
then
$XIM_PROGRAM &
fi

xinitrc-2.4.39/install/etc/X11/xinit/Xclients000075500000000000000000000000421211576746600207460ustar00rootroot00000000000000#!/bin/sh

exec /etc/X11/Xsession
xinitrc-2.4.39/install/etc/X11/xinit/fixkeyboard000075500000000000000000000007311211576746600214710ustar00rootroot00000000000000#!/bin/sh
# Startup script called from /etc/X11/Xsession and /etc/X11/xdm/Xsetup_0
# to adjust keyboard.

usermodmap="$HOME/.Xmodmap"
userxkbmap="$HOME/.Xkbmap"

sysmodmap=/etc/X11/xinit/Xmodmap
sysxkbmap=/etc/X11/xinit/Xkbmap

if xdpyinfo |fgrep -qs XKEYBOARD; then
[ -s "$sysxkbmap" ] && setxkbmap `cat "$sysxkbmap"`
[ -s "$userxkbmap" ] && setxkbmap `cat "$userxkbmap"`
fi

[ -s $sysmodmap ] && xmodmap "$sysmodmap"
[ -s $usermodmap ] && xmodmap "$usermodmap"

exit 0
xinitrc-2.4.39/install/etc/X11/xinit/xinitrc000075500000000000000000000000471211576746600206420ustar00rootroot00000000000000#!/bin/sh

exec /etc/X11/Xsession "$@"
xinitrc-2.4.39/install/etc/X11/xinit/xrandrrc000075500000000000000000000011621211576746600210040ustar00rootroot00000000000000#!/bin/sh

type -p xrandr >/dev/null ||
exit 0

PROG="${0##*/}"
conf=
line=
errmsg() {
printf '%s\n' "$PROG: $conf: line=$line: $*" >&2
}

if ! xrandr -q |fgrep -qs '^default connected'; then
for conf in /etc/sysconfig/xrandr "$HOME/.Xrandr"; do
[ -s "$conf" ] ||
continue

line=0
while read -r display opts; do
line="$(($line+1))"

case "$display" in
:[0-9]*) ;;
'#'|'')
continue
;;
*)
errmsg 'syntax error'
continue
;;
esac

[ -n "$opts" ] ||
continue

xrandr -display "$display" $opts >/dev/null 2>&1 ||
errmsg 'xrandr fail'
done < "$conf"
done
fi
xinitrc-2.4.39/install/etc/X11/xinit/xrootwarn000075500000000000000000000006421211576746600212260ustar00rootroot00000000000000#!/bin/sh -e

[ `id -u` -eq 0 ] || exit 0

SourceIfNotEmpty()
{
local f="$1"
shift
[ -s "$f" ] && . "$f" "$@"
}

SourceIfNotEmpty /etc/sysconfig/xinitrc ||:

[ "$XROOTWARN" != no ] || exit 0

xsetroot -solid "#FF8000"

# Uncomment this string when 'xmessage <UTF8 TEXT>' will work properly.
#[ "$LANG" = POSIX -o "$LANGUAGE" = POSIX ] && SourceIfNotEmpty /etc/sysconfig/i18n ||:

exec /etc/X11/xinit/xrootwarn.real
xinitrc-2.4.39/install/etc/X11/xinit/xrootwarn.real000075500000000000000000000007071211576746600221520ustar00rootroot00000000000000#!/bin/sh -e

TEXTDOMAIN=xrootwarn

message=$"You are running a graphical interface as root.

This is a bad idea because as root, you can damage your system,
and nothing will stop you.

Click on 'Continue' if you really know what you are doing.

Otherwise, please click on 'Exit' and read your manual
to know how to add a non-privileged user account
to the system.
"

exec gxmessage -font fixed -center -buttons Continue:0,Exit:2 -default Exit "$message"
xinitrc-2.4.39/install/etc/X11/xinit/xserverrc000075500000000000000000000023751211576746600212130ustar00rootroot00000000000000#!/bin/sh

config='/etc/sysconfig/xserver'
[ ! -s "$config" ] || . "$config"

is_yes() {
case "$1" in
yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1) return 0 ;;
esac
return 1
}

OPTIONS=
check_arg() {
OPTIONS="$OPTIONS${1:+ $2 $1}"
}

check_yes() {
if [ -n "$1" ]; then
is_yes "$1" &&
OPTIONS="$OPTIONS $2" ||
OPTIONS="$OPTIONS${3:+ $3}"
fi
}

check_arg "$AUDIT" -audit
check_arg "$DPI" -dpi
check_arg "$DEPTH" -depth
check_arg "$NOLISTEN" -nolisten
check_arg "$CONNECTION_TIMEOUT" -to
check_arg "$DATA_SPACE_LIMIT" -ld
check_arg "$OPEN_FILES_LIMIT" -lf
check_arg "$STACK_SPACE_LIMIT" -ls
check_yes "$ACCESS_CONTROL" -ac
check_yes "$COREDUMP" -core
check_yes "$IGNORE_ABI" -ignoreABI
check_yes "$DPMS" dpms -dpms
check_yes "$XINERAMA" +xinerama -xinerama
check_yes "$AUTO_REPEAT" r -r
check_yes "$SCREENSAVER_VIDEO" v -v
check_arg "$SCREENSAVER_CYCLE" -p
check_arg "$SCREENSAVER_TIMEOUT" -s

XSERVER_OPTIONS="$OPTIONS"
OPTIONS=

check_arg "$XDMCP_QUERY" -query
check_arg "$XDMCP_INDIRECT" -indirect
check_arg "$XDMCP_MULTICAST" -multicast
check_yes "$XDMCP_BROADCAST" -broadcast
ENABLE_XDMCP="${OPTIONS:+1}"
check_arg "$XDMCP_PORT" -port
check_arg "$XDMCP_FROM" -from

XDMCP_OPTIONS="$OPTIONS"
OPTIONS=

exec X $XSERVER_OPTIONS ${ENABLE_XDMCP:+$XDMCP_OPTIONS} "$@"
xinitrc-2.4.39/install/etc/rc.d/000075500000000000000000000000001211576746600163555ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/rc.d/init.d/000075500000000000000000000000001211576746600175425ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/rc.d/init.d/dm000075500000000000000000000024561211576746600200770ustar00rootroot00000000000000#!/bin/sh
#
# chkconfig: 5 45 05
# description: This startup script launches the graphical display manager

# Source function library.
. /etc/init.d/functions

LOCKFILE=/var/lock/subsys/dm
RETVAL=0

start()
{
msg_starting $"display manager"
local args=
for f in `sed -ne 's,^\([0-9]\+\):[0-9]\+:respawn:/sbin/mingetty.*,/dev/tty\1,pg' </etc/inittab`; do
[ ! -c "$f" ] || args="$args $f"
done
start_daemon --lockfile "$LOCKFILE" --expect-user root --no-announce -- rundm $args --
RETVAL=$?
return $RETVAL
}

stop()
{
local FGCONSOLE=`absolute fgconsole`
local CHVT=`absolute chvt`

local fgconsole=
if [ -x "$FGCONSOLE" ]; then
fgconsole=`$FGCONSOLE`
fi

msg_stopping $"display manager"
stop_daemon --lockfile "$LOCKFILE" --expect-user root --no-announce -- rundm
RETVAL=$?

if [ -n "$fgconsole" -a -x "$CHVT" ]; then
$CHVT "$fgconsole"
fi

return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condreload|condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status --expect-user root -- rundm
RETVAL=$?
;;
*)
msg_usage "${0##*/} {start|stop|restart|condstop|condrestart|status}"
RETVAL=1
esac

exit $RETVAL
xinitrc-2.4.39/install/etc/sysconfig/000075500000000000000000000000001211576746600175335ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/sysconfig/xinitrc000064400000000000000000000000001211576746600211240ustar00rootroot00000000000000xinitrc-2.4.39/install/etc/sysconfig/xrandr000064400000000000000000000003051211576746600207520ustar00rootroot00000000000000# Xrandr config file may look like:
#
# :0.0 --fbmm 245x184
# :0.1 --mode 1280x768
#
# and xrandr(1) will be called two times with different arguments.
#
# Format: <display> <xrandr options ...>
#
xinitrc-2.4.39/install/etc/sysconfig/xserver000064400000000000000000000044431211576746600211610ustar00rootroot00000000000000# See Xserver(1) for more information about options.

### Main server option.

# Set default connection timeout in seconds.
#CONNECTION_TIMEOUT=15

# Set the data space limit of the server to the specified number of kilobytes.
#DATA_SPACE_LIMIT=-1

# Set the number-of-open-files limit of the server to the specified number.
#OPEN_FILES_LIMIT=-1

# Set the stack space limit of the server to the specified number of kilobytes.
#STACK_SPACE_LIMIT=-1

# Set the audit trail level.
#AUDIT=1

# Causes the server to generate a core dump on fatal errors.
# Value: yes/no
#COREDUMP=yes

# The Xorg server checks the ABI revision levels of each module that it loads.
# It will normally refuse to load modules with ABI revisions that are newer
# than the server's.
# See Xorg(1) for more information about option.
# Value: yes/no
#IGNORE_ABI=yes

# Set the resolution for all screens, in dots per inch.
#DPI=96

# Sets the default color depth. Legal values are 1, 4, 8, 15, 16, and 24.
#DEPTH=24

# Disable host-based access control mechanisms. Enables access
# by any host, and permits any host to modify the access control list.
# Value: yes/no
#ACCESS_CONTROL=yes

# Disable a transport type.
# Value: [tcp|local]
NOLISTEN=tcp

# Enable/disable DPMS (display power management services)
# Value: yes/no
#DPMS=yes

# Turn on/off auto-repeat.
# Value: yes/no
#AUTO_REPEAT=yes

# Enable or disable the XINERAMA extension.
# Value: yes/no
#XINERAMA=no

# Set video-(on/off) screen-saver preference.
# Value: yes/no
#SCREENSAVER_VIDEO=yes

# Set screen-saver pattern cycle time in minutes.
#SCREENSAVER_CYCLE=30

# Set screen-saver timeout time in minutes.
#SCREENSAVER_TIMEOUT=60

### XDMCP opentons.

# Enables XDMCP and sends Query packets to the specified hostname.
#XDMCP_QUERY=localhost

# Enables XDMCP and send IndirectQuery packets to the specified hostname.
#XDMCP_INDIRECT=localhost

# Enable XDMCP and multicast BroadcastQuery packets to the network.
# Value: [ADDRESS [HOP COUNT]]
#XDMCP_MULTICAST=

# Enable XDMCP and broadcasts BroadcastQuery packets to the network.
# Value: yes/no
#XDMCP_BROADCAST=no

# Uses the specified port number for XDMCP packets, instead of the default.
#XDMCP_PORT=6000

# Specifies the local address to connect from (useful if the connecting
# host has multiple network interfaces).
#XDMCP_FROM=127.0.0.1
xinitrc-2.4.39/install/usr/000075500000000000000000000000001211576746600155655ustar00rootroot00000000000000xinitrc-2.4.39/install/usr/bin/000075500000000000000000000000001211576746600163355ustar00rootroot00000000000000xinitrc-2.4.39/install/usr/bin/runwm000075500000000000000000000057121211576746600174400ustar00rootroot00000000000000#!/bin/sh -e
#
# Copyright (C) 2002, 2005, 2006 Dmitry V. Levin <ldv@altlinux.org>
#
# Executes window manager using wm.d database.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

PROG="${0##*/}"
WM_DIR=/etc/X11/wmsession.d

Usage()
{
[ "$1" = 0 ] || exec >&2
cat <<EOF
Usage: $PROG <window manager> [args]
$PROG --print <window manager> [args]
$PROG --list
$PROG --help
EOF
[ -n "$1" ] && exit "$1" || exit
}

[ "$1" != '--help' ] || Usage 0

print_only=
if [ "$1" = '--print' ]; then
print_only=1
shift
fi

if [ $# -lt 1 ]; then
Usage
fi

wm=`printf %s "$1" |tr '[:upper:]' '[:lower:]'`
shift

try_exec_wm()
{
local f
for f in "$@"; do
exec "$f" ||:
done
}

exec_wm()
{
if [ -n "$print_only" ]; then
printf '%s\n' "$*"
exit
else
exec "$@"
fi
}

is_safe_config()
{
[ -f "$1" -a -r "$1" -a -s "$1" ] || return
}

found_default=
scan_wm_dir()
{
local wm="$1" && shift
local d

for d in "$WM_DIR/default" "$WM_DIR"/*; do
is_safe_config "$d" || continue

local n=${d##*/}

# skip files with names containing dot
[ -n "${n##*.*}" ] || continue

# if found default, skip file named "default"
[ -z "$found_default" -o "$n" != default ] || continue

# fetch pathname for later execution
local exec=`sed -ne 's,^EXEC=\(/.\+\)$,\1,pg' "$d" |tail -1`

if [ -x "$exec" ]; then
# fetch WM name
local name0=`sed -ne 's,^NAME=\(.\+\)$,\1,pg' "$d" |tail -1`
[ -n "$name0" ] || continue

# canonicalize WM name
local name=`printf %s "$name0" |tr '[:upper:]' '[:lower:]'`

# if in list mode, print and continue
if [ "$wm" = '--list' ]; then
printf '%s\n' "$name0"
[ "$name" != default ] || found_default=1
continue
fi

# if found WM, execute
if [ "$wm" = default -o "$wm" = "$name" ]; then
exec_wm "$exec" "$@"
fi
fi
done
}

if [ "$wm" = failsafe ]; then
exec_wm xvt -fn fixed -geometry 80x24+0+0
fi

prefdm_config=/etc/sysconfig/desktop
if [ "$wm" = default ] && is_safe_config "$prefdm_config"; then
prefdm="$(sed -ne 's/^[[:space:]]*\([^#[:space:]]\+\)[[:space:]]*$/\1/p' "$prefdm_config" |
head -1 |tr '[:upper:]' '[:lower:]')"
[ -z "$prefdm" ] || scan_wm_dir "$prefdm" "$@"
fi

scan_wm_dir "$wm" "$@"

if [ "$wm" != '--list' ]; then
printf '%s: window manager "%s" not found.\n' "$PROG" "$wm" >&2
exit 1
fi

[ -n "$found_default" ] || echo default
xinitrc-2.4.39/install/usr/bin/xscreenlock000075500000000000000000000033421211576746600206050ustar00rootroot00000000000000#!/bin/sh
#
# Copyright (C) 2003, 2005, 2006 Dmitry V. Levin <ldv@altlinux.org>
#
# Wrapper for xscreensaver and xlockmore.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

unset n XSCREEN_CUSTOM XSCREEN_SERVER XSCREEN_CLIENT XSCREEN_XLOCK ||:
XSCREEN_CUSTOM="$HOME/.xscreenlock"
XSCREEN_SERVER="xscreensaver"
XSCREEN_CLIENT="xscreensaver-command"
XSCREEN_XLOCK="xlock"

# Emulate which(1) internally.
absolute()
{
local WHICH

[ -n "$1" ] || return 1
WHICH="$(type -p "$1")" || return 1
[ "$WHICH" != "${WHICH##/}" ] || return 1

echo "$WHICH"
}

if [ -x "$XSCREEN_CUSTOM" ]; then
exec "$XSCREEN_CUSTOM" "$@"
fi

XSCREEN_SERVER="$(absolute "$XSCREEN_SERVER")"
XSCREEN_CLIENT="$(absolute "$XSCREEN_CLIENT")"
XSCREEN_XLOCK="$(absolute "$XSCREEN_XLOCK")"

if [ -x "$XSCREEN_SERVER" -a -x "$XSCREEN_CLIENT" ]; then
if ! "$XSCREEN_CLIENT" -version >/dev/null 2>&1; then
"$XSCREEN_SERVER" -nosplash </dev/null &
for n in `seq 1 5`; do
"$XSCREEN_CLIENT" -version >/dev/null 2>&1 && break
usleep 100000
done
fi
"$XSCREEN_CLIENT" -lock
elif [ -x "$XSCREEN_XLOCK" ]; then
"$XSCREEN_XLOCK"
fi
xinitrc-2.4.39/install/usr/lib/000075500000000000000000000000001211576746600163335ustar00rootroot00000000000000xinitrc-2.4.39/install/usr/lib/rpm/000075500000000000000000000000001211576746600171315ustar00rootroot00000000000000xinitrc-2.4.39/install/usr/lib/rpm/wms.filetrigger000075500000000000000000000001351211576746600221660ustar00rootroot00000000000000#!/bin/sh -e

egrep -qs '^/etc/X11/(wmsession.d|wms-methods.d)/' && /usr/sbin/update_wms ||:
xinitrc-2.4.39/install/usr/sbin/000075500000000000000000000000001211576746600165205ustar00rootroot00000000000000xinitrc-2.4.39/install/usr/sbin/update_wms000075500000000000000000000036631211576746600206260ustar00rootroot00000000000000#!/bin/sh
#
# Copyright (C) 2002-2006 Dmitry V. Levin <ldv@altlinux.org>
#
# Updates window manager session lists.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

[ -z "${RPM_INSTALL_NAME-}" ] || exit 0
runwmlist="$(runwm --list)" || exit 1
[ -n "$runwmlist" ] || exit 1

# KDM
if [ -s /etc/X11/kdm/kdmrc ]; then
subst "s|^\\(SessionTypes\\)=.*|\\1=$(printf %s "$runwmlist" |tr '\n' ,)|" \
/etc/X11/kdm/kdmrc
fi

# WDM
if [ -s /etc/X11/wdm/wdm-config ]; then
subst "s|^\\(DisplayManager\\*wdmWm\\):.*|\\1:$(printf %s "$runwmlist" |tr '\n' :)|" \
/etc/X11/wdm/wdm-config
fi

# GDM (old scheme)
if [ -d /etc/X11/gdm/Sessions ]; then
rm -f /etc/X11/gdm/Sessions/*
printf '%s\n' "$runwmlist" |while read n; do
[ -n "$n" ] || continue
cat >"/etc/X11/gdm/Sessions/$n" <<__EOF__
#!/bin/sh
exec /etc/X11/Xsession "$n"
__EOF__
chmod 755 "/etc/X11/gdm/Sessions/$n"
done
fi

# GDM (new scheme)
if [ -d /etc/X11/sessions ]; then
rm -f /etc/X11/sessions/*
printf '%s\n' "$runwmlist" |while read n; do
[ -n "$n" ] || continue
cat >"/etc/X11/sessions/$n.desktop" <<__EOF__
[Desktop Entry]
Encoding=UTF-8
Name=$n
Comment=$n session
Exec=/etc/X11/Xsession "$n"
Icon=
Type=Application
__EOF__
done
fi

# external DM configuration
for hook in /etc/X11/wms-methods.d/*; do
[ -x "$hook" ] && "$hook"
done

exit 0
xinitrc-2.4.39/po/000075500000000000000000000000001211576746600137245ustar00rootroot00000000000000xinitrc-2.4.39/po/Makefile000064400000000000000000000032271211576746600153700ustar00rootroot00000000000000#
# Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>
#
# Makefile for pofiles
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#

INSTALL = /usr/bin/install
XGETTEXT=/usr/bin/xgettext
MSGFMT=/usr/bin/msgfmt
MSGMERGE=/usr/bin/msgmerge

PACKAGE = xrootwarn
POTFILE = $(PACKAGE).po
CATALOGS = ru
MOFILES = $(CATALOGS:=.mo)
SOURCES = $(wildcard ../src/*.c)

localedir = $(RPM_BUILD_ROOT)/usr/share/locale

.PHONY: all install clean update

all: $(MOFILES)

install:
@for n in $(CATALOGS); \
do $(INSTALL) -vpD -m644 $$n.mo $(localedir)/$$n/LC_MESSAGES/$(PACKAGE).mo; \
done

clean:
$(RM) $(MOFILES) $(POTFILE) *.old *.new

update: $(POTFILE)
@for lang in $(CATALOGS); do \
mv $$lang.po $$lang.old.po; \
echo -n "$$lang "; \
if $(MSGMERGE) $$lang.old.po $(POTFILE) -o $$lang.po; then \
$(RM) $$lang.old.po; \
else \
echo "failed!"; \
$(RM) $$lang.po; \
mv $$lang.old.po $$lang.po; \
fi; \
done

$(POTFILE): $(SOURCES)
$(XGETTEXT) --keyword=_ -d $(PACKAGE) $^

%.mo: %.po
$(MSGFMT) $(OUTPUT_OPTION) $<
xinitrc-2.4.39/po/ru.po000064400000000000000000000027711211576746600147210ustar00rootroot00000000000000# xrootwarn for xinitrc.
# Copyright (C) 2002,2003 Dmitry V. Levin <ldv@altlinux.org>
#
msgid ""
msgstr ""
"Project-Id-Version: xrootwarn\n"
"POT-Creation-Date: 2002-03-17 15:26+0300\n"
"PO-Revision-Date: 2002-03-17 15:26+0300\n"
"Last-Translator: Dmitry V. Levin <ldv@altlinux.org>\n"
"Language-Team: <devel@altlinux.ru>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "You are running a graphical interface as root.\n\
\n\
This is a bad idea because as root, you can damage your system,\n\
and nothing will stop you.\n\
\n\
Click on 'Continue' if you really know what you are doing.\n\
\n\
Otherwise, please click on 'Exit' and read your manual\n\
to know how to add a non-privileged user account\n\
to the system.\n\
"
msgstr "п▓я▀ п╥п╟п©я┐я│я┌п╦п╩п╦ пЁя─п╟я└п╦я┤п╣я│п╨п╦п╧ п╦п╫я┌п╣я─я└п╣п╧я│ я│ п©я─п╟п╡п╟п╪п╦ п©я─п╦п╡п╦п╩п╣пЁп╦я─п╬п╡п╟п╫п╫п╬пЁп╬\n\
п©п╬п╩я▄п╥п╬п╡п╟я┌п╣п╩я▐.\n\
\n\
п╜я┌п╬ п╬п©п╟я│п╫п╬, п©п╬я│п╨п╬п╩я▄п╨я┐ п╪п╬п╤п╣я┌ п©я─п╦п╡п╣я│я┌п╦ я│п╦я│я┌п╣п╪я┐ п╡ п╫п╣я─п╟п╠п╬я┌п╬я│п©п╬я│п╬п╠п╫п╬п╣ я│п╬я│я┌п╬я▐п╫п╦п╣!\n\
\n\
п²п╟п╤п╪п╦я┌п╣ 'Continue', п╣я│п╩п╦ п╡я▀ п╢п╣п╧я│я┌п╡п╦я┌п╣п╩я▄п╫п╬ я┐п╡п╣я─п╣п╫я▀ п╡ я│п╡п╬п╦я┘ п╢п╣п╧я│я┌п╡п╦я▐я┘.\n\
\n\
п▓ п©я─п╬я┌п╦п╡п╫п╬п╪ я│п╩я┐я┤п╟п╣, п©п╬п╤п╟п╩я┐п╧я│я┌п╟, п╫п╟п╤п╪п╦я┌п╣ 'Exit' п╦ п╬п╠я─п╟я┌п╦я┌п╣я│я▄ п╨ п╢п╬п╨я┐п╪п╣п╫я┌п╟я├п╦п╦,\n\
я┤я┌п╬п╠я▀ я┐п╥п╫п╟я┌я▄, п╨п╟п╨ п╢п╬п╠п╟п╡п╦я┌я▄ я┐я┤п╣я┌п╫я┐я▌ п╥п╟п©п╦я│я▄ п╫п╣п©я─п╦п╡п╦п╩п╣пЁп╦я─п╬п╡п╟п╫п╫п╬пЁп╬\n\
п©п╬п╩я▄п╥п╬п╡п╟я┌п╣п╩я▐ п╡ я│п╦я│я┌п╣п╪я┐.\n\
"
xinitrc-2.4.39/src/000075500000000000000000000000001211576746600140755ustar00rootroot00000000000000xinitrc-2.4.39/src/rundm.c000064400000000000000000000061431211576746600153720ustar00rootroot00000000000000
/*
Copyright (C) 2003 Dmitry V. Levin <ldv@altlinux.org>

The caller data initialization module for the pkg-build-priv program.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#define _GNU_SOURCE
#include <errno.h>
#include <error.h>
#include <stdio.h>
#include <fcntl.h>
#include <paths.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>

extern const char *__progname;

static void
do_child (int ac, const char **av)
{
const char path[] = "/etc/X11/prefdm";
const char *args[(ac > 1) ? ac + 2 : 3];

if (setsid () < 0)
error (EXIT_FAILURE, errno, "setsid");

args[0] = "prefdm";
args[1] = "-nodaemon";
if (ac > 0)
memcpy (&args[2], &av[0], ac * sizeof (av[0]));
args[2 + ac] = 0;

execv (path, (char *const *)args);
error (EXIT_FAILURE, errno, "%s", path);
}

static volatile int terminated, sigchld;

static void
term_handler (int no)
{
terminated = 1;
}

static void
child_handler (int no)
{
sigchld = 1;
}

int
main (int ac, const char **av)
{
const char pid_file[] = "/var/run/rundm.pid";
const char first_file[] = "/var/lock/TMP_1ST";
FILE *f;
pid_t pid;
int i;

if (ac < 1)
return EXIT_FAILURE;
--ac;
++av;

if (daemon (0, 0) < 0)
error (EXIT_FAILURE, errno, "daemon");

signal (SIGHUP, SIG_IGN);
signal (SIGINT, term_handler);
signal (SIGQUIT, term_handler);
signal (SIGTERM, term_handler);
signal (SIGCHLD, child_handler);

f = fopen (pid_file, "w");
if (f)
{
fprintf (f, "%ld\n", (long)getpid());
fclose (f);
}

while (!terminated && !access (first_file, F_OK))
sleep(1);

if (terminated)
{
unlink (pid_file);
return EXIT_SUCCESS;
}

for (i = 0; i < ac; ++i)
{
int fd, flags;

if (!strcmp ("--", av[i]))
{
++i;
break;
}
if ((fd = open (av[i], O_RDONLY|O_NOCTTY)) < 0)
{
error (EXIT_SUCCESS, errno, "open: %s", av[i]);
continue;
}
if ((flags = fcntl (fd, F_GETFD, 0)) < 0)
{
error (EXIT_SUCCESS, errno, "fcntl: F_GETFD: %s", av[i]);
close (fd);
continue;
}
flags |= FD_CLOEXEC;
if (fcntl (fd, F_SETFD, flags) < 0)
{
error (EXIT_SUCCESS, errno, "fcntl: F_SETFD: %s", av[i]);
close (fd);
continue;
}
}
ac -= i;
av += i;

pid = fork ();
if (pid < 0)
{
unlink (pid_file);
error (EXIT_FAILURE, errno, "fork");
}
else if (!pid)
do_child (ac, av);

while (!terminated && !sigchld)
pause ();

if (terminated)
kill (pid, SIGTERM);

TEMP_FAILURE_RETRY (waitpid (pid, 0, 0));
unlink (pid_file);

return EXIT_SUCCESS;
}
xinitrc-2.4.39/xinitrc.spec000064400000000000000000000360241211576746600156470ustar00rootroot00000000000000Name: xinitrc
Version: 2.4.39
Release: alt1

Summary: The default startup scripts for the X Window System
License: GPL
Group: System/X11

Source: %name-%version.tar

Provides: %_sysconfdir/X11/xinit.d, %_sysconfdir/X11/wmsession.d, %_sysconfdir/X11/wms-methods.d
Provides: %_sysconfdir/X11/xsession.user.d
Requires: app-defaults >= 0:0.2, xvt
Conflicts: kde-settings < 3.1.0-alt3, kdebase < 3.0.2-alt5, kde-config < 1.0-alt5
Conflicts: initscripts < 1:5.49.1-alt1

%description
The %name package contains system scripts used to start
X Window System session.

%prep
%setup

%build
%make_build -C po
make -C src rundm CFLAGS="%optflags"

%install
install -pD -m755 src/rundm %buildroot%_sbindir/rundm
mkdir -p %buildroot%_sysconfdir/X11/wmsession.d
mkdir -p %buildroot%_sysconfdir/X11/wms-methods.d
mkdir -p %buildroot%_sysconfdir/X11/xsession.user.d

cp -av install/* %buildroot/
%make_install install -C po
%find_lang xrootwarn

%post
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add dm
fi
if grep -qs '^x:5:' /etc/inittab; then
/sbin/chkconfig --add dm
sed -i 's/^x:5:/#x:5:/' /etc/inittab
fi

%preun
if [ $1 -eq 0 ]; then
/sbin/chkconfig --del dm
fi

%triggerpostun -- initscripts < 1:5.49.1-alt1
/sbin/chkconfig --add dm

%triggerun -- xinitrc < 2.4.39
/sbin/chkconfig --del update_wms

%files -f xrootwarn.lang
%_sbindir/*
%_bindir/*
%_sysconfdir/X11/wmsession.d
%_sysconfdir/X11/wms-methods.d
%_sysconfdir/X11/xsession.user.d
%_rpmlibdir/*
%config %_initdir/*
%config %_sysconfdir/X11/Xsession
%config %_sysconfdir/X11/prefdm
%config(noreplace) %_sysconfdir/sysconfig/*
%config(noreplace) %_sysconfdir/X11/xinit*
%config(noreplace) %_sysconfdir/X11/xdm/*

%changelog
* Thu Mar 07 2013 Dmitry V. Levin <ldv@altlinux.org> 2.4.39-alt1
- xrootwarn: replaced xmessage with gxmessage (closes: #28111).
- Dropped no longer needed update_wms startup script (closes: #28103).

* Mon Jan 21 2013 Dmitry V. Levin <ldv@altlinux.org> 2.4.38-alt1
- prefdm: added E17/entrance support (closes: #28399).

* Mon Sep 24 2012 Dmitry V. Levin <ldv@altlinux.org> 2.4.37-alt1
- prefdm: added MATE support (closes: #27611).

* Tue Jun 26 2012 Michael Shigorin <mike@altlinux.org> 2.4.36-alt1
- prefdm: Added nodm support by Max Kosmach (closes: #27449).

* Sat Aug 06 2011 Evgeny Sinelnikov <sin@altlinux.ru> 2.4.35-alt1
- Xsession: add xsession.user.d for fixed wm program per user
(closes #18316).

* Tue May 17 2011 Mykola Grechukh <gns@altlinux.ru> 2.4.34-alt2
- prefdm: Added lightdm support.
- xserver: Do not listen tcp (by Alexey Gladkov).

* Tue May 18 2010 Dmitry V. Levin <ldv@altlinux.org> 2.4.34-alt1
- prefdm: Added lxdm support (by Nick S. Grechukh, closes: #23424).

* Thu Apr 09 2009 Igor Vlasenko <viy@altlinux.ru> 2.4.33-alt1
- added explicit Provides: of %_sysconfdir/X11/wms-methods.d

* Fri Apr 03 2009 Igor Vlasenko <viy@altlinux.ru> 2.4.32-alt1
- NMU: implemented Display Manager Policy
(http://www.altlinux.org/Display_Manager_Policy)

* Thu Nov 20 2008 Dmitry V. Levin <ldv@altlinux.org> 2.4.31-alt1
- Implemented posttrans filetrigger for WM registration.
- update_wms: Changed to exit when executed during rpm package install.

* Tue Nov 11 2008 Dmitry V. Levin <ldv@altlinux.org> 2.4.30-alt1
- fixkeyboard: Run xmodmap also in case when XKEYBOARD extension
is enabled (shrek).

* Fri Aug 29 2008 Dmitry V. Levin <ldv@altlinux.org> 2.4.29-alt1
- runwm: Fixed failsafe mode (closes: #16820).

* Thu Jan 17 2008 Alexey Gladkov <legion@altlinux.ru> 2.4.28-alt1
- Add xrandr 1.2 support (#13955).
See /etc/sysconfig/xrandr for more information.
- %_sysconfdir/X11/xinit/xserverrc: Add two parameters:
+ IGNORE_ABI - disable ABI check;
+ DEPTH - sets the default color depth.

* Tue Dec 25 2007 Alexey Gladkov <legion@altlinux.ru> 2.4.27-alt1
- Add Xorg server startup arguments customization (#12403).
See /etc/sysconfig/xserver for more information.
- %_sysconfdir/X11/xdm/Xsetup_0: Add two parameters
into /etc/sysconfig/xinitrc:
+ XSETROOT - define xsetroot command;
+ XCONSOLE - enables xconsole run.
- prefdm uses system i18n settings (#10981).
- Fix xrootwarn message.

* Tue Sep 18 2007 Dmitry V. Levin <ldv@altlinux.org> 2.4.26-alt1
- Removed cvsid tags.
- runwm: Replaced "xterm" with "xvt" (#12773).

* Fri Mar 03 2006 Dmitry V. Levin <ldv@altlinux.org> 2.4.25-alt1
- %_sysconfdir/X11/xinit/fixkeyboard:
+ Enabled system xkb map support (#9177).
+ Removed obsolete stuff.
- Removed obsolete %_sysconfdir/X11/xinit/Xmodmap.

* Sat Jan 07 2006 Dmitry V. Levin <ldv@altlinux.org> 2.4.24-alt1
- Changed all scripts to avoid full paths to programs.
- Moved all utilities to %_bindir/.

* Fri Sep 30 2005 Dmitry V. Levin <ldv@altlinux.org> 2.4.23-alt1
- %_sysconfdir/X11/xdm/Xresources: Added Xcursor.theme (closes #7324).
- %_x11bindir/xscreenlock: Handle new XSS paths (closes #7617).
- %_x11bindir/runwm: When looking for default WM,
honor /etc/sysconfig/desktop value (closes #8057).

* Sat Jun 12 2004 Dmitry V. Levin <ldv@altlinux.org> 2.4.22-alt1
- update_wms: deal with strange wm names (fixes #3907).
- Xsession, runwm, init.d/dm: do not use absolute pathnames
where it is not necessary.

* Thu Jun 03 2004 Dmitry V. Levin <ldv@altlinux.org> 2.4.21-alt1
- update_wms: updated new GDM scheme support, by aris@ (#3907).

* Tue Jun 01 2004 Dmitry V. Levin <ldv@altlinux.org> 2.4.20-alt1
- update_wms: added new GDM scheme support, by aris@ (#3907).
- Xsession: updated TryXBrowser list (#4232).

* Mon Nov 03 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.19-alt1
- /etc/X11/xinit/xrootwarn.real: run xmessage with "-font fixed".

* Tue Oct 14 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.18-alt1
- /etc/X11/xinit/xserverrc: new file.
- /etc/X11/xdm/Xservers: use it.

* Fri Aug 22 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.17-alt1
- /etc/X11/xdm/Xservers, /etc/X11/prefdm:
reverted #0002531 workarounds.
- %_sbindir/rundm: added dev list support.
- %_initdir/dm: pass dev list to rundm.

* Fri Aug 15 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.16-alt1
- /etc/X11/prefdm:
added vt7 argument to autologin, to workaround #0002531.

* Wed Aug 06 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.15-alt1
- /etc/X11/xdm/Xservers:
added vt7 argument, to workaround #0002531.

* Mon Jun 09 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.14-alt2
- Provides: %_sysconfdir/X11/wmsession.d

* Tue Jun 03 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.14-alt1
- init.d/update_wms: fixed $LOCKFILE handling.

* Wed May 21 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.13-alt1
- Added %_initdir/update_wms.
- Ported %_initdir/dm to new rc scheme.
- Added %_sysconfdir/X11/xinit.d to provides list.

* Tue Apr 22 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.12-alt1
- Relocated dm stuff from initscripts to this package.

* Fri Jan 24 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.11-alt1
- %_x11bindir/xscreenlock: new wrapper for xscreensaver/xlockmore.

* Tue Jan 21 2003 Dmitry V. Levin <ldv@altlinux.org> 2.4.10-alt1
- update_wms: updated.
- ru.po: updated xrootwarn translation.

* Fri Nov 15 2002 Dmitry V. Levin <ldv@altlinux.org> 2.4.9-alt1
- Xsession: pass args to scripts (#0001560).
- xrootwarn: workaround bash bug.

* Mon Nov 11 2002 Dmitry V. Levin <ldv@altlinux.org> 2.4.8-alt1
- Fixed system Xsession problem (#0000772).
- Fixed /etc/X11/xdm/Xresources (#0000965).
- Fixed autostart problem (#0001430).
- [INCOMPATIBLE] Changed user autostart directory to ~/.xsession.d/ (#0001431).
- Added sourcing of user ~/.xprofile file.
- Implemented xrootwarn.

* Wed Apr 10 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.7-alt1
- runwm: added --print option.
- Xsession: exec runwm default (#0000812).
- Set %_sysconfdir/X11/Xsession to %%config.

* Mon Mar 11 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.6-alt1
- update_wms: fixed GDM session generation (reported by Alexey Morozov).
- Xsession: redirect stderr to "~/.xsession-errors$DISPLAY".
- Xsession: source shell scripts from /etc/X11/profile.d/*.sh.
- Repackaged sources.

* Mon Feb 18 2002 Stanislav Ievlev <inger@altlinux.ru> 2.4.5-alt3
- Xresources moved into new app-defaults package

* Tue Feb 12 2002 Ivan Zakharyaschev <imz@altlinux.ru> 2.4.5-alt2.2
- change the License: Public Domain -> GPL (beacuse Xresources are under GPL)

* Mon Feb 11 2002 Ivan Zakharyaschev <imz@altlinux.ru> 2.4.5-alt2.1
- Xresources: sync with emacs-21.1-alt10 app-defaults

* Mon Jan 21 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.5-alt2
- Xsession: added support for forthcoming Xresources.* config files.

* Thu Jan 17 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.5-alt1
- runwm: return native WM names for "--list" option.
- update_wms: added WDM support.

* Wed Jan 09 2002 Dmitry V. Levin <ldv@alt-linux.org> 2.4.5-alt0.1
- Rewritten wmsession.d support.

* Tue Apr 03 2001 Dmitry V. Levin <ldv@altlinux.ru> 2.4.4-ipl38mdk
- Fixed Xsession to keep user-defined PATH.

* Wed Mar 07 2001 Dmitry V. Levin <ldv@fandra.org> 2.4.4-ipl37mdk
- /etc/X11/Xsession: execute as bash script.
- /etc/X11/Xresources: added wheel mouse translations for netscape.

* Fri Feb 16 2001 Dmitry V. Levin <ldv@fandra.org> 2.4.4-ipl36mdk
- /etc/X11/Xsession: source /etc/profile.d/lang.sh

* Wed Feb 14 2001 Dmitry V. Levin <ldv@fandra.org> 2.4.4-ipl35mdk
- Merged in patch from AEN.

* Sat Dec 30 2000 Dmitry V. Levin <ldv@fandra.org> 2.4.4-ipl34mdk
- Script cleanup.
- RE adaptions.

* Tue Dec 26 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.4.4-34mdk
- xinitrc-Mod_Meta_L_Disable: Add this ugly script, when a
REMOVE_MOD_META_L=yes remove the MOD_META_L to make some
applications happy (ie:xemacs).

* Tue Nov 28 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-33mdk
- added support for ssh2 (bug #871).
- use bash -login only on Xsession for xdm (bug #1505).

* Fri Oct 13 2000 Pablo Saratxaga <pablo@manderakesoft.com> 2.4.4-32mdk
- added auto-launching of XIM servers.

* Fri Oct 06 2000 David BAUDENS <baudens@mandrakesoft.com> 2.4.4-31mdk
- Set HELP_BROWSER

* Mon Oct 2 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-30mdk
- removed ^@ in /etc/X11/Xsession.

* Mon Oct 2 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-29mdk
- remove xhost+ in /etc/X11/Xsession (let msec do this job).

* Tue Sep 12 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-28mdk
- fix resources to make xdm starts the X server only once and let init do its job.

* Fri Sep 01 2000 David BAUDENS <baudens@mandrakesoft.com> 2.4.4-27mdk
- Use Linux-Mandrake colors for xsetroot

* Wed Aug 30 2000 Christopher Molnar <molnarc@mandrakesoft.com> 2.4.4-26mdk
- Xsetup_0: commented out the kdmdesktop and added line to fix background colors

* Tue Jun 6 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.4.4-25mdk
- Xsession: Resinsert /bin/bash -login.

* Mon Jun 5 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.4.4-24mdk
- Xsession: use /bin/sh instead of /bin/bash -login.

* Thu May 4 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-23mdk
- fix path of WindowMaker in RunWM.

* Thu Apr 27 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-22mdk
- added a fallback /etc/X11/xdm/Xsession.

* Thu Apr 20 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-21mdk
- Xsession: merge ~/.Xdefaults too.

* Thu Apr 13 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.4.4-20mdk
- xinitrc-RunWM: set wmaker to the right path (thanks
john.cavan@sympatico.ca).

* Tue Apr 11 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-18mdk
- launch scripts in /etc/X11/xinit.d
- removed imwheel stuff.

* Fri Apr 7 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.4.4-18mdk
- Cvs import clean up spec file.

* Thu Apr 6 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.4.4-17mdk
- Another fix of Xsession.

* Thu Apr 6 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.4.4-16mdk
- Try to get chksession feature when launching with startx (aka:
fix merge of flepied).

* Thu Apr 6 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 2.4.4-15mdk
- smaller xterm in Xsession for failsafe setting, in order
to stay in screen when having 800x600

* Thu Mar 30 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-14mdk
- activate imwheel only if WHEEL is yes in /etc/sysconfig/mouse.
- end the merge of xinit and xdm startup.

* Thu Mar 09 2000 Francis Galiegue <francis@mandrakesoft.com> 2.4.4-13mdk
- imwheel -k added to Xsession

* Wed Mar 1 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-12mdk
- make Xsession ssh aware.

* Mon Feb 7 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-11mdk

- unified xdm and startx init sequences.

* Thu Jan 6 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-10mdk

- load xmodmaps the same way in xinit and xdm modes.

* Wed Dec 22 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Do an exec for chksession. (c) Chmouel.

* Wed Dec 22 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Do an exec (flepied).

* Wed Dec 22 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Xsession and Xclients for new chksession.

* Tue Dec 21 1999 Frederic Lepied <flepied@mandrakesoft.com> 2.4.4-5mdk

- fix RunWM for WindowMaker.
- fix Xclients to be able to launch something else than KDE, GNOME or AnotherLevel.

* Thu Dec 16 1999 Frederic Lepied <flepied@mandrakesoft.com>

- fixed a typo in /etc/X11/xinit/xinitrc.

* Wed Nov 24 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- By default if there is no windows manager launch icewm-light no fvwm.
- Put a midnight color by default.

* Wed Nov 3 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Add xmodmap files.
- 2.4.4.

* Thu Jul 22 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Add Xsession files.
- Oups typo :-((

* Sun May 09 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- By default we run kde (again 8-)

* Mon May 03 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Mandrake adpatations.
- By default Mandrake launch KDE.

* Mon Apr 19 1999 Preston Brown <pbrown@redhat.com>
- argh, fixed my changes from yesterday

* Sun Apr 18 1999 Preston Brown <pbrown@redhat.com>
- added /etc/sysconfig/desktop support

* Mon Mar 22 1999 Bill Nottingham <notting@redhat.com>
- make /etc/X11/xinit/* %%config (bug #1051)

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 2)

* Tue Feb 02 1999 Preston Brown <pbrown@redhat.com>
- added ability to have KDE recognized if it is all that is installed

* Wed Jan 27 1999 Preston Brown <pbrown@redhat.com>
- updated so that GNOME is the default, and a few other cleanups

* Fri Sep 18 1998 Cristian Gafton <gafton@redhat.com>
- added the RunWM script and modified Xclients to use this new script

* Sun Sep 13 1998 Cristian Gafton <gafton@redhat.com>
- included WindowMaker hints

* Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Wed Apr 22 1998 Cristian Gafton <gafton@redhat.com>
- handle AfterStep (and possibly other window managers)

* Tue Nov 11 1997 Michael K. Johnson <johnsonm@redhat.com>
- export the BROWSER variable.

* Fri Nov 08 1997 Cristian Gafton <gafton@redhat.com>
- added handling for the BROWSER variable

* Wed Oct 15 1997 Cristian Gaftin <gafton@redhat.com>
- updated for AnotherLevel

* Fri Jul 18 1997 Erik Troan <ewt@redhat.com>
- built for glibc, added dependencies

* Thu Mar 20 1997 Erik Troan <ewt@redhat.com>
- Added /etc/X11/xinitrc/Xclients to this file and removed it from rootfiles
and etcskel.
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin