Wednesday, December 30, 2020

GPG: Encryption and digital signature for the masses

Disclaimer: This is a very serious topic. The observations made here are for a starter. Kindly refer to the man pages and other text books which specialize in guiding for advanced and high stake uses. I am not responsible for any unwanted results by following the notes below. Understand the seriousness of the job on hand and read enough. 

     The notes below are culled from the public network from various sources. Thanks to the free software foundation for the fantastic gpg tool and all the original authors of the pgp standard. GPG is really "encryption" for the masses. Kindly refer to directions from master users for creation and usage of GPG. The recommended way of creating a key pair is on a computer with

1. The operating system to be installed with images downloaded and checked for the integrity of the OS image on another computer connected to the internet.
2. Install the downloaded operating system on new vanilla hardware and the computer should not be connected to the internet even while installing the OS.
3. After installing the OS generate the keypair ensuring that the computer is in now way connected to the public network.

Even if you dont want to create the keys in the way mentioned above. It is required to know the above information.

--------------------------------

    Private key cryptography and symmetric cryptography are the same phrases. They are just a complicated way of telling that the cipher and key used for encrypting a message is the same that has to be used to decrypt the message. That is, the cipher and the key is first shipped to the recipient. Then the actual encrypted message is sent.

Public key cryptography/asymmetric cryptography:

    A mathematical process generates a pair of keys. A message encrypted by one key of this pair, can be decrypted by the other key of this pair. One key is called the public key(can be shared with the whole world) and the other is called the private key or the secret key(Not to be shared with "anybody").

How asymmetric cryptography works:

 
    Let us assume the data of individuals in the whole world is maintained in a database with their respective public key. So we pickup the name and the corresponding public key on this database(provided we know this is the person whom we want to communicate). Now

1. we create a message which is to be sent to "only" this individual.
2. we encrypt this message with the public key available in the database.
3. send the message to the individual through the public network, by means like email ....
4. The recipient will then decrypt this message with his private key
5. No individual in the world will be able to decrypt this since the message can be decrypted with its pair which was generated by the mathematical process which produced the public/private key pair

-------------------------------

Creating and managing gpg keypairs

Let us now get down to "actually" creating the key pairs. We will be using GPG(GNU Privacy Guard). Kindly refer to the man pages for further information and the public network for deeper insights. GPG is a common on all the *nix operating systems and is available for the proprietary operating systems also.


The first step is to generate a key pair. Run the following command

gpg --full-generate-key

On running the above command in a terminal you will be asked the following queries. Answer accordingly.

a. Choose the type of key: We will choose the default RSA
b. choose the bits for your key: Let us choose the longest option(We are in modern times)
c. Expiry date: I would go for an yearly update
d. Real name: Here you have an option of putting your real name(You can ofcourse not tell your real name. But, to use it in place like github etc, it is better to have your real name)
e. Email address: The same logic as above is applicable here also
f. There is a comment field: You may fill it up or recommended by many people to leave it empty

After the above step gpg asks to enter your passphrase. 

This is a very "important" step. The passphrase is intentionally called a "phrase" it is not called a password. This has to be as long as possible. It is better if it has a mixture of alphanumeric characters interspersed with special characters like @%(%$) etc. It has to be sufficiently long. This is what protects your private key. Please use a long phrase, which you can remember very easily and quickly. In fact you should be flamboyant when your are typing out your phrase. At the same time that phrase should be alien to anybody else on the planet.

Once you enter the passphrase, gpg starts the mathematical part required to generate the key pairs. Help out with sufficient entropy(randomness) by opening lot of firefox tabs, plenty of word processors and go ahead and do whatever work you want to do with your computer. This improves the entropy required to ensure the randomness of the digits generated for your key.

Once you generate the keys, the keys are stored in what is called a "keyring" Just know that the keys are safe in a box and locked by your passphrase

To print out the public key which was generated

gpg --list-key

To get the public key in a format which is accepted worldwide

gpg --export --armor dfdf@fdfd.com > dfdf_pubkey.asc

To display your public key
 

cat dfdf_pubkey.asc

Once this is generated, you can share it with the world. If your friend wants to add your public key to his keyring, then he would

gpg --import dfdf_pubkey.asc

There, now he has your public key in his keyring.


To list the private keys

gpg --list-secret-keys   

Now it is required to generate a revocation certificate. Why are we in such a hurry in creating one. Well, we should have the revocation certificate handy, if the keys have been compromised and you think that the keys can be used by others to gain access or sign documents with your keys and send it to inappropriate places. With revocation certificate you can revoke the key pairs and also tell the whole world about it so that the whole world knows that there is no relationship with your previous sets of keys. The latest version of gpg creates a revocation certificate during the key pair creation process itself, fantastic.

gpg --gen-revoke fdfd@dfdf.com > fdfd_revoke.asc

Now you will be asked for the reason. Choose the appropriate reason.

The file you created is called the ASCII armor file.

So, we have created the revocation certificate. This certificate will be used to revoke our key pairs.

gpg --import revoke.asc

Now if you run

gpg --list-key

You will get your public key information with "revoked" added

Now you can really delete your key pairs

gpg --delete-secret-keys fdfd@dfdf.com


gpg --delete-keys fdfd@dfdf.com

Now if your list your keys

gpg --list-key

The output will be empty

Let us now remove the revocation certificate also

rm fdfd_revoke.asc

-------------------------------
 

Encryption


Let us now encrypt and share some secret documents with friends on the public network

To start with you should have

1. Got the public key of your friend.
2. Import the public key into your keyring.
3. Did your homework to ensure that the public key does indeed belong to your friend.

We have done the homework and are sure thatthe public key shared by your friend is genuine. Let us now go ahead and trust the public key by signing your friends public key with your private key

gpg --sign-key friend@friendship.com

Now, to encrypt the document and ensure that the only recipient who can decrypt the document is your friend,

gpg --encrypt -r friend@friendship.com secret_document.txt

The command will output secret_document.txt.gpg which is a binary file

If you prefer the ascii armor format

gpg --encrypt --armor -r friend@friendship.com secret_document.txt

which would output secret_document.txt.asc again a binary file.

You can now send this document through any channel available on the public network and are assured that your friend with whose public key the file was encrypted can only decrypt it with his private key. From now on, if you, the author have deleted the original secret_document.txt also cannot decrypt the resultant file secret_document.txt.gpg.

To avoid this you can add yourself also as a recipient

gpg --encrypt -r friend@friendship.com -r fdfd@dfdf.com

Now, you the author with email id fdfd@dfdf.com can also decrypt the file as and when required and can safely now delete the original file

-------------------------------


Digital signature


We have all the way been talking about encrypting a document. We want to ensure that the document reaches and is ready only by the individual(s) to which it was intended. This is fine. Let us forget encryption for a moment and think of a public document. Anyone reading a public document should be ensured that this particular document is an un-altered copy authored by a particular person. The document should be able to speak about the author. That is, the document should be signed by the original author. This ensures the reader that the document is an un-altered document and is as was imagined by the author. We are talking a synonymous situation of physically signing a document. We are talking about an electronically signed document.

gpg allows us to do this. When we are signing a file we are not encrypting the file, we are just creating a binary file with contents of the signed file as well as information about our signature. The signing and verifying methodology described below makes use of the fact that the signed file has the contents of the signed file as well as the signature in one single file.

 When gpg signs a document there are two things which are ensured

1. Integrity: When the recipient checks for the signature authenticity and it matches, it also means that the signed document received is not altered in any manner

2. Authentication: Again, when the recipient checks for the signature authenticity and it matches, it also means that the document is indeed from the person who really sent the message by signing with his private key

gpg --sign document.txt

This will create document.txt.gpg, a binary file which includes the content of document.txt and the signature.

Before creating the .gpg file, you will be asked to enter the passphrase, Now, you have affixed your signature on the document. This process makes use of your private key. So, as per the pgp convention, if you encrypt with one part of the key pair, the other key pair is used to decrypt the document. Now, since you have added your signature to the document with your private key, the confirmation of ownership can be done with your public key. Since your public key is supposed to be public, anybody, with access to your public key will be able to ensure that document is created by you. However, the world can view the document by using gpg --decrypt as discussed below and view it but not ensure that the document was really signed by you and you are the creator of the document 

Now, on receipt of the file, the recipient to start with, will first check for the authenticity of the signature. This is done by

gpg --verify document.txt.gpg

The output will show the signature and will term the signature as good, if you have the public key of the sender in your keyring. So we now have attested that the file infact, is created by the creator we were expecting.

Now to proceed to view the contents of the document, let us decrypt it, ie, let us bring it back to viewable state.

gpg --decrypt document.txt.gpg >> document.txt

The above step will still re-create the original file though the authors public key is not present in the keyring. gpg will just tell that the signature cannot be verified.

I think you are used to seeing signed documents with an armor ascii format. To achieve this

gpg --sign --armor document.txt

This will generate document.txt.asc, a binary file which includes the signature in armor ascii format with the contents of the file

To verify the file and as well as decrypt

gpg --verify document.txt.asc >> document.txt

Once you trust the public key and are sure that the public key indeed belongs to the individual you know, that trust can be extended into your keyring by signing the author's public key with your private key. This can be checked in various ways. If we know the author and his online activities, we could go to the place he is most active and check for his email credentials with his pgp fingerprint on that website. Or we could go to the many pgp key servers over the public network and search for the fingerprint or the email id in the fingerprint. It should match with the copy of the public key we have. Once you are content that this is the person associated with the key, then and only then change his public key in your keyring to trusted. This will remove some warnings when you check the signature of the files from the author which talks about "...Not certified with a trusted signature...". To do that

