-- Copyright (C) 2011 OAKCODERS, utroz - utroz (at) oakcoders (dot) com -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>.
Script GNU/BASH on/off screen:
#!/bin/bash
#screen.sh
#Script by Utroz / http://OakCoders.blogspot.com
function getdate {
date "+%a %d %b, %X";
return 0;
}
echo "Dear {$USER}, Script Power/Off Monitor!"
echo ":: by Utroz (RSC) ::"
getdate &
while true;
do
echo "Power OFF Screen...";
sleep 3;
xset -display :0.0 dpms force off;
sleep 3;
xset -display :0.0 dpms force on;
echo "Power ON Screen...";
done
Script GNU/BASH to open/close CD/DVD-ROM device: #!/bin/bash
#cdrom.sh
echo "Dear {$USER}, Script Open/Close CD/DVD ROM!"
echo "by Utroz"
cd /dev;
while true;
do
echo "Opening CD ROM...";
eject cdrom;
sleep 3;
echo "Closing CD ROM...";
eject -t cdrom;
done