25 Apr

Install Recoll

Recoll is a personal full text search tool for Unix/Linux. It is based on the very strong Xapian backend, for which it provides an easy to use, feature-rich, easy administration, QT graphical interface.

su -
[Enter Password]
cd /etc/yum.repos.d/
wget http://www.xapian.org/RPM/xapian.repo
yum install xapian-omega xapian-bindings-php xapian-bindings-python xapian-bindings-tcl8

cd ~
wget http://www.lesbonscomptes.com/recoll/recoll-1.8.1.tar.gz
tar -xzf recoll-1.8.1.tar.gz
cd recoll-1.8.1
make install


23 Apr

Writing tips

Omit unnecessary words. Make every sentence contribute to the point you want to make. Use paragraphs as your arguments. Go through a piece and ask, is this word/clause/sentence/paragraph really necessary? Does it add to the reader’s understanding of the topic, or is it just wind? And once you’ve taken out any fluff, go over it again and ask, do my paragraphs flow clearly from one to the next? Do my arguments build logically on each other?

Avoid passive voice. Whenever possible, rewrite sentences to make them active. You can usually rewrite sentences that begin with “There is” or “There are” to make them more active.

Avoid future tense.

Avoid cliches and overused phrases such as “That’s where ProductX comes in,” “Enter ProductX,” and “last but not least.”

Spell out all abbreviations on first reference: “Open Source Technology Group (OSTG)”

Spell out words on first reference: say “application” before you refer to “apps.”

Spell out numerals less than 10, unless they refer to amounts with units. Use numerals for numbers greater than nine.

Original Article


22 Apr

Installing Perl Modules

Install Perl modules on a linux system – must be connected to the net

perl -MCPAN -e shell

If CPAN is not installed use this command to install it in a RedHat/Fedora system.

yum install perl-CPAN

If you are doing this for the first time, there will be a configuration procedure.

install XML::Parser

Some recommended Modules

19 Apr

Compile and Install LAMP Server from Source – PHP5, Apache2, MySQL5


./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-mysqld-user=mysql --with-unix-socket-path=/tmp/mysql.sock --without-comment --without-debug --without-bench
make install

cp support-files/my-medium.cnf /etc/my.cnf
chown root:sys /etc/my.cnf
chmod 644 /etc/my.cnf
chown -R root:mysql /usr/local/mysql
chown mysql:mysql /var/lib/mysql


cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &


./configure --prefix=/usr/local/apache --enable-so --enable-cgi--enable-info --enable-rewrite --enable-speling --enable-usertrack --enable-deflate --enable-ssl --enable-mime-magic
make install


./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --disable-debug --enable-ftp --enable-inline-optimization --enable-magic-quotes --enable-mbstring --enable-mm=shared --enable-safe-mode --enable-track-vars --enable-trans-sid --enable-wddx=shared --enable-xml --with-dom --with-gd --with-gettext --with-mysql=/usr/local/mysql --with-regex=system --with-xml --with-zlib-dir=/usr/lib --with-gettext --with-gdbm

make install
cp -p php.ini-recommended /usr/local/php/php.ini


12 Apr

Hardware Profile

