Home

One week till it happens.

Leave a comment

Chitchat

=======

Recovered data from a drive that had a foobarred boot. reformatted and installed Debian using the http based install.

Plan to revisit some old electronics projects and get them done.

Replaced the fire alarms, and now wonder if I can adapt them to some other use.

—————————————————

With new technology, there is always some challenges going from an old platform to a new one. Years ago, worked in an independent computer store. This was long before ethernet and the networking that makes things so easy to transfer files between systems. One of my customers who was a college professor wanted to transfer data files from his old eight bit Atari computer to the new Atari. Of course, I volunteered to copy the files to the new system.

To copy the files, you had to use what is known as a null modem connection. To make things even more complicated, the way the files were saved were different in that evey system had it’s own ascii table. For instance, the letter “a” normally would be stored as the number 65. Not all characters were stored as the same numbers between systems. Transferred the files as text between the systems to let the terminal programs do worst of the translation between the systems.

For some files though, all but one character was converted. When I tried to display the files, everything was in one long cast of characters. The paragraphs  should have been broken up with a special character known as a carriage return, When examining the files character by character, found the carriage return was represented by the numberc 155.  Most systems are now standardized using the number thirteen as the carriage return. Obviously, a conversion had to be made.

So we needed to read in the old file one character at a time and write to the new file one character at a time. As we were reading and writing characters, we would replace the old carriage return character for the new one.
This led to some code that looked like this:

OPEN “battery.doc” FOR INPUT AS #1
OPEN “battery.txt” FOR OUTPUT AS #2

