nsbin/xscript
Nico Schottelius d3c6e29902 Initial commit
2006-07-20 09:54:37 +02:00

44 lines
979 B
Bash
Executable file

#!/bin/sh
#
# Author: Nico Schottelius
# Date: Sometime in Summer of 2k
# Last Changed: Wed Dec 13 13:42:45 CET 2000
# Copying: >= GPL 2.0
# Description: This script traces down what X and the
# XTerm are doing. I used that script for finding out, where
# my XTerm reads the LightYellow2 string from :)
#
# used for the xterm
DISPLAY=":0.0"
# What is the name of your X binary ?
X_BIN="XFree86"
# where to write data
X_OUT=/tmp/xerrorn.`whoami`
XTERM_OUT=/tmp/xerrorn-xterm.`whoami`
###############################################################################
# export DISPLAY for the xterm
export DISPLAY=:0.0
# start and trace X.
echo "Starting X"
strace $X_BIN -terminate :0 > $X_OUT 2>&1 &
# start and trace XTerm.
echo "Starting XTerm"
strace xterm > $XTERM_OUT 2>&1 &
# wait some seconds, until XTerm had all time to read all files.
echo "Sleeping some time..."
sleep 15
# ending session. This should be enough data
echo "Stopping tracing..."
killall $X_BIN