Covered Topics

Please see the list of the topics I've covered. It's located near the bottom of the page. Thanks for stopping in!!
Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Friday, September 14, 2018

Two Major Windows 10 Annoyances

In December of 2016, I bought a HP laptop with Windows 10 on it. One of the things I quickly found out about Windows 10 is that they have removed many of the adjustments or tweaks I used to be able to make. One of these is being able to schedule WHEN or IF an update was applied. This was useful to me for several reasons: One was that I'd usually wait a couple weeks to be sure that whatever update being pushed didn't cause major issues - if it did, at least the "early adopters" found out the hard way rather than me. Another reason I liked being able to set my own schedule is that when I need my computer for writing a major paper for school or doing a report for work, it's awfully nice to NOT have the computer tied up installing an update when I need it. Alas, with this latest version of Windows, Micro$oft decided it knows better than I do when and how I should use my PC.

Tonight, I planned to work on some online homework for a college class I am taking. When I opened the laptop, instead of being greeted by my desktop photo and a functioning computer ready to work, I found a green screen with a circle of dots spinning around and the message "Working on Updates 45% Don't turn off your PC. This will take a while". NOT what I needed to see when I'm working on a deadline!!

The second thing that I found very annoying is that when I bought this laptop, it was fast - NOT blindingly super fast, but nice. But within 6 months - after a couple minor software updates from Micro$oft, the thing had slowed down A BUNCH. Adding more RAM helped some, as did installing and using a free app called "CC Cleaner". One can do a Google search for this and find it easily. But it still is a pale shadow of what it was when I brought it home that first evening.

I originally got this because I needed something less expensive than a $1500 MacBook Air, but I'm thinking I'd sooner make payments on a credit card bill for a MacBook than put up with this nonsense. Even if I forked up $800+ for a better laptop, if it isn't an Apple I'll STILL be putting up with Windows and Micro$oft.

Tuesday, July 17, 2018

Retrofitting New Window Screens On Restored 'Retro' RV Camper


RV camping is currently enjoying a resurgence in America. Among the thousands of people taking to America's highways in trailers and motor homes in recent times, there is a growing segment of folks who are restoring older units. This is often done for nostalgic reasons and/or to beat the high cost of a new RV. Recently, I got my hands on an online bargain. The camper shown in the photo dates to the early 1970s and was near completely restored by the previous owner. He sold it to me because he has a child and large dog, and now needs a larger RV. There was one issue with this camper: The restoration job did NOT include screens on the windows. And anyone who has been camping knows how troublesome mosquitoes and flies can be. Also, anyone who has camped in an RV knows that if one is camping in an area where power for the air conditioner is not available, it quickly becomes a "sweat box" unless one can open windows for cross ventilation. So window screens are a MUST.

This RV presented a unique problem due to the design and construction of its windows. Most RVs I have owned or traveled in have a crank that operates the window. On some, this crank is intelligently positioned into the window frame; in others, there is a small, discrete hole in the screen through which the shaft for the window crank protrudes. In the case of this particular camper, the latches which hold the window glass closed are located directly behind where a window screen would be. Thus, it would be impossible to open and close the window when using a conventional window screen. The next photos show this problem:


















I came up with my own novel engineering solution. I'm not saying this is necessarily the best or only solution, but it is what I came up with and it works. My approach was to have an immovable section of screen in the middle of the window, between the bottom latches, with movable screens resembling shutters on either side to allow access to the window latches. The next photo shows my completed installation:
When I first installed this, I realized that despite considerable care in minimizing the gap between the movable and fixed screens, that gap was still wide enough to potentially allow mosquitoes and other "no-seeum"type insects to get in. So I used an outdoor-rated duct tape to seal this opening. This can be seen in the next three photos:



















To some folks, the tape scheme might seem a bit "hillbilly", but it was inexpensive; I had it lying around, and it is certainly easy enough to fix if/when needed. And finally, the next two pictures show how it operates:



I hope this helps someone restoring an older RV or at least gives them ideas for a workaround.

Friday, January 20, 2012

