Friday, May 25, 2018

Open source



Having been an administrator, my job was to keep software updated and running. At the time the OS we used was just upgraded and many applications no longer worked. Of course you were on the phone with the vendor.

The answer we got most was we have to wait an see what the OS vendor was going to do. That is not the answer students want to here when not being able use the software to get their classes done. One particular vendor had software I could fix if they would let me modify it. The application vendor threatened to sue my employer an me if any changes were made. Between a rock and a hard place. All was eventually worked out but quite a few students wanted to strangle the IT team. That really happens with proprietary software.

With open source software in most cases it is not a problem. You can modify the source code to solve issues quickly and effectively. Most of all the major distros have source code repositories for just that.





Also to consider:


A shame that people fall back into the proprietary software rut thinking one linux distro is better than another distro because you have to take it as it is. If you want what another distro to have the same packages use some of the conversion tools to allow packages to run on your distro. or get the source code and
recompile it for your distro. No one distro is better than another.
To take it one step further, you can use source code like pseudo-code. For example I took and old dbase script and converted it to a bash shell script. We do a lot of that with other languages also. .The only limitation is your imagination.

Image may contain: text

A thought about linux.

The one thing, I like about linux is that it is on so many hardware platforms. Source code can easily in most cases used on all the platforms. Also known as portability of code. That gives you a lower cost of software and it's support.

Another company that used to brag about its return on investment (aka ROI) has fallen silent on the subject. I can still run up to date software on my older machines via linux and bsd without in most cases getting new hardware. That is great for keeping it IT budget controllable. Now that 32 bit systems are being phased out that may not be so true, but I can keep cranking a bit longer with my so called obsolete systems.

Monday, April 30, 2018

Gui Web




Tim Berners-Lee was the real inventor of the gui (www) internet. NOT I REPEAT NOT Al Gore.



Source code:
------------------------------------------------------
Cern web server 

Browser advanced
Browser original?

Friday, October 20, 2017

To do this weekend.


Out of Micro sd cards so it is time to get a few more.  Finally have my rpi 0 w to play with. Finally have Pimoroni hammer headers. They do not come with instructions, but that was finally figured out.  Nice they gave you a choice of either female or male headers.




Also have the speaker bonnets, but they do not come with speakers so the ad is misleading,

Only have a few atmel368 chips left. Have a project or two for them.

Have the rpi zero w teathered to my nexus 7 2012.

----
Using the spi version of the ethernet interface with the rpi zero. Your connection may vary.









----


Set up a Raspberry Pi Zero headless

If you are using the GUI (Raspian full download) and want to connect your RPi Zero to a keyboard and monitor there are probably easier ways to do this. These notes are for people that want to use a headless (no monitor and GUI) setup ready to connect to your RPi after first boot via SSH from another terminal.

Raspberry Pi Zero W by lespounder, on Flickr

Download Raspbian Lite

wget -O raspbian-lite-latest.zip https://downloads.raspberrypi.org/raspbian_lite_latest

Download link: https://www.raspberrypi.org/downloads/raspbian/

Write Image to SD Card

dd bs=4M if=2017-08-16-raspbian-stretch-lite.img of=/dev/sdb

After this step there should be 2 additional mounts (if not mount the 2 SD card partitions manually).

Set up network interfaces

Create a new config file for the wireless interface.

cd etc/network/interfaces.d/
 

vim wlan0.conf

Add the following to the new file (if you want to use DHCP – change to static if you want to fix the IP):

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


Note: if you want to use ethernet to get updates and etc. add:

auto eth0
iface eth0 inet dhcp

Set up connection details for local wireless network

vim etc/wpa_supplicant/wpa_supplicant.conf

Check the file and ensure the network settings are as per the Wireless Network you are connecting to.

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="SSID"
psk=HASHED_PSK_VALUE
}


You could use the clear-text PSK passphrase but I prefer not to do that in configuration files. Create a PSK hash using ‘wpa_passphrase
There could be other config values you might need depending on the network you are connecting to.Ensure there are DNS Servers configured

sudo vim etc/resolv.conf

Add the following to the new file (or your own nameservers):

# Google's public DNS servers
nameserver 8.8.8.8
nameserver 8.8.4.4

Enable SSH Access

Create an ssh empty file in the mounted boot partition. This is necessary to enable SSH access as SSH is by default disabled on more recent versions of Raspbian.

cd boot/
sudo touch ssh

Boot RPi

Boot the Rpi by powering up and after ~30secs you should be able to connect to the IP assigned. Check your router or ise ‘nmap’ or similar to check the assigned IP:
sudo nmap -p22 -sV 10.1.1.0/24
Default login details are
UID: pi
PWD: rasbperry

-----

Running desktop using libreoffice and web server from my rpi0w shown at the side, Allows you to save data much easier and not waste space of the palmtop. Can be done with the RPI3 also. You would not believe what all that little computer can do. (shown: nexus 7 2012 and the raspberry pi zero w).



Friday, May 12, 2017

Odd monitors for the Raspberry Pi.

