Updating Linux hosts file

In many situations, you may not have control on the DNS server to add address record and you may need to make the FQDN work instead of IP address.  In Windows, you just update the host file.  Here is how you update in Linux/Ubuntu.

>sudo -i
Enter the password
# vi /etc/hosts
Add the following replacing the values you need

Save the file

restart network service
#/etc/init.d/networking restart

At this point, you should be able to ping the IP address with FQDN you configured.  This only applies to the machine where you changed the hosts file.

Vmware Horizon Client 4.7 failed to install on Ubuntu 18.04

Fix: 

sudo apt install libsigc++-2.0-0v5
sudo ln -s /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1400.0 /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libgstapp-1.0.so.0 /usr/lib/x86_64-linux-gnu/libgstapp-0.10.so.0
sudo ln -s /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0.1400.0 /usr/lib/x86_64-linux-gnu/libgstbase-0.10.so.0



Courtesy:  https://www.werts.nl/vmware-view-horizon-client-for-linux-on-ubuntu-18-04-failed/

How to uninstall python

 Done. The new package has been installed and saved to

 /Python-2.7.13/python_2.7.13-1_amd64.deb

 You can remove it from your system anytime using:

      dpkg -r python

Install different version of java

https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
Uninstall View client

root@siva-OptiPlex-780:~# vmware-installer  --uninstall-product vmware-view
vmware-view is not an installed product.
Available products are:

  vmware-horizon-client

root@siva-OptiPlex-780:~# vmware-installer  --uninstall-product vmware-horizon-client
All installation information is about to be removed. Do you wish to
keep your installation configuration file? [yes]: n

Uninstalling VMware Installer
    Deconfiguring...
[######################################################################] 100%
Uninstallation was successful.

Installing JDK

sudo apt-get update
sudo apt-get install default-jdk
for jre, 
sudo apt-get install default-jre
https://askubuntu.com/questions/921345/installing-a-java-dev-kit

More options and more info
https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html
Installing python

https://askubuntu.com/questions/101591/how-do-i-install-the-latest-python-2-7-x-or-3-x-on-ubuntu
bundle file is not installing

change permissions (give execute rights)
chmod a+x

root login is not working in Ubuntu

By default root login is disabled and you can log in with your user account created at the time of installing the OS. To get to the # prompt, just type sudo -i in terminal window. It will ask the user credentials and put you to the # prompt.

BSOD on XP Reinstall

I thought of getting rid one of my machine and wanted to revert it's OS from Windows 7 to Windows XP Pro.  Dusted off the XP CD bought in 2003 and tried several times with no success.  It always failed with the following error as in the picture.  I have tried with another XP CD, did CHKDSK /f, installed Dos and formatted, installed linux and tried to see of the MBR needs to be re-written where the XP cd is not able to.  Finally, it seems the BIOS setting.  I disabled SATA mode in the BIOS.  That is all it needed to fix the problem.

Digital Library of India Books download script

Digital Library of India scanned lot of content (millions of pages or may be books) in English, some foreign and most Indian Languages (yes, books in your mother tongue too!) in different categories, right from epics to latest technologies.  They took all these books from many central libraries of Universities and other major City Libraries in India, and made them available publicly for free.  See the site (Google search for "digital library of India").  This site provides two book viewers but do not offer any software for offline viewing.  The following script downloads the entire book in minutes for offline viewing.  Copy paste the script in a text file and rename it to .vbs file to run the script.  To see how you can do it yourself, check the following YouTube videos.

Introduction - Digital Library - Online Books - Part1
How to download books from it - Digital Library - Online Books - Part2
How to convert them to PDF: Digital Library - Online Books - Part3

Save the following script (copy and paste) into a text file.  Rename text file to .vbs file.  Once you do that it may prompt a warning, do not worry, select Yes to change the file extension.  Either if you do not see the warning or the file icon do not change, you may have to make sure to turn off "Hide extensions of known files" in Windows Explorer.

  • Open Windows Explorer
  • You may not see the menu if you ar using Windows 7 by default.  Just press ALT+T then you will see the menu
  • Go to "Folder Options"
  • You will see "General" Tab.  Click on the next Yab, that is "View" and uncheck "Hide extensions for known file types" and them click OK.
  • Then you should be able to rename the file as filename.vbs instead of filename.vbs.txt.
Once you see the txt file as a script file with changed icon, just run the file.  For more information, see the videos.

'Script Starts here.
'Change History:
'Skip the pages already downloaded - 29 Nov 2012
'Download previous book if not downloaded all pages-08 Dec 2012.

 
Dim oXMLHTTP
Dim oStream
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.3.0")
J=1

 
userinput = Msgbox ("Do you want to continue/complete previous download?",vbYesNo,"Complete Previous Download?")
If userinput=6 then
Set ObjBookList = ObjFSO.OpenTextFile("BookList.txt",1)
i=0
Do until ObjBookList.AtEndofStream
eachLine = ObjBookList.ReadLine
Loop
ObjBookList.Close
LastLineArr  = Split(eachline,",")
BookTitle = LastLineArr(0)
LastPageNumber = LastLineArr(1)
FirstPageLink = LastLineArr(2)
checkWithUser =  Msgbox("Check if the follwing details are correct." & vbtab & vbcrlf & vbcrlf & _
"Book Title:" & vbtab & BookTitle & vbCrLf & _
"Last Page Number:" & vbtab & LastPageNumber & vbCrLf & _
"First Page URL/Link:" & vbtab & FirstPageLink & vbcrlf & vbcrlf & _
"Do you want to continue?" & vbCrLf & "If any of the details are not correct, download as a new book.",vbYesNo,"Check the details")
If checkWithUser<>6 then
Msgbox "You selected not to continue, exiting the script!!",vbcritical,"Exit Book Download"
Wscript.Quit
End If
Else
BookTitle = Replace(InputBox("Please enter the title of the book.","Book Title to download","Mitra Labham")," ","_")
LastPageNumber = Cint(Inputbox("Please enter the last page number.","Last Page","235"))
FirstPageLink = Inputbox("Enter the first page link","Enter Link","http://www.dli.gov.in/data/upload/0001/770/PTIFF/00000001.tif")
End if

 
WriteToLog("====================================================================================================")
WriteToLog(" DOWANLOADING THE BOOK " & Chr(34) & BookTitle & Chr(34))
WriteToLog("====================================================================================================")

 
Normalized_Link = Left(FirstPageLink,Len(FirstPageLink)-7)

 
If Not ObjFSO.FolderExists(BookTitle) then ObjFSO.CreateFolder(BookTitle)

 
Set ObjBookList = ObjFSO.OpenTextFile("BookList.txt",8,true)
ObjBookList.WriteLine BookTitle & "," & LastPageNumber & "," & FirstPageLink
ObjBookList.Close

 
For j=1 to LastPageNumber
If Len(J)=2 then J= "0" & J
If Len(J)=1 then J= "00" & J
GetThisPage = Normalized_Link & J & ".tif"
If ObjFSO.FileExists(BookTitle & "\" & BookTitle & "_" & J & ".tif") then
WriteToLog("Already downloaded in previous attempt - " & BookTitle & "\" & BookTitle & "_" & J & ".tif")
Else
Call GetWebPage(GetThisPage,BookTitle,J)
If ObjFSO.FileExists(BookTitle & "\" & BookTitle & "_" & J & ".tif") then
WriteToLog("Successfully downloaded - " & BookTitle & "\" & BookTitle & "_" & J & ".tif")
Else
WriteToLog("Downloading failed for - " & BookTitle & "\" & BookTitle & "_" & J & ".tif")
End if
End if
Next
WriteToLog("Completed downloading the book - " & BookTitle)
WriteToLog("This book is found in the location - " & ObjFSO.GetParentFolderName(WScript.ScriptFullName) & "\" & BookTitle)

 
Msgbox Chr(34) & BookTitle & Chr(34) & " is downloaded successfully and can be found in the location - " & ObjFSO.GetParentFolderName(WScript.ScriptFullName) & "\" & BookTitle,vbOK,"Download Complete"

 
Function GetWebPage(GetThisPage,BookTitle,pageNum)
  'http://www.dli.gov.in/data/upload/0001/770/PTIFF/00000008.tif
  'oXMLHTTP.Open "GET", "http://www.new.dli.ernet.in/data/upload/0002/001/PTIFF/00000" & pageNum & ".tif", False
  'oXMLHTTP.Open "GET", "http://www.dli.gov.in/data_copy/upload/0070/506/PTIFF/00000" & pageNum & ".tif", False

 
  oXMLHTTP.Open "GET",GetThisPage,False
  oXMLHTTP.Send
  If oXMLHTTP.Status = 200 Then
    Set oStream = CreateObject("ADODB.Stream")
    oStream.Open
    oStream.Type = 1
    oStream.Write oXMLHTTP.responseBody
    oStream.SaveToFile BookTitle & "\" & BookTitle & "_" & pageNum & ".tif"
    oStream.Close
  Else
    Msgbox "This web page is not found",vbCritical,"Invalid Link"
    Wscript.Quit 101
  End If
End Function
  
Function WriteToLog(str)
Set ObjOutPutLogFile = ObjFSO.OpenTextFile("BookDownloadLog.txt",8,true)
ObjOutPutLogFile.WriteLine Now & vbtab & str
ObjOutPutLogFile.Close
End Function
 
'Script Ends here.

Rechargable Battery Story - You are using it everyday

Rechargable Battery! What an incorrect name? In this world there are no real 100% rechargable batteries. Are you saying I am wrong and you are using them every day in almost in every electronic gadget like your Cell phone, Cordless Phone, MP3 Player, Digital Camera? I bet you, they are not really 100% rechargable. Surprised to know why? Keep reading.....


When so called rechargable batteries are charged, most reversible chemical reaction takes place and a minute portion of irreversible chemical reaction also happens. If a battery is rechargable 1000 times, the lost efficiency is 1/1000 time and this happens during every cycle. That is how they will be become unusable after several months or few years or several cycles of charge/recharge.


Some people return the Cordless phone back to the base station after using it every time. Some others plug in the cell phone or the Digital camera or the MP3/iPod every night to top up to the maximum level and feel so happy to see all bars after full charge. This gives an impression that it keeps full charge and you can use it to get most talk time. This is completely wrong!

Here is why !!!!

As we discussed above, there is little loss every time you charge and discharge, this loss happens usually at the one side/end of the electrode. In a complete charge/re-charge cycle, this happens uniformly and the battery gives long life with less number of complete cycles instead of shorter number of too many cycles. So you should always let the charge happens to the full level and let it dry out to 80 or 90% of it instead of recharging it after using it for 10 or 20%.

So is it good to let it discharge/use completely and and then re-charge from 0% to 100%? This is also not correct. Some times deep discharge may kill the battery and and you may not be able to charge again. So it is always best to charge it while it still has 10-20% of charge. If you have 5 bars in your battery indicator, you should charge so soon as you see it is having the last bar.

@ X PM in the night you are thinking before you are to bed: Tomorrow I have a 2 hour conference call and I see my battery is showing half of its charge and it may not last for 2 hours, shall I charge or not?

It is OK to charge occassionally to skip a complete charge-recharge cycle and do a top-off as long as it do not become a habit.

Printer or Printer Cartridge buying FAQs....

Question: I see a deal. If I buy a laptop I get a free printer. Shall I buy it?
Answer: No! Don't buy it. Bargain to see if you get a discount of the printer cost for the laptop.

Question: I see a deal for a cheap printer. I can't imagine I get a printer for so low price. Shall I buy it?
Answer: No! They make you buy those expensive cartridges so frequently which may be the double the cost of that printer in a month and every few months after that.

Question: I see an All-in-one for $1$$. Shall I buy it?
Answer: Probably yes. Why? See the explnation at the end of this article.

Question: I see refill kits for many printer cartridges. Are they good? May I buy?
Answer: Some are good and some don't work after you refill. So how would I know to buy the refill kit or not?

Question: I bought a printer an year back. I remember, it was printing well for several days after I bought it. Now it is not printing. what shoudl I do? Shall I refill the cartridge?
Answer: No! Toss that cartridge and buy a new cartridge. If the cartridge is expensive than the printer, toss the printer and buy a better printer.

Question: I do not print color in my printer to save refill costs. But I surprise to learn today that my printer do not print in color anymore. I hardly printed in color since I refilled it.
Answer: If you remember, when you loaded the cartridge for the first time, it came in an air tight container. probably you might also remember to remove a plastic tab from the cartridge before loading in the printer. Most cartridges do not last more than 4 months whether you use them or not. If your printer is a simple inkjet printer, the cartridge has a sponge in it, which keep in the ink holding. As the cartridge is not in air-tight condition anymore once you load it, water slowly evaporates and leaving the cartridge dried out after several months. This is the reason, we should keep using color also as required. This is not applicable if you empty a cartridge very frequently like every month or so.

Question: Which printer I should buy?
Solution: Before you buy the selected printer, see what cartridges it needs? How much they cost? If they are more than a few dollars a months, (ex: $3 or $4 a month) on an average, then don't buy them.

Question: Which printer should I buy? InkJet or Laser?
Answer: Do yo you it for home/school/personal needs? Buy an inkjet printer. Do you also do lot of College Project work or have Home Office? Then buy an Inkjet Printer and also a cheap Laser printer. Again, see how much that Laser cartridge costs you and is it available easily in the local stores, before you buy.

Question: Which inkjet printer should I buy? All-in-One or just with print only?
Answer: I suggest you to buy an All-in-one, though it is bulky. It comes with scanner, fax, copier, printer functionality. As you have all of them, you save place and their cartridges are relatively cheap and last for long time then simple inkjet printers.

Question: I am looking to Print all my pictures at home? Which is the best printer?
Answer: Printing at home is not economical and you do not get Photo Lab printing results. So I don't suggest to Print a lot of pictures at home. Occasional printing is OK. Any printer can print with a reasonable print quality.

Laptop Battery may be completely dead if you do like this...

Problem: One day I had to run for an appointment and I quickly closed my laptop lid while it was trying to hibernate. The next day I found the battery was dead and I had to replace the whole battery.

Solution: Never do that. Wait till the laptop is completely shutdown. You would ask may I press the power button down to perform a dirty shutdown. But be informed, if you do so, laptop may not boot and might give booting problems later.

Can't click on Desktop Icons OR Can't run applications from Desktop Icons.

Problem: Can't click on Desktop Icons OR Can't run applications by clicking Desktop Icons.

Solution: Kill the process "explorer.exe" from Task manager (press CTRL+ALT+DEL and select Task Manager and go to Processes Tab). Create the same task by switching to "Applications" Tab, click "New Task" and type "explorer.exe" in that and then OK. Your problem is solved!

How to Post my PC problem in this blog?

Problem: How to post my PC problem in this blog?

Solution: Fortunately, many PC problems are common to many of us. So we do not need to re-invent the wheels. Check if your problem is already discussed in this blog. If so, just click that link to get the solution. If you have a question related to the same blog (question), click the current blog and post your question in the comments section.

If you do not see your PC problem is already discussed, just add your problems in this post by clicking comments link just below this line. When you blog a comment in this blog site I will get an automatic mail. I will try to answer as soon as possible.

Here is the list of all problems and their solutions.

Cool Tools

Free PDF Printer: Some times we want to make PDF document for any content we want. It could be a web page or a picture or a document. One way is to print to PDF printer. This PDF Printer is free with unlimited personal use, no ads, spyware or even water marks. Download BullZIP PDF Printer
Create Font with your own handwriting - http://www.fontcapture.com/ - Free
Audio/Video/Mp3 convertion software - http://www.dvdvideosoft.com/free-dvd-video-software.htm

Photoshop like software: Use GIMP. Click the link to see more about it. - Free

Slice MP3: Do you ever need to slice MP3 files of several hours? Use Slice. You can slice based on duration, size, or tracks. - Free

CPU-Z
-Identifies rated Vs running CPU, memory, FSB speeds. Runs from Thumb Drive, no install required. www.cpuid.com/cpuz.php - Free

Recover Files 2: Some times we do a shift delete a file/folder and struggle a lot how to get it back? There are many utilities with limitations to recover, but this files recovery utility is fully functional with no limitations. Download

Gizmo Drive: Now a days many applications, games, movies, are available for download in the CD/DVD ISO format (.iso files). We often burn those ones to CD/DVD using the CD/DVD burning software we have, of feel left out if we do not have one. Many times it is difficult to handle the CD/DVDs with kids as all they care about playing not how to handle them. This software will let you mount CD/DVD ISO images as a drive in windows explorer and you can keep your CD/DVD in its orinigal jewel case for future need. Mirror link from Download.com. Do you have an immediate question how to convert your CDs/DVDs to ISO images? This also supports this and yet there is another tool. See WinImage utility in this section. - Free

WinImage: Winimage is used to make the ISO images of CD/DVD or VFD/IMZ of Floppies. Clikc the link What is WinImage to know more about it Dowload WinImage. - Free

Defrag Utility: There is a better and fast Defrag Utility that defrags the drives quickly than Windows Deffrag Utility. Download Auslogics Disk Defrag. - Free

HiJackThis - Tells what programs are running at a particular instance. Good to trace spyware www.trendsecure.com/portal/en-US/threat_analytics/hijackthis.php - Free

DVDFlick - Often we have many video files of different formats, but we like to watch them on TV instead of Computer screen. But most of the times we are out of luck as many formats are playable in most DVD Players. This software turns many video files into DVD Playable format. http://www.dvdflick.net/ - Free

Folder Size- We know how to see the file size in Explorer view. But we can not see the Folder size in the Explorer view like files. This tool helps to view Folder size. www.rotebetasoftware.net/wp/freeware/folder-size - Free

GParted - Windows OS do not allow to resize the partitions once the Drives are assigned. This Linux Utility can do that job. Use it carefully. A full bakcup is suggested before you use this Partition tool. http://gparted.sourceforge.net/ - Free

File Unlocker - helps in deleting locked files - www. ccollomb.free.fr/unlocker

DriverMax - This utility helps to take a back up of all hardware drivers present in your machine. You will never need to search for the software again. It also helps to find how latest your drivers are and what version is currently installed. Click the link to download. Click the link to see how it looks (screen shots). Click the link to go to home page of the vendor.

Photoshop like free software

Problem:  Have you noticed when you update (crop/brightness etc) your pictures with software tools (like Windows Live Photo Gallery or Adobe Photoshop Express, or any other many tools) they ultimately make your several mega pixels pictures down to very low resolution (check the size, they may not produce any more good results like the original picture when you print or zoom in, though they look OK on computer screen)?

Solution:  Many advanced users/professionals know to use Photoshop for this problem which costs several hundreds of $$$.  Here is a simple FREE tool that let us edit pictures with out loosing the quality though you crop them!  It has many features like scissor cut style, different picture formats, enhance the color, brightness, contrast, brushing and so on.  Do you use Linux Desktop like Ubuntu?  Don't worry you are covered, it even has MAC version!

Do yo want to know the tool now?  It is GIMP!  Before you download and use, better to know the features.  Click this link to know more about it.

Adware, Spyware, now "Scare"ware!

Question: While browsing internet, I saw a warning that my PC is infected and the window that popped want to scan? Is it safe to click OK, or even Cancel or click the X to close the Window?  Irrespective of I click yes or no, it seems it started scanning my drives.  What is going on?

Answer: These threats are there for a long time with spyware and adwares. These are called as scareware. If you click OK or Cancel or X to close the window, you might have fulfilled the dream of the installing anything that scaring website wanted to install. Even clicking X to close the window or for that matter clicking anyware in that webpage could install the scareware.

Limiting user access for Internet Browsing will stop most of the threats.  So make the user account as Limited Account rather than Adminnstrator account.
What is the best way to determine if a software has Adware/Spyware in that?

There are hell lot of utilities available on the Internet today for free. Many times we linger to download as these tools/utilities might contain spyware. So how to determine if they have any spyware or not?

Never get trapped into the pop-ups you get while browsing. These are usually adware, which might link you to unknown website. We can never tell if a a program is safe or not to download from uknown website. Follow these guidelines to safe gaurd from malicious sofware.

You can safely download the software from well known websites like Microsoft, Adode, Yahoo, etc. Make sure you type the website name correctly and you reached the correct website. Some websites "look like" genuine websites but they may be phishing websites. Often they live with the typo of the actual name.

Never respond to the ads you see in the browsing. Many of then lead to unhealthy websites.

Now-a-days many websites offer free information while they advertise (that is how they can offer free information for you, just like you have to watch a 2 Hrs movie for 4 Hours in TV with commercials). Often these ads are context sensitive, means the advertisement running engines senses subject of the information you ar searching for. Example, if you are looking for a phone, you might also se the advertisements related to service providers. If you want to click the link in an online article, differentiate between an advertisement in the same web page and the article content.

Refer computer magazines. They have already installed and tested the applications for you, so that you do not need to worry for suspecious content.

Look for "Tested spyware free" before you download the application. Example, Download.com does that as a tag line under the download link.