Category: Computers

  • Pinning Eclipse to the taskbar with Windows 7

    Eclipse is a brilliant programming interface for many languages but when using a Windows 7 based PC you may have issues when pinning the shortcut to the task bar. As you can see below when I launch eclipse via the shortcut instead of using the pinned icon it creates a new one.

    If you right click the active icon you do not get a “Pin this program to taskbar” option like you would with other programs. Eclipse on the left and Microsoft Word on the right.

    All we need to do is add 2 simple lines to our Eclipse configuration file so that Java is detected correctly which then enables us to pin the application to the task bar. First we need to go to the directory where we have placed the Eclipse files, in my case this is “C:/Program Files/eclipse” but this will differ between everyone.

    If you can’t find the files try right clicking any shortcuts you have and select properties that will tell you where the actual files are.

    There is a file called “eclipse.ini” open it in Notepad it should look something like this.

    Add the following to the top of the file and save it. The second line needs to point to your Java installation bin directory; this may differ on your computer.

    You can normally find all the Java installations in the following location “C:\Program Files\Java\”, if you have a older or new version of java than me or using the JDK version then the name may differ from”jre7”.

    You can now start Eclipse and right click the icon on the task bar where you will now see the “Pin this program to taskbar” and when you open Eclipse it will no longer create a new icon.

    If you receive the following error when trying to start Eclipse then you have provided a invalid file location for Java. Try the other locations or in my case it was due to me pointing it to the 32bit version instead of the 64bit version (Program Files (x86) instead of Program Files).

  • OS Installation (Windows XP, Vista, 7….)

    Well its about time I writen the Windows installation proccess guide this guide will help you install most Microsoft windows operating systems as they all follow the same process, Vista and Windows 7 installation process is much cleaner and simpler to use as it has a step by step walkthrough but this guide will help you progress with your installation.

    When we first boot from the windows XP disk it needs to loads the files into the computer’s memory so that it can perform all the tasks it needs to do during the installation process, but before the installation we need to setup are hard drive so it’s ready to hold the operating system files and are data.

    Once the loading has completed you will have a selection of options to chose from, seeing as we are installing a new operating system we are just going to press the Enter key, if you ever had an issue with your installation you can also access the recovery console by pressing R but this is for users who known what they are doing and is not covered in this post.

    Now we need to setup the partitions on the hard drive seeing as I am using a new hard drive I have no partitions and it just shows as unpartitioned space, I am going to create a partition using all the available space and install Windows on that partition so I’m just going to press Enter, you can do the same but please make sure you select the correct partition if you have multiple partitions (it will be the one which says Windows or something along those lines), you can create multiple partitions here if you wish by pressing C then entering how much space that partition will be allocated, pressing D will delete a partition and once you have created all your partitions select the one you wish to install Windows on and press Enter.

    A partition is a unique section on the hard drive which isn’t affected by other partitions, meaning if you install Windows on 1 partition and store all your files on another you can reinstall Windows and your other partitions and data will remain exactly how they were left (window shows each partition as a separate hard drive).

    The last question in this stage of installation is how you would like to format the partition which can either be done using a slow or fast formatting process, I generally use the slow method as it guarantees no errors or problems and make it harder to recover the old data. Using the quick method is allot quicker though and depends if you have the patience to wait.

    It will now format the hard drive and then go straight on to the coping process which is moving all the installation files from the CD/DVD to the hard drive to help speed up the installation process. Once it has completed it will automatically restart the computer and the installation process will boot up.

    If you receive a screen like below this is correct and it will then go to the installation process.

    The installation will go through numerous steps installing all the main system files and drivers and you will be prompted 2 or 3 times through the installation process, you can leave it installing and just return every now and again to see if it’s waiting for your response.

    The screenshot below is the first prompt you will receive and all you have to do is specify the language and keyboard layout. Without specifying your correct keyboard layout some of your keys may not work I life in United Kingdom and the default for Windows is United States, if I was to leave it some of my symbol keys would output incorrect symbols for my keyboard.

    Your next prompt is to enter the name of the system administrator (owner) and the CD key for installation. This process will not activate your CD key but a valid CD key must be provided.

    Your CD key can be found in many locations if you purchased your computer with the operating system already pre-installed your CD key will be located on a sticker on the side or back of the computer case, if it’s a laptop it is normally on the bottom of the laptop and if it’s from a shop it will be found inside the box.

    You will receive a couple of other prompts such as selecting a name for the computer (can be anything) and network settings (normally just select Typical Settings). Once the installation is complete it will automatically restart again and this time boot into your Windows operating system. Your installation is now complete and all you need to do is complete the wizard which will load after completion your desktop will show.

  • Apache and PHP compression (gzip/deflate encoding)

    With internet speeds increasing and the users expecting fast and more responsive websites the technology we use has to adjust to these changes, when a user requests a website from a web server the server replies with the website content let’s say the website is my blog, last time I checked it was around 53,929 bytes for the home page which means the users web browser needs to download all 53,929 bytes before the website will display, only if there was a way to decrease the website size decreasing the download time for my visitors (giving them a faster loading website)….well there is.

    A website can be compressed lowering the total bytes required to be downloaded by the visitor which also lowers the bandwidth usage for both the client and web server sending the content, for example my blogs homepage is around 53,929 bytes uncompressed as soon as I enable compression it goes to 9,437 bytes which is a dramatic decrease (82.5% decrease) allowing my visitors to now load my blog quicker and lower the bandwidth consumption, the only side effect really is a slight increase in CPU usage on the web server as it now has to compress the content every time there is a request (pages can be caches as static html files to increase speeds and decrease stress on the server but this is not going to be covered in this post), the only requirement on the visitors side is that the web browser they are using supports compressed content as it will need to uncompress the content to be able to view the website (all modern browsers support this feature so it shouldn’t be a problem, most server compression methods can tell if the browser doesn’t support compression and will send the data normally if no support is found). There are two methods of compression which I am going to go through today which is apaches deflate module (usually provided with a default installation of apache, some shared hosts may uninstall this module so you will not be able to use the apache method) and PHP compression, it is best to use the apache method if possible but if not the alternative will do fine.

    Verifying Compression
    Verifying that are website is being compressed is important there is no point doing all the changes to find out a couple of months later you did it wrong and it hasn’t been compressing anything, there are multiple methods of determining if your website is being compressed the easiest is to use a website such as http://www.gidnetwork.com/tools/gzip-test.php which allows you to quickly and easy check and also see some estimated compression results, the alternative is to view the header data send from the web server this is achieved differently in most browsers but with Firefox you can use a add-on called Live HTTP Headers to view the header data (you’re looking for a line which says Content-encoding: gzip).

    Compressing Media
    Most media is already stored in a compress format such as images, music and archived files and so will not benefit from any more compression (will just be a waste of CPU usage), its mainly text based files such as css, php, html and so on which will benefit from encryption.

    Apache Compression (deflate)
    Enabling apache deflate compression requires access to a file called .htaccess which is located in the base web directory normally public_html, this file allows us to adjust server side apache settings without needing access to the main apache configuration file (we can customize are setup for multiple websites using this file). To compress your whole website simply place the code below into your .htaccess file.

    This will now compress your whole website and all the content including css, html, javascript and php content, images are not usually compressed due to them already being stored in a compressed format, if the following code didn’t work you may not be able to adjust settings using the .htaccess file or mod_deflate is not installed on the web server (you will have to use the PHP method further in this post or ask your hosting provider for help). Not everyone wants to compress all their content so you can specify the exact content to compress by using AddOutputFilterByType.

    This code will now compress only HTML and CSS pages all other content javascript, xml files and such are sent uncompressed make sure to remove SetOutputFilter DEFLATE as that line will cause all content to be compressed, you have specify the MIME data types which can be found here. It’s possible to compress files by extension using the code below.

    This code will compress all files with the extension .html, the same code can be used to compress a specific file by changing *.html to the file name so for example if I want to compress only test.html I would use the code below.

    It’s possible to adjust the compression level by simply adding DeflateCompressionLevel.

    This line of code can range from 1 to 9, 9 being the best compression method. By default 9 is used and there is rarely any reason to specify a compression level unless your CPU usage is high due to high website usage.

    PHP Compression
    It is highly recommended to use apache compression but if your unable to or unwilling its very simple to compress content using PHP, all that is required is to add the following code to the top of any PHP file needing compressed.

    What this does it check if the browser requesting the website supports compression, if it does it compresses the data if not it just sends the content normally (uncompressed). This method will only compress content loaded into the PHP file so if we have a test.html page this page will not be compressed as PHP never loaded it.

    Extra Reading
    http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
    http://www.samaxes.com/2008/04/htaccess-gzip-and-cache-your-site-for-faster-loading-and-bandwidth-saving/
    http://www.g-loaded.eu/2008/05/10/use-mod_deflate-to-compress-web-content-delivered-by-apache/

  • Whats linux and why use it?

    There are a variety of operating systems available but most users don’t know this and believe Microsoft Windows is the only one but there are hundreds available. It quite easy to understand why most people believe there is only Windows due to the way it is forced upon us (you buy a new computer it’s there). The price ranges for operating systems various tremendously starting from absolutely free to thousands of pounds, most are slight variants of another operating system.

    There are hundreds available but most average computer users will only come across Windows and Mac OS, most people will stay away from the others because there scared or don’t want to venture into the unknown, the internet doesn’t help especially when people can post anything putting people off. There’s also the history behind some of the other OS’s such as Linux, if I was to speak to one of my IT friends at work and mention Linux they would immediately start telling me how hard it is to manage and use, if I was to mention Linux to a friend who knew other operating systems existed he would automatically presume I was a computer geek. I think it is this kind of thinking which puts people off from even trying these great operating systems, especially when the internet is full of people pushing them into the dirt. Linux operating systems have come a long way since they first started and most Linux distributions such as Ubuntu are just as easy to use as a Windows operating system, Ubuntu even allows you to incorporate your social networking into your OS so you can get all your latest tweets and notifications alerts straight on your desktop. A majority of the internet’s websites and services are hosted on servers using a Linux operating system, Windows operating systems have been increasing in popularity due to the developments of VB.Net programming languages.

    Why would I even look into Linux?
    Linux is a very powerful operating system which can be used for a variety of uses such as commercial and non-commercial, enterprise users, power users and home users. There is no restriction to the use of Linux and most Linux distributions are free allowing you to just install and use (Windows and Mac OS require you to purchase a CD key). There are hundreds of Linux distributions available for example Ubuntu, Cent OS, OpenSuse, Gentoo, Slackware and Fedora this is just a small sample there are allot more. If you want to give them a try but don’t want to commit to a new operating system you can download the Live CD versions which most Linux distributions provide, this live CD allows you to boot into the Linux operating system experiment without actually installing it (Windows doesn’t provide this and requires you to install to test).

    Getting the operating system is one thing but what about the software we are going to use, well Linux comes with hundreds of free software such as OpenOffice (Microsoft Office replacement), any software made for windows will not work on Linux without the usage of a emulator (tricks the program into thinking its running on windows) or virtualisation platform (runs an operating system inside the Linux one, read this post for more information) but there are hundreds of free alternative software or some software providers also make a Linux compatible version.

    Security is always the issue with computers especially with Windows operating systems, Windows is the most used operating system so most computer threats are targeted at that operating system, this means there is much less threats targeting Linux operating systems (there are still some threats but Linux has a unique protection system). Windows when infected by a hacker or virus can be destroyed quite easily as the viruses has access to everything, on a Linux system the internal security is much stricter and only users with a specific access level can access specific files, for example a normal user can access all their own files but they can’t install, uninstall or access any file outside of their home directory, if a action is needed which requires a higher access level the user is prompted to enter their password, what this means is that even if a user did download a virus it would only have the same access as the user who downloaded it, when it tried to gain high level access the user will be alerted.

    The possibilities of Linux are endless and I would recommend that everyone at least tries it is free after all and comes with hundreds of free software. It won’t hurt to just download the live CD and play around on it for an hour or two you never know you might like it.

  • What is a server

    What is a server

    A server is a computer designed for a specific task such as running a website, a server tends to be powered up more often compared to a regular computer with most servers running 24/7. Servers are a major part of our everyday live, the internet is a collection of hundreds of thousands of servers all working together performing various tasks. (more…)

  • Creating an SSH connection using password authentication

    Creating an SSH connection using password authentication

    SSH is a secure shell command line technology allowing a user to connect to a second computer and perform many tasks securely. I have written a post which is found here which tells out all about the SSH technology. In this post I am showing you how to connect to a SSH server in Windows and Linux operating systems using password authentication, if you are using public/private key authentication please read this post. I would recommend everyone to use public/private key authentication because it increases security dramatically, a SSH client can on connect to the server if they have the correct private key and a private key can be encrypted using a password increasing security even further. (more…)

  • What is SSH (secure shell)?

    What is SSH (secure shell)?

    SSH short for secure shell is a network protocol allowing communications between two computers, it is natively found on Linux based operating systems and used to remotely control computers and server via a command line interface. SSH was created to replace older insecure software such as telnet, telnet lacked encryption allowing anyone to intercept the data transfer. For example it was possible someone could steal the username and password used which would give them remote access to the system. (more…)

  • Why a VPS (virtual private server)?

    Why a VPS (virtual private server)?

    VPS are a cheap and efficient way of owning a server without having to maintain the physical hardware, infrastructure and costs involved when renting server space. You can purchase a new VPS from most providers and within 15 minutes you can be installing your software and services. A VPS is just like owning a physical server you can install and do what you want with it. (more…)

  • What is a VM (virtual machine) or VPS (virtual private server)

    What is a VM (virtual machine) or VPS (virtual private server)

    I’m going to talk about virtual machines (VM) before I go onto virtual private servers (vps), to understand what a vps is you need to understand what a vm is as they are very similar (practically the same thing). A VM is a virtualized (virtual) operating system running inside a master operating system, for example we have a physical computer running windows XP this is known as the master, we install virtualization software which allows us to create virtual computers inside the master, multiple virtual machines can be installed on a single master. (more…)

  • How to create VMs (virtual machines) using VirtualBox

    How to create VMs (virtual machines) using VirtualBox

    Virtualisation is used to run multiple operating systems on a single computer, if you want to know more about virtual machines (vm), virtual private servers (vps) then please read this post. In this guide I will be teaching you how to install, setup and start a virtual machine using some software called VirtualBox, there is alternative software available but I have chosen this one due to its ability to run on most operating systems such as Windows, Linux and it’s free. (more…)