Running Windows in Virtual Box On A LINUX System




















Virtual Box is an application that allows you to run an operating system within another operating system. Virtual box allows you to create one or more virtual machines within a Windows, LINUX, Mac, or Solaris host. With Virtual Box, you are actually running the "guest" operating system within an encapsulated environment. It behaves just as it would if it were installed natively on the hardware. The title of this blog is "Running Windows in Virtual Box On a LINUX System", but you can also run LINUX in Virtual Box on a Windows System.

Some viable uses:
You may be asking "Why do this?" Good question - and one well worth a couple paragraphs.

Running a "Virtual Machine" is an excellent way of testing new software, new releases of operating systems, or performing software quality assurance WITHOUT having to dedicate hardware to a single operating system. You get to keep whatever native environment you are comfortable with while you test or run an application in another environment. If you have a copy of Mac-OS running in a virtual machine, you can see what your web pages look like in a Mac browser without having to own an actual Mac PC.

If you have Windows software that will not work in Wine or Crossover Office, you can simply install Windows within Virtual Box on your LINUX system. The Windows operating system and software simply become as one more application running in LINUX.

A Slick Way Of Trying LINUX Without Commitment
If you would like to "install" LINUX but don't want to re-partition your computer or remove Windows just yet, why not run it within Virtual Box on your existing Windows system? If you don't like Ubuntu, for example, just delete it within Virtual Box and no harm done. You could have several virtual LINUX machines installed so you can compare distros and see how each one would run if it were running "native". Running LINUX in a virtual machine context such as this avoids the need for creating separate partitions for Windows and LINUX. If you decide to keep Windows and NOT use LINUX at all, you have NOT created any changes that can't be undone with a few simple mouse clicks. Pretty cool, huh?

My experiment
A week or so ago, I decided it would be fun to try running Windows VISTA in Virtual Box on a Mint 11 LINUX system.

Using Mint's package manager, I downloaded and installed Virtual Box. When you start virtual box from the menu, a "wizard" will guide you through the steps of selecting what operating system you want to use and how much disk space you want to allocate to that. From there, you will select the install media (DVD, CDROM, network drive, ...) on which the disk image for your selected operating system resides and then proceed to install it within Virtual Box.

The dialog screens are pretty much self-explanatory and I had VISTA installed in about 45 minutes. That is about typical for an install on my hardware, so using a virtualized environment didn't slow down the process any. Once I had VISTA installed, I started Virtual Box and selected 'VISTA' from the list of installed systems. See screen shot below.


















A new window containing the Windows VISTA login screen opened on my Mint 11 LINUX desktop. See the screen shot at the top of this post.

The photo below shows the Windows VISTA desktop within a Window in Mint 11 LINUX.




















Later on I might try the reverse: Installing LINUX within Virtual Box on a native Windows system.

You can learn more and/or download Virtual Box from https://www.virtualbox.org/

Thursday, September 8, 2011

SPIM: MIPS 32-Bit Simulator

SPIM is a simulator that allows one to run programs in MIPS assembly language on one's own PC. Many college courses in computer architecture and engineering teach MIPS assembly language as part of the curriculum. MIPS stands for Microprocessor without Interlocked Pipeline Stages, and is an example of a RISC (Reduced Instruction Set Computer) architecture. MIPS is used in lots of embedded microprocessors, video game systems, some desktop workstations such as DEC (Digital Equipment Corporation) and SGI (Silicon Graphics, Inc.), and many other applications. MIPS based chips can be found in hand held computers and cell phones. There are both 32 bit and 64 bit versions of MIPS.

This semester, I am taking a computer hardware and architecture course and am getting prepared for our first MIPS 32 programming assignment. We will be using SPIM. SPIM is written by James Larus. You can find more information and downloads at the links below:

SPIM Sourceforge Project Page - You can download the Windows version conveniently here.
http://sourceforge.net/projects/spimsimulator/

SPIM MIPS Simulator Homepage - You can find more information and LINUX versions by going here.
http://spimsimulator.sourceforge.net/

From my understanding of the documentation, the more recent versions of SPIM are apparently called "QtSPIM".