gpg --sign-key author@creator.com

After this when you verify the signed files received from the author by

gpg --verify document.txt.gpg


you will not find any warnings

Down the line, by some means you start doubting the public key and the associated individual it is time to revoke the "trusted key" status in your keyring. Now the thing is once you create add a key in the keyring, any further edits are possible only from within the gpg command. Here we are interested in removing the trust from the public key. So you would start the gpg editor like

gpg --edit-key author@creator.com


Now you will get the gpg> prompt
Enter "help" to get all the options. Here we are interested in revoking the trust we put in the above public key
type revsig at the gpg prompt
You will be prompted for the reason, answer accordingly. Exit and save when prompted. Now, you have successfully removed/revoked the "trusted" badge from author@creator.com
 

----------------------------------

Digital signature for special case involving pure text files

 
If you are dealing only with text files. It will better if the text and the sign appear in the same file as a regular document. It is like you have a text document and you affix your signature to the end of the document. gpg provides this facility through

gpg --clearsign document.txt

will create a document.txt.asc

Now the recipient can open the file with

cat document.txt.asc

which will have the content of the document as well as the signature at the end of the document. Now, to verify the signature, the recipient would

gpg --verify document.txt.asc


Now, to get back the original document only, without the signature then the recipient would

gpg --decrypt document.txt.asc > document.txt

--------------------------------

Digital signatures for huge binary files

 
All this time we have been using gpg such that the contents of the signed file and the signature are available in the output file of the gpg command. This might not be conducive as the file sizes grow. It is better off to have the signature separate from the signed file. With this, the file and the signature are two different files. Just remember that to check the signature with the associated file both have to be in the same directory and the file names cannot be changed.

To create a signature separate from the signed document

gpg --detach-sign --armor document.txt


This will output a file document.txt.asc. (You still have your original document.txt unchanged). This file contains only the signature but is associated with the original file document.txt. This is the methodology used to share binary files and packages on the public network. You will have the package/software you would like to download and adjacent to that you will have

1. The signature (normally it will be labelled the pgp file)
2. The public key of the author

You download the above two along with the software package

1. Put all the three files in a single directory
2. Import the public key of the author
3. Sign the public key of the author with your private key after doing your homework about the authenticity of the public key
4. check the signature
5. On no warnings proceed with the installation of the package

Wednesday, December 23, 2020

Arch GNU/Linux and OpenBSD on mac mini 2018, 2019, 2020(Intel processors)

     The laptop is not an ideal computer when you are sitting at the same desk and especially when you are at home. At home, the best computer would be a desktop. For the past 5 - 10 years I have been using laptop at home, but desktops at work. I observed that I have been killing the battery. I have my laptop always connected to the power supply and that is not good. Draining your battery just because you should drain it, though you are near to a power supply is not something which I can digest. For nearly an year used the raspberry pi 4 as a desktop and tried the frugal method of using a computer. I have been mighty happy with the direction the raspberry pi is headed. I loved what the rpi foundation is doing. It is the apple philosophy of making the hardware and software together but with freedom software ethics in place. Yes, there are still blobs being used, but the foundation is putting enough efforts to tend towards an open ecosystem of software and hardware. 

     Now, the thing with the rpi ecosystem is that you have to be abreast of the developments. If you use the bleeding edge software, you should be ready for the occasional glitches. Now, this is a problem, if you want to just start the computer and do an immediate task. Yes, if you run the debian stable, ie, the official rpi os, you are better off. But, the software is outdated for somebody who has been spoilt for using arch Gnu/Linux or Debian testing. Yes there are plenty other options for Operating systems. But, they all have something lacking. I have tried one and all. I have tried the ubuntu dev version, which I used for a long time. But, it was borked many a times during a upgrade. So, it is back to reading the forums and clearing up stuff. Plenty of experiments were carried out. I live a couple of months on the command line "only". It was very interesting and I liked the challenges that were presented. After an year, something happened and the pi 4 started acting strange. It was time to move on. The first rpi 4 had a damaged sd card slot before the usb booting came out. So, as for now, the rpi efforts are shelved.

    As is the norm for a lull after the storm, I decided to take it a little easy this time and decided to have a cheap desktop solution for my daily use at home and keep the laptop for mobile purposes. Started searching the used computer market for a sleek desktop. Plenty of Intel nuc's came along. Every single model has a lacuna on some issues. Marketing and the modelling of these systems is a total failure by Intel. The number of variants is mind boggling and utterly confusing. Searched for mini pcs from other brands like HP and Dell. Nothing interesting came up. This is the time, Apple came out with its M1 processor. I was surprised that Apple released a Mac Mini with its inhouse processor. Started knowing about the Mac mini and at the same time started looking up the used pc market. There was no way, I would be buying any device from Apple on which I cannot install GNU/Linux. I have a mac book pro 2015 which runs Arch Gnu/Linux and OpenBSD like a dream. In summary, I like apple hardware and hate their software and the lockups they try to force people to stay on macos. Until, I can install Gnu/Linux or BSDs, I dont have any gripe with apple. I love the way they make their hardware. If customization is allowed, the choices are easily laid out and of course can be very very very costly.

    Since Gnu/Linux on a mac mini M1 is still a very looooong shot, I started looking at the older versions. I liked the form factor of the mac mini. There was one more surprise, the extensibility of the mac minis. This was a complete shocker. Four thunderbolt 3 ports, two usb 3 ports, Gigabit ethernet ports, 3.5mm jack. It is like the voltage of the shocks went on increasing. Settled to buy a mac mini 2018. Waited and searched for a month and I got my hand on a "very" affordable mac mini. The build quality is excellent. The option of upgrading ram upto 64GB of DDR4 was un-believable. Postponed the upgrade for a later date. Already had a 32" LG 4k monitor, a mechanical keyboard and a M501 logitech mouse. Had an external ssd which I was using to boot up the raspberry pi. Everything just fell in place. The onboard storage is only 128GB. But I am OK with it.

    Searched the public network for installing Gnu/Linux on a mac mini. The literature is very limited. But, could put together a collection of information necessary. Infact, the installation of Gnu/Linux or a BSD on a mac mini is much simpler than that of installing windows through Bootcamp, which was a breeze when I bought the macbook pro 2015. Installation of Gnu/Linux or BSD is mighty straight forward and can be summed up as

1. Disable the secure boot and file system protection(csrutil disable) on the mac mini


2. Partition the external ssd hard drive(Dont forget to create a FAT32 partition with type set to EFI as the first partition on the external SSD, a 512MB partition will do) for Gnu/Linux and OpenBSD(I prefer OpenBSD to Freebsd just for the fact that the graphics stack is "owned" by the core devs of the project and all other security related "firsts". Again a "sensible" default) 


3. If you want to install OpenBSD do not forget to create a partition of type OpenBSD before starting the installation on any other GNU/Linux box. This will provide you and option during installation to chose that particular partition. This just makes the job easy for installing OpenBSD in multiple boot machines.


4. Download and install the refind boot manager from macos(You can install this in the macos recovery which you have entered to disable the file system protection). I just love this application. My gratitude to all the devs and users of this excellent tool.


5. Install Arch Gnu/Linux. I chose to install arco Gnu/Linux for a change and I loved the installer. Be wary of choosing other software options provided during the setup process. It struggled to download and install these. It is better to install these extra options doled out to you after the base arco install. The installation was flawless. Again dont forget to choose the EFI partition created in step two and set the boot flag. This option will be thrown to you when you select the EFI partition to be mounted as /boot/efi


6. Install OpenBSD. I love the installer. I have expressed my awe at the defaults the installer puts up. Installation process was flawless. It trumped the arco install process. Kudos to the OpenBSD team. Here again, OpenBSD expects an EFI partition on the first partition of the external SSD, which we have already met.
7. Wifi and sound through the 3.5mm jack does not work. This is the same for Arco Gnu/Linux and OpenBSD.


8. Resolved Wifi by using an USB adapter and resolved the sound issued by taking the output from my monitor.


9. At some occasions, refind is unable to boot up macos. The work around as of now is to shutdown the mini and restart. At the chime press the alt key. This will bring up the apple boot loader. If you are lucky you will see the options for choosing the apple drive and the EFI partition on the external ssd. If you are unlucky, you will definitely get to boot the macos partition. To boot the FLOSS operating systems, just reboot and you will be presented with the refind menu.


10. Dont forget to enable the file system protection again by entering the recovery menu(csrutil enable).


11. Arch Gnu/Linux and OpenBSD run flawlessly and the availability of 4 thunderbolt 3 ports is freaking amazing.


12. The form factor is just perfect for putting it in a compartment in my table without clogging the surface of the table for space. Resulting in one of the neatest desks I have maintained.


PS: All of a sudden, my arch gnu/linux installation was not detecting the Ethernet connection. Ran 

lspci

After searching the public network for the Ethernet hardware detected, tried

# modprobe tg3

reboot, and Ethernet started working.

Saturday, November 7, 2020

