Friday, January 25, 2019

Wndows antivirus utility kills mail foldeers on Tnunderbird


virus which are transmitted w/o encoding cause entire mail files to be killed by stupid windows anti virus.

here is a discussion of the problem and how to cure it on various platforms.


https://wiki.mozilla.org/Thunderbird:Testing:Antivirus_Related_Performance_Issues


Thursday, January 24, 2019

veracrypt build notes


building veracrypt 1.23 on arm.

https://www.veracrypt.fr/en/Documentation.html

https://www.veracrypt.fr/en/Downloads.html

A bit outdated note on how to with wxwidgets (needed for build)

change reference from 2.8 to 3.0 (which is  rev required to build veracrypt)

how-to-install-wxwidgets-on-a-linux-system

User README.md for build instructions after loading

wxwidgets sources
https://www.wxwidgets.org/downloads/

another note page for building
https://randomgooby.wordpress.com/2015/03/02/quick-tip-veracrypt-on-a-raspberry-pi-2/

after all the building, won't run on a 512mb arm systems.

--30--

Sunday, January 20, 2019

configuration notes for beaglebone pocket


local link to BBB if connected (presented for convenience).
http://192.168.7.2/bone101/Support/bone101/

This will probably apply to the beaglebone black (wireless) which will be used in the Unibone project that is in the queue.

This has some number of extra complications since it has a USB OTG connection for power and also presents a USB networking adapter via that conduit to the host.

This allows for a very interesting control interface via the web, but makes it a bit tricky to
get to the internet with the pocket (since it has no network NIC).

The first few notes here are for configuring the network, setting up ssh.

The default login is debian for the system, which is default for the debian releases.

The network router / gateway address is 192.168.7.1, and 192.168.7.2 is the IP for the debian board on the other side of the USB.  On windows at least, the win 10 automagically recognized the connection, created an eth instance for the USB NDIS nic and the ip 192.168.7.1 is visible there.

Login worked to the 192.168.7.2 as advertised.

The time page below doesn't use Debian, so such as installing software must be translated to debian commands.  The page's example uses Angstrom (which is advertised on the BBB images).

Also it did not include the incantation for getting the time to be set.  ntp was not in the downloaded debian image used, so one must use some way to get  the time to set.

http://derekmolloy.ie/automatically-setting-the-beaglebone-black-time-using-ntp/

I also wanted to set the timezone.  Not sure how one would do it on the Angstrom release, but on debian, the dpkg reconfigure worked as usual.

dpkg-reconfigure tzdata

This page has info for making Windows 7 host the network connection.

https://ofitselfso.com/BeagleNotes/HowToConnectBeagleboneBlackToTheInternetViaUSB.php

Will research how to use a raspberry pi W or such linux system to host this, with possibly less foolishness with the network setup on the hosting system end.  With windows not sure how much has to be redone everytime the system starts and stops.

Also since this will be frequently used on a windows laptop, not sure whether the whole thing will survive suspend, even if the BBB pocket is turned off prior to the exercise of suspending.

Eventually setting up a raspberry pi zero as a router would be valuable as it could also present an IP and make it accessible by natting the connection used by the BBB.

***********************
Hosting system + network with a linux host:

https://elementztechblog.wordpress.com/2014/12/22/sharing-internet-using-network-over-usb-in-beaglebone-black/

The Debian OS is used for the testing which is obtained from here.
BBB console can be obtained by using the following command
ssh 192.168.7.2 -l root
 
In the BBB console type the following
ifconfig usb0 192.168.7.2
route add default gw 192.168.7.1

In the linux console of host system type
sudo su
 
#wlan0 is my internet facing interface, eth5 is the BeagleBone USB connection
ifconfig eth5 192.168.7.1
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface eth5 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

Incase network not accessible then type the following in BBB terminal

echo "nameserver 8.8.8.8" >> /etc/resolv.conf  

To set up a domain use the following (example uses pri domain):

