View | Details | Raw Unified | Return to bug 220668 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/local/bin/startx (-2 / +3 lines)
Lines 179-184 Link Here
179
    # create a file with auth information for the server. ':0' is a dummy.
179
    # create a file with auth information for the server. ':0' is a dummy.
180
    xserverauthfile=$HOME/.serverauth.$$
180
    xserverauthfile=$HOME/.serverauth.$$
181
    trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
181
    trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
182
    touch "$xserverauthfile"
182
    xauth -q -f "$xserverauthfile" << EOF
183
    xauth -q -f "$xserverauthfile" << EOF
183
add :$dummy . $mcookie
184
add :$dummy . $mcookie
184
EOF
185
EOF
Lines 192-200 Link Here
192
    # now add the same credentials to the client authority file
193
    # now add the same credentials to the client authority file
193
    # if '$displayname' already exists do not overwrite it as another
194
    # if '$displayname' already exists do not overwrite it as another
194
    # server man need it. Add them to the '$xserverauthfile' instead.
195
    # server man need it. Add them to the '$xserverauthfile' instead.
195
    for displayname in $authdisplay $hostname$authdisplay; do
196
    for displayname in $authdisplay $hostname/unix$authdisplay; do
196
        authcookie=`xauth list "$displayname" \
197
        authcookie=`xauth list "$displayname" \
197
        | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null;
198
        | sed -n "s|.*$displayname[[:space:]*].*[[:space:]*]||p"` 2>/dev/null;
198
        if [ "z${authcookie}" = "z" ] ; then
199
        if [ "z${authcookie}" = "z" ] ; then
199
            xauth -q << EOF 
200
            xauth -q << EOF 
200
add $displayname . $mcookie
201
add $displayname . $mcookie

Return to bug 220668