15K Kms on my Royal Enfield classic Chrome 500

     It has been a long time since I wrote about my motorcycle drive, The Royal Enfield Classic 500. The last thing I wrote was about the feeling after riding 500Kms. The thing is it took very little time to reach that mile stone. However, the present mile stone of 15K Kms has taken a very, very long time considering the amount of distances and places bikers cover in their journey. But, the drive still feels fresh and every day the drive is new. The adrenaline rush is still the same. The grunt on the bike is still the same. 

     The lockdown gave me the opportunity to drive the bike like I would have dreamt of driving in the Himalayas. Working for a company which cannot afford a lockdown, gave me the opportunity of taking the beast to the sea, and boy, did I take him to the sea, I took him to the ocean. It was like I wasted 20 odd years by waiting on the bike. Waiting on the reason that the bike is so bulky, so heavy. What a journey it has been. I never felt so comfortable on any bike I have driven to date. Even on bikes which are supposed to be comfortable, I have been the opposite. There is a joy when I drive the bike which cannot be expressed, explained. 

     In my (very) younger days, I always thought that going "fast" is what is biking about. Oh, boy, was I wrong. Cruising at a constant speed is what is biking about. It is more about the journey than the destination. Yes, I can hear you, the bottom line is all it matters. But, whenever anybody wants to reason out the causes for the bottom line, then you always try to remember the journey, However, alas, you dont remember much, because all your efforts were on the destination. 

     Newton's laws of motions have been now constrained to the things visible to the naked eye and comprehensible to the naked eye. And when that man told that "Eveybody moves(likes to move) in a straight line and in uniform motion", he knew what he was talking about. There is a certain joy in cruising, There is a certain joy in constant velocity. There is a certain joy in not creating an opposing force, there is a joy in blending. The joy of driving.... 

     The bike is as good as it was bought. It has the same sheen in its chrome finish. In fact the company has now brought the same chrome finish for its 350cc lines of bikes, which was exclusive to the 500cc for all these years. A fresh wash and the bike starts gleaming. It is like it is grinning with its mouth wide open, ear to ear. It is like an invitation to start a new journey. It is like there is no end. It is like you can make the same journey, provided you decide that what matters is the journey and not the destination. It is like.....

Friday, October 30, 2020

Going "console only "on GNU/Linux

Got frustrated with the time taken for the browser to load up and then dependency trap for installing other gui applications. Add to that the nuisance of gtk and qt quirks on a 4K monitor. The feeling is share by many. But as we shall see living in this place is not easy. The major difficult piece of the puzzle is the browser. All your banking, shopping options are ruled out in the terminal. 

 

What I did here was to disable even the start of the X server. I disabled sytemd unit which is supposed to reach the graphical login target. Disabled the graphical login manager, lightdm in my case. Disabled all the cloud stuff which ubuntu GNU/Linux starts with lot of difficulty. In fact, because of this the first boot of ubuntu after install is a hit or a miss. After boot do not try to login immediately. There are plenty of things ubuntu is doing in that phase. If you try to login, it will fail. Wait for 10 minutes, approx, it might be higher so that it spews many lines of information over the login prompt, then it will allow you to login and change the default password. 

 

Disabled ssh service, because the rpi 4 is connected to a 4K monitor. Even during login, ubuntu tries to plenty of things. It will try to check for updates and provide a notification once in the motd. It will also provide information from the ubuntu motd server which canonical wants you to see. It will also spew out certain information from your computer like memory usage, load on the cpu etc. All this will take plenty of time considering the rpi 4. Find the respective scripts and disable them to speed up the time required to reach the login prompt. So, we have reached the login prompt. The fonts are so tiny, you have to squint to type any commands. First thing is to first reconfigure the fonts. Get the biggest font available while running the re configuring tool. Yes, the size can be changed, but the fonts are horrible. They are not for your daily tasks. All the fonts which you had installed in your X is now out of reach. 

 

The console well, is a console. It will display fonts which are baked into the linux kernel. If anybody knows how to change the fonts on the default console, kindly advice or drop a link. But, as of now, we have a readable console and the font size is alright. The fonts are not. We have been pampered for the variety of fonts on X. It is a requirement that we should do something about it. Step in, fbterm. As the name suggests it is a terminal emulator designed to work with a framebuffer. The biggest advantage, supports all the fonts supported on X. There goes my first gripe about the console. So, we install fbterm and start and run it at the console. The console is taken over by fbterm and again we have micro-sized fonts, but nice looking fonts taken from the X environment you had installed earlier. Let us go ahead and fix the fonts by restarting fbterm with fbterm -s 24. This was for my monitor. Try experimenting with different sizes to get the optimum size. 

 

The config file for fbterm is in .fbtermrc. Well, I already see your smiling face and I have received your gratitude and in turn it is time to congratulate you for completing the first time required for living in the console. Whatever further tools we are planning to used depends on this success. The fonts are beautiful and they are your favorite ones. They look good and it is as though you are back on your terminal emulator on X, but without all its bells and whistles(another name for bloat). You now can clearly distinguish between l and 1, 0 and O, I and L. I would like to thank all the creators of fonts which can clearly distinguish the characters of the English language. It is an artists job and the creator of any font is an artist. 

 

You opened the fbterm man page and want to edit the configuration file by reading the manual, you are out of luck. You are on the console. There are no windowing systems. What d you do, you press C-A-F2 and switch to the next virtual console and login again. Then you can switch between the virtual consoles. Your are now flabbergasted. You have started hating yourself for moving away from X. But, fritter not, there are further goodies which come with fbterm. You can create multiple windows and switch to them using shortcuts as mentioned in the fbterm man page. This will give you a method of moving between multiple windows and then moving between them. 

 

 Let us go to the next step. Now, you would like to group certain windows and recognize them for a specific task group. You have a web page related, you have a manual page related and couple of windows concerned to the programming task related to the web page and the man page. You are out of luck. You cant see all the windows at once together on one single screen. Frustration. Enter terminal multiplexer. The first name which comes to he mind is tmux, if you are a year 2000 person and screen, if you are before that. These are excellent tools and are blind faith groups unto themselves. So, if you like a tool, silently use them. Do not compare them and publish your comparisons. This is because, if you have reached a position where you compare both these tools, that means you already "prefer" one among them. This will start a war. We already have the longest running war between Vi and GNU Emacs. These are the kitchen sinks of terminal multiplexers. 

 

If you are a person believing in the *nix philosophy of "One tool that does one thing and does it best", then you have an alternate option. Many a times I had tried to pull myself together and learn tmux, but since I was using the i3 wm, I thought that it is not worth the effort. I could open as many windows and all would be started side by side preparing a huge canvas for exchanging information. I am in love with i3 wm for its simplicity and doing what it is supposed to do and doesnt do anything more. A huge shoutout to all the devs and users of this fantastic wm. Now, once again my terminal multiplexer flames were re-kindled by Mr. Bronie Robertson on his youtube channel. I like his videos. They are short and to the point with excellent examples and use case scenarios. 

 

Plentiful thanks to him for introducing me to abduco. Such a strange name. If there are explanations for the name kindly enlighten me. A session management tool with such a strange and difficult to pronounce name. However, what caught my attention was the ease with which Bronie did the session management. No obscure keystrokes to remember. Just session management and nothing else. In fact, I understood session management in that under 10 minutes video, than I had tried for a good 10 years. So, Thank you Bronie. Yes, there might be plenty other things required for complex setups, but for a desktop use and a home network user, that is exactly what the doctor would prescribe. 

 

 So, three main things which a session manager has to do. Create a session. Detach a session. Re-connect to a session. abduco does all the three with elan. All technicalities, I would redirect you to Mr. Bronie. So to create a session, let us understand what is a session. A session is a group of tasks related to one another. It is a method of grouping applications and open files related to a task on hand. Let us say the session you have created contains a compile task which will take another hour. Now, you are free to let us say, listen to some music, read a novel, well, things like that. What we now do is, detach the task on hand. And now, the compiling and all other windows are moved to the background and keep running. We will now create another session and do the relaxing stuff related to music and reading. You now want to continue listening to music and then you would like to check your online accounts like your email, your toots etc. You detach the multimedia session and start a new session with these applications. Its been an hour and you would like check on your compile session, You detach the online session and re-connect to compiling session and so on. That is session management for dummies. 

 

But in a session, if you have to have multiple windows grouped together, it is all good in an X environment. If you remember we are at a console running fbterm. We were very happy with good fonts but a bit sad about moving between windows as every window occupied the complete screen making it very difficult to share information between windows. Enter dvtm. The expansion will be dynamic virtual terminal manager. The name tells everything. It is there to manage windows. It will create, position, delete windows. It is an equivalent to i3 wm and more close to dwm wm but for terminals. When we create a new window in dvtm, we are starting a new terminal waiting for our input. dvtm does exactly what i3 does. It just arranges windows side by side in many different ways. But all your window contents are there for you to see and transfer between windows in the same screen. For our case it is a window manager for the console. 

 

I hated the console because if you wanted to refer to a man page and return back to the editor, you had to suspend the editor read up and remember the man page and then suspend the man page and bring back the editor to the foreground and dump whatever you remembered from the man page. This is no way ideal. For the optimal setup, we combine a session manager with a terminal manager and you have Window management for the console. How do we do it? Well just run both the commands in unison as so.

 

abduco -c session_name dvtm -m ^x 

 