domain pri
search pri
nameserver 10.192.168.1
nameserver 8.8.8.8

***********************
Other links of use:

getting started

How to Connect a BeagleBone Black to the Internet Using USB

discussion for Armbian, but some good info on USB OTG as a tether.
USB OTG as a network - Development - Armbian forum 

Announcing $25 PocketBeagle - Google Groups (link into GG discussions)

BeagleBoard.org - latest-images

eLinux org links

BeagleBoardDebian - eLinux.org

--30--

Friday, January 11, 2019

Small web page template, with auto refresh.

Small refreshing web page. 

Also note on shell infinite loop to mechanize on the server side.

By running the shell script to generate the web page,  and adding the auto refresh you have a quick and dirty way to offloading information from the server via browser and simple script.

auto-refresh-code-in-html-using-meta-tags

bash-infinite-loop

Small example from temperature

<HTML>
<HEAD>
<TITLE>Odroid temp</TITLE>
<meta http-equiv="refresh" content="5">
</HEAD>
<BODY>
WEATHER-BOARD v1.6<br>
<br>======== si1132 ========<br>
UV_index : 0.01<br>
Visible : 206 Lux<br>
IR : -1486 Lux<br>
======== bme280 ========<br>
temperature : 30.18 'C<br>
temperature : 86.32 'F<br>
humidity : 31.18 %<br>
pressure : 1010.49 hPa<br>
altitude : 113.952599 m
<br></BODY>
</HTML>


--30--

xrdp and xrdp-sesman problems


update to the xrpd sesman recently via update killed the xrdp.

bug report included below.

if necessary, have to log in and and manually start xrdp-sesman

service xrdp restart seems not to restart xrdp-sesman, so connections fail after you restart it after reboot

xrdp failed (problem connecting) when package was auto-updated

Unable to start XRDP service

#854548 xrdp sesman service fails

--30--

Thursday, January 10, 2019

Adding system tray to a project c# and a console application


Need to add to references

System.Windows
System.Windows.Forms
System.Drawing

so that the Icon reference will work



            NotifyIcon tray = new NotifyIcon();
            tray.Visible = true;

            tray.Icon =
                new System.Drawing.Icon(System.Environment.GetFolderPath
                (System.Environment.SpecialFolder.Personal)
                + @"\Icon.ico");

            tray.Text = "Ice Essentials";

An Icon.ico file must exist as this example uses that method to get the "ico"-ized bitmap file for use.

If one were using windows with forms, other than a console window project to start with, the ico object could be taken from objects created for forms.  But this allows the system tray object to be created w/o that on a console type exe in c#

xinit xsession xsessionrc notes


This is a brief on xinit xsession etc.

https://unix.stackexchange.com/questions/281858/difference-between-xinitrc-xsession-and-xsessionrc


~/.xinitrc is executed by xinit, which is usually invoked via startx. This program is executed after logging in: first you log in on a text console, then you start the GUI with startx. The role of .xinitrc is to start the GUI part of the session, typically by setting some GUI-related settings such as key bindings (with xmodmap or xkbcomp), X resources (with xrdb), etc., and to launch a session manager or a window manager (possibly as part of a desktop environment).

~/.xsession is executed when you log in in graphical mode (on a display manager) and the display manager invokes the “custom” session type. (With the historical display manager xdm, .xsession is always executed, but with modern display managers that give the user a choice of session type, you usually need to pick “custom” for .xsession to run.) Its role is both to set login-time parameters (such as environment variables) and to start the GUI session.

~/.xsessionrc is executed on Debian (and derivatives such as Ubuntu, Linux Mint, etc.) by the X startup scripts on a GUI login, for all session types and (I think) from all display managers. It's also executed from startx if the user doesn't have a .xinitrc, because in that case startx falls back on the same session startup scripts that are used for GUI login. It's executed relatively early, after loading resources but before starting any program such as a key agent, a D-Bus daemon, etc. It typically sets variables that can be used by later startup scripts. It doesn't have any official documentation that I know of, you have to dig into the source to see what works.