WHILE NOT EOF(1)
a$ = INPUT$(1, #1)
IF ASC(a$) = 155 THEN
PRINT
PRINT #2, CHR$(13);
ELSE
PRINT #2, ASC(a$);
PRINT a$;
END IF
WEND
CLOSE #1
CLOSE #2

Just for my own interests, the characters were echoed to the screen to made sure everything was ok. Lot of work, but the files were transferred and converted.

Ironically today, we still have that sort of problem between unix systems and dos based systems.

To go from unix to dos systems the code might be:

OPEN “battery.doc” FOR INPUT AS #1
OPEN “battery.txt” FOR OUTPUT AS #2

WHILE NOT EOF(1)
a$ = INPUT$(1, #1)
IF ASC(a$) = 13 THEN
PRINT
PRINT #2, CHR$(13);chr$(10);
ELSE
PRINT #2, ASC(a$);
PRINT a$;
END IF
WEND
CLOSE #1
CLOSE #2

To go from Dos to unix, the code might be:

OPEN “battery.doc” FOR INPUT AS #1
OPEN “battery.txt” FOR OUTPUT AS #2

OPEN “battery.doc” FOR INPUT AS #1
OPEN “battery.txt” FOR OUTPUT AS #2

WHILE NOT EOF(1)
a$ = INPUT$(1, #1)
IF ASC(a$) = 10 THEN
rem do not print the character to the new file.
print ;
ELSE
PRINT #2, ASC(a$);
PRINT a$;
END IF
WEND
CLOSE #1
CLOSE #2

This code may seem unimportant, but  you never know when something simple can get the job done.

—————————————————

Though floppy drives are not really used anymore, they can be adapted for other purposes. Most web cameras only look in one direction. With the help of a floppy drive and a sort of lazy suzan, you can control the direction of view for the webcam.

 

The electronic wiring is fairly  simple. You can connect in several ways.

If the jumper from pin 11 to 12 is set and you have the power source connected, the led of the disk drive should be on. If you do not want to use the picture:

A. Connect Pin 11 and 12 with a Jumper on the drive.
B. Connect Pin 18 of the drive with Pin 2 of the parallel port.
C. Connect Pin 20 of the drive with Pin 3 of the parallel port.
D. Connect the rightest pin of the power from the drive to the red wire of the floppy power cable.
E. Connect the pin left of the rightest pin of the power with black wire on the floppy power connector and to the ground to pin 18 of the parallel port. Actually I did not touch the ground wire on the power cable. I took pins 17 and 19 off the drive to pin 18 on the cable.

Probably use a cut off floppy cable connector with some ribbon cable attached. No need to solder directly to the pins, but you will need to connect wires together for pins 11 and 12 on the drive.

or

 

Now moving the head:

We need to connect the following:

  • 14: Drive select enables or disables the motor and also the LED. This is useful if you want the LED only to be active when you hear a tone but clearly optional.
  • 20: Step steps the motor by one step by changing it from HIGH to LOW.
  • 18: Dir controls the direction of the motor. You should change it every step so your motor vibrates. Personally, I prefer vibrating over moving up and down as moving is not very loud and doesn’t sound very good either

Direction change
x = 0
out 888, 2^x

Step motor
X = 1
out 888, 2^x

out 888, 0
—————————————————

Debian testingcurrently aliased jessie, contains software being tested for inclusion in the next major release. The packages included in this distribution have had some testing in unstable but they may not be completely fit for release yet. It contains more modern packages than stable but older than unstable. This distribution is updated continually until it enters the “frozen” state. Security updates for testing distribution are provided by Debian testing security team.Keep Calm and Install Debian JessieIn this article, we are going to learn to install & setup Debian Xfce “jessie” testing from scratch using netinst/minimal iso which is around 300MB in size.
Note: This method of installing Debian requires a functioning internet connection during installation.
Although both Ethernet and wireless connections are supported, a wired Ethernet connection is better. This method requires internet connection because only minimal packages as opposed to the full version and the other stuff has to be downloaded during installation.Step 1: Download the ISO & make a bootable diskDownload the iso & make a bootable usb drive using software like “Unetbootin” or some other similar software that lets you copy iso files to a usb drive & make it bootable.  You can find the weekly builds of all architecture & all formats in this link, http://cdimage.debian.org/cdimage/weekly-builds/. Here are the direct links to download the weekly builds of the testing iso,

Do a server/network setup to install the debian system: http://computoman.blogspot.com/2014/10/http-based-linux-install-starter.html

Step 2: The installation from the iso

Boot from the usb drive and choose install. For older machines just use the cdrom and the cd/dvd drive. Yes don’t choose the graphical installer as we are going to use the basic installer. You can refer to the attached images at the end of the article for the step by step process of the installation. There are a total of 42 pictures so we are just going to list only the important steps during the installation.

Configure Network

If you are using dhcp on your home router then the network setting will be configured automatically.  If you are not using dhcp then the installer will ask you to configure the network manually. We have dhcp setup in my home router so the network settings were configured automatically by the installer.

Debian_NetInst_09

Hostname

Name that identifies the particular system on the network. You can leave debian as the hostname or choose something else. I chose myinuxbox.

Debian_NetInst_11

Domain Name

If you are on a particular domain, then use that. If you are not sure then you can just leave it blank.  You can always go back later and name it. We left it as blank as we are not in any domain. (Note: Don’t use local as its a reserved name)

Debian_NetInst_12

Choose Mirror

Choose the mirror country and the mirror to use to download the packages & updates from. We usually just use the defaults.

Debian_NetInst_14

Proxy

Generally proxies are only used in a business or protected network. You network administrator can get you the details you need.  If you want to configure proxy then you can do it here. If you are not going to use a proxy then leave it as blank and go to next step.  We left it as blank as we are not using any proxy server.

Debian_NetInst_15

Root Password

Actually we are going to grant sudo (administrative rights) access to the user we are going to choose in the next step. So basically the root access is of much use when multiple users are using the system and you don’t want others to have sudo (aka root) access.  Enter the root password and re-enter the root password.

Debian_NetInst_17

Username & Password

Enter the username (no caps as it makes it easier to keep up with users and for you to have a simpler log in name) and the fullname of the user. Its better to choose a password different from the root password. First thing people will try to become root is to use your password if they know it.

Debian_NetInst_20

Partition Manager

We to arrange the system as you might setup a file cabinet to partition the files. The partition manager is same as the partition manager from the graphical install except for the fact that we will be configuring everything using keyboard itself.  Choose one partition for the installation and another partition for swap.
Ex:

  • 20GB partition with ext4 filesystem with mount point as / (you can leave all other options in the default value)
  • 4GB swap (usually swap size it twice the RAM size, so if the system has 2GB RAM then the swap size should be 4GB)

Debian_NetInst_25

After choosing the partitions, choose “yes” to write changes to disk.

Debian_NetInst_26

Package usage survey

If you are too much concerned about “privacy” then choose no or else choose yes. We chose NO. Basically Debian wants to know what packages are important to you.

Debian_NetInst_28

Step 3: Software selectio

This is the most important step in this installation, so make sure to choose the “correct” options. We are going to install Xfce desktop environment later. Xfce is a less system resource hog, So deselect the “Graphical desktop environment” option and continue. You may want to select the “Laptop” option if you are using a laptop for the installation.

Debian_NetInst_29
Debian_NetInst_30
Debian_NetInst_31

Step 4: GRUB Installation
GRUB

GRUB will check if any other operating systems are already installed in the system and will list them. If the list is correct then you may proceed with the installation. Usually GRUB boot loader is installed in /dev/sda but if you have more than one HDD, then you can choose the HDD in which you want the boot loader to be installed.

Debian_NetInst_35

Complete the installation from the iso

Get ready to boot into your new installation after the installer reboots the system.

Debian_NetInst_38

Step 5: Boot into the new installation
Boot into your new Debian installation and get ready to roll… Nope, not actually. We still have few more steps to do.

Debian_NetInst_40

After booting into Debian, you will still be greeted with a command line because we are yet to install a display manager nor the graphical desktop environment.
Enter the user login & password that you chose during the installation.

Now we have to switch to super user mode (root) and edit the resources list to testing, update and then install sudo & grant sudo rights to the user.
Here are the commands,

su

Enter the root password

nano /etc/apt/sources.list

You’ll find something like

deb http://ftp.us.debian.org/debian jessie main
# deb-src http://ftp.us.debian.org/debian jessie main
deb http://security.debian.org/ jessie/updates main
# deb-src http://security.debian.org/ jessie/updates main

Now what we are going to do is make this installation as testing forever. So even after jessie goes stable, this installation will still download packages from the next testing release which will have some other code name.
Also we are going to add “contrib” & “non-free” repositories that are not 100% FOSS as per the Debian Free Software Guidelines.

  • “contrib” – repositories include packages which do comply with the DFSG, but may fail other requirements. For instance, they may depend on packages which are in non-free or requires such for building them.
  • “non-free” – repositories include packages which do not comply with the DFSG

Now replace “jessie” with “testing” and add “contrib non-free” after main. Save and close the file.

deb http://ftp.us.debian.org/debian testing main contrib non-free
deb-src http://ftp.us.debian.org/debian testing main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free
deb-src http://security.debian.org/ testing/updates main contrib non-free

If you want to use a installation that is 100% FOSS as per the Debian Free Software Guidelines then just don’t add “contrib” & “non-free”.
Note: I would like to let you know that we are going to install software from the “contrib” and “non-free” repositories too.

Now lets update the system & grant sudo access to the user.

# apt-get update
# apt-get install sudo

# usermod -a -G sudo <username>

Replace <username> with your username to which you want to grant sudo
access.

# reboot

Step 6: Update & Upgrade the new installation

Now we are going to update & upgrade the system. We are using the iso from the weekly builds, so this step should take less time.
Log into your user and run the following commands.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

If you get any messages, press q to exit the message and continue the installation. You may read them if you want and then press q.
When you get a dialogue box asking if services can be restarted automatically during upgrade, choose “yes”.

Debian_NetInst_41

After the upgrade is complete, restart the system

$ sudo reboot

Step 7: Install the Xfce Desktop Environment

Now we are going to install Xfce & goodies by running the following command.

$ sudo apt-get install xfce4 xfce4-goodies

 The “Goodies for Xfce” project includes additional software and artwork that are related to the Xfce desktop, but not part of the official release.

To view the list of packages installed by xfce4-goodies, check this link, https://packages.debian.org/jessie/xfce4-goodies.

If you want to start the HDD temp monitoring daemon during startup then you chose “yes” or else choose “no”. we chose “no”.

Debian_NetInst_42

After the installation is complete, run the following command to check if the Xfce installation was successful.

$ startx

The startx command is actually a “front end” for the xinit system which will  bring up the GUI (Xfce in this installation).

After running the above command you will see the Xfce desktop environment that we just installed. Now  log out to get back to the command line.

Step 8: Install the Lightdm display manager

Now we are going to install lightdm display manager (i.e. the GUI in which you enter username & password) which is the recommended display manager for Xfce. You may install some other display manager as per your choice. You can find the list of display managers available in Debian in this link, https://wiki.debian.org/DisplayManager.

$ sudo apt-get install lightdm

Now we are going to install few packages,

  • synaptic package manager – graphical package management tool which enables you to install, upgrade and remove software packages in a user friendly way.
  • apt-xapian-index – maintenance and search tools for a Xapian index of Debian packages
  • gdebi – simple tool to install deb packages
  • gksu – graphical frontend for su
  • menu – generates programs menu for all menu-aware applications
  • iceweasel – Iceweasel is just Firefox but with a different name

Note: we like to also install vim, mc, links2, and gpm to make command line use easier.

$ sudo apt-get install synaptic apt-xapian-index gdebi gksu menu
$ sudo reboot

After rebooting the system and while entering your username & password, choose “Xfce Session” from the drop down box. Now enjoy your new Debian Xfce installation.

Plus:

First lets update the sources and grant sudo access to the default user.
Also we are going to add “contrib” & “non-free” repositories that are not 100% FOSS as per the Debian Free Software Guidelines.

  • “contrib” – repositories include packages which do comply with the DFSG, but may fail other requirements. For instance, they may depend on packages which are in non-free or requires such for building them.
  • “non-free” – repositories include packages which do not comply with the DFSG

If you want to use a installation that is 100% FOSS as per the Debian Free Software Guidelines then just don’t add “contrib” & “non-free”.
Note: I would like to let you know that we are going to install software from the “contrib” and “non-free” repositories too.

Now lets begin. Open terminal & run the following commands,

$ su

Enter the root password

GUI to manage network connections :

We have 2 choices here,

  1. wicd – If you are going to use only wired & wireless wifi network connections.
  2. network-manager-gnome – If you are going to use VPN or mobile broadband in addition to wired & wireless wifi network connections.

I installed wicd in my system just to check its performance and I can say that its much smooth & stable than the default network-manager. I could see the difference immediately in iceweasel, pages were loading faster and smoother than before wicd was installed.
Initially I installed wicd just for the sake of testing it so that I could add the steps in this guide but after experiencing the network smoothness, I decided to stick with wicd and purge network-manager.

Network-manager-gnome

If you want to use VPN or mobile internet then can’t use wicd and have to settle with the default network manager. To install the frontend gui for network manager, run the following command
sudo apt-get install network-manager-gnome
You can refer the Debian wiki, https://wiki.debian.org/WiFi/HowToUse, for information on setting up wifi.

Extra screensavers: (Optional)

If you are a fan of the matrix screensaver like me, then you might want to install it.

$ sudo apt-get install xscreensaver-gl

That is all for now.

—————————————————

Needed a sort of portable podium. So I made a platform to attach to a camera tripod. Unfortunately, all I had was an unpainted board. The wood was so white, it almost looked like an amateurs project (actually it was). Really did not want to spend any money on the project. After doing some research, found an almost free natural stain.  So simple, I did not believe it would work. but lo and behold it did.

The podium looks very professional now!

—————————————————

With Linux does not mean you have to do everything via the command line. For example you might want to import a picture into tuxpaint. That requires you know what command to use and know where the file to be converted is.

$ tuxpaint-import file2bconverted.ext

Now you could make the program semi gui with using the zenity command.

tpimport.sh

#================================
#
# Tuxpaint file import catcher
#
#=================================
# Assignments
# --------------------------------
szAnswer=$(zenity --file-selection --title="Select a file to convert to tuxpaint")
datafile=$szAnswer
#=================================
#
# Data input
#---------------------------------
tuxpaint-import $datafile

Once you create the file, you will want to make it executable.

$ chmod +x tpimport.sh

From there you could run the program withL

$ ./tpimport.sh

or you would get sort of a gui with:

The you would get the file selector.

You can select the file to convert form there without knowing a bunch of commands to get to where the file is.  Now we can go one step farther and create an icon that can be easily double clicked to execute the shell file. To do that you want to create a launcher. Just right click where you want the launcher to reside such as at the desktop and then click on create launcher.

You will want to select a name for the launcher and even choose a graphic for the launcher but the most important is to choose the tpimport.sh as the file to execute.

Of course, I have already chose the command.

Then finally you have an icon to double click without having to deal with the command line. Tada!

—————————————————

From Wikipedia:

BASIC (an acronym for Beginner’s All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use.
In 1964, John G. Kemeny and Thomas E. Kurtz designed the original BASIC language at Dartmouth College in New Hampshire. They wanted to enable students in fields other than science and mathematics to use computers. At the time, nearly all use of computers required writing custom software, which was something only scientists and mathematicians tended to learn.
Versions of BASIC became widespread on microcomputers in the mid-1970s and 1980s. Microcomputers usually shipped with BASIC, often in the machine’s firmware. Having an easy-to-learn language on these early personal computers allowed small business owners, professionals, hobbyists, and consultants to develop custom software on computers they could afford.
BASIC remains popular in many dialects and in new languages influenced by BASIC, such as Microsoft’s Visual Basic. In 2006, 59% of developers for the .NET Framework used Visual Basic .NET as their only programming language. Mono is a close relative.

Although quickly disappearing there is a lot of code that you can find on the internet  for programming in basic. Fortran sort of a father of the Basic language. Since learning Fortran (Formula translation) in college, Basic was very easy to pick on. Basic on the TRS-80 model one, was the first dialect for me to use. Of course, every microcomputer manufacturer has it’s own version of basic. To use a variety of computers, you almost had to be bilingual. As the personal computer became sort of standardized, gwbasic sort of took over even from the days of CPM. GWbasic also save in a cryptic format unless you saved it in text or ascii format.

Then, very quickly Qbasic took over. In most basics up till that date, you had to use line numbers to arrange all the instructions in a sequence. With Qbasic that changed. Now Qbasic became more like other computer programming languages, including using procedures. Like all preceding basics, it was still interpreted. In other words you could not make a stand alone program not requiring the Basic interpreter. You began to have for of an IDE integrated development environment.

As development moved forward, you finally had versions of Basic that would generate a stand alone program. Quickbasic, Turbobasic, Basic 7 and a variety of others all filled that need. QB45 has soft of taken over the Quickbasic realm and is available for a variety of operating system platforms. In fact we use it on Linux. Considering the wealth of Basic source code from over the years, you can not but help to make it usable immediately. Another Basic that we use alot is free basic. Although it has a Quickbasic compatibilty mode, there are some instructions that do not translate directly as of yet.

There is not a direct IDE in the Linux environment for Freebasic, but you can use programs such as Geany to make development easier. We use vim to work just fine for most of the things we do. We find that Freebasic is very good at controlling hardware such as the parallel port very easily without having to do cartwheels. This is extremely important for doing home automation. In fact it is very easy to include compiled Freebasic programs as part of a cgi web platform.

Though Basic may be a dying breed of development, you can use the source code as pseudocode for other platforms. Found an old book for a dollar that had a lot of code for doing electronics calculations. One of the best book finds for me. Now schematic values such as for resistors, capacitors, and etc. can be easily calculated. Also written business programs such as an editor, simple spreadsheet, and flatfile database with Basic.There really seams to be no limitation with Basic.

—————————————————

Redid a tv antenna more to spec.

Made an antenna guessing at the specs. Also did it do see how critical the angle of the dipoles were.

Original version:

The antenna did not work that well. So I went back and looked at the original picture and noticed the angle was quite different.

Oops, the original angle used was a bit wide. Hmm. S/B:

Now, the new version with the corrected angle.

Now to test it.

—————————————————

Making pizza.

pizza

Good day.

Electonic stuff.

Leave a comment

chit chat

=======

Busy weekend with repairs and etc.

Saw the old Makezine Tv series on over the air TV. They usually come onin the middle Saturday morning.

Ubunru 14.04 has a lot of maturing to do.

————————————————

Giving out the super secret code for doing the Kitt light show on the X86. Do not have a guitar anymore, but that was me playing the guitar.

Think this is the secret code in freebasic for lighting the leds.

dim duration as double
dim tim as double
tim = TIMER
duration = .3
out 888, 0

for y = 1 to 20
‘rem up
for x = 0 to 6
out 888, 2^x
r= inp(888)
out 888, (2^(x+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next x

‘rem down
for b = 1 to 7
z = 7 – b
out 888, 2^z
r= inp(888)
out 888, (2^(z+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next b
next y

‘rem end of sequence
out 888,0

rnd.bas

randomize  88888888
dim duration as double
dim tim as double
tim = TIMER
duration = .1
out 888, 0
for y = 1 to 100
out 888, 2^(abs((rnd(1)*8)))
tim = Timer
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next y

Circuit

Note: adapter used was http://www.instructables.com/id/No-solder-parallel-port-break-out/

————————————————

Use at your own risk.

Parallel and serial I2C

Download

Note : no warranty, no liability, project is provided ‘as is’ but I hope you will enjoy it !

Other:

Why ?

Access to I2C components from a very low cost interface, in pure python, over serial, parallel (maybe more in the future) interfaces, with a minimum hardware. This implementation is intended to be fast but simple and minimalist.

Features (0.3)

  • handle SDA and SCL pins
  • handle your own hardware interface simply adding your puthon driver in drivers directory,
  • auto-detect available interfaces (COM1, COM2, LPT1, etc…)
  • LM75/DS75 I2C sensors,
  • analyse SCL/SDA signals with pyScope :pyScope

Future features

  • add more I2C components,
  • add your own driver if you send it to me,

Example

>>> import I2C
>>> import I2C.sensors

>>> i2c = I2C.BusI2C('COM2')
>>> i2c.bus.setSpeed(2000)  # you can set i2c speed adapted to your hardware
>>> sonde = I2C.sensors.LM75('Room 1', i2c)
>>> print "T =  %02.03f C" % sonde.getTemperature()

Example minimal serial port I2C interface

This interface is really low speed and minimalist, it’s based on specific optos. You can find better also better solutions : http://www.standardics.nxp.com/support/documents/i2c/pdf/optoisolation.pdf

$ wget wget http://www.standardics.nxp.com/support/documents/i2c/pdf/optoisolation.pdf

Example minimal parallel port I2C interface

It-s possible to select SDA input signal, python driver can be easily adapted to you choice.

Python packages required

  • pySerial if you plan to use I2C over serial port
  • pyParallel if you plan to use I2C over parallel port

$ sudo apt-cache search pyparallel
python-parallel – pyparallel – module encapsulating access for the parallel port

$ sudo apt-cache search pyserial
python-serial – pyserial – module encapsulating access for the serial port
python3-serial – pyserial – module encapsulating access for the serial port

Win32 platform

pyParallel need you install and start giveio.sys driver

Linuxes

pyParallel on linux is based on ppdev module, make sure ppdev module is loaded and not lp. add change device access rights to make non root users or add users in right group (lp group on most systems). Use a non production computer for this as the parallel port may not print normally after making these adjustments. On most systems, ppdev is not the default parallel port handler, you must make sure module ppdev is loaded :

sudo modprobe ppde
sudo rmmod lp
sudo chmod go+rw /dev/parport0

Install from tarball

tar -xvzf pyI2C-0.3.tar.gz
cd pyI2C
python setup.py install

————————————————

This was not my project, but I really would like to try it. Sort of a 3d mouse. You should have good familiarity with the Arduino to do this project.  This definitely a project that could apply to the handicapped.

Parts:
Aluminum foil (1)
Masking tape (1)
Computer with Processing and Arduino software installed (1)
Shielded cable, cut off the ends, cut into (3) 2′ lengths (1) from RadioShack.
Arduino (1) from RadioShack.
10KΩ resistors (3) from RadioShack.
220KΩ resistors (3) from RadioShack.
Alligator clips (3) from RadioShack.
pieces of cardboard (3)
Main circuit: (left side to the Arduino and right side to each of the three foil plates.)

Unit hookup:

Arduino hookup:

Software download links:

Processing:  https://processing.org/download/?processing
Arduino: https://github.com/Make-Magazine/3DInterface

More information at: http://makezine.com/projects/a-touchless-3d-tracking-interface/

————————————————

Giving out the super secret code for doing the Kitt light show on the X86. Do not have a guitar anymore, but that was me playing the guitar.Think this is the secret code in freebasic for lighting the leds.dim duration as double
dim tim as double
tim = TIMER
duration = .3
out 888, 0for y = 1 to 20
‘rem up
for x = 0 to 6
out 888, 2^x
r= inp(888)
out 888, (2^(x+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next x’rem down
for b = 1 to 7
z = 7 – b
out 888, 2^z
r= inp(888)
out 888, (2^(z+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next b
next y’rem end of sequence
out 888,0rnd.bas

randomize  88888888
dim duration as double
dim tim as double
tim = TIMER
duration = .1
out 888, 0
for y = 1 to 100
out 888, 2^(abs((rnd(1)*8)))
tim = Timer
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next y

Circuit

Note: adapter used was http://www.instructables.com/id/No-solder-parallel-port-break-out/

Good day.

Getting back to basics.

Leave a comment

Chit chat

=======

I’m kind of quiet this week, but  here is a cartoon or two:

Building a six plus node analog computer cluster. An analog computer is a device that measures some value.

Future programmer.
Podcast?
She’s trying to get into your computer.
Bash issue…

——————————————————————

Good old fashioned office.

Standalone packages

Database:

Word processor:

Spreadsheet:
Integrated packages:
Office packages:

 

 

Integrated ERP/CMS:
Beyond…..
———————————————————
Five basic components of computer system1.Input Unit
2.Output Unit
3.Storage Unit
4.Central Processing Unit (CPU)
5.Arithmetic and Logic Unit (ALU)
6.Control UnitThe internal architectural design of computers differs from one system model to another. However, the basic organization remains the same for all computer systems. The following five units (also called “The functional units”) correspond to the five basic operations performed by all computer systems.1. Input UnitData and instructions must enter the computer system before any computation can be performed on the supplied data. The input unit that links the external environment with the computer system performs this task. Data and instructions enter input units in forms that depend upon the particular device used. For example, data is entered from a keyboard in a manner similar to typing, and this differs from the way in which data is entered through a mouse, which is another type of input device. However, regardless of the form in which they receive their inputs, all input devices must provide a computer with data that are transformed into the binary codes that the primary memory of the computer is designed to accept. This transformation is accomplished by units that called input interfaces. Input interfaces are designed to match the unique physical or electrical characteristics of input devices to the requirements of the computer system.In short, an input unit performs the following functions.
It accepts (or reads) the list of instructions and data from the outside world.
It converts these instructions and data in computer acceptable format.
It supplies the converted instructions and data to the computer system for further processing.2. Output UnitThe job of an output unit is just the reverse of that of an input unit. It supplied information and results of computation to the outside world. Thus it links the computer with the external environment. As computers work with binary code, the results produced are also in the binary form. Hence, before supplying the results to the outside world, it must be converted to human acceptable (readable) form. This task is accomplished by units called output interfaces.In short, the following functions are performed by an output unit.
It accepts the results produced by the computer which are in coded form and hence cannot be easily understood by us.
It converts these coded results to human acceptable (readable) form.
It supplied the converted results to the outside world.3. Storage Unit (Memory and off-line storage memory).The data and instructions that are entered into the computer system through input units have to be stored inside the computer before the actual processing starts. Similarly, the results produced by the computer after processing must also be kept somewhere inside the computer system before being passed on to the output units. Moreover, the intermediate results produced by the computer must also be preserved for ongoing processing. The Storage Unit or the primary  main storage of a computer system is designed to do all these things. It provides space for storing data and instructions, space for intermediate results and also space for the final results.In short, the specific functions of the storage unit are to store:
All the data to be processed and the instruction required for processing (received from input devices).
Intermediate results of processing.
Final results of processing before these results are released to an output device.4. Central Processing Unit (CPU)

The main unit inside the computer is the CPU. This unit is responsible for all events inside the computer. It controls all internal and external devices, performs “Arithmetic and Logical operations”. The operations a Microprocessor performs are called “instruction set” of this processor. The instruction set is “hard wired” in the CPU and determines the machine language for the CPU. The more complicated the instruction set is, the slower the CPU works. Processors differed from one another by the instruction set. If the same program can run on two different computer brands they are said to be compatible. Programs written for IBM compatible computers will not run on Apple computers because these two architectures are not compatible.The control Unit and the Arithmetic and Logic unit of a computer system are jointly known as the Central Processing Unit (CPU). The CPU is the brain of any computer system. In a human body, all major decisions are taken by the brain and the other parts of the body function as directed by the brain. Similarly, in a computer system, all major calculations and comparisons are made inside the CPU and the CPU is also responsible for activating and controlling the operations of other units of a computer system.4. Arithmetic and Logic Unit (ALU)

The arithmetic and logic unit (ALU) of a computer system is the place where the actual execution of the instructions take place during the processing operations. All calculations are performed and all comparisons (decisions) are made in the ALU. The data and instructions, stored in the primary storage prior to processing are transferred as and when needed to the ALU where processing takes place. No processing is done in the primary storage unit. Intermediate results generated in the ALU are temporarily transferred back to the primary storage until needed at a later time. Data may thus move from primary storage to ALU and back again as storage many times before the processing is over. After the completion of processing, the final results which are stored in the storage unit are released to an output device.

The arithmetic and logic unit (ALU) is the part where actual computations take place. It consists of circuits that perform arithmetic operations (e.g. addition, subtraction, multiplication, division over data received from memory and capable to compare numbers (less than, equal to, or greater than).

While performing these operations the ALU takes data from the temporary storage are inside the CPU named registers. Registers are a group of cells used for memory addressing, data manipulation and processing. Some of the registers are general purpose and some are reserved for certain functions. It is a high-speed memory which holds only data from immediate processing and results of this processing. If these results are not needed for the next instruction, they are sent back to the main memory and registers are occupied by the new data used in the next instruction.

All activities in the computer system are composed of thousands of individual steps. These steps should follow in some order in fixed intervals of time. These intervals are generated by the Clock Unit. Every operation within the CPU takes place at the clock pulse. No operation, regardless of how simple, can be performed in less time than transpires between ticks of this clock. But some operations required more than one clock pulse. The faster the clock runs, the faster the computer performs. The clock rate is measured in megahertz (Mhz) or Gigahertz (Ghz). Larger systems are even faster. In older systems the clock unit is external to the microprocessor and resides on a separate chip. In most modern microprocessors the clock is usually incorporated within the CPU.

6. Control Unit

How the input device knows that it is time for it to feed data into the storage unit? How does the ALU know what should be done with the data once it is received? And how is it that only the final results are sent to the output devices and not the intermediate results? All this is possible because of the control unit of the computer system. By selecting, interpreting, and seeing to the execution of the program instructions, the control unit is able to maintain order and directs the operation of the entire system. Although, it does not perform any actual processing on the data, the control unit acts as a central nervous system for the other components of the computer. It manages and coordinates the entire computer system. It obtains instructions from the program stored in main memory, interprets the instructions, and issues signals that cause other units of the system to execute them.

The control unit directs and controls the activities of the internal and external devices. It interprets the instructions fetched into the computer, determines what data, if any, are needed, where it is stored, where to store the results of the operation, and sends the control signals to the devices involved in the execution of the instructions.

———————————————————–

In an earlier article we briefly discussed the start, stop, and flow symbols. Now let us add one more symbol. Now let’s add the rectangle to represent process or arithmetic calculation. Computers have memory. We can represent a piece of memory with a symbol known as a variable. Variables can change value at any time we want them to. Usually when we change a variable, we assign a new value to it or we just want to define a part of memory to a particular variable.

In this case, we want define part of memory to be known as “A” and then assign the value of zero to it. We could also say that “A” was assigned a starting value of zero sort of like algebra you may have learned in school. So the program above starts, then assigns the value of zero to “A”, and then just stops  So far that does not seem very practical, but it is still a program.

So now so far, we have four tools to work with. Let’s review. Every program must have a starting and an ending point or termination. We need to have flowlines to describe how the program gets from the beginning to the end. Now we have a way to define a process or something to do in the program we have just created. This program might be represented in code as (rem stands for remarks or programmer notes that will not be executed by the computer):

‘rem start
A=0
end

or

‘rem start
‘rem assign values
let A = 0
‘rem stop
end

or you could go a bit further for documentation purposes:

‘****************************************
‘  Program start


‘=========================
‘Variable assigment (aka starting values)

Let A = 0

‘=========================
‘  Program stop (this is the end of the program)
end

‘****************************************

————————————————

One of the most often asked questions I hear is “What language should I learn.?”. Can not really tell you the answer to that. Then I ask, what are going to do with your programming skills? The answer is many times they do not know. They just want to be a programmer. Many times they see the big dollar signs, but programming is not really where their heart is sometimes.

Usually for future programmers I recommend having two disciplines. For instance, how can you do an accounting program if you have no idea how debits and credits at the minimum even work. You need to know about what you want to program for. In most cases, people in a particular industry feel they do not have the software that meets their needs. They go on a quest to develop such software.

Now let us go one step further. You need to know more than a language. You need to understand logic modules, just like there are different rooms in a house. All houses have the basic rooms, but they are all not attached in the same way. So is it true of software. You will need to learn the basic constructs to apply them in programming. Some say musicians can make good programmers, because they are used to putting parts of songs together. You will also need to be a good problem solver to be a programmer. No piece of software works the first time.

If you have ever done a “todo” list, you have written a program aka a piece of software for humans. Unless you are an independent programmer, you will not be developing the code from scratch, You will have guidelines that will usually come from a systems analyst or the like. Those guidelines may come in either the form of a flowchart (sort of an architect’s blueprint) or it may come in some form of “todo” list such as pseudocode. It will be your job to translate those instructions in to a computer language program.

What makes up a program? Lots of instructions. Just like you speak English or even another language, you know you have to say things in a certain way so that you will be understood by the instructions you want to convey. You need to know the syntax or the constructs (there is that word again) of the programming language you are using to write your program. That leads people to want to use the language both spoken and as a program that you feel comfortable with. Only you can decide what that is for you.  What languages are there?

As for languages, some of them were developed to accomplish certain tasks easier. In the early days, Many people in the sciences learned Fortran (formula translation) because it was good for doing heavy computation. then again people use Cobol (common business oriented language) because it was good for business, self documenting  and was very much like using English. Now there are a zillion languages for a variety of purposes or just what someone liked at the time. There are also languages that were meant for teaching about computing such as Pascal, Basic, Python, and C (and it’s variants).

In some cases, especially working for an employer, more than likely you will not get to choose the programming language will program with. Be flexible. Just like now it is good to know more than one oral language even if you do not speak it fluently. Knowing even a little bit, makes it easier to communicate with others. makes it easier to translate computer code from one language to another. The Basic language is now sort of frowned upon. It is a shame. I like to use old books with Basic computer programs and translate them to what I can use. For example, mathematics is not my strong point. I found an old program that created what is known as a sine wave. I translated that into what I could use. So it is best to be multilingual both in programming and in oral conversations.

Now that we have gone through all of that, what is next? Of course, you want to write a program. You have either read a book, magazine article, took a class, or even looked at some old programs, that you would like to try!  You will need a program that will translate what you create into what the computer can understand or a sort of a translator. All computer language translators do not come with all machines. You can go online to places like compileonline.com to start entering programs to see the results. Computeronline.com has a wealth of programming languages to choose from. There you can experiment in coding and learning a language.

For a survey of a few languages see: http://computoman.blogspot.com/2014/09/freedom-of-assembly.html In my case, I wanted to learn a bit of Java. so I went to the java option and entered some code to see what would happen.

So now you have a sandbox to try several languages to see what you personally may like,

——————————————————————

Whether you prefer a graphical user interface such as:

Where all you have to do is just double click a picture is so sexy and seems very easy. Let’s consider and alternative where all you have to do is just press a single key to start the program you want:

But then you could actually sort of do the same thing with an interface like this:

Oh but it is not as sexy some might say. It does exactly the same thing, but without using so many system resources. Not only that but you could get even more choices without having to redo the desktop. So if you pressed 1, you would get:

Or if you pressed 2 than you would get:

All this was done without any swiping!  Of course that does not prevent you from using your favorite program such as a spreadsheet or whatever:

But then you could do sort of the same thing with a text based alternative like homecalc or sc:

With all the embedded devices such as the Raspberry Pi and the like, you will want to be as resource conscious as you can.  Or to put it in another way, with all the impending issues in the world, what if computers, hand held devices and the like were stopped from being made? You still have to compute. What would you use? Those old systems in the closet do not look so bad now!?! Do not worry, computers will not be stop being made.

———————————————————————
A bit of code:

echo “************************”
echo “* Music programs       *”
echo “************************”
echo “* [1] Autoharp         *”
echo “* [2] Radio            *”
echo “*                      *”
echo “* [0] Exit/Stop        *”
echo “************************”
echo
echo “Enter your menu choice [1-2, or 0]: “
read -n 1 yourch
case $yourch in
1) autoharp.sh  ;;
2) radio.sh ;;
0) exit 0 ;;
*) echo “Oopps!!! Please select choice 1,2 or 0″
echo “Press Enter to continue. . .” ; read ;;
esac
done

————————————————-

Decided to take my score scraping script and apply it to other media. Per se maybe we just want the headlines of CNN.com. Used essentially the same set of instructions on a local news site with results. You will want to use the same rough logic or pseudocode:

Dump web page as ascii (text) to disk file.
Read disk file one line at a time in, but ignore all lines till you get what is needed.
Now continue reading one line at a time, but ignore certain lines
With the line you read in, output what is needed while editing out unwanted characters.
Stop output when you get to a point nothing else is needed.
Finnish reading file one line at a time.
End.

You might get results like this ignoring equals signs.

=========

THE LATEST* Source: Joan Rivers’ doc took selfie
* Freak accident kills hero bus
driver
* IOS 8 is live: How to get it
* Five iOS 8 features you’ll love
* NEW Billionaire tells big named computer company: Innovate
* Obama stands firm: No ground troops
* Kerry heckled during testimony
* NEW Stocks hit record; thank Yellen
* NEW Panthers star takes leave
* Vikings: Peterson must stay away
* NEW Virus coming to a state near you
* Dowd inspires edible-pot campaign
* Wrongly convicted man gets a statue
* China blacks out CNN’s report
* He mistakenly calls 911, then …
* Surprise! Mendes, Gosling have babyOPINION

===============

Then we can we can add it to our report.sh homemade newspaper. For details see:
http://computoman.blogspot.com/2013/12/create-your-own-newspages.html

#——————————————————–
# cnn.sh
echo “<h3>CNN Headines</h3>” >> report.html
echo “<pre>” >> report.html
# creates cnn.txt
./cnn.sh > cnn.txt
echo “<pre>” >> report.html
cat cnn.txt >> report.html
echo “</pre>” >> report.html

####################################
# Cnn Headline  Grabber
#
#===============================
# Assignments
# --------------------------------
datafile="rawcnn.txt"
let "flag = 0"
# end assignments
#=================================
#
# Get data file
#---------------------------------
elinks -dump "www.cnn.com"  > $datafile
#=================================
#
# Extract and display data
#---------------------------------
while read line
do fdata[$a]=$line
    echo $line | grep -q "THE LATEST"
    if  [ $? -eq 0 ]; then
        # header
        clear
        let "flag = 1"
    fi
    if [ $flag -eq 1 ]; then
        echo $line | grep -q "Weather"
            if [ $? -eq 0 ]; then
            let "flag = 0"
        else
            echo $line | grep -q "IMG"         
            if [ $? -eq 0 ]; then
                let "response = donothing"
            else
                echo $line | sed 's/\[.*\]//'
            fi
        fi
    fi
let "a += 1"
done < $datafile
# footer
echo ---------------------------------------------
echo
#===================================
# End.
####################################

————————————–

Schools spend a a lot of money on computer education management systems  such as the following: (values are subject to change at any time.)

Blackboard has dominated the market including try to allegedly sue out of business their competitors.  If your a small school with less than a hundred students, a thousand dollars a per student seems a bit extreme to me unless you can afford it.  The login in can tell you a lot about an institution. Lee college gives you the chance to look at potential courses.

Yet, when I see a credit card pictured and focused on, I wonder if the they are only looking for your money. Could be a turnoff for a potential student.

Now let’s look at an open source alternative. No money mentioned and you can again grab information without even signing up.

The cost of the Moodle software alone is $0 per student, allowing institutions to be more competitive. It is at least something to look at if you are an education administrator. Used Moodle a long time. Just did a fresh server install for testing. There are already many pre-setup modules you can use such as: http://moodle.net/?downloadable=1&submitbutton=Search+for+courses

Plus there are dozens of other sources with just a web search. i.e.  http://moodleshare.org/

Check out http://moodle.synergy-learning.com/.

 

————————————–

Penne pasta and red sauce.

SUNP0081

Good day.

Pxe booting to a linux install.

Leave a comment

Chit chat

=======

Finally started putting back together my desktop. so I can get off a borrowed laptop.

This weekend is for building electeronic stuff.

—————————————————————–

Just a few notes about doing an http based linux install.

 

Linux Debian is kind of taking of the reigns of being one of the most popular linux distros. Like installing any operating system the traditional way, you can run into roadblocks.  For example, you may not be able to burn a linux cd, the machine you want to load linux on has a broken cd/dvd rom, or a host of other reasons. What we are about to do is what is known as pxeboot networking. Another words we will use a web server to get us started with a linux install on a system. Traditionally you actually had to have several servers to do the network install. You had to modify a Dhcp (Ipaddress servers) server,  a Tftp (boot files) server, and among other systems which general required a lot of setup and the blessing of the system administrator,

Tried this with the python web server, but you have to have all the files in one directory from what I could see.  I just did not want to take the time to do it.

$ python -m SimpleHTTPServer

I went ahead and used the Apache2 web server. You can get portable versions of the Apache2 web server so that there is not much to install. But before I get ahead of myself, we need a way to boot the target computer to access the network.

Etherboot led the way in this direction and had now graduated to Ipxe. (more information at http://www.etherboot.org). So we need to make a boot disk for the computer we want to install linux on. You have severaal choices. For our purposes a floppy will be used. You can also use a cd/dvd rom disk and or a very small usb stick. We need to go to http://www.romomatic.org to create the boot media for our system.

We chose the floppy disk. Now even though we can use the floppy disk to access the network, we need to add a short script to let the floppy know about the web server we want to use. in our case the script was for oeorgan1 using the debian in /var/www directory. The script is pretty standard so all we had to do was to change one line of the script.

#!gpxe
echo Performing DHCP on first network interface
dhcp net0
set 209:string pxelinux.cfg/default
set 210:string http://oeorgan1/debian/
chain ${210:string}pxelinux.0

You will press the customization button to get the text box where to enter the script. If the script is ok, the you want to save it to your existing system.  It is usually saved as a very long name so I use the gui to rename it to test.dsk.

Now we need to get the image written to the floppy and that is pretty easy,

$ sudo dd if=test.dsk of=/dev/fd0

Note: on newer systems it might be something like:

$ sudo dd if=gpxe-1.0.1+-gpxe.dsk of=/dev/sdb

The client machine is ready to go, so now let us look at the server. You probably want to make a special directory such as debian in your document root. /var/www/.

$ sudo mkdir debian
$ cd debian

Now that we have a place to store the files we need to download them. Remember we will not have to burn a dvd. Here is where the files are, so all you have to do is download them directly to your web server,

$ sudo wget http://debian.linuxmint.com/incoming/dists/testing/main/installer- i386/current/images/netboot/netboot.tar.gz

The we need to expand the archive in the /var/www/debian directory.

$ tar zxvf netboot.tar.gz

Then you also need to get the cdrom image file for your system. In this case we are going for the i386 version,

$ wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-i386/current/images/netboot/mini.iso

That is all you need! Make sure your apache2 web server is running though.

$ sudo service apache2 status

Apache is running (pid 12345)

Now it is time to boot up your client machine with the floppy media!

 

In just a few seconds you should get the install menu. Now the rest of the install should come from the internet. That is another article. We have our server set up to support several linux distros. i.e. Debian, Mint,  Ubuntu, and others. Using a standard boot media, there is.no need to burn new cd’s every time a new version of linux comes out.  Have fun!

Even if your computer does not have a floppy drive you can get a usb floppy drive fairly cheap. Since the data on the floppy is so small, it should not take long to load even with a usb floppy drive.. For mass installs we recommend the cobbler, drbd/clonezilla, or as a last resort the Fog software. I will talk about them later.  Last but not least you can also use this method to install MSWindows systems.

 

Arch Linux Netboot Live System

The Arch Linux netboot environment allows booting Arch Linux live media directly over the network. It will boot into a menu where you can choose from a list of available mirrors. The image will be downloaded into memory.
Requirements: A computer that connects to the internet via LAN and DHCP.
If your ethernet NIC is not supported by iPXE, you must use your NIC’s netboot capabilities. This is only possible if you select “Boot from network” in the BIOS and configure your DHCP server to load the PXE image provided below. In this case, the UNDI driver will be used for downloads until Linux is booted. The first stage of the download can be extremely slow.

Test netboot with qemu

Download an iPXE kernel image.

Run qemu with the kernel image:

qemu -m 1G -kernel ipxe.lkrn

Boot with any Linux bootloader

Download an iPXE kernel image to /boot.

Add the image to your bootloader configuration:
GRUB 2:

menuentry 'Arch Linux Netboot Environment' {
  set root='(hd0,1)'
  linux16 /ipxe.lkrn
}

Syslinux:

LABEL archnetboot
MENU LABEL Arch Linux Netboot Environment
KERNEL /ipxe.lkrn

GRUB Legacy:

title Arch Linux Netboot Environment
    kernel (hd0,0)/ipxe.lkrn

Boot from USB

Install a bootloader (e.g. GRUB or syslinux) onto the USB drive and use the .lkrn file as described above.

Boot from Floppy

Download an iPXE floppy image.

Write the image to your floppy:

dd if=ipxe.dsk of=/dev/fd0

Boot from CD

Download an iPXE ISO image and write it to a CD.

Boot from the network   (from the Arch documentation)

There are two ways to do this:

Using an iPXE image

Download an iPXE PXE image into your TFTP root.

Set the PXE filename to ipxe.pxe (using the filename option in dhcpd or the -M option in dnsmasq).
This method is recommended, as it will always work – if iPXE lacks a native NIC driver, the UNDI driver will be used.

Flashing your boot ROM

You can build a custom iPXE images and flash it to your boot ROM. You must include one of the following iPXE scripts:

If you do this, your computer will always boot the Arch netboot environment when you netboot your computer.

 

Been spending time looking at booting systems to the net to install linux operating systems. So far we have looked at Arch and Debian based systems. Both Fedora and Centos have pre-made iso’s for network install.

Centos:

http://www.centos.org/download/

Fedora:

http://fedoraproject.org/en/get-fedora

But if you want to roll your own, here are some scripts to look at:

Fedora

#!ipxe
dhcp any
# Set source URI
set mirror http://download.fedoraproject.org/pub/fedora/linux/releases/20

# Detect CPU architecture and calculate repository URI
set arch i386
set repo ${mirror}/Fedora/${arch}/os

# Start installer
kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
initrd ${repo}/images/pxeboot/initrd.img
boot

or

#!ipxe
dhcp any
# Set source URI
set mirror http://download.fedoraproject.org/pub/fedora/linux/releases/18

# Detect CPU architecture and calculate repository URI
cpuid –ext 29 && set arch x86_64 || set arch i386
set repo ${mirror}/Fedora/${arch}/os

# Start installer
kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
initrd ${repo}/images/pxeboot/initrd.img
boot

or older releases

#!ipxe
dhcp any
# Set source URI
set mirror http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14

# Detect CPU architecture and calculate repository URI
set arch i386
set repo ${mirror}/Fedora/${arch}/os

# Start installer
kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
initrd ${repo}/images/pxeboot/initrd.img
boot

———————————————-

Centos

dhcp any
set base http://mirror.centos.org/centos/6/os/x86_64
kernel ${base}/images/pxeboot/vmlinuz stage2=${base}/images/install.img ksdevice=${netX/mac}
initrd ${base}/images/pxeboot/initrd.img
boot

=================================

Our local server ipxe script

dhcp any
set base http://oeorgan1/distro/centos
kernel ${base}/pxeboot/vmlinuz stage2=${base}/install.img ksdevice=${netX/mac}
initrd ${base}/pxeboot/initrd.img
boot

Files  for local server needed:

${base}/
boot.iso
install.img
${base}/pxeboot/
initrd.img
vmlinuz

 —————————————————
Stromboli biscuit:
stroboli
Good day.

Almost xmas!

Leave a comment

Chit chat

========

Upgraded two machines to ubuntu 14,04. Desktop video capture and other issues. ugh,

—————————————————

Cartoons:

 

 

————————————————–

Legacy way to combine text and a graphic.

<table>
<tr>
<td><img src=”prof.png” alt=””></td>
<td>06/01/2008 The Info pages are done <br> 06/09/2008 Locally on-line as of 03/05/2008 <br> 06/08/2009 Some web pages updated <br> 06/30/2010 Redoing student services web pages. <br> 09/15/2014 Menus are restructured
</td>
</tr>
</table

———————————–

Good job for an old computer to get videos from youtube. Data flle consists of lines like this (without spaces):

https ://www.youtube.com/watch?v = 3kJXbXhEPrk
https ://www.youtube.com/watch?v = yxAhrUAvjo0
http ://www.youtube.com/watch?v = 9DTjssGms8I
https ://www.youtube.com/watch?v = ACsy6xSIBm8

The code:

———————————–

One of the questions I get is that what software may I use to replace the programs that I used on my old system. Personally, I have been off of proprietary software such as Microsoft systems for more than seven years and have not looked back.  Well here is a table that might help.  By the way, this list is by no means exhaustive.

By the way:  Thanx to Troy R. Schulz who compiled this list.

MSWindows Application

Open Source Application

Adobe Acrobat Reader
KPDF

People want to be able to view PDF files quickly and easily. We usually recommend KPDF, but if someone uses Google Apps for Business they can view PDF’s right in their Chrome Browser.


Adobe Illustrator, CorelDRAW!
Inkscape

Some of our customers (including myself) do vector graphic design. Some are sign shops. Honestly, most use Corel Graphics Suite, but many are begging Corel to make a Linux version, or at the very least a Wine port for it. Some have elected to use Inkscape.

Adobe Photoshop, Corel PhotoPaint
Gimp, Cinepaint, MyPaint

Again, some of our graphic design customers and photographers need to be able to edit photos. Some actually paint pictures for advertising.


Microsoft Publisher, Adobe Pagemaker
Scribus

Folks in offices that have gotten used to MS Publisher (most) or Pagemaker (not too many) tend to like Scribus. The only beef they usually have is you can’t import your Publisher files into it. But, I always point out that you can’t import Publisher files into ANYTHING except Publisher. They should be using a real page layout program.


Adobe Lightroom
Darktable

This is a really big one for a couple photographer customers we have. One of them who is just getting started has no problem using Darktable and really likes it.


AIM, ICQ, YahooChat, MSN Messenger, mIRC, Trillian, GoogleTalk, MySpace Chat, Facebook Chat, Skype
Pidgeon, Empathy, ChatZilla

There are a large variety of chat programs on the market. Most are specifically geared toward that chat service who provides the chat program. However, there are some programs, like Trillian, which will let you chat with people on multiple chat services all through one program/interface. The closest equivalent I’ve found, that is the most user friendly, is Pidgeon.


Windows Media Player, iTunes, RealPlayer, WinAmp (music players)
Banshee, Rhythmbox, Audacious, Amarok

WMP and iTunes are just a pain. iTunes is horribly slow. Real Player is not reliable at all. WinAmp is fantastic. Of the Linux equivalents, most of our people like Rhythmbox the best so far. Many people who work in offices like to listen to music on their computers instead of having a radio or CD player on their desk while they work.


iViewMedia Pro, Adobe Lightroom, Picasa
digiKam, fSpot, Shotwell, Darktable, Picasa

We are specifically talking about photo management and organization. We’ve had business and home users that all want something to do this easily. So far, most people have liked digiKam and Picasa the best.


Microsoft – Word, Excel, PowerPoint, Access, Math
LibreOffice Suite, OpenOffice Suite

These should be obvious. We put LibreOffice not only on the Linux machines we sell, but on all the new Windows machines too.


MS Frontpage, Adobe Dreamweaver, MS Expressionweb, Sharepoint
Bluefish, KompoZer, Nvu

Not too many people use Frontpage anymore since it’s discontinued but there are a couple that still fiddle with the last version that was out. For those that used to use Dreamweaver, most like Nvu the best overall. It’s available for Win, Mac, and Lin.


Internet Explorer, Firefox, Google Chrome, Safari
Firefox, Opera, Chromium, Google Chrome for Linux

IE just plain sux bricks. Safari is slow. We put Chrome on ALL our Windows machines. We put Firefox and Google Chrome on our Linux machines. We usually use Google Chrome instead of Chromium because the brand is already familiar to our customer base and because we are Google Apps for Business resellers.


MS Outlook, Windows Mail, Windows LiveMail, Eudora
Evolution, Thunderbird

For those in a business environment, Evolution is a comfortable transition if they have been used to Outlook since it looks so much alike. However, that being said, most of our customers have loved Thunderbird. Plus, if they are Google Apps customers there are a variety of plug-ins to add Google Apps Synchronization support for mail, calendar, and contacts.There are several plug-ins we always put in a Thunderbird install (ESC to close, Minimize to Tray, Google Calendar, Google Task Sync, Google Contacts sync, and more).


MS Paint
TuxPaint, MyPaint

Believe it or not, this tends to be a hot spot with some customers, both business and home users. They don’t want to lose MS Paint! Oh my goodness, that would be the end of the world! Puh-lease. Spare me. While Tux Paint is suited more for small children you’d be surprised how many adults like it. However, a more professional program with more features and the one I prefer is MyPaint.


Nero Burning Rom, Roxio Creator, ImgBurn
Brasero

If you’ve ever used ImgBurn on Windows I think it totally beats everything else available. It’s so simple to use, it’s very fast, and it just plain works! However, Brasero on Linux is the same. It’s really the best alternative.


NewzCrawler RSS Feed Reader
Akgregator, Feedly App for Chrome

Honestly, I used to use Google Reader and was very VERY put out when they closed down the project! So were many many other people. One company stepped up and worked with Google to take over handling Google’s old customer’s feeds. That would be Feedly. They have apps for almost all major devices and platforms….except Linux. However, you can use feedly in your web browser and it works great! We usually install the Feedly app in Chrome.


Notepad, TextPad, Notepad++
gEdit, Kate

Almost everyone uses Windows Notepad for one thing or another. For those businesses that are trying to troubleshoot website page issues they want a text editor that shows line numbers so they can more easily debug their page designs. We usually recommend gEdit


Partition Magic, Acronis, many many others….
gParted

Being a computer support shop, we have to partition discs all the time. There really just isn’t anything better than gParted! It seems to be the easiest and most user friendly, and they even have a LiveCD you can run the application off of while you are building or rebuilding your system.


Quicken, Microsoft Money
GNUcash, KMyMoney

Honestly, most businesses still use Quickbooks. There really just isn’t an equivalent out there that I have found that does what they do the way they do it. There’s a reason they are an industry standard. However, for those customers that need something for their home or some small business finances, most have opted to use GNUcash. Some have like KMyMoney though.


Variety of torrent readers….
Ktorrent, Transmission

There are so many torrent readers out there that people use to download or share files and video presentations. Most of the customers on Windows usually use BitTorrent. I have found that most people like Ktorrent the best, though.


CinePlayer, WinDVD
VLC, Totem

We have home and business users that tend to watch a lot of DVD’s on their computers. Some of our customers are financial planners who record some of their seminars and want to present them or share them with their customers. They burn their presentations to DVD’s. Some actually want movies at their desk while they work. There simply is no better multimedia player than VLC. It plays just about every media format on the planet and just plain works. To make the transition more comfortable we always install the Windows Media Player 12 skin on it after installation. This way it looks a lot like the old Media Player they were used to before.


Cakewalk
Audacity

Some of our customer are into music production. Or, they are editing audio from seminars they have done for their MP3 streams to their customers. Both kinds of customers love Audacity both on Windows and Linux platforms.


Windows Movie Maker, Adobe Premier
Cinelerra, Kino, OpenShot, VideoLan Movie Creator
Those of our customers that are actually producing their video presentations or home movies usually ask for an alternative to Windows Movie Maker. So far, they seem to like Cinelarra or OpenShot the best.

wsFTP, WinFTP
FileZilla

There are a ton of FTP programs out there. While there are several open source equivalents, most people whether on Windows or Linux like FileZilla the best.


Variety of music ripping programs….
Sound Juicer

We’ve got some customers that want to rip music to MP3’s to install on the drives of the systems that manage their hold music on their phone systems. Or, they like to listen to the music while they work but don’t like having to swap CD’s all the time.


Variety of programs for tethering a dSLR camera to a computer for remote shooting….
Entangle

Another thing our photographer customer want is a way to tether their dSLR camera to a laptop so they can do tethered shooting and see their images on the screen after. I am also a photographer and have searched for the same thing. While there better, more seamless solutions, those usually involve spending a bunch of money on special hardware interface devices and special software and wireless modules, etc. You can plug your camera into your Linux laptop with a USB cable and use Entangle. It took me a long time to find this program, but it works great, at least with the Canon camera I and a couple of our customers use.


Variety of scanning software….
Xsane

Many times you buy a scanner or MFC device it comes with the manufacturer’s scanning software. Much of it is bloated and very slow. Other times, please will just use a TWAIN driver of some sort and scan directly into the program they wish to edit the image in (for example Corel PhotoPaint or Gimp). Xsane is, in my opinion, the best stand alone scanning software available.


Windows Remote Desktop (MSTSC)
KRDC, Vinagre Remote Desktop Viewer

Many many of our business customers need to be able to remote connect to a desktop computer or Windows server back at the office. While a couple use VNC, most use Microsoft Terminal Services. The best RDC program I’ve found on Linux so far is KRDC. It seems to be the most compatible, reliable, and fastest.


HP Universal Print Driver
HP Universal Print Driver for Linux

Instead of downloading a specific driver for a specific model of HP printer, HP has been offering a “Universal Print Driver” which is supposed to allow your computer to connect to and use MOST of their printers using this single driver. It seems to work pretty darn well. HP also happens to be a really big Linux supporter so they offer this and many other drivers for Linux on their site. While you can download the latest version “for your particular distro” I have had better luck installing the latest version directly from their site.


Windows Vista/7 Post It Note Widget
Tomboy Notes

I can’t believe the number of customers who actually use those desktop widgets – especially the post it notes. If they have to get a new computer they complain they don’t want to lose their notes. The closest equivalent I can find is Tomboy Notes and it’s full featured and works great!


Adobe Encore, DVDfab
Handbrake, Make MKV for Linux

Many of our financial planning customers who like to record their seminars to share with others, want to convert their video to a format that can be viewed on their iPads. Many of our home users want to save their ripped movies to their iPads. Handbrake really is the best solution for this.


Windows Backup
Back In Time, Deja Dup, Simple Backup

Customer both large and small, business and home, always ask what they can use for backup. Honestly I’ve had people use all three of the above listed apps and they all like them for one reason or another. Of course this also depends upon whether you want to initiate a simple backup yourself or to automate a backup on a schedule.


VMware
VirtualBox

This has been sort of a sticky issue depending upon the customer’s needs. For a lot of our business customers, when they buy a Windows server from us, I install VMware ESXi as the primary operating system and then install their Windows server(s) into it as virtual machines. This allows for easy expansion later on in case they need additional servers, they just virtualize it.They can remote manage their virtual machines using vSphere Client. There is even a vSphere Client app for iPad that works great too! However, some of our smaller customers just want to add another server (maybe SQL, Untangle, etc..) to their existing server. Or they want to virtualize another machine for some other special purpose. We always recommend VirtualBox in these cases. You can setup a customized Linux system to run VirtualBox in a manner similar to ESXi, but it just isn’t as polished or easy to use. Keep in mind, VMware is Linux based anyway. ;-) Another thing you can do with either VMware or VirtualBox is to create virtual workstations on your virtualization server. You can then install Linux-based think client software on an old machine you have lying around or boot to a special think client flash drive and you now have a remote virtual desktop machine that runs right off your server.


Fraps
Desktop Recorder

Many homes users, like gamers, use Fraps to record their gaming sessions to post and share on YouTube. However, we’ve had businesses that record desktop sessions when they are making how-to tutorials for their customers on how to do things on their computers.


Windows 8 Metro and/or Apple OS X Dock
Compiz, Cairo Dock

There are those that think that Windows 8 has a more polished look to it (but they still detest it and how it works), and there are those that love the beautiful, shiny, polished look to OS X and the dock interface. While Ubuntu has a sort of dock, it’s just not quite the same as the 3D dock on a Mac.
Believe it or not, I’ve gotten more feedback on this from some of our business customers than from the home users. So, I can install Compiz on their systems and turn on several effects, like desktop cube and wobbly windows, or annotating on the screen with fire, etc…. This really blows them away since they like to show off to their colleagues. “Hey! I bet your computer can’t do THIS!”, that sort of thing. It’s quite funny. I also may add Cairo dock for those users that like the Mac interface. I can make it look and work exactly like the Mac dock, or I can change the look of it in a variety of way. The dock can be flat, 3D, shiny, plain, bouncing icons, zooming icons, and so on and soforth.
I’d have to say, using Compiz and Cairo on my personal laptop has been the number one selling point that has gotten many customers to switch to Linux. They can see things they simple cannot do in a Windows or Mac computer and are just blown away. Many times it doesn’t even matter if we give them the default installation of Ubuntu or Linux Mint without the effects. They are still just excited at that point to be using something new.

————————————————–

Coffee pot dinner.

cpdosg

————————————————–

 

Good day.

Warning: Major warning of bug in the Linux bash program.

Leave a comment

Per ArsTechnica:

Security vulnerability in the GNU Bourne Again Shell (Bash), the command-line shell used in many Linux and Unix operating systems, could leave systems running those operating systems open to exploitation by specially crafted attacks. “This issue is especially dangerous as there are many possible ways Bash can be called by an application,” a Red Hat security advisory warned.

The bug, discovered by Stephane Schazelas, is related to how Bash processes environmental variables passed by the operating system or by a program calling a Bash-based script. If Bash has been configured as the default system shell, it can be used by network–based attackers against servers and other Unix and Linux devices via Web requests, secure shell, telnet sessions, or other programs that use Bash to execute scripts.

Because of its wide distribution, the vulnerability could be as wide-ranging as the Heartbleed bug, though it may not be nearly as dangerous. The vulnerability affects versions 1.14 through 4.3 of GNU Bash. Patches have been issued by many of the major Linux distribution vendors for affected versions, including:

Red Hat Enterprise Linux (versions 4 through 7) and the Fedora distribution
CentOS (versions 5 through 7)
Ubuntu 10.04 LTS, 12.04 LTS, and 14.04 LTS
Debian

A test on Mac OS X 10.9.4 (“Mavericks”) by Ars showed that it also has a vulnerable version of Bash. Apple has not yet patched Bash, though it just issued an update to “command line tools.”

While Bash is often thought of just as a local shell, it is also frequently used by Apache servers to execute CGI scripts for dynamic content (through mod_cgi and mod_cgid). A crafted web request targeting a vulnerable CGI application could launch code on the server. Similar attacks are possible via OpenSSH, which could allow even restricted secure shell sessions to bypass controls and execute code on the server. And a malicious DHCP server set up on a network or running as part of an “evil” wireless access point could execute code on some Linux systems using the Dynamic Host Configuration Protocol client (dhclient) when they connect.

There are other services that run on Linux and Unix systems, such as the CUPS printing system, that are similarly dependent on Bash that could be vulnerable.

There is an easy test to determine if a Linux or Unix system is vulnerable. To check your system, from a command line, type:

$ env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

If the system is vulnerable, the output will be:

vulnerable
this is a test

An unaffected (or patched) system will output:

$ env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x’
this is a test

The fix is an update to a patched version of the Bash shell. To be safe, administrators should do a blanket update of their versions of Bash in any case.

————————————————————————————————-

My ubuntu 14.04 system before the update:

$ env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

vulnerable

this is a test

After the update:

$ env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

bash: warning: x: ignoring function definition attempt

bash: error importing function definition for `x’

this is a test

Come on, special day.

Leave a comment

Chit chat

=======

Highly disappointed to see people take my work especially pictures and use them for their own blog, without any payback.

——————————————

Cartoons:

 

But where do you connect the wires?

 

 

 

—————————————–

Make up a to do list of your days activities. If that is easy for you then, you might be a programmer.

Path to programming.

    • Know a subject that gives you reason to program
    • Learn logic
    • Learn the syntax of a possible language that looks interesting
    • Apply practical examples till you feel comfortable.
    • Learn to debug.
    • Work as a maintenance programmer.
    • Develop a plan for the program you want to write

and describe in detail  what is to be done (see below),

  • Code in manageble segments via modules.
  • Test and redo the program as needed.

Pseudo coding makes life easier.

Dump web page as ascii (text) to disk file.
Read disk file one line at a time in, but ignore all lines till you get what is needed.
Now continue reading one line at a time, but ignore certain lines
With the line you read in output what is needed, while editing out unwanted characters.
Stop output when you get to a point nothing else is needed.
Finnish reading file one line at a time.
End.

—————————————–

Giving out the super secret code for doing the Kitt light show on the X86. Do not have a guitar anymore, but that was me playing the guitar.

http://www.youtube.com/watch?v=BlCHGiG_CQM

Think this is the secret code in freebasic for lighting the leds.

 dim duration as double

dim tim as double
tim = TIMER
duration = .3
out 888, 0

for y = 1 to 20
‘rem up
for x = 0 to 6
out 888, 2^x
r= inp(888)
out 888, (2^(x+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next x

‘rem down
for b = 1 to 7
z = 7 – b
out 888, 2^z
r= inp(888)
out 888, (2^(z+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next b
next y
‘rem end of sequence
out 888,0

rnd.bas

randomize  88888888
dim duration as double
dim tim as double
tim = TIMER
duration = .1
out 888, 0
for y = 1 to 100
out 888, 2^(abs((rnd(1)*8)))
tim = Timer
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next y

Circuit

 —————————————————————-

Decided to take my score scraping script and apply it to other media. Per se maybe we just want the headlines of CNN.com. Used essentially the same set of instructions on a local news site with results. You will want to use the same rough logic or pseudocode:

Dump web page as ascii (text) to disk file.

Read disk file one line at a time in, but ignore all lines till you get what is needed.

Now continue reading one line at a time, but ignore certain lines

With the line you read in output what is needed, while editing out unwanted characters.

Stop output when you get to a point nothing else is needed.

Finnish reading file one line at a time.

End.

You might get results like this ignoring equals signs.

=========

THE LATEST

* Source: Joan Rivers’ doc took selfie

* Freak accident kills hero bus

driver

* IOS 8 is live: How to get it

* Five iOS 8 features you’ll love

* NEW Billionaire tells Apple: Innovate

* Obama stands firm: No ground troops

* Kerry heckled during testimony

* NEW Stocks hit record; thank Yellen

* NEW Panthers star takes leave

* Vikings: Peterson must stay away

* NEW Virus coming to a state near you

* Dowd inspires edible-pot campaign

* Wrongly convicted man gets a statue

* China blacks out CNN’s report

* He mistakenly calls 911, then …

* Surprise! Mendes, Gosling have baby

OPINION

===============

Then we can we can add it to our report.sh homemade newspaper. For details see:

http://computoman.blogspot.com/2013/12/create-your-own-newspages.html

#——————————————————–

# cnn

echo “<h3>CNN Headines</h3>” >> report.html

echo “<pre>” >> report.html

# creates cnn.txt

./cnn.sh > cnn.txt

echo “<pre>” >> report.html

cat cnn.txt >> report.html

echo “</pre>” >> report.html


####################################

# Cnn Headline  Grabber

#

#===============================

# Assignments

# --------------------------------

datafile="rawcnn.txt"

let "flag = 0"

# end assignments

#=================================

#

# Get data file

#---------------------------------

elinks -dump "www.cnn.com"  > $datafile

#=================================

#

# Extract and display data

#---------------------------------

while read line

do fdata[$a]=$line

    echo $line | grep -q "THE LATEST"

    if  [ $? -eq 0 ]; then

        # header

        clear

        let "flag = 1"

    fi

    if [ $flag -eq 1 ]; then

        echo $line | grep -q "Weather"

            if [ $? -eq 0 ]; then

            let "flag = 0"

        else

            echo $line | grep -q "IMG"          

            if [ $? -eq 0 ]; then

                let "response = donothing"

            else

                echo $line | sed 's/\[.*\]//'

            fi

        fi

    fi

let "a += 1"

done < $datafile

# footer

echo ---------------------------------------------

echo

#===================================

# End.

####################################

Older Entries

Follow

Get every new post delivered to your Inbox.