Re: Security Implications of running startx from command line - was Re: Startx: was Great Debian experience
In order to keep the output of the X-session when starting with the command
startx, something like the following snippet could be inserted into the file
~/.xinitrc :
sessid="${HOSTNAME:-$(uname -n)}-${DISPLAY##*:}"
# Send output to file
#
logfile="${XDG_CACHE_HOME:-$HOME}/xinit-${sessid}.log"
: > "$logfile"
chmod go-rwx "$logfile"
exec > "$logfile" 2>&1
unset logfile
If the environment variable XDG_CACHE_HOME is set, the output from X is written
to, e.g., "${XDG_CACHE_HOME}/xinit-0.log" otherwise to "~/init-0.log".
Regards,
Jörg-Volker.
Reply to: