sx: use the default logfile
There's not a lot of point in absorbing the xserver's log file when it will just be less intuitive for those looking for it in the standard location. Since the log is generated by Xorg and not sx, it only seems reasonable. This commit also renames xauthfile to xauthority for a little more consistency with documentation and prior art.
This commit is contained in:
parent
29e20b2e41
commit
e08bc130c0
13
README
13
README
|
@ -14,31 +14,18 @@ INTRODUCTION
|
|||
|
||||
* The Xorg server's command-line is hard coded and not exposed to the
|
||||
user.
|
||||
|
||||
* The first DISPLAY is 1 instead of 0 contrary to what X(7) suggests.
|
||||
|
||||
* xauth entries are overwritten if the displayname is identical.
|
||||
|
||||
* Corresponding xauth entries are unconditionally removed when the Xorg
|
||||
server is terminated.
|
||||
|
||||
* The Xorg server uses the -noreset flag.
|
||||
|
||||
* /usr/lib/xorg-server/Xorg is used directly, bypassing Xorg.wrap.
|
||||
|
||||
* The Xorg server logs are written to $XDG_DATA_HOME/sx/$DISPLAY instead
|
||||
of Xorg.$DISPLAY.log
|
||||
|
||||
* While XAUTHORITY is still honoured, $XDG_CONFIG_HOME/sx/xauthfile is
|
||||
used instead of $HOME/.Xauthority
|
||||
|
||||
* Very little proxy error checking is used preferring instead to let each
|
||||
tool speak for itself.
|
||||
|
||||
* None of the typical /etc/X11/xinit infrastructure is directly used.
|
||||
|
||||
* Neither XINITRC is honoured nor .xinitrc used.
|
||||
|
||||
* The XDG_CONFIG_HOME/sx/sxrc file is used instead of .xinitrc and is
|
||||
required to be executable.
|
||||
|
||||
|
|
8
sx
8
sx
|
@ -44,10 +44,9 @@ case $tty in
|
|||
esac
|
||||
|
||||
cfgdir=${XDG_CONFIG_HOME:-$HOME/.config}/sx
|
||||
datadir=${XDG_DATA_HOME:-$HOME/.local/share}/sx
|
||||
XAUTHORITY=${XAUTHORITY:-$cfgdir/xauthfile}
|
||||
XAUTHORITY=${XAUTHORITY:-$cfgdir/xauthority}
|
||||
|
||||
mkdir -p "$cfgdir" "$datadir"
|
||||
mkdir -p "$cfgdir"
|
||||
|
||||
touch "$XAUTHORITY"
|
||||
export XAUTHORITY
|
||||
|
@ -65,8 +64,7 @@ xauth add :"$tty" MIT-MAGIC-COOKIE-1 "$(mcookie)"
|
|||
trap 'DISPLAY=:$tty "${@:-"$cfgdir"/sxrc}"' USR1
|
||||
(
|
||||
trap '' USR1
|
||||
exec /usr/lib/xorg-server/Xorg :"$tty" -keeptty vt"$tty" -noreset \
|
||||
-logfile "$datadir/$tty" -auth "$XAUTHORITY"
|
||||
exec /usr/lib/xorg-server/Xorg :"$tty" -keeptty vt"$tty" -noreset -auth "$XAUTHORITY"
|
||||
) & pid=$!
|
||||
|
||||
wait
|
||||
|
|
18
sx.1
18
sx.1
|
@ -24,13 +24,13 @@ argument is provided.
|
|||
.SH ENVIRONMENT
|
||||
.TP
|
||||
.B XAUTHORITY
|
||||
This environment represents the file used to store authorisation entries used
|
||||
to secure
|
||||
This environment is the path to a file which to stores authorisation entries
|
||||
used to secure
|
||||
.BR Xorg (1) .
|
||||
If this environment is not set then
|
||||
.B sx
|
||||
will create and use
|
||||
.IR \%$XDG_CONFIG_HOME/sx/xauthfile
|
||||
.IR \%$XDG_CONFIG_HOME/sx/xauthority
|
||||
instead.
|
||||
|
||||
.SH FILES
|
||||
|
@ -40,18 +40,18 @@ The default client started by
|
|||
.BR sx .
|
||||
This file must be executable.
|
||||
.TP
|
||||
.BR $XDG_DATA_HOME/sx " " "" ( $HOME/.local/share/sx )
|
||||
This directory is used for storing the logs generated by
|
||||
.BR Xorg (1) .
|
||||
Each log is named numerically based on the
|
||||
.B DISPLAY
|
||||
environment.
|
||||
.BR $XDG_CONFIG_HOME/sx/xauthority " " "" ( $HOME/.config/sx/xauthority )
|
||||
The default authority used by
|
||||
.B sx
|
||||
if an alternative file is not provided with
|
||||
.BR $XAUTHORITY .
|
||||
|
||||
.SH SOURCE
|
||||
.UR https://github.com/Earnestly/sx
|
||||
.UE
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR xauth (1),
|
||||
.BR xinit (1),
|
||||
.BR startx (1),
|
||||
.BR Xserver (1),
|
||||
|
|
Loading…
Reference in New Issue