What we are doing is asking our session manager abduco to create(-c) a new session and name that session "session-name" and the application it has to run is dvtm. The next option is for the MOD key. The default key for the MOD key is ^g. Yes, you are a bit confused here. For i3 users, the MOD key used to be a single key like the super key or the ALT key. But, these keys are not recognized by the console. So keep the default or change it to the value which I use, since x is close to the control key than the g key. Once you run this command, a session is created and control is handed over to dvtm. Now here you can start using the keybindings as suggested in the man page of dvtm. MOD-c will create a window in the tiled mode. Another MOD-c press will create another terminal window and so on. MOD-j and MOD-k will move between the windows and all windows are available in one single screen. 

 

I cannot express my joy, when I saw my console splitting into multiple windows. For everything else there is MasterCard. You did plenty of work by moving between windows and your program is now copiling. Time to relax. Detach the session by pressing MOD-\. You now land back at your console. Now run another command as so abduco -c relax dvtm -m ^x You get a fresh canvas. Create multiple windows again for playing your music with lyrics, reading a book by the next window. 

 

Enough of recreation, back to work. But, you want the music continue to play and want the book you were reading to be at the same place. Detach this session again by pressing MOD-\. Run without any arguments, abduco, will list all the live sessions. Run this command with the session name abduco -a session_name Now you are connected back to your compiling and editing session with all the windows as you left them when you detached from this session. The compiling is not complete, detach again and then re-connect to your relax session and continue reading your book. 

 

You are smiling. Your low spec PC is so responsive. But, But, We are living in a modern world and it is very difficult to survive without a pdf viewer, an image viewer, a video player, an ebook reader, a music player, a text reader(should we talk about it), web browser, a spread sheet, a document writer, a presentation tool and what not........ 

 

Let us try and resolve these applications one by one.

1. Let us start with a pdf viewer. This was rather easy. I was happy that the less command is more than capable of displaying text based pdfs. It will display pdfs with images, but the images are ignored.

2. An image viewer. For this the framebuffer image viewer, fbi is upto the task and is enough for viewing images and also includes the capability to perform a slideshow of the images supplied to the command.

3. For a Text reader/editor we are spoilt for choice and I would rather not talk about the options here. Whatever I talk about would be less.

4. If we come to the web browser, we do have choices, but none capable of handling 2 - 4GB of modern websites. We have applications for displaying true html. Blogs written with text only are a joy to read. I would recommend w3m. It also has support for images(I have not tried out this feature). If you access gopher holes or the modern avatar, the gemini space, then you are in luck and there are plenty of options. With the gopher and gemini protocol, you are at home in the console. Want to access your banking site, forget it.

5. If you are on the fediverse, there are clients for the mastodon network. There are clients for reddit.

6. For reading ebooks like epubs and mobis, I would recommend epy.

7. For searching the web we have the duckduckgo client ddgr and surfraw. Both are powerful and meet all the web searching requirements. 

8. Playing music has always been easy on the console with plenty of applications. My personal favorite is the mpd and mpc combination with ncmcpp added into the mix. 

9. For playing video, mpv is my default goto. The framebuffer device plays most of the videos thrown at it. 

This has already been a very long post. If you made it this far, then you are definitely a console junkie. If I could give you a hint of the entrance to the rabbit hole, then I would be most happy. Dont forget to buy yourself a mechanical keyboard. Thanks to all the devs and users who wrote all those wonderful applications and of course GNU/Linux. The journey with the tux and the beastie and the puffer since the year 2000 has been nothing but joy. I would like to end the post with the tagline of distrowatch. "Put the fun back into computing. Use GNU/Linux, Freebsd, Openbsd, Netbsd, Plan9, templeos, Haiku, Minix, GNU ..."



Sunday, October 18, 2020

Buffers, Windows and tabs in vim/neovim

There are three concepts when it comes to viewing/editing files in vim.

Buffer:

When you open a file in vim the contents are loaded to RAM. This portion of the ram which has the contents of the file is the buffer. Now, this loading happens behind the scenes. It is no good if the file contents are in the buffer. We have to view it. That is what visual editors like vim are for. There are ways and means of editing files without having the contents of the file displayed on the screen. For that you can combine the power of ed and then the later front ends like grep and sed. So, now we are still at a stage where vim has loaded the file into memory and named that block of memory with a name taken from the file name itself. This buffer name can be used in moving around buffers when we have multiple buffers.

When you create an empty buffer, vim allocates a certain amount of the RAM for the buffer. If you write this content to a file then the contents are saved. If you delete the buffer without saving it then all your content created in this buffer is out in the ether.

For playing with buffers vim provides commands starting with :buffer. It follows the object, action on the object philosophy of the other vim commands.

When you shift from one buffer to another using the buffer next command or similar, vim prompts you to save the present buffer to file. This can be overridden with settings in the vim config file.


Window:

This is the area where the contents of the buffer is displayed to the user. After loading the file into the buffer, vim then reads the contents of the buffer and displays it on the screen for the user's viewing pleasure. A full screen of content, which was a big deal in the good old days. To display the file vim creates a window. The file contents are displayed within this window. Okay, you have been editing a single file for many days. Now, you want to refer another file. So you now go ahead and open it up with :e file2

You are in for a shocker, the screen is now showing only the contents of file2. As we have already clarified, a window is the place where vim displays the contents of the file. In the present case we have only one window. So, when you requested vim to open a second file, vim agreed and showed the contents on the solitary windows. To show that vim had to clear the screen and load up the buffer which was the contents read in from file2.

The situation here is we are having one window and two buffers, as such vim can display only one buffer while the other is still loaded and available with vim read to be displayed when asked for. You can ask to bring the buffer contents of file1 to the fore by using appropriate :buffer command. But, instead a more elegant way of viewing both files side by side would be to create another window. This will reduce the screen estate available for each windows. if you open two windows then both share 50% of the screen and so forth.

Ctrl-W v    opens a new window and splits the screen into half vertically. Now you can open file1 in the left window and file2 in the right window. Now there are two buffers and two windows displaying the respective buffer. What if I open the same file in both the windows, well all your editing activities in one window will reflect in the second window also. try it. Because you are editing the same buffer.

To end the discussion about windows, when you close a window, the buffer is not offloaded from memory. It is still there within vim. You have to delete the buffer using the respective command to instruct vim to offload the buffer from memory.

Tab:

Tabs are the masters of vim windows. Every tab has access to the full screen. Withing tabs you create windows as explained above. In the above example there was only one tab which is started by default. Every tab can have multiple windows. When you close a tab you close all the windows in that tab. tabs are good when you want all your files to use the complete screen of your monitor. Whenever a new tab is created it is started with exactly one window. If you want to view file1 and file2 using the full screen estate of your monitor and move between them then, the :tab command is the way to go. The disadvantage is that you cant see the file side by side.

When you close a tab, all the windows within that tab are closed. But all the buffers you were viewing in that tab within their respective windows are still in memory. You have to delete the buffers to remove them from memory.


 Of course, when you quit vim, all the buffers are closed and any changes which you have done to the buffers, will be queried for saving.

In summary, we see that there is no one single strategy which works for and individual. And for every individual, the strategy depends on the task/s at hand. So, dont be very harsh on your preferences. You will be losing out on the most important aspect of vim, ie, "situational editing"

Monday, September 21, 2020

HoCl, the forgotten sanitizer

Disclaimer: Whatever follows is my observations and experiments with HoCl. I am no way advising the use of HoCl nor recommending that it replace whatever you believe and have been using. Use the information mentioned below at your own risk. I am no way responsible for any harm caused by using the information below.

Thanks to all the independent researchers and particularly, the public network, which made the activities mentioned below possible in the first place.

This post is not about belittling any company/organization, but when a product is released in the time of a pandemic and is marketed using the situation, the customer should be given enough knowledge not only about theory but also the practical data points. It is the responsibility of the company. If there is anything wrong in the post, Kindly post it in the comments and I will take it up in the right spirit and if found wrong will update the post.

Ok. after the Disclaimer, let me bring out the experiments and research carried out to arrive on a sanitizer which is not alcohol based.

Alcohol based sanitizers are new entrants to our country. When their advertising started, the ads showed where you could spray the sanitizer on your hands when you are at a hotel/fast food joint, wherein you cannot waste some time to wash your hands. Later the ads vanished as it was proved that the alcohol based sanitizers are not safe and there will be residual from the usage and will get mixed with your food. The details and the homework to do the same is left to the reader and the various search engines are your friends.But, be aware that the time you search for sanitizers all your feeds/social networks will start bombarding you with ads and ads disguised as articles down your throat. Kindly use ad-blockers and script blockers while doing general purpose web browsing and allowing ads on websites/blogs whom you know well and are ethical and depend on ad revenue.

The pandemic on our hand has brought back the alcohol based sanitizer on our hands. My skin is very dry and all my efforts at moisturizing them have failed terribly. Now, I rub the sanitizer on my hands, I know what is going to happen. My hands are akin to to a dried up tree branch and leads to other skin complications. You are now telling me to buy sanitizers with moisturizers. Yes, the alcohol has to do its bit, then the other contents of the concoction comes into play. Once I understood that there is no other option than to start using the sanitizers, I started a hunt for alternatives. It is in my blood that I always look for alternatives. The alternatives cannot stand on their feet just being clones, there should be something which makes them stand apart. This process of differentiation is a blessing in disguise for the customer. When the alternate is suggested by nature itself, then you have to standup and take notice. That is what I did.


