ALT Linux Bugzilla
– Attachment 292 Details for
Bug 3129
startx can be smarter regarding 'server already running'
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
better startx
startx (text/plain), 3.01 KB, created by
Michael Shigorin
on 2003-10-07 20:28:38 MSD
(
hide
)
Description:
better startx
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2003-10-07 20:28:38 MSD
Size:
3.01 KB
patch
obsolete
>#!/bin/sh > ># $Xorg: startx.cpp,v 1.3 2000/08/17 19:54:29 cpqbld Exp $ ># ># This is just a sample implementation of a slightly less primitive ># interface than xinit. It looks for user .xinitrc and .xserverrc ># files, then system xinitrc and xserverrc files, else lets xinit choose ># its default. The system xinitrc should probably do things like check ># for .Xresources files and merge them in, startup up a window manager, ># and pop a clock and serveral xterms. ># ># $XFree86: xc/programs/xinit/startx.cpp,v 3.12 2001/11/30 20:57:48 dawes Exp $ > >userclientrc="$HOME/.xinitrc" >userserverrc="$HOME/.xserverrc" >sysclientrc=/etc/X11/xinit/xinitrc >sysserverrc=/etc/X11/xinit/xserverrc >defaultclientargs="" >defaultserverargs="" >clientargs= >serverargs= >display= > >if [ -f $userclientrc ]; then > defaultclientargs=$userclientrc >elif [ -f $sysclientrc ]; then > defaultclientargs=$sysclientrc >fi > >if [ -f $userserverrc ]; then > defaultserverargs=$userserverrc >elif [ -f $sysserverrc ]; then > defaultserverargs=$sysserverrc >fi > >add_client_args() >{ > if [ -z "$clientargs" ]; then > clientargs="$1" > else > clientargs="$clientargs $1" > fi >} > >add_server_args() >{ > if [ -z "$serverargs" ]; then > serverargs="$1" > else > serverargs="$serverargs $1" > fi >} > >add_def_client_args() >{ > if [ -z "$clientargs" ]; then > clientargs="$defaultclientargs $1" > else > clientargs="$clientargs $1" > fi >} > >add_def_server_args() >{ > if [ -z "$serverargs" ]; then > serverargs="$defaultserverargs $1" > else > serverargs="$serverargs $1" > fi >} > >whoseargs=client > >while [ -n "$1" ]; do > case "$1" in > /''*|\.*) > if [ "$whoseargs" = client ]; then > add_client_args "$1" > else > add_server_args "$1" > fi > ;; > --) > whoseargs=server > ;; > *) > if [ "$whoseargs" = client ]; then > add_def_client_args "$1" > else > if [ -z "$display" -a -z "${1##:*}" ]; then > display="$1" > fi > add_def_server_args "$1" > fi > ;; > esac > shift >done > ># process client arguments >if [ -z "$clientargs" ]; then > clientargs="$defaultclientargs" >fi > ># process server arguments >if [ -z "$serverargs" ]; then > serverargs="$defaultserverargs" >fi > >if [ -z "$XAUTHORITY" ]; then > export XAUTHORITY=$HOME/.Xauthority >fi > ># select next free display if not specified >if [ -z "$display" ]; then > locklist="`ls /tmp/.X*-lock 2>/dev/null`" > if [ -n "$locklist" ]; then > display=:$[1+0$(echo $locklist | tail -1 | sed -n 's/.*X\([[:digit:]]\+\)-lock$/\1/p')] > fi >fi > ># set up default Xauth info for this machine >removelist= >authdisplay=${display:-:0} >mcookie=`mcookie` >for displayname in "$authdisplay" "`hostname -f`$authdisplay"; do > if ! xauth list "$displayname" |fgrep -qs "$displayname "; then > xauth add "$displayname" . "$mcookie" > removelist="$displayname $removelist" > fi >done > >cleanup() >{ > [ -z "$xinit_pid" ] || kill "$xinit_pid" >} > >trap cleanup EXIT > >xinit $clientargs -- $authdisplay $serverargs -deferglyphs 16 & > >xinit_pid=$! > >wait "$xinit_pid" > >xinit_pid= > >if [ -n "$removelist" ]; then > xauth remove $removelist >fi > >DEALLOCVT=/usr/bin/deallocvt >if [ -x "$DEALLOCVT" ]; then > "$DEALLOCVT" >fi
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3129
:
292
|
298