03 June 2010

Disable the clicking sound when pages load in Internet Explorer

  1. From the keyboard, press Ctrl+R to open the Run window.
  2. Type control then press Enter.
  3. Double-click: Sound (in Classic view) - or - Hardware and Sound > Sound (in the Control Panel Home or Category view).
  4. From the Sounds tab, locate Start Navigation. Left-click Start Navigation to select it.
  5. From the Sounds pulldown, click (None).
  6. Click OK.

02 June 2010

Install Lighttpd, MySQL and PHP5 for my local development environment

  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: sudo apt-get update then press Enter.
  3. When prompted, type the sudo password then press: Enter. This is done to resynchronize the package index files with their sources, ensuring that your system is aware of new and updated packages. If updates are found, simply type: sudo apt-get upgrade then press: Enter. Otherwise, proceed to the next step.
  4. Once update/upgrade is complete, type: sudo apt-get install mysql-client mysql-server then press: Enter and follow the prompts to complete the installation.
  5. Next you will install the Lighttpd server and Lighttpd Doc (the documentation files). At the prompt, type: sudo apt-get install lighttpd lighttpd-doc then press: Enter.
  6. Once this installation is complete, open your web browser and navigate to either http://127.0.0.1/ or http://localhost/. If all went as planned, you should see: Placeholder page The owner of this web site has not put up any web pages...
  7. Next we will install PHP5. At the prompt, type (or copy/paste): sudo apt-get install php5 php5-cgi php5-common php5-imagick php5-intl php5-mcrypt php5-pspell php5-recode php5-memcache php5-memcached php5-librdf php5-ps php5-ming php5-mysql php5-imap php5-ldap php5-snmp php5-sqlite php5-svn php5-tidy php5-xmlrpc php5-xsl php5-curl php5-gd then press: Enter.
  8. We then need to modify the php.ini file to enable cgi.fix_pathinfo. At the prompt, type: gksudo gedit /etc/php5/cgi/php.iniA gedit window will open and display the php.ini file. Search (Ctrl+F) for the line: ;cgi.fix_pathinfo=1 and uncomment this line by simply deleting the leading ; (semi-colon).
  9. Save your changes then close gedit.
  10. At the prompt, type:gksudo gedit /etc/lighttpd/lighttpd.conf then press Enter.
  11. In the server.modules section, add "mod_fastcgi",
  12. Scroll to the bottom and paste the following fastcgi.server = ( ".php" => ((
    "bin-path" => "/usr/bin/php-cgi",
    "socket" => "/tmp/php.socket",
    "max-procs" => 2,
    "bin-environment" => (
    "PHP_FCGI_CHILDREN" => "16",
    "PHP_FCGI_MAX_REQUESTS" => "10000"
    ),
    "bin-copy-environment" => (
    "PATH", "SHELL", "USER"
    ),
    "broken-scriptfilename" => "enable"
    )))
  13. Save your changes then close gedit.
  14. Next we will create a PHP info file that will enable us to view details about our PHP installation. At the terminal prompt, type (or copy/paste): sudo sh -c "touch /var/www/php-info.php ; echo '<?php phpinfo(); ?>' > /var/www/php-info.php" then press: Enter.
  15. Open your web browser and navigate to either http://127.0.0.1/php-info.php or http://localhost/php-info.php. You should see something similar to: PHP Version 5.3.2-1ubuntu4.2.... You should also see: CGI/FastCGI in the: Server API row.

The installation is now complete. Here is a short list of additional tools that you may wish to add. Either click the apturl protocol link or use the terminal commands to install.

Here are a few useful commands for working with your Lighttpd server.
  • Stop Lighttpd:sudo /etc/init.d/lighttpd stop
  • Start Lighttpd:sudo /etc/init.d/lighttpd start
  • Restart Lighttpd:sudo /etc/init.d/lighttpd restart

Installing applications in Ubuntu using Synaptic Package Manager

GUI: Synaptic Package Manager (SPM)

Screenshot of Synaptic Package Manager

As is cleverly depicted in the above screenshot, there are essentially five areas of the SPM window that concern us:
  1. Reload
  2. Search
  3. Package List
  4. Package Description
  5. Apply

SPM Usage
  1. From the desktop, select: System > Administration > Synaptic Package Manager. If prompted, enter the administrator password then press: Enter. The Synaptic Package Manager window will open.
  2. In the SPM window click: Reload (area 1). This action will reload the package information so that SPM becomes aware of any new, removed or updated software that may be available for your system.
  3. Once SPM has obtained the most recent package information, click: Search (area 2). The Find window will appear.
  4. In the Find window, type: frozen bubble then press: Enter.
  5. The results of your search will be displayed in the Package List (area 3). Scroll through the list and locate the package titled: frozen bubble.
  6. In the Package column, click the frozen bubble package name. This will display additional details of Frozen-Bubble in the Package Description (area 4).
  7. Click the checkbox for the frozen bubble package then click: Mark for Installation. This will open a window listing additional packages that need to be installed in support of our selected application. Click: Mark.
  8. Once you are satisfied with you selections simply click: Apply (area 5). The Summary window will appear. Click: Apply again to start the installation.
  9. Once installation is complete, the Changes Applied window will display. Click: Close then close SPM after it has refreshed. You may now access the newly installed application. In our case Frozen Bubble is located in: Applications > Games. Though this particular application is installed in a fairly obvious location, it is possible that you may not be so lucky with all of your installations. In those instances, a little hunting may be necessary.

For additional information, please refer to the official: SynapticHowto.

Installing applications in Ubuntu using the APT command-line

  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: sudo apt-get update then press Enter. This action will reload the package information so that APT (Advanced Package Tool) becomes aware of any new, removed or updated software that may be available for your system.
  3. Once APT has obtained the most recent package information, type: sudo apt-cache search frozen bubble then press Enter. This tells APT to search the cached package list that you updated in the previous step. The result of your search will look something like this: fb-music-high - High quality, large music files for Frozen-Bubble
    fb-music-low - Lower quality, small music files for Frozen-Bubble
    frozen-bubble - Pop out the bubbles!
    frozen-bubble-data - Data files for Frozen-Bubble
    junior-puzzle - Debian Jr. Puzzles
  4. By reading the results of our search, it should be clear that the package we want is the third from the top, titled: frozen-bubble with the description: Pop out the bubbles!. If it is not clear, you may view the complete details of the package in question by typing: sudo apt-cache show frozen-bubble then pressing: Enter. This returns: Package: frozen-bubble
    Priority: extra
    Section: universe/games
    ...
    Description: Pop out the bubbles!
    Frozen-Bubble is a clone of the popular "Puzzle Bobble" game, in which
    you attempt to shoot bubbles into groups of the same color to cause them
    to pop. It features 100 single-player levels, a two-player mode, music
    and striking graphics.
  5. By reading the details of the package, it is now obvious this is the game we are looking for. To install, simply type: sudo apt-get install frozen-bubble then press: Enter. If additional packages (referred to as dependencies) need to be installed, they will be added to the list displayed in the terminal window. When the summary is shown, you will have an opportunity for a final review before installing. When prompted, type either: y to confirm the installation or n to cancel. Since we cannot wait to play Frozen Bubble, type: y then press Enter.
  6. Once installation is complete, you may close the terminal by simply typing: exit then pressing: Enter. You may now access the newly installed application. In our case Frozen Bubble is located in: Applications > Games. Though this particular application is installed in a fairly obvious location, it is possible that you may not be so lucky with all of your installations. In those instances, a little hunting may be necessary.

Installing applications in Ubuntu (GUI/CLI)

Though there are multiple approaches for installing applications or packages in Ubuntu, they essentially all take one of two forms:
  • A graphical user interface (GUI), in which the user interacts with the package manager via familiar clickable buttons and menus
  • A command line interface (CLI), in which the user issues commands via a text terminal


There are advantages and disadvantages to both methods but we are not here to debate these points. Rather, we are here to gain a basic understanding of how to use the tools available to accomplish what we want: installing and removing software packages from our Ubuntu system. For the purposes of this tutorial, we will be using the Frozen Bubble application. Though we are installing a specific piece of software, these instructions apply to the majority of packages available for your system.


Now that we have shown you the menu, it is time to choose:


Advanced Package Tool (apt) basics

For this tutorial, we are again using our go-to favorite: Frozen Bubble. However, it should be noted that these instructions apply to virtually every application or package that you wish to install. This is intended only to be a basic introduction to the most used functions or methods of apt.
  • Reload the package information so that apt becomes aware of any new, removed or updated software that may be available for your system. sudo apt-get update
  • Search for and display a list of packages from the cache that include the term frozen bubble in either the name or description of the package. Note: Spaces are allowed when using apt-get search. apt-cache search frozen bubble
  • Once the name of a particular package is identified (using apt-cache search from above), obtain detailed information about said package. Note: Package names normally use hyphens in place of spaces. apt-cache show frozen-bubble
  • Install the chosen package and all necessary supporting files (dependencies). Note: This automatically resolves dependencies. If one package or ten packages are needed to install your chosen application, they are installed automatically, thus saving you (fingers crossed) from dependency hell.sudo apt-get install frozen-bubble
  • Remove a particular package and any accompanying dependencies no longer needed by other packages. sudo apt-get autoremove frozen-bubble

Uninstalling packages in Ubuntu using apt

As with package installation, package removal may be accomplished using both graphical and command-line tools. In my opinion however, the more reliable avenue for removing (and, arguably, even installing) packages is done via the command-line. If things go wrong with GUI tools, those "in the know" will invariably refer you to the command-line in an effort to resolve the issue. Why not simply hasten the point and start there from jump street.


Although for this tutorial we are removing a specific application (Frozen Bubble), the process may be applied to virtually any package you wish to remove.


  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type:sudo apt-get autoremove frozen-bubble the press: Enter. The terminal will display a list of packages to be removed (including any accompanying dependencies no longer needed by other packages). Note: If you do not recall the exact name of the package you wish to uninstall, refer to: Advanced Package Tool (apt) basics for more information.
  3. When prompted to confirm removal, type: Y then press: Enter.
  4. Once removal is complete, close the terminal.

Set preferred application for opening files

The Preferred Applications window (System > Preferences > Preferred Applications) allows you to configure a few basic settings: the default web browser, default email client, etc. However, for detailed control of which application is in charge of a particular file type, Preferred Applications falls a little short. Luckily, there is a way.

Let's say, for example, that you want to open mp3 files in Rhythmbox but you want your m3u playlists opened in a different application, like Tomtem. The following steps will show you how.
  1. From the desktop, launch: Nautilus by selecting: Places > Home Folder.
  2. Navigate to the location of an mp3 file. Any file will do. Next, right-click that file and select: Properties.
  3. Switch to the: Open With tab, where you will be presented with a list of applications. If for some reason Rhytmbox is not listed, simply click: Add. Scroll through the list, select: Rhythmbox then click: Add.
  4. Now select: Rhythmbox to set it as the default application for handling your mp3s then click close.
  5. Repeat this process for you m3u playlist file. Once complete, double-clicking on either an mp3 or m3u file will result in that file being opened with the appropriate application.

Using Perl to replace strings in multiple text files

  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal.
  2. At the prompt (the blinking cursor), type: cd ~ then press Enter. You will now be in you home directory inside the terminal.
  3. Next, we will create a test directory where you will be able to test the commands without impacting your other files. In the terminal, type:mkdir testthen press Enter.
  4. Navigate into your new directory: cd test then press Enter.
  5. Copy the following code and paste it into your terminal using either: Ctrl+Shift+V or right-click > Paste touch replace.txt ; echo 'test
    blue
    red
    white blue
    pink red
    red orange yellow yellow
    purple orange
    green red pink
    green red' > replace.txt
    then press Enter.
  6. To view the contents of this file, type:cat replace.txt
  7. Type the following into the terminal: perl -pi -e 's/red/truck/g' replace.txt then press Enter.
  8. Now type:cat replace.txt All occurences of the string: "red" have been replaced with the string: "truck".
  9. The replacement also works for more than one word. For example:perl -pi -e 's/green truck/boat/g' replace.txt will search for the string "green truck" and replace each instance with "boat". To adapt this code to replace a string in multiple text files, simply change the target file from replace.txt to *.txt:perl -pi -e 's/green truck/boat/g' *.txt