Let us talk about the things against HoCl and why it is not being mentioned/produced by the capitalist companies

1. The viral killing power of the solution decreases over its storage time.
2. The solution has to be avoided from direct sunlight.
3. The solution has to be kept in opaque containers.
4. The active life is varied based on varied studies from 04 weeks to 04 months.

The effectiveness of the HoCl solution is left to the reader to find it out for himself by going through the research articles on the public network.

After all this, it is now time to generate HoCl. After searching for generators, zeroed in on Cuckoo generator, from a Korean company, available in our country. This can be ordered on the company website as well as on amazon.

Read through the website and without going into depth of the technicalities ordered the unit. Started using it and replaced the sanitizer used by me and my family. This continued for a couple of weeks. The reliability of the solution was questioned by one of my colleague. Came back home and hit the public network for data. Because data speaks.

Now, there are three data points for a HoCl solution.

1. The Ph of the solution
2. The free chlorine available in the solution in ppm.
3. Percentage HoCl

The points 1 & 3 are connected. The Ph of the solution is what tells us about the "acidity" of the solution. Pure water has Ph of 7.0. Less than that is classified as acidic and more than that will be basic. Further prodding can be taken up on the public network or turn back your pre-university chemistry books.

When the Ph of the solution is at 5 to 5.5 99% of the free chlorine available in the solution is in the form of HoCl. This is the most desirable end result. This will be the perfect solution. Perfect for sanitizing and cleaning of fruits, vegetables and meat. Solutions within this range are corrosive and cannot be used on rusting surfaces. It can be used on other surfaces but has to be cleaned off after its application. It can be used as a sanitizer, but after spraying on to the hands, it is better to wash it off after 10 -15 seconds. Solutions with Ph less than 5 will react with the sprayed surfaces and produce chlorine gases, totally undesirable.  But, when the Ph of the solution is around 6 then 90% of the freely available chlorine is in the form of HoCl. Solutions at this Ph have a lesser degree of corrosion. It is still better to clean off the solution from the surface after 10 -15 seconds.

The action of HoCl in the range of 5 - 6 is that the solution kills the virus almost immediately. If the solution is left to linger, it will not have any effect on the further virus which might come and settle on the solution. The summary is the solution will kill the virus on the surface which was there before the spraying started. This is the reason that in hospitals this process of spraying and cleaning happens at regular intervals.

Now let us come to the other parameter, free chlorine available in the solution. The amount of free chlorine available in any solution is measure by ppm. 1ppm will be 1mg of chlorine/litre. For an effective sanitizer this measure should be a minimum of 200ppm. Th studies have shown that the solution with a Ph between 5 to 6 an ppm between 100 to 200 will kill the virus almost immediately on application. With the same Ph range and a ppm of 80, it would take 0.5 to 1.0 minute for killing all the virus on the surface. A ppm of 50 would take 10 minutes. Many commercial generators with proprietary procedures produce a ppm of around 400 - 500 ppm, Just to be on the safer side.

So, now we know the final properties of our solution. The Ph should be in the range of 5 - 6 and should have a ppm of around 200 - 300 ppm, the safest bet.

Well now we know the data points. How about measuring them. This was the most trickiest task.

1. Measuring Ph with strips was not intuitive. I tried with a variety of strips and I found it very difficult to compare the colors. This was compounded by the fact that I am not that good with colors. But, again, I am not color blind. I then went ahead an purchased a digital Ph meter for the task. It is very easy to read and very handy.
2. Measuring the ppm was more tricky. We dont have any companies which make any apparatus to measure a ppm of above 10 which is normally used to test the amount of free chlorine in the swimming pools. After a through search ordered a set of strip on amazon from an Indian company which imports it from US. Tragedy. The color map on the box and the colors the strips produced never matched except for 10 ppm. So search started again and then it ended at desertcart.in. Here I was able to purchase the best in the business. The strips were capable of showing a ppm of 50 to 1000!!!. The wait took exactly 1.5 months after placing the order. The strips were awesome and the colors after testing were very intuitive.

Ok. So now we have the measuring apparatus. Let us now get the ingredients to prepare the solution

1. Tap water
2. Kosher salt(Rock salt)- Un-iodized
3. Vinegar (Distilled white, 5% acidity)
4. Distilled water( for cleaning the digital Ph meter and also the generator at regular intervals to keep the electrodes carrying out the electrolysis. More about this later)
5. Weighing scale to measure a minimum of 0.01gm

The generator from cuckoo does not mention anything regarding all these technicalities. Which is a big fail. And a very risky proposition. The solution generated was at 10 ppm. I really dont know what can that be used for. After a couple of months there was a call from a customer care exec and once I started belting out ppm's and Ph's, the call was cut. That was that. I am on my own.

The cuckooo generator is capable of producing 250ml of the solution at one go.

1. Fill up the generator with 250ml of tap water
2. Fire up the weighing machine and measure 0.8 gms of kosher salt and 1.3 gms of vinegar and add it to the 250ml of water. Mix it thoroughly so that the salt is completely dissolved. Lumps of salt can damage the electrodes of the generator
3. Check the Ph of this water. It should be around 4.5 - 4.6
4. Run the generator for 3 cycles(9 minutes)
5. Check the Ph of the final solution. It should be around 5.5 to 6.0
6. Check the free chlorine ppm. It should be around 250 - 300 ppm


Thats it. you now have one of the safest to use sanitizer. Pour it to spray bottles and share it with your loved ones. The effectiveness of the solution decreases based on its exposure to sunlight. Pour the solution in opaque spray bottles. Anyhow, it will not last beyond a week because of the present usage. So, we have not crossed the threshold. You can always keep a bottle of the solution for a week and check the Ph and the ppm to ensure that it definitely lasts a week.

The proportions of the salt and vinegar was arrived at after a lot of permutations and combinations. Try your combinations. It is better to use less salt and run more cycles(Just my hunch. I dont have anything to back this claim).

The applications are numerous. No smell when you spray it in your office premises. The solution can be use on clothes, gloves, sofas, tables, door knobs, toilet seats, car, office, handles, drawers, refrigerators, washing machines, kitchen gadgets, floors, walls, windows and of course cleaning veggies and meats. Use it to deodorize your trash can, kitchen sinks and what not. Jump on to the public network for more applications.

I also use it to disinfect my masks and can be easily used on the N95 masks and the hang them to dry(Again, I dont know the effectiveness. But, I have believed in the process)

Saturday, September 12, 2020

Adeventures of Tom Sawyer by Mark Twain

What a delight of a book! What writing! No doubt that the author amassed wealth and fame. No doubt he spent it all. It is all in there. It is as though the author time travelled. It is as though the author knew that the grown up part of his story will be failure. But the growing up phase or to use the commercial parlance "coming of age" has never been more beautifully brought out than with the adventures of Tom Sawyer. It is a book to be read up whenever you are down. 

 Whenever consumerism has consumed you. Whenever you think mother earth cannot give you more. Whenever you feel you have seen it all. The book removes all the dejavu feelings you might be having about life. What energy, what adventure, what characters! Wow. Every line is painstakingly written to have the utmost effect on the reader. The reader is the king. Very few books makes the reader feel that way. Plenty of the philosophical side involved. The author brings out the consumerist attitude of the young and the men. It brings out the young in the men. It talks about the men in men. 

 Every scenario is beautifully contrasted. Mother earth is in her full glory. All her presents to mankind are kindled and remembered, explained, reveled. You very easily become the protagonist. You can easily replace the others with similar characters in your life. But, with the present generation and the looming pandemic might just change the whole world wherein the children would never understand the joy the book can provide. 

How can you enjoy the book, if you have not lived a part of it. How can you enjoy a book, if you feel that you have not done certain activity in the book. How can you enjoy the book when you know the activities mentioned in the book happened in a lifetime that does not happen now. Oh, the playing in the sand, jumping in puddles of rain, getting wet in the rain, getting caught for trifles, Oh yes, we have live a life. But, what about our children, they wont understand a thing.....

Thursday, September 10, 2020

Brideshead revisited aka Aristocracy revisited aka WWII revisited aka religion revisited aka innocence revisited

After reading orlando, I wanted an easy go book. Brideshead revisited has been consistently recommended by seasoned as well as young readers. So I took it up and let me be frank that I was a tad surprised by the breadth of coverage in the book. The writing is easy paced and the vocabulary requirements are standard.

The book starts interestingly in world war 2 and goes back and forth. Reliving the nostalgic memories brings in the book brings back your own as you go through the book. The characters are relatable. Yes, we dont have as many aristocratic families as in the good old time. We still do have pretty rich families wherein a similar pattern is observed. The camaraderie between two friends is brought out beautifully. In fact this is the portion I like immensely. The character build up of the two friends is fantastic and this makes all the situations which will be shown to us in the future believable and rooted in human relationships.

The expectation of a family from your near and dear friends is one more aspect which is brought out nicely. Each family is selfish in the fact that they see what the friend can bring or do to make their sibling better at the expense of not understanding the friend and his needs. The other thing is as the characters grow up, we see the maturity and the different views they have on life get concrete and they run after worldly pursuits. Only when the characters pause in their life and think about their experiences do they feel the right or wrong they did.

Alcoholism is again shown as it should be. When you are drunk you might feel better but when you wake up you are deeper in sorrow and you go so deep that nobody can dig you out. Religion is queried enough. The right questions asked with no right answers.

Love is complicated.

Sunday, September 6, 2020

Orlando by Virginal Woolf

 Orlando is a mind bending, time bending, beliefs bending saga. There is no stone un-turned which questions traditions, the societal setup. The entire societal setup from the way the poor static people, to poor nomads, to rich static people, to rich nomads the books attempt at gathering the entire gamut of the societal setup is unprecedented in all the books I have read to date. Time flies in seconds and at times it does not move at all. Time is tamed by the author. She moves it at her own will. The poor and the rich are contrasted. None are spared. Orlando gets bored with the lives of the poor as much as the lives of the rich. Yes, there are times that the author finds it difficult to move along and in that situation she move the character to the ancestral home. It is like a launchpad to launch the character to the next chapter/level.


Gender is played with. Gender which plays a main character in our societal setup is toyed with. The chairs, the tables, the animals, wild and domesticated all find their place in the novel. All find their place and time. Man, woman, boy, girl, animals, plants all are living beings. The human societal setup with the clear distinction between the male and female functions are made fun of. The stereotypes are made fun of. The various issues in the stereotypes are brought out beautifully. How the male dominated society has bound the female capabilities are elucidated beautifully by just comparing the dress each one wears.

Sometimes it appears that she wants the answers to many of her queries very fast. Sometimes she answers but does not explain further. Sometimes she explains many of the situations a bit more. This might be intentional. The evolution of the society in over 300 years is also a character in the novel. There are places of rapid ascent and reaching a crescendo. But, she does not loosen the grip on the reader. She gradually loosens her grip as any musician would do after reaching a crescendo.

A recommended read when the reader wants his time to go slow. Not recommended for speed reading.

Friday, August 14, 2020

Covid 19 Non immune have the same rights of a human life

 All this herd immunity thing cannot be digested. So the world has decided that there will be casualties. So, a person dies in the present pandemic, it is because of weak immunity. That will become a count the next day. Now, why should a person die because of a lack of immunity to a mistake done by a state/company/individual. The person who is dead is in no way connected to the mistake done by the source. We have totally forgotten to question the source. Why because the source seems to be more powerful. 

Is a common man powerful enough to change this thought. No. Not in democracy, not in any other setup of modern governance. Let us take the example of sweden. One of the doctor in sweden's biggest hospital put out his thoughts on the way the country handled the pandemic. There were no lockdowns. All in all around 6K people have passed away in the past four months due to the pandemic. That is a very measly figure considering the yearly deaths of the country in question. Just because it is measly does it mean that those 6K people were so easily expendable. How was it decided that some people were expendable. 

The doctor is very happy with how it has turned out and he believes that all this occurred because of herd immunity. But what about the people who died and will continue to do so for lack of immunity. Who is responsible for their lives. Everybody who passed is a father, brother, sister, friend and most of all a human being. How any other human being is expendable is a big question. This is real war. It is fought silently by all the governments on its own people. 

Even in the times of the pandemic, while the doctors and scientists are struggling for funds, majority of the countries are on an arms race. Defense equipment still takes the major chunk of all the countries expenses. When will the health of the citizens take priority over borders. We are in a demo of the dooms day setup. When there is a real dooms day and all the 1% escape to safety, and all the 99% are washed away or zombied. The only difference is we are allowing a human activated virus, resulting from a human mistake, which could have been culled at the source, to simulate a dooms day. Even at the expense of the people's death, hospitals are making money, extravagant money, again enriching the 1%. Destroying the environment. 

All the items banned are on the main page of all the stores. Alcohol based sanitizers, banned at one time, now share the same space in bags as drinking water. Just before the pandemic there was a huge drive against plastic use. We are now choking the Planet with masks, PPE, and related things which will be a much bigger problem and would result in a bigger issue which the mask and PPE cant stop.

Why cant the economy of the worlds stop for a moment. It cant stop because we are in an economy of Just in time. The supply chain is just in time. It is not relaxed. Stop the arms race, stop all the cross border issues. Join hands with the doctors and the scientists. Just pause the economy for a few months. Dont tell me it cant be done. We have seen it done in all the countries, albeit for a varied amount of time. This calls for a collective effort from all the countries/individuals. All the laboratories/scientific establishments working in tandem sharing data in an open way to reduce re-invention of the wheel. 

All the laboratories/scientists/doctors belonging to the 1% should be allowed to work in a global way, without the intervention from the owners and under a universal governing body, again, made of doctors/scientists/engineers and all the professional people required in assisting and testing the output. Can the consumerist world pause itself so that all the 1% companies have nothing to sell. Buy local groceries. Support the local producers. So that the world when it gets back has an alternate setup for consumption. Well, dont the 1% know this can happen. They know it can happen. If the lockdown had extended for another 06 months throughout the world, humans would have setup an alternate setup for meeting the consumerist attitude of the individual & it would definitely be local. 

Humans are basically restless. This 06 months all the funds available for defense from all the countries should be diverted to identify test and release the requisite medicines. Well, medicines are required for that portion of people who dont have immunity. So, now the medicine is out and the non-immune portion of humanity also will survive. Husbands, wives, sons, daughters, friends, humans live. No human life is expendable. If a tea sellers life was long ago deemed as not important and expendable a country wouldn't have had one of the longest serving state head.

All of a sudden deaths of people around the world has become a mere count. A tech company head comments on medicines. A traditional dancer assures that vaccines if available will be provided to one and all. The thing is doctors and scientists are the only people talking sense. This is their job. They know their job. Let them be. Let them talk. For once, I request all the 1% to be quiet and allow the podium to the doctors and scientists. Let us give them the stage and the mic. This is their time to be in the spotlight. Turn the spotlights on them.

Let us save the Non-immune humanity not by treating them and torturing them on ventilators but by prevention. And, No, the logic of death of a few for the survival of the largesse is totally flawed. Since the largesse surviving might be the worst of the lot.

Wednesday, July 22, 2020

There is only that much that can be done........

"There is only that much that can be done by them". How many times have we not heard this statement regarding the helplessness of giant establishments when it comes to grass-root controls. The reason for this is obvious in their sheer size. As the size of corporations increase and as the organization spreads across the globe increasing the customers and the people employed with varied customs, languages, preferences and what not are employed, it is very very difficult to know exactly what one person is doing in the establishment. Now, that is business and we will have this talk some other time. It is like having a dinosaur's body with its pea sized brain.

What I would like to talk about in context is that of facebook, twitter, youtube and the like. With customers varied as is the world, it is a herculean task with a centralized team controlling data into and out of centralized servers. Yes, there are servers in many countries and you would like to call it de-centralized. We will come back to this. If this is the model they still would like to continue then I would suggest these companies to take a leaf out of traditional manufacturing companies. The D&D is made in the parent country. The manufacturing of various parts are made worldwide and assembly takes place in a country which did not participate in any of the other operations. What is happening here is a new variation of scientific management. Wherein specialization is localized and the best locality for a specific job is targeted and optimized. The first step of optimization is the job of zeroing on the place itself. Now, once the manufacturing is done, these traditional companies have a presence in all the states of a specific country at major cities and if possible towns also. This gives the big organization a taste of the local thinking. Now, it is all about targeting in the most optimal way with the differing tastes and cultures in mind.

It is high time these big social media companies learn to localize. Localize normally associated with computers is only language. But, localization is much more than a language. The same language is spoken and written in various ways in a matter of a few 100 kilometers. Now, this knowledge comes if there are teams managing specific local geographical locations. With the amount of ad revenue these companies are reaping, it is a responsibility of giving a bit to the community which makes these websites possible. One of the first steps would be to recruit local talent with a varied specializations so that a majority of the local population is represented. The algorithms can be tweaked to reflect more towards the local taste and reduce the global shit which people dont care. This easily separates the global team with the local team and the local team can curate the ones affecting the local areas more and then move out less affecting issues.

Yes, it is not easy, but that is the way these companies can survive in the future. We now have real federation with the activity pub protocol. Mastodon, pleroma, pixelfed and many more are already on the train. They are working perfectly. You now have people running instances which collect like minded people and share ideas. These instances are at the same time free to expand their vistas by connecting to other like minded ones or related ones. There is a bit of anarchy here and I like it. As one of my friends point out, anarchy as a religion is not acceptable. Anarchy in its pristine form is always preferred. With these small groups, it is very easy for administrators to maintain their instances. The rules are laid out in the beginning itself. In fact you know the rules when you join and instance. You know what you are not supposed to do on that instance. If you want to talk about something else then you should search for such an instance and put your views there.

The proprietary ones cannot be as free spirited as these, but, they should try. Because right now, they are struggling. Administration depends more on algorithms. It is an utter failure. There will always be means wherein content can be put back in other ways. And, these algorithms look for content which is gaining more eyeballs. The easy, digestible, shocking, breaking issues get the eyeballs and the algorithm definitely will support it and brings it into the forefront for other users thereby converting them also. If this is what they want, then it is the job of the government to not allow this. If the government wants exactly this, then stopping this rests on the general public and they should act.

Saturday, July 18, 2020

People, what is wrong with you and your masks

There is something really wrong with majority of the people in the world. Yes, it is a matter of discussion whether the social distancing rules and wearing a mask is going to help in a pandemic. Yes, there will be arguments on both sides. But, the mask wearing side has always won. Now, there are many classifications on the attitudes of people wearing masks. Let us for a moment forget about the age old classifications based on caste/creed/color and what not and concentrate on masks. Oh...I heard you. What a waste of time. We could have continued our discussion on traditional classifications. You are interested more in it. You feel that is more colorful. You feel that is more relevant. You feel ..... OK, I understand. Shall we now get back to the masks...

Lot many people are still considering the present pandemic a conspiracy theory. I have always maintained neural ground and will not take any particular sides until it is so clear that there really are no sides. I have seen educated people talk non-sense. Let us leave the mask for a moment and come to the next item important, Oximeter. There are very clear instructions as to when you require an oximeter. Let us assume you have decided to home quarantine after testing positive or the doctor has advised home quarantine based on your past health. Now, two instruments needed will be a thermometer and the oximeter. In a six person home an oximeter might be a good buy. But the requirement is very clear. You should have an oximeter with you if you are showing any symptoms of the pandemic at hand. Will the oximeter save your life? No. It will tell you if your health in home quarantine is deteriorating and you should consult the hospital immediately. So, one person decides not to buy the oximeter not because he understood why it is required. He doesnt want to buy, because it is a conspiracy theory by the capitalist companies. By the way he is wearing a mask. Thank the force for that.

Let us come back to the masks. What is wrong with people. The mask is not a handkerchief. It is not be touched every milli-second. Let me see the different ways the masks are touched and handled by the public
1. Majority wear it because the government is levying fines for people not doing so.
2. Many are wearing substandard thin cotton masks, while we are talking about N95.
3. Many are wearing it at their chin.
4. Many are wearing it so loose that all the air going in and coming out might be full of the virus.
5. If they want to pull the mask down, they do so by holding it exactly in the middle an pulling it below their chin.
6. They again hold exactly the middle portion to pull it back.
7. They dont cover the nose and it is at the mouth level.
8. They are not washing it every day(if washable).

Am I an expert in recommending masks? No. I am only logical at it. So, what is the best mask?

1. An N95 mask wore properly covering the nose and the mouth down to the chin such that majority of the air going in and coming out is through the mask.

What other choices?

Though not medically recommended, masks made of multiple layers of cloth with criss-cross strands could be made at home. Preferably more than 3 layers. If possible a filtering medium in between the layers is recommended.

How to really wear it?

1. Hold the masks only at the strands which are for fixing it. Fix it such that it covers your nose and the mouth and you feel that majority of the air entering is through your mask only. You are not feeling the air entering through the sides of the mask. If this is not so then there is no point of wearing your mask.
2. Once you wear it, do not touch any portion of the mask. Move around as though you are not wearing them. Do not touch your face at any point of time.
3. If you want to remove it, again, hold them at the strands and make an arrangement for hanging the mask from the strands. Ensure that you or any others or any other thing does not touch the surface or the insides of the mask. To wear it again, follow step 2.
4. It is better you have a mask for the office work separately and keep it at the office.
5. If you are using masks made of layers of cloth, it is recommended to wash them everyday.

For better results with the mask, another important aspect is maintaining distancing. At any point of time maintain at least a minimum of 1 metre distance between everybody. And everybody in the vicinity also to maintain the same. It is not enough that you are wearing the mask properly and maintaining the distance. Everybody else should do so. This will minimize the payload, if it exists in any of the person in the group.

With all the above we are ensuring that the payload when delivered to our body, will be minimal and our immune system is capable of fighting that smaller payload.




Survive.

Sunday, July 12, 2020

Why are we here

Yes, Why are we here. Why are we born on this planet and why on this planet and only on this planet. Why is this question being asked now. Is this the right time to ask this question and is it the right time. In fact, are we allowed to ask this question. The whole world has been swallowed and united by a pandemic. United is a very big word and that too encompassing the entire world with that is a bit..... We are united only in discussing about it and the devouring news regarding the pandemic. But when it comes to resolving the problem at hand, there has been no unity.

Let us see, what does a restaurateur do in this time of a pandemic. He can serve free food until his capability to do so runs off. Which happens very quickly in this modern world. We dont stock anything except our electronics, which is totally useless and a headache for cleaning. Our forefathers always planned for a bad day, bad year, if possible, out of experience. Dried food which can be store for a long time. Food grains which have long storage life etc were always maintained. Now, it is all, JIT. The concept of cost cutting, the concept of saving time so that the time saved can be spent on our electronic devices. So, did we get our answer for the first question. Are we here to consume and consume only. We are not creating a new earth. We are trying to move to more dirtier and dangerous planet instead of cleaning up and maintain the most inhabitable planet in the known cosmos.

It is all the same everywhere. All Indians dream of going towards the west and the west are always in awe at the philosophical and metaphysical knowledge available for ready digestion if anybody wants to have some. Since we are in the times of a pandemic can the funds for the rocket scientist be transferred to the scientists/doctors working towards the pandemic. Can the same be done for other areas of research. Can we press the pause button for two quarters for all other scientific spending. Will there be an alien attack within this time. Can we stop the petty quarrels related to our fake borders, ethnicity, colors, beliefs, gods, ........, nationalism, jingoism, religion, economic models, rich, poor.... OMG,I cant further go on. I am tired. What a waste of knowledge. What a waste of brains capability, listening to all these things and arguments about all sides. The thing is some people are expendable. Now, who are expendable is situational and many other variables which is beyond the capability of my brain. Is any living being expendable. Really, a living being is expendable. The statements and statistics that this many will die. I have to agree that the statisticians are definitely doing their job. Who gave the right and power to allow the people making such statements by arranging press meets and spending money for such events.

All human feelings have become situational. Everybody is made to believe that the pandemic will not affect him. Whoever is affected is brought to the side and told that your are affected. Now, who is responsible for this. Human apathy towards fellow humans is the reason. Everybody is fighting the pandemic in their own way. There has never been a unified approach. There has never been all hands on the deck approach. If that approach had been there, we would be out of this scenario by now. Fake sanitizers, Fake masks....... Where is humanity going towards. Is/was there anything called humanity. Does humanity mean every human has equal rights for everything in this world. Humanity also means that we should be considerate to all other human beings. But, if the meaning of that word does not apply to fellow humans, then I think the word is just a catchphrase for a company. Whoever is affected by the pandemic is fighting a lone battle and who has not come into the contact of the virus is feeling that he will not be affected. This is being maintained by all the governments and corporations across the world.

This pandemic is not something which humanity can defeat. It requires all hands on the deck approach regarding human efforts and all the resources required for resolving this issue. Can Human race unite and join together in bringing health to the entire world. Was the world before the pandemic a better one. Will the world after the virus is defeated be a better one. We can make the world better by imbibing the real meaning of humanity into minds/hearts of all the humans on this planet. Isnt that why we are here. To survive and strive. Let us.............

Tuesday, June 16, 2020

talking, listening

Is it everybody's responsibility to advice. If everybody starts advising, who will be listening. If anybody advises, will everybody listen or will anybody for that matter listen. Will people listen to persons with authority. Will people generally listen. Listening is a capability like many other hard to obtain ones. Talking is easy. That too talking about others mistakes and ones own successes is very easy. It is difficult the other way round. It is very rare people talk on the other side of the spectrum. So, you think people will listen when you tell them that something is wrong and something is right. You dont want them to do the wrong and you would like them to do the right which you thought is right. Do people really care about your opinion. And, are people ready to talk to others regarding the right and wrong. There are plenty of people who know much rights and wrongs and beyond that. But they cant talk, or not interested to talk, or when they talk they cant get their points across, Or they try to simplify it so much that it becomes a procedure and not that higher level thought. Is talking important or the listening. Which ability will make you understand more. There are people who when talk and see the response and decide whether what they talked was right or wrong. Why after so much of human civilization we lack the basic premise of our societal existence, communication.

Why is it so complicated. People want to listen to more of what they know. They may listen to somebody talking about a wrong which the listener himself has classified as wrong. This will cement the wrong in the listener but the same cannot be talked about the person talking. But it does not work the other wary round. The person talking might give up seeing the response. There are situations where people dont want to hear anything which is out of their belief/knowledge system. If somebody has identified a wrong, is it his responsibility to communicate it to the world. Will the world which knows it might be wrong but continue to do so listen to him. Or the person talking has only the responsibility of talking without gauging its effect. Is his responsibility over once he has made his statement. I in many of configuration posts put up a disclaimer relieving myself of all the dangers of my actions which are to be copied by others. Is this right. Thought my statutory responsibilities are over, are my moral responsibilities met.

Much of the research on communication has concentrated and suggested better listening skills. Are these skills to compensate for the bad talking skills. Are we humans better at talking and bad at listening. Why not we concentrate on how well we talk so that we can relieve the pressure on the listeners. Since there is more pressure on the listener to "really" understand. The presenter should prepare well so that the listener gets it. But again, full responsibility on the presenter does not augur well for the communication. But, the presenter is in focus. He wants or commands the limelight. If you have to be special, then your preparation has to be special. As for the listener pressure is definitely there to assimilate as much as possible. But, he is large in number and it is very difficult to gauge who has understood how much. But the presenter will b judged by all the listeners. This gap between the person talking and the person/s listening is broadening day by day as humans gain more insights and form their own "understanding". It is becoming hard to convince people of what is wrong and right. Both the sides have their own argument but both cannot communicate enough to prove the other wrong. If, so, the communication is a continuous debate, which will never be won......Will it....


Endangered/Minority

That is the word I would use for all the minority of living beings. Why? Well there is not much of a problem if we have a problem with the number of chairs in a room. So, do the minority and the endangered lives mean the same? Yes. The minority are always endangered. Or the endangered species are always in a minority. So, if the minority are important, does that mean the majority or the non-endangered species not so important. Well, both are important. How do we know a group of people are endangered? By seeing who is not. So both are co-existing in all forms of societies. Now, you will ask me will they have to co-exist. Well, since they are co-existing we have the problem of minority and majority. What if all unique living beings asked for their own place under the sun. Maybe a different country for all the classifications we have made. The earth is not enough. The universe itself might not be enough considering the number of divisions and classifications we have made. Can a world exist which honors every trait in an individual. Can an individual exist in such a setup.


    Who is important? The endangered or the opposite. Whom should we protect more. Who are more vulnerable? The answer is very clear, we should talk about the minority. The minorities are to be protected more. They are to be brought up in the societal setup. Why should we do it. You are telling me that this will create a problem. If everybody is non-endangered then nobody will be. Correct. Cant we reach that situation. That is a theoretical situation, maybe, We dont know for sure. It is not a perfect science. As humans have continued with killing of non-human endangered species instead of protecting them, in fact going as far as eliminating even the last one, we really dont have much hope for the human minority. Every government has some sort of budget allocation for the betterment of the minority. But when it comes to the real issue of discrimination all the governments turn a blind eye. Some times the minorities themselves dont help the cause. There will always be people from that side participating in majority politics playing the minority card. But by doing this, this individual is doing more harm than all the majority joined together. He is weakening the minority further.

How do the minority, the endangered tell the world this is happening(as though the world dont know what is happening). Should they tell the world what is happening instead of the world tackling this issue. Are the minority confident on this majority societal system that their voices will be heard. I dont think that there are much examples in our society where the endangered have won a major victory. A minor victory here and there is what would have happened. That again, would be politics played by the majority. By giving the minority a little leeway, the majority has again stamped its supremacy. So whom do you fight against. Do the minority have the facility, the oomph in terms of financial, political, moral, intelligence to beat the majority setup. Should they do it. Should they resist the majority. What should be their demands. What if done by the majority and overlooked by the majority will bring better conditions and safety to the endangered.

Whenever there has been talk of safety, some portion of the individual freedom has been foregone. Now, if we see the plight of endangered animals. What is the best way to protect them. Track them. Put a tracker in the body of the animal and give it a serial number, the human tracks it. The animal, whether it likes to be tracked, we dont know. What I gave was just a small example when you ask protection from the majority. Equality of humans has been a myth. Instead of asking to reduce the power and funding to the police, which also can be asked so that the funding starts to flow towards health services which will be direly needed in the nearing apocalyptic world, the minority should ask for equal treatment. They should ask for disparity of treatment to be punished. The demand should be all encompassing. It should demand disparity of treatment by an individual or government should be punishable. I am not asking preferential treatment. I am asking a response at par with whatever response is given by anybody to the majority. Preferential treatment creates one more class in the endangered who come out premium endangered since they know the working of this preferential treatment. This is not going to solve the problem but complicate it.

All the living being have full rights to lead the life they like in their own style within the boundaries of the society. But when the tenets of the society is discriminating people based on many traits, it is time to change the society and its thinking. Societies have evolved and will evolve. If sufficient force is not applied then the society will continue its rot. A society has to continuously change and adapt. The time for change is, always. The society should always look for inclusiveness. But, the people in the society will always look for exclusivity. The society as a whole should fight for removing this exclusivity. Since majority of the societies are majority based. It is the responsibility of the majority to set things right for the minority and work towards the removal of minority traits. That is how equality can be achieved.


Friday, June 12, 2020

Well, What is on my raspberry pi 4

The first thing I install is my client for the cloud based notes application. I use simplenote. It has the advantage that it is available on all the major platforms. There is a terminal client called sncli. This is my go to client.
The next thing is to install terminology for the terminal. After trying out many, I observed that terminology is the fastest on the pi.
i3 window manager. I cannot live without it. None of my Gnu/Linux installations is complete without this. It is lightweight, easily configurable and simple.
For the browser, since I have started using computers I have sided with Firefox. I am at home with this browser. I install noscript, ublock, privacy badger and dark reader plugins. I like it. It has always met my expectations.
For the application launcher i go with rofi. The run menu is shown in a small window in the bottom left corner of my monitor.
For searching on the command line I use ddgr(DuckDuckgo client for the terminal) and surfraw. After installing surfraw I install a small script called menu-sufraw available on github. This integrates beautifully with rofi. Must try.
For the office suite, My choice was OpenOffice before it went to the butcher's table with the Apache foundation. Now it is libreoffice. I like it. It gets the job done.
For my text editor, wait, wait, I use both Neovim and Doom emacs as demanded by the situation. I use emacs with the client/server model. It is quick and very snappy to start and to work.
Feh for my wallpaper needs.
There is one more plugin which I install on firefox, it is called play-with. This I combine with mpv. We now have an awesome combination for playing streaming content on the pi. For this configuration to work there is one more piece of software required and that is youtube-dl. A beautiful example of the unix philosophy working for the modern age of the internet.
Not to forget that all the apps are in dark mode, if available. I like the dark mode. It has been excellent for my eyes. Even now when firefox flashes before loading a tab, I close my eyes for a while. Thank you, Apple, only for bringing the dark mode into vogue.
My hardware setup is already discussed in one of my previous posts.
font-awesome for that "graphics" in the terminal.
d2code for the font, wherever possible. I like its legibility.
I use i3status showing the date, time, empty space, processor speed and the temperature.

Thanks to all the devs/users of all the freedom software. My respect to one and all without which this post wouldn't exist.

Sunday, June 7, 2020

raspberry pi os 64 bit on the raspberry pi 4(4 GB)

Disclaimer: I am not responsible for any damage to your pi for following any of the instruction below. These instructions are what I have used  on my pi. There might be no gurantee that it might work on yours. You have been warned.

So, now you know that there is a 64 bit beta OS for the raspberry pi. I dont know about you, but from the day I bought the pi 4 I always wanted to run the 64 bit version of any Gnu/Linux distro. I tried many flavors. I tried ubuntu, manjaro and gentoo. I rolled back to the 32 bit raspbian because it was a complete and highly optimized OS for the rpi 4. But I was sad that though the board supports 64 bit OS, we were holding back on its capabilities. The problem as always while distro-hopping is that you have to re-start majority of your configuration and app installs. So, things in the home directory can be moved easily, but other tiny optimizations we do, we forget it. This process has to start afresh. It is not an easy thing to do. The rpi does not fly in terms of computing power.

Anyhow, we are now holding the efforts of the rpi foundation in releasing a 64 bit OS with a more beefy pi with 8 GB. That will be happy news for people running servers on their pis. For us desktop users, the 4GB version will be fine for a certain amount of time. That is a very subjective line. Let us not dwell more on it. It is indeed time to laud the efforts of the rpi foundation for supporting pis from the first generation to the present with OS updates across the devices. I would like to take this opportunity to congratulate and thank the rpi foundation and the numerous contributors, beta testers and users for bringing the 64 bit OS to our favorite pi.

Thanks is also for bringing the USB boot support. This make the rpi application more universal. I had a pi 4 which had the sd card slot damaged. I taped the sd card in the slot with much difficulty and then flashed the latest bootloader. There we have it, the pi is now alive again. Thanks again to every person involved.

To start off with the USB boot support.

1. Download the latest 64 bit beta raspberry pi OS(raspbian is now renamed to this)
2. Install it on your spare sd card(8GB min is recommended)
3. Boot your rpi from this sd card
4. You now get a taste of your new rpi os 64 bit
5. Go through the setup and it will automatically upgrade all the packages.
6. reboot
7. sudo apt-get update
8. sudo apt-get upgrade
9. sudo rpi-update          ---Now, be careful here. This installs the bleeding edge kernel an other bleeding edge blobs. This is also a disclaimer regarding any damage to you pi after this. You are on your own. I have done it and many others as well and have not faced any issues.
10. reboot
11. sudo apt-get update
12. sudo apt-get upgrade
13. reboot
14. sudo nvim /etc/default/rpi-eeprom-update
    and change the "critical" to "beta"
15. reboot
16. cd /lib/firmware/raspberrypi/bootloader/beta/
17. check the latest files starting with pieeprom-
18. Now run
    sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/beta/latest-file from step 17
19. poweroff
20. Repeat step 1 and 2 with your ssd
23. unmount the ssd and re-connect again
24. Now the boot partition which is a fat partition will get mounted or you have to mount it on your GNU/Linux.
25. Open the file config.txt and edit the file with the following information regarding the overclocking of your pi(A disclaimer again here. This overclock has been safe on my pi with a fan connected and with heat sinks on the processor and the graphics unit. I am not responsible for any damage to you pi)

 over_voltage=6
 arm_freq=2140
 arm_freq_min=400
 gpu_freq=750

26. If you had slower ssd speeds previously dont forget to enter the quirks into the file cmdline.txt
27. Connect your ssd to your usb3 port of the pi and remove the sd card.
28. Power on the pi
29. If your boot is painfully slow then you should refer to this post. https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=245931


Enjoy the fruits of freedom software and its ethos. Dont forget to spread the ethics of freedom software and this may not include the price you paid for the software.