OS: Fedora Core release 6 (Zod)
Default run level: 5
Language: en_US.UTF-8
Platform: i686
BogoMIPS: 5401.97
CPU Vendor: AuthenticAMD
CPU Model: AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
Number of CPUs: 2
CPU Speed: 2159
System Memory: 1834
System Swap: 0
Vendor: To Be Filled By O.E.M.
System: To Be Filled By O.E.M. To Be Filled By O.E.M.
Form factor: desktop
Kernel: 2.6.18-1.2798.fc6xen

		(None:None:None:None) serio, psmouse, None, i8042 Aux Port
		(4318:1013:6217:1003) pci, Unknown, OTHER, MCP61 Memory Controller
		(4318:1012:6217:1012) pci, Unknown, OTHER, MCP61 SMU
		(4318:1004:6217:1004) pci, AMD_IDE, IDE, MCP61 IDE
		(4318:1009:6217:1009) pci, ohci_hcd, USB, MCP61 USB Controller
		(None:None:None:None) platform, pcspkr, None, Platform Device (pcspkr)
		(4318:1011:0:0) pci, Unknown, OTHER, MCP61 PCI bridge
		(4318:1010:6217:1010) pci, ehci_hcd, USB, MCP61 USB Controller
		(4318:1003:6217:1003) pci, Unknown, OTHER, MCP61 SMBus
		(None:None:None:None) input, Unknown, KEYBOARD, AT Translated Set 2 keyboard
		(None:None:None:None) scsi_host, Unknown, None, SCSI Host Adapter
		(None:None:None:None) input, Unknown, None, PC Speaker
		(None:None:None:None) platform, i8042, None, Platform Device (i8042)
		(None:None:None:None) usb_device, Unknown, None, USB Raw Device Access
		(None:None:None:None) platform, Unknown, None, Platform Device (vesafb.0)
		(None:None:None:None) scsi, sd, None, SCSI Device
		(4130:4352:0:0) pci, Unknown, OTHER, K8 [Athlon64/Opteron] HyperTransport Technology Configuration
		(4332:33081:17748:17230) pci, 8139too, NETWORK, RTL-8139/8139C/8139C+
		(4318:1001:0:0) pci, pcieport-driver, OTHER, MCP61 PCI Express bridge
		(None:None:None:None) pnp, parport_pc, None, ECP printer port
		(None:None:None:None) input, Unknown, MOUSE, ImPS/2 Logitech Wheel Mouse
		(4318:977:6217:977) pci, Unknown, VIDEO, GeForce 6100 nForce 405
		(4318:1001:0:0) pci, pcieport-driver, OTHER, MCP61 PCI Express bridge
		(None:None:None:None) net, Unknown, NETWORK, Networking Interface
		(None:None:None:None) ide, ide-cdrom, None, IDE device (master)
		(None:None:None:None) usb_device, Unknown, None, USB Raw Device Access
		(None:None:None:None) pnp, i8042 aux, None, Microsoft PS/2-style Mouse
		(4318:1014:6217:1014) pci, sata_nv, IDE, MCP61 SATA Controller
		(4318:992:6217:992) pci, Unknown, OTHER, MCP61 LPC Bridge
		(4130:4353:0:0) pci, Unknown, OTHER, K8 [Athlon64/Opteron] Address Map
		(4130:4355:0:0) pci, Unknown, OTHER, K8 [Athlon64/Opteron] Miscellaneous Control
		(None:None:None:None) serio, atkbd, None, i8042 Kbd Port
		(None:None:None:None) scsi_generic, Unknown, None, SCSI Generic Interface
		(4318:1000:0:0) pci, pcieport-driver, OTHER, MCP61 PCI Express bridge
		(4318:1008:6217:2184) pci, Unknown, OTHER, MCP61 High Definition Audio
		(4130:4354:0:0) pci, k8_edac, OTHER, K8 [Athlon64/Opteron] DRAM Controller
		(4318:1007:6217:1007) pci, forcedeth, OTHER, MCP61 Ethernet
		(None:None:None:None) scsi_host, Unknown, None, SCSI Host Adapter
		(None:None:None:None) pnp, i8042 kbd, None, IBM Enhanced (101/102-key, PS/2 mouse support)
		(None:None:None:None) net, Unknown, NETWORK, Networking Interface
		(4318:1002:6217:1002) pci, Unknown, OTHER, MCP61 Memory Controller


12 Apr

Shutdown A Windows System from Command Line

ShutDown.EXE [/shutdown][/restart][/poweroff][/logoff][/lockws][/hibernate][/standby][/fshutdown][/frestart][/fpoweroff][/flogoff][/flockws][/fhibernate][/fstandby][/hide][/show]

Switch      Description             Available for 

/shutdown   ShutDown Windows        Windows (all) 
/restart    Restart Windows         Windows (all) 
/poweroff   Power Off Windows       2000/XP/2003 
/logoff     Log Off curent user     Windows (all) 
/lockws     Lock WorkStation        Windows (all) 
/hibernate  Hibernate Mode          2000/XP/2003 
/standby    Standby Mode            Windows (all) 
/fshutdown  Force ShutDown Windows  Windows (all) 
/frestart   Force Restart Windows   Windows (all) 
/fpoweroff  Force Power Off Windows 2000/XP/2003 
/flogoff    Force Log Off curent user     Windows (all) 
/fhibernate Force Hibernate Mode    2000/XP/2003 
/fstandby   Force Standby Mode      Windows (all) 
/hide       Run ShutDown+ in Silent Mode     Windows (all) 
/show       Show the tray icon when running in Silent Mode     Windows (all) 
/? or /help Help screen  

OS (1) Command line Effect Remarks
DOS ECHO G=FFFF:0000 � DEBUG  Reboot Warm boot, sometimes cold boot.
May not work with “exotic” memory managers, like Quarterdeck’s QEMM or DesqView; in that case, use RESET.COM instead.
Win31* ECHO G=FFFF:0000 � DEBUG  Task Manager popup And sometimes reboot
Win9* RUNDLL USER.EXE,ExitWindows  Shutdown (2)   
Win9* RUNDLL USER.EXE,ExitWindowsExec  See Remarks Win95: various results, usualy fast shutdown (and lock PC), sometimes restart Windows, sometimes reboot.
Win98: Restart Windows, sometimes reboot.
Win9* RUNDLL SHELL.DLL,RestartDialog  Restart dialog “System Settings Changed, Do you want to restart your computer now?” dialog
Win98 RUNDLL32 KRNL386.EXE,exitkernel  Poweroff Poweroff for ATX boards only, otherwise normal shutdown (3)
Win98/ME RUNDLL32 SHELL32.DLL,SHExitWindowsEx n  See Remarks n can be any combination (sum) of the following numbers: (4)
0    Logoff
1    Shutdown
2    Reboot
4    Force
8    Poweroff (if supported by the hardware)
Win98/ME RUNONCE.EXE -q  Reboot (4)   
NT4 See Reboot NT on my Solutions found in alt.msdos.batch page Reboot Reboot immediately
NT4 RUNDLL32 USER32.DLL,ExitWindowsEx
RUNDLL32 USER32.DLL,ExitWindowsEx  Logoff Most systems require the command to be called twice before logging off
W2K+RK SHUTDOWN /L /R /T:0 /Y  Reboot Immediate shutdown & reboot
W2K+RK SHUTDOWN /L /T:10 /Y /C  Delayed shutdown Shutdown in 10 seconds, close without saving.
Can be stopped during those 10 seconds using SHUTDOWN /A
NT+ (1) PSSHUTDOWN \\mynt4srv -K -F -T 20  Delayed poweroff Poweroff \\mynt4srv after a 20 seconds delay
Can be aborted using PSSHUTDOWN \\mynt4srv -A
Uses PSSHUTDOWN.EXE from SysInternal.com’s PS Tools
NT+ (1) PSSHUTDOWN \\myw2ksrv -O -F -T 0  Logoff Immediately logoff console user on \\myw2ksrv
Uses PSSHUTDOWN.EXE from SysInternal.com’s PS Tools
W2K (5) DEVCON Reboot  Reboot Requires Microsoft’s DEVCON utility
W2K Click here and learn how to shutdown a remote Windows 2000 computer Shutdown GUI, no command line
XP SHUTDOWN -r -t 10  Delayed reboot Reboot after a 10 seconds delay.
Can be stopped during those 10 seconds using SHUTDOWN -a
XP SHUTDOWN -s -t 01  Delayed shutdown Shutdown after a 1 second delay, NO poweroff.
TS LOGOFF 16 /SERVER:termserv1  Logoff Logoff session 16 on Terminal Server TERMSERV1.
Use the QUERY USER command to find out which session ID belongs to whom.
More Terminal Server commands here.
TS TSSHUTDN 45 /SERVER:termserv1 /POWERDOWN /DELAY:20 /V  Delayed poweroff Notify all users on Terminal Server TERMSERV1, logoff all Terminal Server sessions after 45 seconds, wait another 20 seconds, and then shut down Terminal Server TERMSERV1 and power off.
See my Terminal Server Commands page for the exact syntax.
Kix RC = SHUTDOWN( “\\server”, “Shutting down…”, 10, 1, 0 )  Delayed shutdown Shutdown \\server in 10 seconds, with message, close without saving, no reboot
RC = SHUTDOWN( “\\server”, “”, 0, 1, 1 )  Reboot Immediate shutdown & reboot \\server, without a message
Kix RC = LOGOFF( 1 )  Logoff Forcing applications to close.
Use 0 instead of 1 if you don’t want to force applications to close
Perl InitiateSystemShutdown(
sComputer, sMessage,uTimeoutSecs, bForce,bReboot )    General syntax (ActivePerl for Windows only)
Perl InitiateSystemShutdown( “”, “”, 0, 1, 1 )  Reboot Immediate reboot without message, force applications to close without saving data
Perl InitiateSystemShutdown( “”, “Going down…”, 10, 0, 1 )  Delayed reboot Reboot after 10 seconds, with message and without forcing applications to close
Perl InitiateSystemShutdown( “”, “Sorry”, 5, 1, 0 )  Delayed shutdown Shutdown of remote computer after 5 seconds, with message and forced closing of applications
Regina Rexx RC = W32SysShutdown( how [,force] )    General syntax (Regina Rexx for Windows with W32Funcs only).
how can be either Reboot, Logoff, Poweroff or Shutdown.
force can be either Force or Noforce.
Regina Rexx RC = W32SysShutdown( “P”, “F” )  Poweroff Immediate shutdown and poweroff, forced closing of application
Regina Rexx RC = W32SysShutdown( “L”, “N” )  Logoff Logoff, prompt for saving unsaved data
WSH [1] Set OpSysSet = GetObject(“winmgmts:{(Shutdown)}//./root/cimv2”).ExecQuery(“select * from Win32_OperatingSystem where Primary=true”)
[3] for each OpSys in OpSysSet
[4]     OpSys.Reboot()
[5] next  Reboot Requires WMI.
Remove [line numbers].
(Found in a forum posting by Alex K. Angelopoulos on www.developersdex.com)
WSH Replace line 4 in the script above with this one:
[4]     OpSys.Shutdown()
to shut down the PC instead of rebooting it. Shutdown But no poweroff.
See my WSH page for examples on how to reboot or shut down remote computers too.
WSH [1] Const EWX_LOGOFF = 0
[3] Set wmi = GetObject(“winmgmts:{(Shutdown)}”)
[4] Set objSet = wmi.InstancesOf(“Win32_OperatingSystem”)
[9] For Each obj in objSet
[6]     Set os = obj
[7]     Exit For
[8] Next
[10] os.Win32Shutdown EWX_LOGOFF  Logoff Requires WMI.
Remove [line numbers].
(Posted by Michael Harris on microsoft.public.scripting.vbscript)
My Logoff.vbs combines this code with that of the reboot and shutdown commands, and allows logoff of remote computers as well.
OS/2 START /PM SHUTDOWN && EXIT  Shutdown Will still stop and ask for confirmation if a non-PM application is active
OS/2 SETBOOT /B  Reboot Unconditional shutdown & reboot from default Boot Manager entry.
(Mailed by Rick Curry)
OS/2 SETBOOT /IBD:C:  Reboot Unconditional shutdown & reboot from C: drive
OS/2 SETBOOT /IBA:nonsense  Shutdown Unconditional shutdown & failing reboot.
Needs Boot Manager installed.
Will reboot, no questions asked, and then stop if nonsense is an invalid Boot Manager menu entry (which, in this case, is exactly what we want).

#include <sys/socket.h>
int shutdown(int s, int how);