#!/bin/echo "This Script Must Be Sourced!!!!" # rootx - Configure X For root User After An su or sudo Promotion # Copyright (c) 2012 TundraWare Inc., Des Plaines, IL USA # All Rights Reserved # $Id: rootx,v 1.105 2013/02/12 18:37:11 toor Exp $ # Allow the DISPLAY variable to be overriden on the command line DISPLAY=localhost:10.0 xrootBADARGS=FALSE case $# in 1) ;; 2) DISPLAY=$2 ;; *) echo "usage: . rootx user [display]" xrootBADARGS=TRUE ;; esac if [ $xrootBADARGS != TRUE ] then cp -pv /home/$1/.Xauthority /root/ export DISPLAY fi