Install Irfanview and resize images easily

Here’s a quick tutorial how to resize images quickly and easily using a great free program called Irfanview.

First, if you haven’t already, download and install Irfanview from https://www.irfanview.com

When starting the program for the first time go to the top menu and select:
Options > Set file associations > Images only > OK
Now all images will open in this nifty program, it’s good and fast.

Note that with the latest Windows 10 updates, you need to go to Settings > Default Apps and set IrfanView as your default viewer. Some Windows updates are known to actually remove IrfanView altogether!

Resizing an image with Irfanview

Resizing images really depends on what you want to achieve as an end result. There are a few common scenarios here:

  1. You want to resize pictures to keep the file size down because you are sending by email. This option is usually when sending family pictures or work images to a colleague.
  2. You want to create an avatar, logo or smaller image from the original image.
  3. You want to crop a section of the image and resize it afterwards.

In each of these cases, we shall be using the resize dialog box so let’s see how to open this now.

Open Irfanview from the shortcut or All Programs menu, and click on File > Open.

In the box that opens, navigate to the image you want to resize. Double click it or click on the Open button.

The image will open up in the main Irfanview window.

Irfanview resize image tutorial

From the toolbar menu at the top, click Image and select Resize/Resample. This will open the Resize/Resample image dialog box which is where you will select the settings that will be applied to your final image.

Now we want to either use some of the handy presets you see to the right side or manually add our image sizes. Think of 800 x 600 pixels as a landscape orientation, postcard sized image and you won’t be far wrong. This is an ideal size to send pics to family and friends by email and not have them clogging up their inbox. Most digital cameras now have extremely high pixel count so your original could be something like 2992 x 2000. This is obviously a landscape image because the first figure quoted is always the width, the second being the height. Resizing this image to 800 x 600 would work as landscape photos are generally close to a 4:3 ratio (although that example of 2992 x 2000 is not quite 4:3). Because some stretching of the image would occur in that case, we can actually check the box preserve aspect ratio. Now, typing in your desired width should alter the height accordingly and vice versa, resulting in a non-stretched image. It’s up to you if you want to apply sharpen after resample, this is generally better when going to a very small image such as used for icons and avatars, so I would generally avoid it for larger photos. For images on web pages such as WordPress powered sites, a width of 500 pixels (px) is usually sufficient for the content areas, going down to 150 px where we are wrapping text around the image.

In the Size Method box, put a tick next to Resample (better quality), and using the dropdown arrow, select Lanczos filter (slowest). What we are doing when resizing is effectvely getting rid of pixels, so the image needs to have a degree of loss applied to it that the human eye can’t see that well. The jpeg format is called a ‘lossy’ format for this reason. When you see a pixellated image, this is generally because it has been compressed a bit too much and too many critical pixels have been lost.

When you have the settings the way you want them, click on the OK button. Irfanview renders the image in its new size, although it may still be zoomed in or out. Use the + or – magnifying glass on the toolbar to zoom in or out until you see 100% displayed on the lower toolbar of Irfanview. This is your actual image size, as rendered by your monitor.

IMPORTANT NEXT STEP

You currently have the resized file in the main Irfanview window but it isn’t saved. Most photographs are better quality when they are original and making them smaller reduces quality, so we generally don’t save the image at this point. We do a File > Save As. Think of this as duplicating the file and you won’t go wrong, we are saving another copy of the image but in a different size. You have the chance to navigate to a new folder (I usually create one called Resized) and save the image with a descriptive name, something like:

dave-birthday-party-may-2014.jpg

I like to keep all filenames lowercase and separate words with hyphens as it’s much better for search engines and for web server semantics when uploaded to the web.

Saving in Jpeg format is generally good for photos, it results in smaller file sizes. Slide the quality slider up to 100 for best quality though.

Resize image irfanview jpeg quality

Now all that remains is to click on Save and you are done.

I hope that helped to clear up a bit of resizing mystery, please drop me a comment below if you have any questions or just to let me know it helped.

 


Kaspersky Internet Security licence renewal instructions

These are the instructions to follow when renewing the licence on Kaspersky Internet Security. I’ll presume that you have a new licence key to hand from a recent version and that the product is the same (eg not Kaspersky Pure etc). If you don’t have a new licence yet, you’ll find them for sale at discounted prices here [Hint: search for ‘kaspersky internet security 3 user’ or however many computers you need to protect]

You can buy the new licence in advance of your current product expiring, but you don’t need to wait until the existing licence has expired to install it any more. Kaspersky now seems to add on the remaining days from your current licence to your new licence, providing the product is the same.

First, open Kaspersky. The quickest way is to double click the icon in your system tray (bottom right of your desktop screen). If you can’t see it there, use the little arrow on the left to expand the icons and find it. It’s a red letter K like this one below:

 

