#!/bin/sh
# Wrapper to make sure passwd is set and launch xlockmore.
# If you are a different user than root or tc, surely you already set a passwd.

if [ $(whoami) = "root" ]; then

	if grep "root:[$]1[$]EbR327ag[$]" /etc/shadow 2>&1 >/dev/null; then
	aterm -title "Set Root Password" -e sudo passwd
	fi

fi	
		
if [ $(whoami) = "tc" ]; then
	
	if sudo grep "tc::13646:0:99999:7:::" /etc/shadow 2>&1 >/dev/null; then
	aterm -title "Set Your Password" -e sudo passwd tc
	fi

fi

		
	xmodmap -e 'remove control = Control_L' -e 'remove control = Control_R'
	/usr/local/bin/xlockmore $@
	xmodmap -e 'keycode 37 = Control_L' -e 'add control = Control_L' -e 'keycode 105 = Control_R' -e 'add control = Control_R'
		

