Search My Techie Guy

Tuesday, January 22, 2013

How to by-pass internet download manager?

When you install Internet Download Manager, it takes over all your download jobs by default. But there are cases when you want to override the internet download manager settings and resort to the normal download offered by your browser, especially when you find yourself behind proxies or if your Download Manager expires.

Here is another sticky note from your techie guy on how to by-pass the "Internet Download Manager":

1. Access the website that contains the download link using your browser.
2. Press and hold the "Alt" button on your PC and then click the download link.
3. Your download should start normally in the browser.
Remember: Press and hold "Alt" + Click the download link
Have fun.

Tuesday, January 15, 2013

Best default disk partitioning for Linux Systems - Small Sticky Note

If you are not familiar with partitioning a hard disk and preparing it for a Linux system installation, here is a starting point or what i would call the best default disk partitioning for people who don't have so much experience with Linux systems. i too, normally forgets the right partitions to use so this serves as a small sticky note to remind me the next time am up to this task.
My Techie Guy Loves Linux
Depending on your disk space (Mine was 80Gb):

/boot     Give the boot partition 1Gb
swap     Give the swap partition 1Gb
/             Give the root partition "the reminder of the hard disk space"

And you are good to go.

Thursday, December 13, 2012

Installing Google Chrome on linux - OpenSUSE 11.3 - Sharing my experience

I set out to install Google Chrome (Google's web browser) on my PC running OpenSUSE 11.3, i had just finished doing a fresh installation of openSUSE and the default browser (firefox) was outdated! so i either had to update firefox or install a new browser, i went for the latter option.

1. Download the rpm from:  Google make sure to select the appropriate package depending on your processor hardware (32 bit or 64 bit) and operating system (linux).
Installing Google Chrome on OpenSuSe 11.3
2. My downloads save in:

marco@linux-cgqg:~/Downloads> pwd
/home/marco/Downloads

3. Change to the directory that contains your downloaded file:

marco@linux-cgqg:~/Downloads> cd /home/marco/Downloads/
marco@linux-cgqg:~/Downloads> ls -ltr
total 43124
-rw-r--r-- 1 marco users    33964 2012-12-11 13:30 sony_tv_tagsale.jpeg
-rw-r--r-- 1 marco users     6298 2012-12-11 13:32 bb-curve-8900.jpg
-rw-r--r-- 1 marco users   218639 2012-12-11 13:48 sony_tv_tagsaleuganda.jpg
-rw-r--r-- 1 marco users 43892050 2012-12-11 14:20 google-chrome-stable_current_i386.rpm
marco@linux-cgqg:~/Downloads>

4.  Install the rpm (but as you can see below, i ran into some small trouble, let us see how i get over this challenge!):

marco@linux-cgqg:~/Downloads> rpm -ivh google-chrome-stable_current_i386.rpm
warning: google-chrome-stable_current_i386.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
error: Failed dependencies:
    lsb >= 4.0 is needed by google-chrome-stable-23.0.1271.95-169798.i386

5. I suspect the installation media i used to install openSUSE could be the source of all these issues, no wonder i saw some error messages during the installation but decided to skip them. i also performed a media check (to check the dvd) before installation but it failed! but yet again i went ahead and used the same DVD to install openSUSE. so i ended up with a working operating system but with a lot of software modules missing! (so, my advise to you if you are installing a fresh copy of linux is to run a media check so you don't end up with a broken system and then you have to patch it up like am doing now. but let us see how i managed to go around the above issue and get google chrome working on my openSUSE 11.3).

Note you can download Open Suse 12.2 DVD Image Here: Open Suse 12.2
Open SuSe - Linux
6. So i decided to add the Google Chrome repo to my software repositories and then install with yast2


Using the zypper command to add the google-chrome repository:
#zypper ar http://dl.google.com/linux/rpm/stable/`uname -i` google-chrome
#
Checking to make sure your repo has been updated successfully:
linux-cgqg:/home/marco # zypper lr -d

7. Installing Google Chrome using yast2

Using yast2 to install google chrome:
linux-cgqg:/home/marco # yast2 --install google-chrome-stable_current_i386.rpm
linux-cgqg:/home/marco #

8. The rest was simple, i just followed the prompts (the usual ones; ok, accept, finish) and in a couple of minutes i was enjoying google chrome on my half broken system! still patching it up though.

Thursday, December 6, 2012

Why use the volatile Keyword in C Programming?


A volatile keyword as used in C Programming or C++ is used to to define a variable and to tell the C Compiler NOT to optimize the section or block of code where that variable is used.


take for example the following variable definition:


int age = 100;
while(age == 100)
{
  //execute this code
}


When the compiler looks at the above code, it may be tempted to optimize it to:


while(true){   //execute this code}

And the compiler is justified to do so because the variable "int age = 100;" doesn’t seem to ever change, Instead of the compiler always loading this variable from memory (if it’s not in the register) and comparing it to 100 before running that block of code, it chooses to optimize it and save on processing time.

why use volatile keywords in c-programming?
But what if that variable changes when the compiler has already modified the code (optimized the code)? may be because of an interrupt or some user input? then we would have runtime issues!!!

This is where we need a volatile keyword, to tell the compiler not to touch that piece of code because that variable which the compiler thinks that it never changes! can actually change.
And this is how we would define the variable with a volatile keyword:


volatile int age = 100;

And this would stop the compiler from optimizing the block of code where the variable “age” is present.