# Calculate chmod=0755 #!/bin/sh # Xlogout - run as root after user logout #?pkg(sys-apps/calculate-utils[desktop])!=# VT="vt$(( ${DISPLAY#:} + 7 ))" XAUTHORITY=$(ps ax | sed -nr "s/.*usr\/bin\/X.*-auth (\S+).*$VT.*/\1/p") export XAUTHORITY /usr/share/calculate/xdm/xdm --logout #pkg#