EULA: yes
Smart Card: no
Real-Time Audio-Video: yes
Client Drive Redirection: no
USB Redirection: yes
Virtual Printing: no
add script to maximize the volume
nano usr/bin/maxsound
paste the following in it
#!/bin/bash
amixer | grep "control" | awk '{print $4,$5,$6}' > sound.txt
getArray() {
while read line
do
vc=`echo $line | grep "," | cut -d "," -f1 | sed s/"'"//g`
echo -n " * Maximizing volume for $vc ....."
amixer set "$vc" 100% &> /dev/null
echo "OK"
done < $1
}
getArray "sound.txt"
rm sound.txt
make the above script executable
chmod a+x usr/bin/maxsound
add the script to power on all usb hub so any usb device can wake machine
nano usr/bin/usbwake
and paste the following in it
#!/bin/sh
ls=`ls -al /sys/bus/usb/devices/ | awk '{print $9}'`
for x in $ls
do
echo -n " * Enabling power for $x ......"
if [ -e "/sys/bus/usb/devices/$x/power/wakeup" ]
then
echo enabled > /sys/bus/usb/devices/$x/power/wakeup
fi
echo OK
done
save and make above script executable
chmod a+x usr/bin/usbwake
create power saver script
nano /usr/bin/powersaver
#!/bin/sh
upSeconds="$(cat /proc/uptime | grep -o '^[0-9]\+')"
upMins=$((${upSeconds} / 60))
ip=`ps aux | grep "vmware-remotemks-container" | awk '{print $17}' | cut -d "," -f4 | sed 's,/2E,.,g'`
ip=`echo $ip | awk '{print $1}'`
if [ "${upMins}" -gt "20" ]
then
if [ -z $ip ]
then
echo mem > /sys/power/state
fi
fi
make the above script executable
chmod a+x /usr/bin/powersaver
Create cronjab to run this script every 20 minutes
crontab -e
and paste the following at the bottom
*/20 * * * * /usr/bin/powersaver
place all scripts in system startup
nano /etc/rc.local
Paste the following before/above exit 0
# rename the machine
# rename the machine
nic="eth0"
ip=`ifconfig $nic | grep 'inet addr' | cut -d ':' -f2 | awk '{print $1}'`
mac=`ifconfig $nic | grep "HWaddr" | awk '{print $5}' | sed s/://g`
name=`nslookup $ip | awk '{print $4}' | cut -d '.' -f1`
name=`echo $name | sed s/_/-/g`
name=`echo $name | sed s/find/$mac/g`
/bin/hostname $name
# max sound
/usr/bin/maxsound
# usb wake
/usr/bin/usbwake
# load iscsicd.py, written by Tom (\\hvcc.edu\its\support\tom\iscsi\iscsicd.py)
/usr/bin/iscsicd.py
# start the X session
startx
Create script to set the correct dispaly
nano /usr/bin/setdispaly
and paste the following
#!/bin/sh
# get all variables passed by kernel as arguments
$(for var in $(cat /proc/cmdline); do echo export $var | grep =; done)
# list all connected display/monitors
disp=`xrandr | grep -w connected | awk '{print $1}'`
cnt=0
# set the resolution and count the connected display
for mon in $disp
do
if [ "${res}" != "" ]
then
xrandr --output $mon --mode ${res}
fi
cnt=$((cnt+1))
done
# get the name of each connected display, so far only doing two monitors
dis1=`echo $disp | awk '{print $1}'`
dis2=`echo $disp | awk '{print $2}'`
# if connected monitor is more than one and its not for mirror then set the dual monitor
if [ "$cnt" -gt "1" ] && [ "${mirror}" = "" ]
then
xrandr --output $dis1 --right-of $dis2
fi