Enable the Nautilus address bar

Method 1 (Current Nautilus session only)
  1. From the desktop, open a new session of Nautilus.
  2. Press: Ctrl+L to enable the address bar. Note: This method will only display the address bar for the current Nautilus session. Once you close Nautilus, you will be back to the button controls.
Method 2 (All Nautilus sessions)
  1. From the desktop, select: Applications > Accessories > Terminal.
  2. At the prompt, type: gconf-editor then press: Enter. The Configuration Editor - preferences window will appear.
  3. In the left pane, navigate to: apps > nautilus > preferences then locate the checkbox titled always_use_location_entry. Enable the address bar by checking the box. Once you are satisfied with your selection, close the Configuration Editor - preferences window then close the terminal window and launch Nautilus to confirm your changes.

Create a shortcut to launch Nautilus as root

  1. Right-click an empty space on the desktop and select Create Launcher then configure the following items:
    1. Type: Application
    2. Name: Whatever name you want (should be unique, like RootNautilus or something)
    3. Command: gksudo nautilus
    4. Comment: Whatever comment you want (optional)
    5. Additionally, you could select a different icon for your shortcut by clicking the default spring-board icon in the top left corner. A sizable collection of icons is located at /usr/share/icons/hicolor/scalable.
  2. Click OK.
  3. Double-click your new launcher and you should be prompted to enter the password for the root account. Once this is done, root-level Nautilus file browser will open. Take extra caution when using root-level access to anything.

Launch applications using Alt+F2

Launching applications via Alt+F2 is fairly straight forward, provided you know at least most of the application's name. I say most because Run Application is able to use tab completion (i.e. hitting the Tab key once you have enough of the name typed for it to match) to make things easier. For this example we will be launching a new terminal session.

  1. From the keyboard, press Alt+F2. The Run Application window will display.
  2. Type gnome-ter then press Tab. You will see that the full name gnome-terminal now appears. Press Enter. A new terminal session will launch.
  3. Try this again. This time type fir and press Tab. You should see Firefox. Press Enter to open Firefox.

31 May 2010

Enable TCP/IP and Named Pipes then connect SQL Server Management Studio

  1. Select SQL Server Services then right-click SQL Server Browser and select Properties.
  2. Switch to the Service tab then set the Start Mode to Automatic. Click OK.
  3. Right-click SQL Server Browser then select Start.
  4. From the left pane, select SQL Server Network Configuration > Protocols for SQLEXPRESS.
  5. Right-click TCP/IP then click Enable. Click OK. Repeat this step to also enable Named Pipes.
  6. From the left pane, select SQL Server Services then right-click SQL Server (SQLEXPRESS) and select Restart.
  7. Select Start > All Programs > Microsoft SQL Server 2008 R2 > SQL Server Management Studio. Note: I may be necessary to run SSMS using the Run as administrator option in the right-click menu. If so, type the administrator password then click Yes.
  8. In the Connect to Server window, type the details for your server connection. Note: The Server name will likely need to be in the format ComputerName\InstanceName. For example, my computer name is Zeus and my SQL Server instance name is SQLEXPRESS. As a result, my Server name is set to Zeus\SQLEXPRESS.
  9. Once you have made the necessary changes, click Connect.

Installing Microsoft SQL Server 2008 R2 Express

  1. Download Microsoft SQL Server 2008 R2 Express and begin the installation.
  2. From the SQL Server Instalation Center, select Installation > New installation or add features to an existing installation.
  3. Accept the license terms then click Next.
  4. After a few moments, the Feature Selection window will display. Select the desired options. During my installation I chose:
    • Database Engine Services
    • SQL Server Replication
    • Management Tools - Basic
    • SQL Client Connectivity SDK
  5. Click Next.
  6. Click Next to use the default instance configuration: SQLExpress.
  7. Click Next to use the default service account and collation settings.
  8. Configure the desired authentication options then click Next.
  9. Set your error reporting preferences then click Next.
  10. Once installation is complete, click Close then exit the SQL Server Instalation Center.

Is my computer running a 32-bit or a 64-bit version of Windows?

  1. From the desktop, clic: Start > Control Panel > System and Maintenance > System.
  2. Under System, you should see the system type.