Implemented command line override of DISPLAY variable.
1 parent d3bbbd9 commit a9de385b80d5876fc8265f2048bf1a927f21ec87
@toor toor authored on 27 Dec 2012
Showing 1 changed file
View
26
rootx
#!/bin/sh
# 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.101 2012/12/27 23:06:56 toor Exp $
# $Id: rootx,v 1.102 2012/12/27 23:12:29 toor Exp $
 
export DISPLAY=localhost:10.0
# Allow the DISPLAY variable to be overriden on the command line
 
if [ _$1 = _ ]
then
DISPLAY=localhost:10.0
 
else
DISPLAY=$1
 
fi
 
cp -pv /home/tundra/.Xauthority /root/
export DISPLAY