If you do not have access to hdmi based monitors, any old monitor with composite input used with the old eight bit computers should do fine. You may have to purchase a special cabIe. I like to use my old c=1701. You can even add a digital tuner and use it as a tv.



Some old TV's that do not have composite but do have rf input can be used with a vcr



My favorite is to use an old dvdrom player with composite and audio input. You can always attach a Raspberry Pi to the back of the unit to make it super portable.



Even an old portable tv with composite input can be a choice! In the case though it is only black and white.


Then again you can use your tablet via xrdp to act as a screen for your raspberry Pi.


Last but not least is the old Trs-80 monitor. No sound and is only black and white. You also have to provide a +5 volts line externally..



There is always those inexpensive mini portable monitors, but they may require 12 volts to work. Normally used for automobiles.


Note: for the Raspberry Pi Zero will require adding solder points for the composite output and an audio filter. The specs for this are in an earlier article.

Monday, April 17, 2017

Starting slackware 14.2 in a virtual machine.

Started with Slackware linux and decided to go back and look at it.  In this case, I plan to use qemu to build a virtual machine. You will need to have a stable internet access for this project. You also need to have a fast machine with over a gig of memory.  You will not need to download and burn a cd or dvd.  You will need a floppy, usb, cd, or a network interface card that supports gpxe (ipxe).



You will want to go to romomatic,net to build your image to put on your boot device. Though with Qemu you can just use the image without creating boot media,  Though I do recommend using 256 megabytes of ram. Be sure to set up the virtual drive for your install.


Once you have everything the way you want then you can launch the install.




Eventually you will get to a login and the you can start the the good old install;


AAh, at home again.

-------------------------------------------------------------------------------------------------------
Slackware pxeboot script:

 #!ipx.e
dhcp any
initrd http://slackware.cs.utah.edu/pub/slackware/slackware-14.2/isolinux/initrd.img
chain  http://slackware.cs.utah.edu/pub/slackware/slackware-14.2/kernels/hugesmp.s/bzImage load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 nomodeset SLACK_KERNEL=huge.s

Motioneyeos.

Normally I am not fond of canned software, but this one might be an exception. Motioneyeos is a raspberry pi implementation for the program Motion. Motion is software to control video capture devices. All control is done via the web. For purposes of this project we used an original raspberry pi. (https://github.com/ccrisan/motioneyeos/releases). There are several releases depending on the unit you have.



First I tried a logitech usb camera clone. The system recognized it immediately. Not like a certain other operating system where you have to load the drivers for almost everything.


Then we added an ipcamera (network ready). After adding the network camera file, it worked just like you would expect. The documentation for the camera did not have the description of the file. Fortunately the Motion software site did have that information.  (http://www.lavrsen.dk/foswiki/bin/view/Motion/WorkingDevices) Again no additional drivers were required.


Actual picture is much clearer. For a novice user it is pretty simple. Only exception is shutting the unit down, I did not see a visible icon. Also security could be greater, but for the price of free you can not beat it.

installing motion from scratch:

Let's get your system up to date (might take a while if you have not updated very recently).

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

Now let's install Motion

$ sudo apt-get install motion.

Does the RPi see your camera?  (aka list usb devices attached.)

$ lsusb

...
Bus 001 Device 004: ID 046d:08a9 Logitech, Inc. Notebook Deluxe
...

if not, you may need to get a more mainstream camera. usually Logitech sets the standard. I just used a cheap refurbished knickoff. Your output will vary..

Do a little configuration:

$ sudo nano /etc/motion/motion.conf
In here there are a few basic changes that you need to perform:
  • Daemon = OFF to ON
  • webcam_localhost = ON to OFF
You can change other settings but it’s recommend you don’t take more than 2 frames, and you been the default frame pixel size, for stability.

To ensure that the motion service will actually start as a daemon we need to change another configuration setting, so enter the following:

sudo nano /etc/default/motion

Then change the value “start_motion_daemon=no” to “yes”


Let's get started:

Finally you can start the motion service to stream the web cam images

sudo service motion start
Then after about 30 seconds browse to the new web interface, which should be at the below URL (where 192.168.0.100 is your Raspberry PI’s IP address yours may vary)

http://192.168.0.100:8081

Hint: if you do not have direct access to your RPi, you can use https://www.instructables.com/id/Red-October-network-discovery/ to find it on the network. Frequently I will hook up the RPi to the network without a keyboard, mouse, or monitor and then remote into the unit,

Also:

Note if you want to use an ipcamera it is easy but you have to know about the camera. I ended up going to the zoneminder wiki and found the answer for my camera. Setup is the same, but you have to add two lines to motion.conf.

 netcam_url http://19.168.10.85/videostreadlocationsomekindof.cgi
 netcam_userpass user:password

For us  it was:

 netcam_url http://192.168.10.85/video.cgi
 netcam_userpass user:password

I have ZM installed on my Media Server that runs multiple programs including Apache, email server, and Mysql with no issues. I don't know if the earlier stages of Zm was picky like that but its more friendly now neat! do this to my room!
Cool. I also thought of maybe using this for a pod casting setup also.
Awesome. I was easily able to set up a video surveillance system at home and at work.
There are also instructions for installing from source: