Tuesday, July 30, 2019

rpi-monitor install



RPI monitor page (installation)

https://xavierberger.github.io/RPi-Monitor-docs/11_installation.html

To use this repository follow the instruction bellow:
Install RPi-Monitor‘s public key to trust RPi-Monitor repository:

sudo apt-get install dirmngr
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F
Execute the following command to add RPi-Monitor into your list of repository:
sudo wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list
To install RPi-Monitor, execute the following command:
sudo apt-get update
sudo apt-get install rpimonitor

script:

#!/bin/bash

sudo apt-get install dirmngr
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F

sudo wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list

sudo apt-get update
sudo apt-get -y install rpimonitor

echo "access monitor via http://`hostname`:8888"

****************
debugging notes

Use USR1 and USR2 to increment log level for code

 sudo killall -USR1 rpimonitord

perl code is @ /usr/bin/rpimonitord.pl

other goods are at /usr/share/rpimonitor

the web sub directory contains js and img directories for the web side of the application.

HTML5 is used for the web browser side.

-30-

Saturday, July 20, 2019

Apollo Virtual AGC for Raspbian on Raspberry Pi 4


starting to make a version of the AGC from source for the latest Raspian

The original version is from this page:

https://www.ibiblio.org/apollo/

Start with this formula:
https://www.raspberrypi.org/forums/viewtopic.php?t=154681

The update has to be changed at least this far.  You may also need to do an apt update depending on the version of Raspbian that is in use.  The buster version is now in release mode, but may not be in the earlier downloads.  apt-get update will fail, needs an update of the repo.

Then the GTK wx widget lib is newer.  Sucks they have version numbers in the package names, and have dropped the earlier version.  Still to verify if the AGC build will run on this.

sudo apt-get install wx3.0-headers libwxgtk3.0-0v5 libsdl1.2debian libncurses5 -y

Original article dropbox link is dead.  updated from a comment to a onedrive share

https://onedrive.live.com/?id=DE6A25658CBCD62E%21110&cid=DE6A25658CBCD62E

so far the current agc.zip and others won't work on Buster with the new display code.  Will need to be updated to use 3.0 it looks like.

--30--

Tuesday, July 16, 2019

message filter backup in Thunderbird


since the addon has died, the file with the file needs to be restored when the Thunderbird program is stopped.  Kill all instances, then use the following to deal with it

http://kb.mozillazine.org/Filters_%28Thunderbird%29#Export.2FImport

Export/Import

The message filters for each account are stored in a "msgFilterRules.dat" file in the accounts "local directory". The local directory is specified near the bottom of each accounts server settings by the browse button. You could copy that file over the corresponding file in another account. You could also copy and paste filters from one file to another using a text editor. Its a ASCII text file whose format is not hard to figure out.
There is a Message Filter Import/Export but several comments on that add-ons web page claim it doesn't work anymore.

--30--

Sunday, July 7, 2019

qemu and kvm server install



https://www.cyberciti.biz/faq/install-kvm-server-debian-linux-9-headless-server/

Step 1: Install kvm

Type the following apt-get command/apt command:
$ sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils libguestfs-tools genisoimage virtinst libosinfo-bin
If you want normal/regular user can manage virtual machines. Add user vivek to libvirt and libvirt-qemu using usermod command:
$ sudo adduser vivek libvirt
$ sudo adduser vivek libvirt-qemu

Reload group membership with the help of newgrp command:
$ newgrp libvirt
$ newgrp libvirt-qemu

Verify your group membership with id command:
$ id
Please note that you need to use the following command to connect to KVM server:
$ virsh --connect qemu:///system
$ virsh --connect qemu:///system command
$ virsh --connect qemu:///system list --all


Step 3: Configure bridged networking on Debian

I am going to create bridge Interface br0 as the network connection in VM guests configuration for eth0 interface:
$ sudo vi /etc/network/interfaces.d/br0
Append the following:
## make sure all config related to eth0 deleted ##
auto br0
iface br0 inet static
 address 192.168.2.23        ## set up/netmask/broadcast/gateway as per your setup
 broadcast 192.168.2.255
 netmask 255.255.255.0
 gateway 192.168.2.254
 bridge_ports eth0    # replace eth0 with your actual interface name
 bridge_stp off       # disable Spanning Tree Protocol
        bridge_waitport 0    # no delay before a port becomes available
        bridge_fd 0          # no forwarding delay

Restart the networking service on Linux:
$ sudo systemctl restart network-manager
To see current networking setting for KVM, run:
$ sudo virsh net-list --all


You need to configure a KVM guest domain on a bridged network. So create a file named bridge.xml as follows a text editor such as NA command:
$ sudo vi /root/bridged.xml
Append the following config:
<network>
  <name>br0</name>
  <forward mode="bridge"/>
  <bridge name="br0"/>
</network>
Save and close the file in vi/vim.
$ sudo virsh net-define --file /root/bridged.xml
$ sudo virsh net-autostart br0
$ sudo virsh net-start br0


Create CentOS 7 VM

In this example, I’m creating CentOS 7.x VM with 2GB RAM, 2 CPU core, 1 nic and 40GB disk space, enter:
$ sudo virt-install \
--virt-type=kvm \
--name centos7 \
--ram 2048 \
--vcpus=2 \
--os-variant=rhel7 \
--virt-type=kvm \
--hvm \
--cdrom=/var/lib/libvirt/boot/CentOS-7-x86_64-DVD-1708.iso \
--network=bridge=br0,model=virtio \
--graphics vnc \
--disk path=/var/lib/libvirt/images/centos7.qcow2,size=40,bus=virtio,format=qcow2

To configure vnc login from another terminal over ssh and type:
$ sudo virsh dumpxml centos7 | grep vnc
<graphics type='vnc' port='5901' autoport='yes' listen='127.0.0.1'>