kaspersky-internet-security-1

 

 

Now, look in the bottom right of the Kaspersky window and click on ‘License: xx days remaining’ (where xx is your actual days remaining).

 

kaspersky-internet-security-2

 

 

Now click on the ‘Enter activation code’ button.

 

 

kaspersky-internet-security-3

 

 

Finally, type in your activation code, or copy and paste it if you received it by email. Be careful to get EXACTLY the right code as some letters do look similar! You can copy and paste the whole of the new licence key into the first entry field, it will separate them for you.

 

 

kaspersky-internet-security-4

 

 

Press the ‘Save activation code’ button and you’re done. Give the PC a restart, open Kaspersky again and you should be able to see your licence has the correct amount of days remaining.

I sell full versions in my shop here at discounted prices that are often much cheaper than renewal. Grab the code from those and you won’t need to install anything, just follow the method above.

 


What is a shebang in Linux?

shebang script explained

Known as a a shebang or a bang line, this is just the characters at the very start of a Linux script. It is simply a hash or number sign followed by an exclamation point character (#!). This is then followed by the full path to the interpreter, for example /bin/bash

Think of it as a necessary code mark that tells the system the absolute path to the Bash interpreter and you’ll not have a problem.

More info on how to use and execute Linux scripts here


Four ways to execute a shell script

shebang script explainedIf you need to execute a shell script and can’t get your head around the conflicting information out there, I’ll try to clear things up. There are quite a few ways to execute a shell script and each has its pros and cons. If you are coming from a Windows environment where the file extension dictates how we handle the file, then try not to think like this. A script can have no extension but still be run. So, let’s take a look at our four ways to execute a shell script.

 

Execute shell script by calling the filename (Method 1)

This method simply changes into the script’s containing directory and calls the script’s file name to execute it.

We can change into the directory first

$ cd /usr/bin

 

and then call the script thus:

$ ./myscript

 

Now, my preferred method is to consolidate these 2 lines into 1 , calling it from any directory by simply adding the full path to the file:

$ /usr/bin/myscript

 

If you have the shebang at the start of this script, then it will be executed by using the command interpreter that is specified directly after it.

Execute shell script by specifying an interpreter (Method 2)

You can also run a shell script by specifying the interpreter. You do this by adding the preferred interpreter within the command thus:

Execute the script using the bash interpreter

$ bash myscript

 

Execute the script using the sh interpreter

$ sh myscript

 

There are usually several interpreters available such as bash, sh,  csh, ksh and more.  Note that if you use a different interpreter in the shebang, this will be overridden by the one you specify.

Execute shell script with . ./ (Method 3)

If you execute the shell script by using . ./ (aka ‘dot space dot slash’), it will not fork a sub shell and you’ll see it executed in the current shell.

$ . ./myscript

 

Why do this? Well it’s normally used after we have changed something in the .bashrc or .bash_profile. Using this method of execution we won’t need to logout and login again.

$ cd ~

$ . ./.bashrc

$ . ./.bash_profile

Execute shell script with source command (Method 4)

source is a bash shell built-in command that executes the contents of the file, which is passed as argument, in the current shell. It has a synonym that you can use which is the dot or period (.)

This can replace the ‘dot space dot slash’ method.

source myscript [arguments]

. myscript [arguments]

 

A word of warning here though because ./ and source are not quite the same.

./myscript runs myscript as an executable file in a new shell
source myscript reads and executes commands in the current shell environment

To help further, ./myscript is not the same as . myscript, but . myscript is exactly the same as source myscript

 

Do you have a preferred method for executing shell scripts and if so, why? Let me know below.


Cannot find unread emails in Gmail inbox

I have had quite a few customers calling over the years to say that they cannot find unread emails in their Gmail inbox. It’s a common complaint and one which I have found can be quickly cured by doing the following.

Logon to Gmail in your browser (Chrome, Firefox, Internet Explorer, Safari etc).

Go to the search bar at the top of the Google page (the one with the blue and white ‘magnifying glass’ search button that looks like this):

cannot-find-unread-email-inbox-gmail

In that box, type this:

is:unread in:anywhere

Note that there is a space after the word ‘unread’ but not anywhere else. Copy and paste my text above if you aren’t sure.

Now press enter and you should see all of your unread emails! You can click to read individual ones or select them using their check boxes and then do ‘More’, then ‘Mark as read’.

Try some new search terms to get more out of Gmail

If you want to take things further, there are lots of useful search ‘operators’ that you can use within Gmail too. Get used to using these and you’ll open up a whole new level for this great email tool. Here’s a list of the most popular ones:

 

What you can search by Search operator & example
Specify the sender from:

Example: from:amy

Specify a recipient to:

Example: to:david

Words in the subject line Subject:

Example: subject:dinner

Messages that match multiple terms OR or { }

Example: from:amy OR from:david

Example: {from:amy from:david}

Remove messages from your results -

Example: dinner -movie

Find messages with words near each other. Use the number to say how many words apart the words can be AROUND

Example: dinner AROUND 5 friday

Messages that have a certain label label:

Example: label:friends

Messages that have an attachment has:attachment

Example: has:attachment

Messages that have a Google Drive, Docs, Sheets, or Slides attachment or link has:drive

has:document

has:spreadsheet

has:presentation

Example: has:drive has:document

Messages that have a YouTube video has:youtube

Example: has:youtube

Messages from a mailing list list:

Example: list:[email protected]

Attachments with a certain name or file type filename:

Example: filename:pdf

Example: filename: homework.txt

Search for an exact word or phrase " "

Example: "dinner and movie tonight"

Group multiple search terms together ( )

Example: subject:(dinner movie)

Messages in any folder, including Spam and Trash in:anywhere

Example: in:anywhere movie

Search for messages that are marked as important is:important

label: important

Example: is:important 

 

Starred, unread, or read messages is:starred

is:unread

is:read

Example: is:read is:starred

Messages that include an icon of a certain color has:yellow-star

has:blue-info

Example: has:purple-star

Recipients in the cc or bcc field cc:

bcc:

Example: cc:david

Note: You can’t find messages that you received on bcc.

Search for messages sent during a certain time period after:

before:

older:

newer:

Example: after:2004/04/16

Example: before:2004/04/18

Search for messages older or newer than a time period using d (day), m (month), and y (year) older_than:

newer_than:

Example: newer_than:2d

Chat messages is:chat

Example: is:chat movie

Messages delivered to a certain email address deliveredto:

Example: deliveredto:[email protected]

Messages in a certain category category:

Example: category:updates

Messages larger than a certain size in bytes size:

Example: size:1000000

Messages larger or smaller than a certain size in bytes larger:

smaller:

Example: larger:10M

Results that match a word exactly +

Example: +unicorn

Messages with a certain message-id header Rfc822msgid:

Example: rfc822msgid:[email protected] 

Messages that have or don’t have a label has:userlabels

has:nouserlabels

Example: has:nouserlabels 

Note: Labels are only added to a message, and not an entire conversation.

Credit for search operator list:  https://support.google.com/mail/answer/7190?hl=en


Lowest prices on Norton Antivirus renewals

cheap norton security discountBeing asked often about where to find the lowest priced Norton Antivirus renewal made me come up with this article. Symantec offer a renewal by credit card that is often too pricey for most people. With Norton Anti-virus being a capable product, it’s a shame to uninstall it so here are a few tips to get a new and fully licensed program at a much reduced price. And there’s nothing illegal about it!

You don’t have to uninstall your current product, simply buy another package (at much less than the price to renew your licence!) from our software shop which will open in a new window for you. When you open it up, use the serial number you find inside. Type this into your existing product and you’ll get another 12 months of updates (or more if you buy a 2 year package).

Remember to match the amount of user licences you have, eg if you have 3 PCs buy a 3-user licence.

Not got Norton Antivirus? Click here for the cheapest Norton Internet Security renewal or click here for the cheapest Norton 360 renewal

Don’t forget to ‘Tweet’ or Facebook ‘like’ this article if it saved you some cash! or tell your friends about our low-priced software shop


Install mod_GeoIP2 on Apache2 in CentOS 7

geoip-centos

If you need to install the excellent mod_geoip2 extension for Apache2 then it can be done fairly painlessly. First off, we need to make sure that we have gcc installed:

gcc --version

 

If you don’t have it then you could ‘yum install gcc’, but I prefer to install all development tools because they include gcc anyway:

yum groupinstall 'Development Tools'

 

Install the GeoIP development package

yum install geoip-devel

 

Install mod_geoip2 by fetching the latest version with wget. To check the latest version, take a look here first:

https://github.com/maxmind/geoip-api-mod_geoip2/releases

 

I’m installing 1.2.10 here with this, but replace the code in lines 1, 2 and 3 here with their latest version:

 wget https://github.com/maxmind/geoip-api-mod_geoip2/archive/1.2.10.tar.gz
 tar -zxvf 1.2.10.tar.gz
 cd geoip-api-mod_geoip2-1.2.10

 

Now we use the apxs (Apache Extension Tool) to build our extension modules for Apache:

apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c

 

If you haven’t got apxs then you’ll need to install httpd-devel.

Be aware that this overwrites httpd so backup your server in case this fails or you get strange results.

yum install httpd-devel

 

If this fails with “Error: Nothing to do”, then it’s fairly common. You’ll probably find that /etc/yum.conf is blocking the installation. We can get around this by either editing the configuration file or typing:

yum --disableexcludes=all install httpd-devel

 

You should now have mod_geoip2 installed on your server!


Who or what is [email protected]?

 

root notty whm ssh hackedIf you’re looking through WHM’s process manager and you see [email protected] mentioned as one of the processes, don’t be alarmed. It’s perfectly normal and it’s definitely not some hacker called ‘Notty’ who has suddenly got root permissions. Be honest, you’re here because you thought that 😉

You may also have seen sshd: [email protected] in the output of ps aux too.

Why notty?

The term ‘notty’ just represents ‘no tty’ which roughly translates as meaning ‘no terminal’. When you login locally to any Linux machine the terminal will always appear in the process list as ‘tty’. If a connection is made via SFTP or you are copying files with SCP (as I did here on a test server prior to bringing up the screenshot above) then it will show as no tty (notty).

Where does TTY come from?

Many years ago, user terminals that were connected to computers were clunky and noisy Electro-mechanical Teleprinters also known as Teletypewriters. They took the latter phrase and chopped some characters out to get the TTY abbreviation:

TeleTYpewriter = TTY

Since then, TTY has been used as the shortened name for a text-only console. Here’s a teletypewriter in action:

 

 

Now you can’t say that things haven’t progressed!

 

 


Cheapest Norton 360 renewal

cheap norton security discountI’m frequently asked by customers how to get the cheapest renewal price on Norton 360.  Symantec’s renewal price is really one of the highest for any Internet Security product.  It is a capable package though and worth keeping on your PC. The best way by far is to purchase a new fully licensed program at a reduced price and install that. Nothing underhand, just a new product at a price much lower than Norton currently quote for renewal.

The beauty of this is that you don’t have to uninstall your current product if it is the same ‘family’ as the one you are installing, simply match the product family. For example, if you have Norton Security, get a Norton Security package with any version number as they all qualify for Norton’s free upgrade to the latest version anyway! If you have the older Norton 360 then get Norton Security and uninstall Norton 360 first.

Do Norton really offer a free upgrade?

Yes, most versions of Norton qualify for a free upgrade to the latest version in that product family. If you download the latest installation program, Norton will auto-detect and remove your older version and then install the newer one too, making it even simpler to install.

Please note

You can change to another security software at this point. From doing lots of virus clean-up work and labs testing, I would recommend uninstalling the Norton product and installing my preferred security suite and consistent labs test winner Kaspersky Total Security. Norton is quite capable but Kaspersky definitely has the edge on speed and low resource usage.

A word of warning. Norton products such as Norton 360, Norton Internet Security and Norton Antivirus are now retired in favour of “Norton Security” and “Norton Security with Backup”. Confused? This article explains more: New Norton product family (opens in a new window).

So to recap, if your Norton 360 has expired, then take a look in my software shop (opens in a new tab) and buy either a Norton or Kaspersky product at prices cheaper than Symantec’s renewal rates. If you want to upgrade to another software product (such as Kaspersky) then simply uninstall the existing Norton software, restart the computer and then install the Kaspersky product.

Don’t forget to ‘Tweet’ or Facebook ‘like’ this article if it saved you some cash!

Shop for Norton products now


Outlook emails stay in Outbox after Windows 10 upgrade

email-settings-pop-imap-btconnect-outlookAre you getting your Outlook emails stuck in your Outbox after upgrading to Windows 10? I’ve seen this happen on several machines and it really seems to be a problem where Windows corrupts the Outlook database and/or profile on many versions of Microsoft Office (2007, 2010 and 2013). The easiest fix and one that I’d recommend here is to delete or move the stuck emails then close all programs that are open such as Outlook.

Now we can use the in-built Windows “System File Checker” that will scan your PC and repair any corrupt files that it finds. To do this:

  • Click Start
  • Type cmd in the Search box
  • Right-click Command Prompt and then click ‘Run as administrator’. If you are prompted for an administrator password or for a confirmation then type the password or click ‘Allow’
  • In this black window (the command prompt) that appears, type in sfc /scannow noting the space before the forward slash
  • Press enter and go and grab a delicious cup of coffee because this will take a while

Note: Do not close this Command Prompt window until the verification is 100% complete. The scan results will be shown after this process is finished.

Technical information for nerds
The sfc /scannow command will scan all protected system files, and replace corrupted files with a cached copy that is located in a compressed folder at %WinDir%\System32\dllcache.
The %WinDir% placeholder represents the Windows operating system folder. For example, C:\Windows.

The time taken to complete this scan is different on every PC but usually can range from 20 minutes to an hour or more. If it solves your problem (which it has on over 50 client PCs to date) then please take a minute to drop a comment below or maybe buy something through our shop to say thanks.