The LINUX downloads there appear to cater to Debian and Ubuntu users. I am currently in the process of finding out what is available for those of us who use Fedora and other distros. Last night I attempted to compile SPIM directly from the source code onto my Fedora system, but to no avail. There is a problem with the makefile that I am currently trying to resolve. I have contacted some people about it, so as soon as I find out what is going on with that I'll post it here. Meanwhile, in the interest of quickly getting something going for the class, I loaded QtSPIM to my Windows VISTA partition from the first of the two links shown above. Here is a screenshot:



Note there are two windows open. One is the "console" window that shows any results or dialogs when the program runs. The "Qt" window shows you your source code, registers, and other relevant information.

This promises to be quite an interesting semester. Will write more as things progress.

Friday, November 19, 2010

Using gcc and g++ To Compile Programs In A LINUX Or Windows Environment

Many LINUX and most UNIX users are familiar with the gcc and g++ compilers. GCC stands for the "GNU Compiler Collection". GCC supports C, C++, JAVA, and a few others. GCC and g++ are available for free for most distributions of LINUX and UNIX. Many folks have used these utilities for both school projects as well as actual production development. The "GNU Compiler Collection" is ideal for developers, students, hobbyists, or anyone else wanting to work with or learn C/C++, JAVA, or Fortran on a shoestring and NOT shell out major funds for a commercial product. CygWin g++ and MinGW are designed for Windows machines; I've posted a link concerning this near the end of this post.

The gcc utility supports C, whereas g++ also supports C++.

GCC may be operated either from the command line or via a graphical IDE (Integrated Development Environment). Some folks also use it from within the vim or emacs text editors. I will cover the Code::Blocks IDE environment in a future post.

These are operated from the command line using commands such as the following:

gcc file.c

or

g++ file.c

Various command line switches such as -o, -g, ... tell it to save to a specific output file name, use the gdb debugger, etc.

The gcc and g++ compilers, by default, output to a file named a.out, unless you use the -o switch.

To compile a program and output to a filename of your choosing, such as "My_File", you would do the following:

gcc file.c -o My_File

To quickly test my compiler, I typed out the ever popular "Hello World" program in my text editor as shown below:

#include

main() {
printf("Hello from Karl's Lab!\n");

return 0;

}

and saved it as "Hello_Test.c" in my home directory. I wanted an output file called "Hello_1". I also wanted debugger information. Here's the command I used:

gcc Hello_Test.c -g -o Hello_1

The "-g" switch activated the gdb debugger; the -o Hello_1 part told it to name the output file "Hello_1"; "the "Hello_Test.c" part told it the name of the source file to be used.

When I typed "Hello_1" without the quotes at the command line, I received the following output:

Hello from Karl's Lab!


See a Compiler error:

In C, you must use the ";" symbol at the end of a statement. I wanted to see how gcc responds to an actual error, so I removed the ";" symbol from the "printf" line in the code snippet above, then saved and compiled the code as before. Here's the message it returned:

Hello_Test.c: In function ‘main’:
Hello_Test.c:7: error: expected ‘;’ before ‘return’

The first line of information shows the function - "main" - the error occurred in. The second line of output shows which line number the error occurred in and there is a ";" symbol missing in the code. While the actual typo was in line 4 of the code, the 'return' statement at line 7 is where the compiler errored out. With this output, you are at least given somewhere to start in trouble-shooting your code.

See the gdb debugger work:

Suppose your working directory is /home/mike/c_progs, and your executable is My_File. The command you would enter at the command line is:

gdb /home/mike/c_progs/My_File

You will get something like the following:

Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb)


At this (gdb) prompt, RUN "My_File" by typing "r" (without quotes).

(gdb) r

Starting program: /home/mike/c_progs/My_File
Hello from Mike!

Program exited normally.


This shows the program's output (Hello from Mike!), as well as that it executed without any errors or warnings.

When you are finished working, EXIT the gdb prompt by typing "q" without the quotes at the (gdb) prompt. This exits the debugger and returns you to the UNIX shell prompt.


