Archive for the ‘Technical’ Category

LAMPP / XAMPP start up script for CentOS / Fedora / Red Hat

Tuesday, April 22nd, 2008

Here is a little script that may help you out if you want to start LAMPP as a service on linux using chkconfig and service commands.

Place the following code in “/etc/init.d/” with the file name “lampp” and make sure it is executable.

#!/bin/sh
#
# author: william ruckman ruckman.net
#
# chkconfig: 2345 98 83
#
# description: Starts and stops the LAMPP Server
#
# processname: lampp

# Source function library
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = “no” ] && exit 0

RETVAL=0
# See how we were called.
case “$1″ in
start)
echo -n “Starting lampp service: ”
echo ” ”
cd /opt/lampp/
./lampp start
sleep 1
RETVAL=$?
;;
stop)
echo -n “Stopping lampp service: ”
echo ” ”
cd /opt/lampp/
./lampp stop
sleep 1
RETVAL=$?
;;
restart|reload)
echo -n “Restarting lampp service: ”
echo ” ”
cd /opt/lampp/
./lampp restart
sleep 1
RETVAL=$?
;;
status)
echo -n “Checking lampp service: ”
echo ” ”
cd /opt/lampp/
./lampp status
sleep 1
RETVAL=$?
;;
*)
echo “Usage: lampp {start|stop|restart|reload|status}”
echo ” ”
exit 1
esac

exit $RETVAL

Happy coding!

Kawasaki Ninja 500R Ground Lighting Mod

Monday, March 10th, 2008

Here are a few cellphone pictures I took of my street bike after I finished custom installing some ground lighting. I used green LEDs on the front bottom, and some yellow or amber looking LEDs on the front bottom that also blink with the blinkers. I also place some green LEDs above the chrome exhaust which looks sweet from behind. On top of that, I also installed all LED lighting for the running lights and flashers. Which I found gave me “hyper flashing” due to the low resistance of the LEDs with my stock flasher unit. To fix that problem, I also installed a after market variable load electronic flasher unit.

Here is a picture of me testing some of the LEDs on the bottom of the front end with a 9V battery.

Bottom

Bottom Bike

I would have preferred to purchase a easy to install kit, but unless you own a top of the line bike, that isn’t going to happen.

Right Side

Right side bike

Left Side

Left Side Bike

Rear

Rear Bike

Updated Rear

udated rear bike

Update: I added a few more LEDs to the rear bottom of my bike. They REALLY make it stand out now!

Front

Front Bike

I hope you enjoyed taking a peek at my latest hack. Perhaps I will do more in the future. My cell phone doesn’t have the best camera, especially in the dark. So, Sorry about the fuzz.

I may add some more lighting to the bottom rear of the bike. Or if I get really ambitious, make it look like a green Tron!

 

Guide to flashing a meraki/accton/fonero

Monday, March 3rd, 2008

LINUX:

You can go here to get the Ubuntu LiveCD:

http://www.ubuntu.com/getubuntu/download

We have tried to make this as simple as possible, but it would be
helpful if you have some familiarity with Linux (or someone available
who has).

1. Boot Live CD and bring up a terminal window (under “Applications”,
then “Accessories”, then “terminal” on Ubuntu)
2. Make sure it is connected to the internet, then type the following to
download the files you will need:
Code:

sudo apt-get upgrade
sudo apt-get install wget
wget http://www.blogin.it/ROBIN/test/meraki/openwrt-atheros-2.6-vmlinux.gz
wget http://www.blogin.it/ROBIN/test/meraki/openwrt-atheros-2.6-root.jffs2-64k
wget http://ruckman.net/downloads/mesh/easyflash
wget http://ruckman.net/downloads/mesh/flash
ifconfig eth0 up
chmod +x easyflash
chmod +x flash

3. Plug in your Meraki to your Ethernet LAN port on your computer.
4. Type: ./flash (note: If your Meraki is NOT connected to eth0, modify
the file “flash” accordingly, it should be eth0 but you can check by
issuing ifconfig)
5. Plug in the Meraki to power.
6. You should see something like this displayed:
Code:

No packet
No packet
Peer MAC: 00:18:84:80:67:1C (this will be the MAC address of your
router)
You MAC: 00:ba:be:ca:ff:ee
Your IP: 192.168.1.0
Setting IP address…
Loading rootfs…
Sending rootfs. 6400 blocks…
Initializing partiions…
Rootfs partition size now 0×006f0000
Flashing rootfs…
Loading Kernel…
Sending kernel, 1536 blocks…
Flashing Kernel…
Setting boot_script_data…

Done. Restarting device…

7. Go get lunch. This will take 15-30 minutes, depending upon the flash
chip speed in your router. DO NOT INTERRUPT!
8. When it is done, the window will show Done.

WINDOWS:

Get the utility:

http://ruckman.net/downloads/mesh/ap51-flash-gui.exe

Download the firmware:

http://www.blogin.it/ROBIN/test/meraki/openwrt-atheros-2.6-root.jffs2-64k

http://www.blogin.it/ROBIN/test/meraki/openwrt-atheros-2.6-vmlinux.gz

Run the utility and choose the firmware files with the browse buttons.

Choose the network adapter that the Meraki is connected in the pull down menu.

Click on the “Go” button and walk away for about 30 minutes.

Good Luck!

Forcefully remove Firestarter without IPTables kernel support

Wednesday, January 30th, 2008

I made the mistake of installing Firestarter on a system that had no kernel support for IPTables. In order to remove it I did the following.

Run this script:

rm -f -R /etc/firestarter
rm -f /etc/firestarter/firestarter.sh
rm -f -R /etc/init.d/firestarter
rm -f -R /root/.gnome2/firestarter
rm -f -R /root/.gconf/apps/firestarter
rm -f -R /usr/share/doc/firestarter
rm -f /usr/share/locale/fr/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/ml/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/cs/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/sr@Latn/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/az/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/ga/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/tr/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/lv/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/sq/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/no/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/pt_BR/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/pl/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/ru/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/hr/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/es/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/hu/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/nl/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/da/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/en_GB/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/zh_TW/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/de/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/nb/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/ko/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/sk/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/en_CA/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/sr/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/zh_CN/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/vi/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/el/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/ja/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/uk/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/fi/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/ro/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/sv/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/pt/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/pa/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/ca/LC_MESSAGES/firestarter.mo
rm -f /usr/share/locale/it/LC_MESSAGES/firestarter.mo
rm -f /usr/share/menu/firestarter
rm -f -R /usr/share/firestarter
rm -f /usr/share/pixmaps/firestarter.xpm
rm -f /usr/share/pixmaps/firestarter.png
rm -f /usr/share/gnome/apps/Internet/firestarter.desktop
rm -f /usr/share/man/man8/firestarter.8.gz
rm -f /usr/share/gconf/schemas/firestarter.schemas
rm -f /usr/sbin/firestarter
rm -f /var/lib/dpkg/info/firestarter.preinst
rm -f /var/lib/dpkg/info/firestarter.conffiles
rm -f /var/lib/dpkg/info/firestarter.prerm
rm -f /var/lib/dpkg/info/firestarter.md5sums
rm -f /var/lib/dpkg/info/firestarter.list
rm -f /var/lib/dpkg/info/firestarter.postinst
rm -f /var/lib/dpkg/info/firestarter.postrm

Then run the following commands:

sudo apt-get remove firestarter

It will now remove. This will save you from having to recompile the kernel to just unistall it. Die Firestarter! DIEEEEE!

Hierarchy of Information Technology Job Descriptions

Wednesday, January 30th, 2008

I decided to post some information on job descriptions and the hierarchy of the IT industry starting from top to bottom for Information Technology positions since that seems to be a common question I come across. Most of the information I obtained from the Occupational Outlook Handbook. I have it all organized and simplified here.

Chief information officers (CIO)