--30--

Tuesday, January 8, 2019

Installation log for raspberry pi monitoring RPI-monitor


log from installing rpi monitor


pi@raspberrypi2:~ $ sudo su
root@raspberrypi2:/home/pi# apt-get -y install dirmngr
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  gnupg gnupg-agent
Suggested packages:
  pinentry-gnome3 tor parcimonie xloadimage scdaemon
Recommended packages:
  gnupg-l10n
The following NEW packages will be installed:
  dirmngr
The following packages will be upgraded:
  gnupg gnupg-agent
2 upgraded, 1 newly installed, 0 to remove and 313 not upgraded.
Need to get 2,068 kB of archives.
After this operation, 968 kB of additional disk space will be used.
Get:1 http://mirror.os6.org/raspbian/raspbian stretch/main armhf gnupg-agent armhf 2.1.18-8~deb9u3 [499 kB]
Get:2 http://mirror.os6.org/raspbian/raspbian stretch/main armhf gnupg armhf 2.1.18-8~deb9u3 [1,022 kB]
Get:3 http://mirror.os6.org/raspbian/raspbian stretch/main armhf dirmngr armhf 2.1.18-8~deb9u3 [547 kB]
Fetched 2,068 kB in 3s (570 kB/s)
apt-listchanges: Reading changelogs...
(Reading database ... 123891 files and directories currently installed.)
Preparing to unpack .../gnupg-agent_2.1.18-8~deb9u3_armhf.deb ...
Unpacking gnupg-agent (2.1.18-8~deb9u3) over (2.1.18-8~deb9u1) ...
Setting up gnupg-agent (2.1.18-8~deb9u3) ...
(Reading database ... 123891 files and directories currently installed.)
Preparing to unpack .../gnupg_2.1.18-8~deb9u3_armhf.deb ...
Unpacking gnupg (2.1.18-8~deb9u3) over (2.1.18-8~deb9u1) ...
Setting up gnupg (2.1.18-8~deb9u3) ...
Selecting previously unselected package dirmngr.
(Reading database ... 123891 files and directories currently installed.)
Preparing to unpack .../dirmngr_2.1.18-8~deb9u3_armhf.deb ...
Unpacking dirmngr (2.1.18-8~deb9u3) ...
Processing triggers for install-info (6.3.0.dfsg.1-1+b1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up dirmngr (2.1.18-8~deb9u3) ...
root@raspberrypi2:/home/pi# sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F
Executing: /tmp/apt-key-gpghome.C0qYeR41mJ/gpg.1.sh --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F
gpg: key E4E362DE2C0D3C0F: public key "Xavier Berger <berger.xavier@gmail.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
root@raspberrypi2:/home/pi# sudo wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list
--2019-01-08 12:16:05--  http://goo.gl/vewCLL
Resolving goo.gl (goo.gl)... 216.58.193.206, 2607:f8b0:4007:80b::200e
Connecting to goo.gl (goo.gl)|216.58.193.206|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/master/src/etc/apt/sources.list.d/rpimonitor.list [following]
--2019-01-08 12:16:05--  https://raw.githubusercontent.com/XavierBerger/RPi-Monitor/master/src/etc/apt/sources.list.d/rpimonitor.list
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.196.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.196.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 73 [text/plain]
Saving to: ‘/etc/apt/sources.list.d/rpimonitor.list’

/etc/apt/sources.li 100%[===================>]      73  --.-KB/s    in 0s

2019-01-08 12:16:06 (4.97 MB/s) - ‘/etc/apt/sources.list.d/rpimonitor.list’ saved [73/73]

root@raspberrypi2:/home/pi# sudo apt-get update
Get:1 http://mirrordirector.raspbian.org/raspbian stretch InRelease [15.0 kB]
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Ign:3 http://giteduberger.fr rpimonitor/ InRelease
Get:4 http://giteduberger.fr rpimonitor/ Release [1,396 B]
Get:5 http://giteduberger.fr rpimonitor/ Release.gpg [455 B]
Get:6 http://giteduberger.fr rpimonitor/ Packages [359 B]
Fetched 17.2 kB in 4s (4,096 B/s)
Reading package lists... Done
root@raspberrypi2:/home/pi# sudo apt-get install rpimonitor
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libcommon-sense-perl libdbi1 libencode-locale-perl libfile-which-perl
  libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libio-html-perl
  libipc-sharelite-perl libjson-perl libjson-xs-perl liblwp-mediatypes-perl
  librrd8 librrds-perl libtimedate-perl libtypes-serialiser-perl liburi-perl
Suggested packages:
  libwww-perl
The following NEW packages will be installed:
  libcommon-sense-perl libdbi1 libencode-locale-perl libfile-which-perl
  libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libio-html-perl
  libipc-sharelite-perl libjson-perl libjson-xs-perl liblwp-mediatypes-perl
  librrd8 librrds-perl libtimedate-perl libtypes-serialiser-perl liburi-perl
  rpimonitor
0 upgraded, 18 newly installed, 0 to remove and 313 not upgraded.
Need to get 1,385 kB of archives.
After this operation, 2,188 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://giteduberger.fr rpimonitor/ rpimonitor 2.12-r0 [469 kB]
Get:2 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libcommon-sense-perl armhf 3.74-2 [23.6 kB]
Get:3 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libdbi1 armhf 0.9.0-4+deb9u1 [27.1 kB]
Get:4 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libencode-locale-perl all 1.05-1 [13.7 kB]
Get:5 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libfile-which-perl all 1.21-1 [14.3 kB]
Get:6 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libtimedate-perl all 2.3000-2 [42.2 kB]
Get:7 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libhttp-date-perl all 6.02-1 [10.7 kB]
Get:8 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libio-html-perl all 1.001-1 [17.6 kB]
Get:9 http://mirror.os6.org/raspbian/raspbian stretch/main armhf liblwp-mediatypes-perl all 6.02-1 [22.1 kB]
Get:10 http://mirror.os6.org/raspbian/raspbian stretch/main armhf liburi-perl all 1.71-1 [88.6 kB]
Get:11 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libhttp-message-perl all 6.11-1 [75.9 kB]
Get:12 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libhttp-daemon-perl all 6.01-1 [17.3 kB]
Get:14 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libjson-perl all 2.90-1 [86.0 kB]
Get:13 http://raspbian-us.ngc292.space/raspbian stretch/main armhf libipc-sharelite-perl armhf 0.17-4 [23.0 kB]
Get:15 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libtypes-serialiser-perl all 1.0-1 [12.7 kB]
Get:16 http://mirror.os6.org/raspbian/raspbian stretch/main armhf libjson-xs-perl armhf 3.030-1 [90.0 kB]
Get:17 http://mirror.os6.org/raspbian/raspbian stretch/main armhf librrd8 armhf 1.6.0-1+b1 [227 kB]
Get:18 http://raspbian-us.ngc292.space/raspbian stretch/main armhf librrds-perl armhf 1.6.0-1+b1 [124 kB]
Fetched 1,385 kB in 8s (162 kB/s)
Selecting previously unselected package libcommon-sense-perl.
(Reading database ... 123910 files and directories currently installed.)
Preparing to unpack .../00-libcommon-sense-perl_3.74-2_armhf.deb ...
Unpacking libcommon-sense-perl (3.74-2) ...
Selecting previously unselected package libdbi1:armhf.
Preparing to unpack .../01-libdbi1_0.9.0-4+deb9u1_armhf.deb ...
Unpacking libdbi1:armhf (0.9.0-4+deb9u1) ...
Selecting previously unselected package libencode-locale-perl.
Preparing to unpack .../02-libencode-locale-perl_1.05-1_all.deb ...
Unpacking libencode-locale-perl (1.05-1) ...
Selecting previously unselected package libfile-which-perl.
Preparing to unpack .../03-libfile-which-perl_1.21-1_all.deb ...
Unpacking libfile-which-perl (1.21-1) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../04-libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libhttp-date-perl.
Preparing to unpack .../05-libhttp-date-perl_6.02-1_all.deb ...
Unpacking libhttp-date-perl (6.02-1) ...
Selecting previously unselected package libio-html-perl.
Preparing to unpack .../06-libio-html-perl_1.001-1_all.deb ...
Unpacking libio-html-perl (1.001-1) ...
Selecting previously unselected package liblwp-mediatypes-perl.
Preparing to unpack .../07-liblwp-mediatypes-perl_6.02-1_all.deb ...
Unpacking liblwp-mediatypes-perl (6.02-1) ...
Selecting previously unselected package liburi-perl.
Preparing to unpack .../08-liburi-perl_1.71-1_all.deb ...
Unpacking liburi-perl (1.71-1) ...
Selecting previously unselected package libhttp-message-perl.
Preparing to unpack .../09-libhttp-message-perl_6.11-1_all.deb ...
Unpacking libhttp-message-perl (6.11-1) ...
Selecting previously unselected package libhttp-daemon-perl.
Preparing to unpack .../10-libhttp-daemon-perl_6.01-1_all.deb ...
Unpacking libhttp-daemon-perl (6.01-1) ...
Selecting previously unselected package libipc-sharelite-perl.
Preparing to unpack .../11-libipc-sharelite-perl_0.17-4_armhf.deb ...
Unpacking libipc-sharelite-perl (0.17-4) ...
Selecting previously unselected package libjson-perl.
Preparing to unpack .../12-libjson-perl_2.90-1_all.deb ...
Unpacking libjson-perl (2.90-1) ...
Selecting previously unselected package libtypes-serialiser-perl.
Preparing to unpack .../13-libtypes-serialiser-perl_1.0-1_all.deb ...
Unpacking libtypes-serialiser-perl (1.0-1) ...
Selecting previously unselected package libjson-xs-perl.
Preparing to unpack .../14-libjson-xs-perl_3.030-1_armhf.deb ...
Unpacking libjson-xs-perl (3.030-1) ...
Selecting previously unselected package librrd8:armhf.
Preparing to unpack .../15-librrd8_1.6.0-1+b1_armhf.deb ...
Unpacking librrd8:armhf (1.6.0-1+b1) ...
Selecting previously unselected package librrds-perl:armhf.
Preparing to unpack .../16-librrds-perl_1.6.0-1+b1_armhf.deb ...
Unpacking librrds-perl:armhf (1.6.0-1+b1) ...
Selecting previously unselected package rpimonitor.
Preparing to unpack .../17-rpimonitor_2.12-r0_all.deb ...
Unpacking rpimonitor (2.12-r0) ...
Setting up libcommon-sense-perl (3.74-2) ...
Setting up libipc-sharelite-perl (0.17-4) ...
Setting up libdbi1:armhf (0.9.0-4+deb9u1) ...
Setting up libfile-which-perl (1.21-1) ...
Setting up libencode-locale-perl (1.05-1) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up libio-html-perl (1.001-1) ...
Setting up libtypes-serialiser-perl (1.0-1) ...
Setting up librrd8:armhf (1.6.0-1+b1) ...
Setting up liblwp-mediatypes-perl (6.02-1) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Setting up liburi-perl (1.71-1) ...
Processing triggers for systemd (232-25+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libjson-perl (2.90-1) ...
Setting up libhttp-date-perl (6.02-1) ...
Setting up libjson-xs-perl (3.030-1) ...
Setting up librrds-perl:armhf (1.6.0-1+b1) ...
Setting up libhttp-message-perl (6.11-1) ...
Setting up libhttp-daemon-perl (6.01-1) ...
Setting up rpimonitor (2.12-r0) ...
[ ok ] Restarting rpimonitor (via systemctl): rpimonitor.service.
root@raspberrypi2:/home/pi#