Here are some good links on using gcc and g++ :

GCC's Homepage - Look here for the manuals to whatever version of gcc you have.
http://gcc.gnu.org/onlinedocs/

http://www.network-theory.co.uk/docs/gccintro/


Some good info for getting g++ for a Windows machine:

http://cocoon.cs.odu.edu/cocoon/~cs252/open/yourOwnCompiler/allPages.html


Here are some links to a good tutorial on the gdb debugger:

http://heather.cs.ucdavis.edu/~matloff/UnixAndC/CLanguage/Debug.html#tth_sEc3.2.1

and

http://www.cs.cmu.edu/~gilpin/tutorial/


The GCC Homepage:

http://gcc.gnu.org/

Thursday, April 1, 2010

Tools For Testing Your Computer and Network

Late last Fall, I completed some on-line courses on PC Security. These were quite interesting, and enlightening. Eye-opening would not be an exaggeration. The "advanced" course covered tools such as "wireshark" - a packet sniffer, and "nmap" - used for probing a PC's software ports. The lesson on using wireshark came at a very good time, as I shall describe below.

Diagnosing Slow Internet Service
Wireshark, and other packet sniffers such as "TCP Dump", are used to monitor data as it passes across the network. A packet sniffer will tell you if packets are being dropped, re-routed, and will tell you the IP address of any routers or computers involved in the connection. Within a week after I had gone through this lesson and installed wireshark on my LINUX system, my Internet connection slowed W A Y down. The term "glacial" was an understatement - with throughput falling below that of 56K dial-up. I verified this using several sites on the web which test your connection speeds. When I fired up wireshark and attempted to navigate to a web site, I saw that MANY packets were being dropped - both at one of my ISP's routers as well as at a DNS server. Ping times were in the seconds, in some cases, but averaged around 700-800 milliseconds. Armed with this information, I was able to avoid the inevitable lame questions such as "Have you cleared your browser cache?", or "Have you tried rebooting?", ... when I called my ISP's tech support line. I was able to talk intelligently with the technician, citing the data I gleaned from my earlier wireshark session. During my 30 minute call, the technician identified a configuration problem at their end and fixed it. One word of warning: Wireshark and nmap are both legal when used properly and ethically, however they ARE considered "hacker" tools and should be used with CAUTION. If you are trying either of these on your work PC you may well get an angry phone call from your IT department - or even face discipline! ASK IT's permission FIRST if you are legitimately wanting to do this on their network for educational purposes. Your ISP also will likely take a dim view of your running these tools from home to probe other machines on the Internet, figuring you're engaged in nefarious activities. My ISP didn't ask me what "diagnostic tools" I was running prior to my talk with tech support, so I didn't tell them.

Testing Your PC's Security and Firewall
Recently, for my continuing IT education, I bought someone's cast-off copy of Windows VISTA "Home" edition. I partitioned my newest machine and configured it to dual-boot my choice of VISTA or LINUX. Soon, I plan to run my OWN tests of VISTA and its built-in firewall by probing it with another networked LINUX box loaded with the nmap port scanner. Since both machines contain LINUX systems, I can effectively use either box to test the other's firewall configuration.

Removable "Drawers" for Quickly Reconfiguring a PC
Removable hard drive "drawers" allow you to quickly remove a physical hard drive from a computer through the front panel WITHOUT opening up the case. With this, you can use a computer in multiple configurations and OSes - it's like having several PCs, only MUCH cheaper! For example, on the dual-boot VISTA box I mentioned above, I have a Win 2K/LINUX dual-boot drive and the VISTA/LINUX dual-boot drive. Each drive is installed in its own drawer and can be swapped within a few seconds by powering down the PC, removing the one drive and inserting the next one. One drive/drawer may be used for software development while another can be reserved for general browsing, multimedia, or whatever. I have several small, <10GB hard drives left over from 10 years ago. I'd like to get another couple drawers for these and use them for certain types of testing in my lab. Loading one with LINUX and Apache server would be VERY useful for testing one's web pages BEFORE going "live" with them on-line.