The CIO is responsible for the overall technological direction of their organizations. They are increasingly involved in the strategic business plan of a firm as part of the executive team. To perform effectively, they also need knowledge of administrative procedures, such as budgeting, hiring, and supervision. These managers propose budgets for projects and programs and make decisions on staff training and equipment purchases. They hire and assign computer specialists, information technology workers, and support personnel to carry out specific parts of the projects. They supervise the work of these employees, review their output, and establish administrative procedures and policies. Chief information officers also provide organizations with the vision to master information technology as a competitive tool.

Chief technology officers (CTOs)

Evaluate the newest and most innovative technologies and determine how these can help their organizations. The chief technology officer often reports to the organization’s chief information officer, manages and plans technical standards, and tends to the daily information technology issues of the firm. Because of the rapid pace of technological change, chief technology officers must constantly be on the lookout for developments that could benefit their organizations. Once a useful tool has been identified, the CTO must determine an implementation strategy and sell that strategy to management.

Management information systems (MIS) directors or information technology (IT) directors

Manage computing resources for their organizations. They often work under the chief information officer and plan and direct the work of subordinate information technology employees. These managers ensure the availability, continuity, and security of data and information technology services in their organizations. In this capacity, they oversee a variety of user services such as an organization’s help desk, which employees can call with questions or problems. MIS directors also may make hardware and software upgrade recommendations based on their experience with an organization’s technology.

Project managers

Develop requirements, budgets, and schedules for their firms’ information technology projects. They coordinate such projects from development through implementation, working with internal and external clients, vendors, consultants, and computer specialists. These managers are increasingly involved in projects that upgrade the information security of an organization.

Network Administrators

Design, install, and support an organization’s computer systems. They are responsible for local-area networks (LAN), wide-area networks (WAN), network segments, and Internet and intranet systems. They work in a variety of environments, including professional offices, small businesses, government organizations, and large corporations. They maintain network hardware and software, analyze problems, and monitor networks to ensure their availability to system users. These workers gather data to identify customer needs and then use the information to identify, interpret, and evaluate system and network requirements. Administrators also may plan, coordinate, and implement network security measures.

Systems Administrators

Systems Administrators are responsible for maintaining network efficiency. They ensure that the design of an organization’s computer system allows all of the components, including computers, the network, and software, to work properly together. Furthermore, they monitor and adjust the performance of existing networks and continually survey the current computer site to determine future network needs. Administrators also troubleshoot problems reported by users and by automated network monitoring systems and make recommendations for future system upgrades.

Computer security specialists

Plan, coordinate, and implement the organization’s information security. These workers educate users about computer security, install security software, monitor networks for security breaches, respond to cyber attacks, and, in some cases, gather data and evidence to be used in prosecuting cyber crime. The responsibilities of computer security specialists have increased in recent years as cyber attacks have become more common. This and other growing specialty occupations reflect an increasing emphasis on client-server applications, the expansion of Internet and intranet applications, and the demand for more end-user support.

Computer support specialists

Provide technical assistance, support, and advice to customers and other users. This occupational group includes technical support specialists and help-desk technicians. These troubleshooters interpret problems and provide technical support for hardware, software, and systems. They answer telephone calls, analyze problems by using automated diagnostic programs, and resolve recurring difficulties. Support specialists work either within a company that uses computer systems or directly for a computer hardware or software vendor. Increasingly, these specialists work for help-desk or support services firms, for which they provide computer support to clients on a contract basis.

Technical support specialists

Respond to inquiries from their organizations’ computer users and may run automatic diagnostics programs to resolve problems. They also install, modify, clean, and repair computer hardware and software. In addition, they may write training manuals and train computer users in how to use new computer hardware and software. These workers also oversee the daily performance of their company’s computer systems and evaluate how useful software programs are.

Help-desk technicians

Respond to telephone calls and e-mail messages from customers looking for help with computer problems. In responding to these inquiries, help-desk technicians must listen carefully to the customer, ask questions to diagnose the nature of the problem, and then patiently walk the customer through the problem-solving steps.

