Switch your monitor on/off from the command-line

You can switch your screen on or off in a terminal when using the xset command in Ubuntu Linux:

to query information about your screen simply type the command:
# xset -display :0.0 -q

to turn your screen to standby or off type:
# xset -display :0.0 dpms force standby
or
# xset -display :0.0 dpms force off

to turn your screen on again simply type:
# xset -display :0.0 dpms force on

in case the dpms should be disabled on your screen, you can enable it manually with:
# xset -display :0.0 +dpms

Note:

If the screen stays black after switching the screen on again use this command:
# xset -display :0.0 s reset

Autobackup pfSense

Hi again,

everyone who is using pfSense knows that there is no good (and free) automated backup possibility for the config file. Therefore I have written a python script that connects over sftp to a pfsense box, gets the config.xml and stores it to a local directory or remote server through sftp.

The only dependancy this script has is the pysftp package which can be installed very easily with:
# easy_install pysftp

The script has been tested on a CentOS 5.8 machine with python 2.4 and is released under the BSD Licence.

I hope I could help someone with this.

Download:  Backup script for pfSense (740 downloads )

Automatic email forward (Ensim/RHEL)

Hello world 😉

I have written a small Python script that adds or remove email forwards based on a time period. This script has been tested under Ensim Control Panel 10.3 and a CentOS 5 server with Python 2.6. It should also work on Ensim 10.0+ (as long as ensim does not change their filestructure) and RHEL 4+. Maybe it works under Python 2.3/2.4 as well as i only used standard libraries which are included in Python 2.5

There are 2 files in the archive:
* autoforwards.py (the main script)
* autoforwards.conf (config file, put it into /etc)

You can launch it manually with the command:
# python autoforwards.py

or create a cronjob (which is preferred because of the automation purpose)

Feel free to contact me if you have problems or alike. The license is BSD so do with it whatever you want but don't make me responsible for any kind of problems which may rise with its usage. Read the BSD license first 😉

Download:  Autoforwards for Ensim/RHEL (722 downloads )