You can also use the following command:
$ sudo virsh vncdisplay centos7
Please note down the port value (i.e. 5901). You need to use an SSH client to setup tunnel and a VNC client to access the remote vnc server. Type the following SSH port forwarding command from your client/desktop:
$ ssh vivek@server1.cyberciti.biz -L 5901:127.0.0.1:5901
Once you have ssh tunnel established, you can point your VNC client at your own 127.0.0.1 (localhost) address and port 5901 as follows:

Step 5 – Use virt-builder to create VM

Above method (virt-install) works nicely but if you need quickly building new virtual machines, try virt-builder.

How to list the virtual machines available

$ virt-builder --list | more
You can use the grep command to filter out only x86_64 arch based VMs:
$ virt-builder --list | grep x86_64

Create Debian 9.x VM

Create Debian 9 VM with 10GB disk space, 2GB ram, 2 vCPU and random password for root account, run:
$ sudo virt-builder debian-9 \
--size=10G \
--format qcow2 -o /var/lib/libvirt/images/debian9-vm1.qcow2 \
--hostname debain9-vm1 \
--network \
--timezone Asia/Kolkata


Finally import image with virt-install command:
$ sudo virt-install --import --name debian9-vm1 \
--ram 2048 \
--vcpu 2 \
--disk path=/var/lib/libvirt/images/debian9-vm1.qcow2,format=qcow2 \
--os-variant debian9 \
--network=bridge=br0,model=virtio \
--noautoconsole


You can login to your VM using x0E4iZ8sHjA6ekb6 password for root account:
$ sudo virsh list --all
$ virsh console debian9-vm1

  





--30--

Running PDP10/KLH10 on Raspberry Pi



copied from Keith Halewood's facebook note 7/7/2019

https://www.facebook.com/notes/dec-computer-users/running-pdp10klh10-on-raspberry-pi/394084557900778/


This is a bit of a work in progress so beware the rough edges.
The PDP-10 (KLH10) distribution from github seems to have been modified to make it more general purpose so the various bits of documentation on the net seem to be a little out of date or confusing, so here’s how I got it to work so that I could install the Panda distribution of TOPS-20 onto it, along with DECnet (connection to HECnet) and TCP-IP. LAT too, was a bit of a surprise.
Firstly, the raspberry Pi. I’m running the minimal ‘buster’ version with a WIRED network. I have also used ‘apt-get install’ to install the following:

screen
bridge-utils
uml-utilities
autogen
autoconf
build-essential (if on minimalist install, such as debian, for example)
 
The Pi’s networking configuration has a fixed IP address so I’ve switched off the standard dhcp client and I rely entirely on the content of /etc/network/interfaces. For me, the contents look roughly like:

auto lo br0 tap1 tap2 tap3
iface lo inet loopback
iface eth0 inet manual
iface tap1 inet manual
pre-up ip tuntap add tap1 mode tap user simh
iface tap2 inet manual
pre-up ip tuntap add tap2 mode tap user simh
iface tap3 inet manual
pre-up ip tuntap add tap3 mode tap user simh
iface br0 inet static
bridge_ports eth0 tap1 tap2 tap3
bridge_fd 0
address 192.168.x.y
netmask 255.255.255.0
gateway 192.168.x.a

where x.y and x.a are the host addresses of your pi and default gateway. ‘simh’ is the userId of the non-privileged user under which you run your simulations. What has been set up here is a bridge device linking the real ethernet device eth0 and pseudo devices tap1, tap2, tap3 - usable by SIMH and by the PDP10 emulator.
Download and unzip the KLH10 emulator:
$ curl -L https://github.com/PDP-10/klh10/archive/master.zip > klh10-master.zip
$ unzip -o klh10-master.zip
Go into the ./klh10-master directory and edit the configure file. Find the CFLAGS setting and change the -O3 into -O2
Go back up a directory level.
Create another directory, say klh10-build and go into it and:
$ ../klh10-master/autogen.sh
Assuming you’ve installed autogen, autoconf etc., you should see a few files and directories magically appear in your current directory (klh10-build).
Type:
$ make
and watch it building the kl, ks and ks-its models in the appropriate subdirectories. You should see the compiler compiling with -O2. This is important. The -O3 optimisation seems to mess up something critical in the simulators.
Go into the bld-kl directory and you’ll see some executables like:
dpni20, dprpxx, dptm03, enaddr, kn10-kl, udlconv, uexbconv, vdkfmt, wfconv, wxtest.
Copy these to a location where you’ll be running the simulator with a configuration file and disc image file(s).
kn10-kl is the simulator executable. When running a simulation, it’ll fire up instances of dprpxx and dpni20. The dpni20 executable will need to be setuid root, ie:
# chown root:root dpni20
# chmod u+s dpni20
It’s annoying because the whole point about ‘tap’ network interfaces defined above is that a non-privileged user, ie. simh as defined above, should be able to exert full control over its side of the device.
WORK IN PROGRESS
Panda distribution of TOPS-20 , installation and configuration - see
 http://www.ldx.ca/notes/tops-20-notes.html

Talk about the workaround for the network connection and the fact it doesn’t use the tap device you want it to.... etc...
NCP might take a while to start... or not.
Using screen to let you detach the pdp10’s console...
Connections via TCP/IP, DECnet. LAT appears to work much better than DECnet’s CTERM.

--30--

Thursday, July 4, 2019

Imagemagick and command line "convert" to create pdf files



 https://itsfoss.com/convert-multiple-images-pdf-ubuntu-1304/

Command Line:

sudo apt-get install imagemagick
 
convert image1.jpg image2.png image3.bmp output.pdf
 
  
Convert tool, with gui support:

gscan2pdf


--30--