Help-desk technicians deal directly with customer issues and companies value them as a source of feedback on their products. They are consulted for information about what gives customers the most trouble, as well as other customer concerns. Most computer support specialists start out at the help desk.

Get a Quake like Linux Console in Windows

Friday, October 5th, 2007

When I saw Yakuake for Linux I began the long journey to find a similar product for Windows. I normally like to use CentOS Linux for all my needs but for gaming and at work I am forced to use Windows. I may be the system administrator but a lot of our products are written in .NET which is Windows Dependant making a switch to Linux at work currently impossible.

Quake Console

Screenshot note: This may look like a Linux XFCE Desktop but it is actually a Windows XP Desktop. See my other article: Give XP (Linux/Mac) looks and shame Vista

This will require some minor tweaks using a text editor depending on your screen size and positioning you want for you console. I will walk you through most of the steps and even give you a download of my setup to make it as simple as possible.

Step 1:

Acquire my download of the software and unzip it to your “C:\” drive. This should give you a default copy of Cygwin, a tweaked copy of Console2 for windows, and my generated binary for binding the “WIN-~” key combo to the console.

Download: Quake style console default install

Step 2:

Test the default install. Run the “Quake.exe” binary in the “C:\Console2″ folder. You will now see a green “H” in your system tray. This is the key binder. It listens for the key combination “WIN-~” and then executes the Console2 program which is skinned using a custom XML file and then executes Cygwin within the console giving you the Linux prompt and feel.

At this point you will discover that to console may be too big if your resolution is less than (1024×768) or may be too small if your resolution is larger than (1024×768). You may also not be pleased with the placement or any one of the other features. These can all be altered.

Step 3:

Customize! The file you will want to edit with any text editor will be located at “C:\Console2\console.xml”. This will allow you to edit all of the features of the console (Look and feel). Basically allowing you to create your own skin and positioning for the console.

The current console.xml file contains:

<?xml version=”1.0″?>
<settings>
<console change_refresh=”10″ refresh=”100″ rows=”25″ columns=”122″ buffer_rows=”500″ buffer_columns=”0″ shell=”" init_dir=”" save_size=”0″>
<colors>
<color id=”0″ r=”0″ g=”0″ b=”0″/>
<color id=”1″ r=”0″ g=”0″ b=”128″/>
<color id=”2″ r=”0″ g=”150″ b=”0″/>
<color id=”3″ r=”0″ g=”150″ b=”150″/>
<color id=”4″ r=”170″ g=”25″ b=”25″/>
<color id=”5″ r=”128″ g=”0″ b=”128″/>
<color id=”6″ r=”128″ g=”128″ b=”0″/>
<color id=”7″ r=”192″ g=”192″ b=”192″/>
<color id=”8″ r=”128″ g=”128″ b=”128″/>
<color id=”9″ r=”0″ g=”100″ b=”255″/>
<color id=”10″ r=”0″ g=”255″ b=”0″/>
<color id=”11″ r=”0″ g=”255″ b=”255″/>
<color id=”12″ r=”255″ g=”50″ b=”50″/>
<color id=”13″ r=”255″ g=”0″ b=”255″/>
<color id=”14″ r=”255″ g=”255″ b=”0″/>
<color id=”15″ r=”255″ g=”255″ b=”255″/>
</colors>
</console>
<appearance>
<font name=”Courier New” size=”10″ bold=”0″ italic=”0″ smoothing=”0″>
<color use=”0″ r=”0″ g=”0″ b=”0″/>
</font>
<window title=”" icon=”" use_tab_icon=”0″ use_console_title=”0″ show_cmd=”1″ show_cmd_tabs=”1″ use_tab_title=”1″ trim_tab_titles=”20″/>
<controls show_menu=”0″ show_toolbar=”0″ show_statusbar=”0″ show_tabs=”1″ hide_single_tab=”1″/>
<styles caption=”1″ resizable=”0″ taskbar_button=”1″ border=”0″ inside_border=”2″ tray_icon=”0″/>
<position x=”20″ y=”0″ dock=”-1″ snap=”0″ z_order=”0″ save_position=”0″/>
<transparency type=”1″ active_alpha=”200″ inactive_alpha=”100″ r=”0″ g=”0″ b=”0″/>
</appearance>
<behavior>
<copy_paste copy_on_select=”0″ clear_on_copy=”1″ no_wrap=”1″ trim_spaces=”1″ copy_newline_char=”0″/>
<scroll page_scroll_rows=”0″/>
</behavior>
<hotkeys use_scroll_lock=”1″>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”83″ command=”settings”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”112″ command=”help”/>
<hotkey ctrl=”0″ shift=”0″ alt=”1″ extended=”0″ code=”115″ command=”exit”/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”112″ command=”newtab1″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”113″ command=”newtab2″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”114″ command=”newtab3″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”115″ command=”newtab4″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”116″ command=”newtab5″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”117″ command=”newtab6″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”118″ command=”newtab7″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”119″ command=”newtab8″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”120″ command=”newtab9″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”121″ command=”newtab10″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”49″ command=”switchtab1″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”50″ command=”switchtab2″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”51″ command=”switchtab3″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”52″ command=”switchtab4″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”53″ command=”switchtab5″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”54″ command=”switchtab6″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”55″ command=”switchtab7″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”56″ command=”switchtab8″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”57″ command=”switchtab9″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”48″ command=”switchtab10″/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”9″ command=”nexttab”/>
<hotkey ctrl=”1″ shift=”1″ alt=”0″ extended=”0″ code=”9″ command=”prevtab”/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”87″ command=”closetab”/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”0″ code=”82″ command=”renametab”/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”1″ code=”45″ command=”copy”/>
<hotkey ctrl=”1″ shift=”0″ alt=”0″ extended=”1″ code=”46″ command=”clear_selection”/>
<hotkey ctrl=”0″ shift=”1″ alt=”0″ extended=”1″ code=”45″ command=”paste”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”0″ command=”scrollrowup”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”0″ command=”scrollrowdown”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”0″ command=”scrollpageup”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”0″ command=”scrollpagedown”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”0″ command=”scrollcolleft”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”0″ command=”scrollcolright”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”0″ command=”scrollpageleft”/>
<hotkey ctrl=”0″ shift=”0″ alt=”0″ extended=”0″ code=”0″ command=”scrollpageright”/>
<hotkey ctrl=”1″ shift=”1″ alt=”0″ extended=”0″ code=”112″ command=”dumpbuffer”/>
</hotkeys>
<mouse>
<actions>
<action ctrl=”0″ shift=”0″ alt=”0″ button=”1″ name=”copy”/>
<action ctrl=”0″ shift=”1″ alt=”0″ button=”1″ name=”select”/>
<action ctrl=”0″ shift=”0″ alt=”0″ button=”3″ name=”paste”/>
<action ctrl=”1″ shift=”0″ alt=”0″ button=”1″ name=”drag”/>
<action ctrl=”0″ shift=”0″ alt=”0″ button=”2″ name=”menu”/>
</actions>
</mouse>
<tabs>
<tab title=”">
<console shell=”" init_dir=”"/>
<cursor style=”0″ r=”255″ g=”255″ b=”255″/>
<background type=”0″ r=”0″ g=”0″ b=”0″>
<image file=”" relative=”0″ extend=”0″ position=”0″>
<tint opacity=”0″ r=”0″ g=”0″ b=”0″/>
</image>
</background>
</tab>
</tabs>
</settings>

For editing the size of the console you will want to edit the rows=”25″ columns=”122″ to whatever fits your screen. You may need to experiment until it is right.

If you would like to create your own keybinding you will have to download Autohotkey from “http://www.autohotkey.com/“. You will have to edit the “C:\Console2\quake.ahk” file and recreate the “quake.exe” binary.

Here is a copy of my current “quake.ahk” file:

; Launch console if necessary; hide/show on Win+`
#`::
DetectHiddenWindows, on
IfWinExist ahk_class ATL:00456188
{
IfWinActive ahk_class ATL:00456188
{
WinHide ahk_class ATL:00456188
; need to move the focus somewhere else.
WinActivate ahk_class Shell_TrayWnd
}
else
{
WinShow ahk_class ATL:00456188
WinActivate ahk_class ATL:00456188
}
}
else
Run, C:\Console2\Console.exe -d C:\cygwin\ -r “cmd /C Cygwin.bat”
; the above assumes a shortcut in the c:\windows folder to console.exe.
; also assumes console is using the default console.xml file, or
; that the desired config file is set in the shortcut.

DetectHiddenWindows, off
return

; hide console on “esc”.
#IfWinActive ahk_class ATL:00456188
esc::
{
WinHide ahk_class ATL:00456188
WinActivate ahk_class Shell_TrayWnd
}
return

In the above script you will notice,

“C:\Console2\Console.exe -d C:\cygwin\ -r “cmd /C Cygwin.bat”

That is the command that runs when the “WIN-~” key is pressed. It runs console and then console automatically runs Cygwin. Pretty nice and dirty hack.

Console was obtained from “http://sourceforge.net/projects/console/“. This basically gives you the XML customizable extended windows console that we edited above.

Cygwin was obtained from “http://www.cygwin.com/“. This is what gives you the Linux bash prompt inside the Console program. It can be run independently, but it wouldn’t look as cool.

Final Step:

Create a startup shortcut for “C:\Console2\quake.exe” in “C:\Documents and Settings\%username%\Start Menu\Programs\Startup\” folder so that it runs the keybinding software automatically when the system starts.

I would recommend reading up on all three of these wonderful products listed above. Enjoy!

RuckOS Linux LiveCD Version 1 Released

Friday, September 7th, 2007

I like CentOS Linux so much I decided to create my own custom version called RuckOS. It is still a work in progress but it is a major improvement over a standard CentOS version. It may still have some minor bugs but I plan to improve and refine it more in the future when I have time.

It has as many codecs as I could find installed. Which means it has native ability to play almost any media. I also included a bunch of useful programs that any user would normally want in a portable OS. I have installed Vuze, Firefox, Pidgin, Thunderbird, Wireshark, VLC, Xine, Amarok and Teamspeak to list just a fraction of the programs. This is the only public distro which includes Teamspeak.

If you are a Linux beginner and you wish to give another OS a try this is the Distro for you. Just put it in your CD tray and reboot. No hard drive required! It won’t bother your current setup at all.

Need a instant secure environment? Are you using a public computer and are deathly afraid of viruses and spyware stealing your information? Throw a copy of RuckOS in there and find a user friendly, and threat free environment.

Download: RuckOS LiveCD V1

(more…)

Fix slow login on Windows when offsite from domain

Wednesday, June 20th, 2007

I recently ran into a interesting issue where a Windows Vista machine would wait for 2 minutes to login after the password was typed in. But it would only occur when the laptop was connected to a network with internet access that was not its normal domain network.

After hooking the laptop to a hub with another PC, i started Wireshark to log all packets. After sifting through the data I found that it was attempting to connect to the primary domain controller by domain name, and consecutively trying to connect to all 5 secondary domain controllers by domain name.

What I found was that the domain names were not pointing to the domain servers across the internet, which would be dumb, but were trying to resolve the domain using yahoo name servers which didn’t know the internal sub domains. It was connecting to Yahoo’s name servers because that is who they have hosting their external DNS for them. Yahoo’s name servers redirected the connections to their main website instead because it was a catch-all address.

The problem is in three different places here.

  1. Split DNS is being used - They are using a internal DNS server to resolve their subdomains internally, but these subdomains are not known externally so when they are remote they do not resolve properly.
  2. A catch-all address is being used on yahoo’s name servers - This is causing any unknown subdomains to be redirected to the main domain name. Which in this case, is the main website which doesn’t house the domain server.
  3. The requests are hitting yahoo’s firewall and it is dropping the packets instead of sending a ICMP error message - This is causing the TCP connections to hang for the default amount of time causing windows to wait before logging in.

This problem is obviously caused by DNS issues. In order to remedy the problem, I had to fix the broken split DNS issues.

To do this you have two options:

  1. Remove the wildcard from DNS.
  2. Redirect the problem subdomains to 127.0.0.1

Removing the wildcard from DNS is the preferred solution. This will cause the DNS server to report “no such name” which will terminate the connection before it is established.

If you cannot remove the wildcard from DNS then you will want to manually make DNS records that point to 127.0.0.1

Such as:

  • subdomain1.example.com > 127.0.0.1
  • subdomain2.example.com > 127.0.0.1

This will cause the connection to redirect to your localhost when offsite using global DNS. Your localhost will then report that connection unusable which will terminate the connection right away.

The boot up times decreased by 75%!

From 2 minutes to 30 seconds. That is an improvement! The lesson here is to make sure your DNS is correct.

Although, it would be nice if Microsoft would release a patch that would do this in the background after it loads your desktop instead of waiting for the connections to terminate!

I would also like to thank the genius who set up the DNS incorrectly and created all this wonderful work for me. Much appreciated!

Linux - How to split screen your command line

Wednesday, June 6th, 2007

Have you ever been using your command line and found that you would like to see the man page in front of you and also be able to craft your command without the wasted resources of a X-Server on your Linux server?

This may seem pretty elementary to some of you 1337 haxtorizors, but I think this tip is important to post in order to help Linux beginners accelerate their learning experience and ease of use.

Linux split screen shell

The secret is to use the “screen” command. And I will tell you all the commands you need in order to make it work wonders for you. But first a little copy and paste from the screen website: (LINK)

“Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g., insert/delete line and support for multiple character sets). There is a scroll back history buffer for each virtual terminal and a copy-and-paste mechanism that allows the user to move text regions between windows. When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill the current window, view a list of the active windows, turn output logging on and off, copy text between windows, view the scroll back history, switch between windows, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the users terminal.”

From the description above you will notice that there are some other advantages to using screen besides the ability to split screen your console. For instance, if you are using putty on a somewhat unstable internet connection and your connection is lost you will lose your console session and any program instance that is running. But if you are using screen your terminal instance will continue to run even if you lose your connection and all you have to do is reconnect and reattach to your screen session.

If you do not have screen, you can obtain it at the link listed above or from your Linux distros update command such as yum or apt-get.

I will now give you the commands you require to use screen efficiently. Any command when you are inside screen begins with “CNTL-A”.

To start you will have to call the first instance of screen. You can combine a lot of these commands into one command line argument but I prefer to show you one command at a time. Run the following command:

screen

You will now see the shell prompt again. To split screen hit the following key combinations:

CNTL-A

SHIFT-S

You will now need a second screen instance to run in the bottom window. Run the screen command again:

screen

Run a command such as “man”, “htop”, or top. You will notice that it fills the top half of the screen.

You will now have to toggle to the bottom screen by hitting the following key combinations:

CNTL-A

TAB

You will now be in the bottom window, although you will not see your command prompt yet. You will have to toggle through the instances of screen in the bottom window to get to it. Use the following key combinations to do this:

CNTL-A

N

or:

CNTL-A

P

The “N” stands for next and the “P” stands for previous. It just allows you to step forward and backward through as many instances of screen that you have running. If you see the same output in both windows just do the same key combo again to get to the next version of screen.

Once you get the shell prompt in the bottom screen you can run your second command and view the output from both running instances. You can now view a man page in the top window and craft your command below or view htop and iftop in the same window at the same time. You can also split the screen more times but I wouldn’t recommend it unless you have some decent resolution set for your text console which can be controlled in your boot options in grub or lilo but that is another lesson.

You may find a few more commands useful during your stay with screen. You may with to leave the current session running in the background and jump back to you regular console. You can do that by detaching which is done with the following key combo:

CNTL-A

D

Now that you are detached, which is what also happens during loss of connectivity, you may want to reattach to one of your screen instances. You will first need to list the instances of screen by typing the following command:

screen -list

You will the get a list similar to:

There is a screen on:
3880.pts-0.localhost (Detached)

To reattach to the instance listed above, type:

screen -r 3880.pts-0.localhost

The part after “-r” will change depending on your linux box.

You will notice that you are now back into your detached session of screen.

Now that you know the basics of screen, I am sure you will become accelerated at learning other Linux commands. Take care, and enjoy the ease of use!

How to install DAG, YUM, and BIND on Clarkconnect

Friday, May 25th, 2007

I was playing with my Clarkconnect box this morning and noticed that some of my favorite Linux command line tools were not installed.

What is Clarkconnect? According to their website: (LINK)
“ClarkConnect is a powerful and affordable Internet server and gateway solution. The software solution will give your organization enterprise-level server features at an affordable price.”

If you have ever installed anything on Linux you know that you can easily fall into the dependency trap at any time when installing new software.

To avoid the need to install 30 different dependencies so that you can install one program on Clarkconnect you problebly want to use a program like apt-get or yum. I prefer yum, but Clarkconnect comes with apt-get which is a little strange considering that it is based off Red Hat Enterprise Linux (RHEL).

I am using Clarkconnect 4.1 Community Edition. For the software repository I choose DAG since they have one of the largest collections of software for RHEL. In this case we want to match the version that Clarkconnect was coded from as closely as possible to make sure our software will work properly. We are going to use the RHEL 4 repo. (LINK)

If you follow the install directions on the DAG website you will notice that it will not work. And after fiddling with error messages I found that I had to craft my own source list file which I will give to you so you don’t have to deal with the same tortures I did.

NOTE: Watch for line wrap!

Log in as root using putty or any other ssh client.

Change directory to: /etc/apt/sources.list.d/

cd /etc/apt/sources.list.d/

Run:

rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm

Create or edit the file rpmforge.list in that directory.

vi rpmforge.list

In that file place the following information (Download this file):

# Name: RPMforge RPM Repository for Red Hat Enterprise 4 - dag
# URL: http://rpmforge.net/
rpm http://apt.sw.be redhat/el4/en/i386 dag

If you have never used vi before you may need to know a few basic commands.

a = append mode (Used to edit text)

ESC = command mode (Used to give vi commands)

:w (Save file command)

:q (Exit vi command)

Make sure you write your changes before exiting vi or you will lose your changes.

Run the following command to update your apt-get info:

apt-get update

You are now ready to install your software. In this case we are going to install yum because I like it, but if your happy with apt-get just install whatever other packages you like. The sky is the limit!

apt-get install yum

Since Clarkconnect uses apt-get for its updating process I prefer to use yum for installing third party packages so there is no chance for conflict due to the repos. With yum installed, it is now safe to remove the source list created for apt-get unless you plan to keep using it.

BONUS:

Some packages such as Bind cannot be found in the DAG repo because they are usually included with the base system. But not with Clarkconnect since it uses DNSMasq. If you rather have your own DNS server instead of relying on your ISP you can add the CentOS 4 repositories to your YUM configuration.

Change to the “/etc/yum.repos.d/” directory.

cd /etc/yum.repos.d/

Then create the file “CentOS-Base.repo” using vi or joe.

Add the following information to that file (This file has been modified):

NOTE: Watch for word wrap! (Download this file)

# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/4/os/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#released updates
[update]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirror.centos.org/centos/4/updates/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirror.centos.org/centos/4/addons/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirror.centos.org/centos/4/extras/i386/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirror.centos.org/centos/4/centosplus/i386/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirror.centos.org/centos/4/contrib/i386/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

Remember, Bind and dnsmasq will fight for port 53 UDP. I went into the file “/etc/dnsmasq.conf” and added the statement:

port=40

This will assign dnsmasq to port 40 freeing up port 53 for bind. 40 is a unassigned port so it is ok to use it. The reason you reassign the port instead of disabling dnsmasq is because it controls the DHCP functionality. And if you wish to continue to use the web interface for DHCP configuration then you will need to keep this package installed and operating. DNS will operate wonderfully this way.

Enjoy!