Facebook soon to be … RIPped

Some people never learn. Facebook is owner of Instagram, and is not respecting the law… again…

Nous tenions à vous informer que nous avons apporté quelques modifications à nos Conditions générales afin de les clarifier. L’objectif est d’aider les utilisateurs à mieux comprendre ce qui est autorisé sur Instagram et comment fonctionnent nos services. Ces Conditions générales entreront en vigueur le 20 décembre 2020. Passé cette date, toute utilisation de l’application aura valeur d’acceptation de ces conditions.

Facebook is provoking the authorities with this…. lets wait and see.

LibreOffice controversy

Today, I read some article around LibreOffice 7.0 and the way it is presented. Basically, it says LibreOffice will be labelled personal edition, but nothing else will change.

This however is a major error. For years, I am advocating the use of LibreOffice in companies. Advocating this against MS Office is tough because most people are not IT people, and they are unable to make a proper judgement when it regards a choice in a domain that is not theirs.

With version 6, what are the pros and contras when comparing the two suites:

  • It is free, you do not have to crack it in order to use it (+).
  • There is no hassle activating. (+)
  • It is truly cross-platform. (+)
  • The user interface is different. (-)
  • The formatting is lost. Especially complex documents or presentations. (-)
  • The perceived functionality is less. (-)
  • Everyone else uses MS Office . If I make a document with LibreOffice, the other guys cannot open my document. (-)
  • There is no-one promoting it as all professionals make their living with something that is paid for, enabling them to hide their fees. (-)
  • What version to select? LibreOffice, OpenOffice, WPS Office, … and all the other variations. Opposed to that you select MS Office based on how much you are ready to pay now and in the future. (-)

As you can see, there are more arguments against LibreOffice as there are against MS Office. I admit, the reality is different, but I am talking about perceived reality.

Yet, now we will give another argument against LibreOffice. The version you get is not for the enterprise, only for the individual. How will we fight this if the distributor is working against us?

I herewith call the ones distributing LibreOffice to label the new version as follows:

Enterprise version with free community support. Personal use and distribution is free.

Recently, I came across a bug that a document I created could not be opened with an older version of LibreOffice. Seems the default file format version number has changed and the new format is not backwards compatible. The file correctly opened on LibreOffice when saving in .xlsx format however…. I believe there are some strange decisions taken that are wrongly communicated to the user base. If you are playing the underdog, you must be better and avoid these kind of issues. Why no say upon saving: save for all versions of LibreOffice or save for users of version x upwards, something in the style of .xls or .xlsx…

How to add image to Nagios chart

We assume following configuration:

  • FAN installation containing Nagios and Centreon installed on CentOS 5.9
  • IP of Nagios: 10.50.100.101
  • You are owner of a working machine with linux or macos (windows users will need to use putty for some of the steps or install an ftp server on the centreon machine)

First step, prepare your image

Create an image of 40 by 40 pixels and in PNG format. In order to blend in the image with Nagios, make sure that the parts around the image are transparent. (Alpha layer PGN).

Second step, upload your image

Normally speaking, your server should only support following protocols. HTTPS (or HTTP for local deployments) and SSH. If you have FTP running on your server, things are different, but here we assume we only have HTTP/SSH. We also assume the root account is accessible from the outside. If not (e.g. debian default install) one will have to copy to the user having remote access over SSH.

scp image.png root@10.50.100.101:/root
scp image.png user1@10.50.100.101:/home/user1

Third step, copy the image to the right folder on the server

Please note the second operation is a move operation. Make sure to execute the steps in the correct order.

cp /root/*.png /usr/share/centreon/www/img/media/logos/
mv /root/*.png /usr/share/nagios/images/logos/

Normally, a chown apache:apache to the files would be required in order to make the files readable for Nagios, but this seems to be working without. Just for the sake of correctness, please find following commands.

chown apache:apache /usr/share/centreon/www/img/media/logos/
chown apache:apache /usr/share/nagios/images/logos/

Forth step, refresh the server

Log-in to centreon, go to administration, options, media and select synchronise media. Now you should be able to use the image on any network device.

Add diskspace on CentOS 6.x

This procedure will only work if your configuration is using LVM. LVM is the default used during install, so this should be ok.

Start analyzing the usage of the disks.

fdisk -l

Shows that the volumes are on e.g. /dev/sda and that you are using an LVM system.

fdisk /dev/sda

In fdisk, create a new volume by pressing ‘n’. Create new primary partition (extended partition is not tested but should work). Change partition type by pressing ‘t’. Select partition type ‘8e’, this is Linux LVM.
Write down the results by pressing ‘w’ key. In case of doublt, press ‘m’ key to get help.

Now we need to re-read the partition table. Ether we restart the services or do a reboot.

shutdown -r now

After restarting the services, we check if all is ok and then proceed by creating the ‘Physical Volume Group’. The pvs command will show if it was created correctly. The example below assumes that your new partition is called /dev/sda4.

fdisk -l
pvcreate /dev/sda4
pvs

Now extend the volume group. Example assumes that name is VolGroup00, but fdisk will show you the exact name to be used. In case of doubt and you only have one volume group, the command vgs will show its name.

vgextend VolGroup00 /dev/sda4

Now extend its space, type the command vgdisplay to get the number of blocks to be extended. It should be displayed next to the label Free PE / Size. The example below assumes it shows Free PE / Size 3190 / xxxx.

vgdisplay
lvextend -l +3190 /dev/mapper/VolGroup00-LogVol00

After doing this, resize the file system. The command resize2fs assumes you are using ext4 which is the default.

resize2fs /dev/mapper/VolGroup00-LogVol00

Now check available disk space. It should be increased.

df

After finishing, do not forget to restart services or reboot.

shutdown -r now

Done !

Installing Code::Blocks on Linux Mint

Check what version of Mint you have:

cat /etc/debian_version

This should be Buster for the following to work. If you are on Stretch, please refer to: https://wxstuff.xaviou.fr/article/debian-repository.html

Import repository key:

wget -O- https://apt.xaviou.fr/key.asc | sudo apt-key add -

Create repository list:

sudo vi /etc/apt/sources.list.d/codeblocks.list

And insert following text:

deb https://apt.xaviou.fr/stable/ buster main
deb-src https://apt.xaviou.fr/stable/ buster main

Update your installation

sudo apt-get update

Now you are ready to install Code::Blocks from the packet manager or from the command line.

sudo apt-get install codeblocks

Tinkering on what happened in 2019

2019 was a great year for the internet, but some elements are worry-some

Tim Berners-Lee launched the contract for the web. A good initiative. Certainly an answer to what happened with some big companies wanting to take control:

HTTPS everywhere – great for privacy. Downsides: most proxies are broken, network acceleration is back to basics widening the gap in between the western countries and third world countries. How are corporate firewalls handling it? Most of the time, there is no need to deliver data over HTTPS except for a single reason, privacy. Why in a hell is firefox showing a broken lock when a site is not HTTPS. It should be more like a spying eye. Please let users decide whether or not they want privacy. Anyway, as long as we do not control the keystore, there is no privacy.

Facebook stance on privacy. 2019 was the beginning of the fall of facebook. It will either be broken up or people will start to understand how it is abusing your data.

The demise of windows. Even on Azure, now there are more linux installations than windows installations. Only a few years keep us apart from an opensource windows for the public and a closed source version for the enterprise.

Do-not-track. Honestly, I do not understand why we need this. If I go to a web-site, I want content of this web-site. I do not want publicity, nor any other content that is not delivered from other sources as the one on the website. It is time for browsers to block all content from other sources than the URL we just typed in the address bar. The do-not-track would not be required.

WWW has to go. Honestly, I do not understand why we need this. As a sideline, some browsers will not show the parameters in the address bar unless I select it. People already do not understand how a browser works, so why hiding some of its core concepts? Goal, take the hand of your user so you can guide him/her to where you want. This lets me think of the early Microsoft that thought you, nobody will ever need HTML 4 as majority of users stick to 3.2, lets remove it from Internet Explorer Mac so we can force users to silverlight.
For those that do not understand, www is great for routing. A company might have multiple servers, such as mail, webmail, intranet, application1, ftp, … and then a also a server servicing www content.

DNS over HTTP. What the heck is going on? Why would we ever need this? Answer: you certainly can read the reasoning from those promoting it. Until all browsers, phones, operating systems, … will adopt it, it will create a dual speed internet. In the mean time, all those applications that are on iOS or play store will start to function differently than the google browser. (Yes, I should sell this idea to google, great way to force users to come back to them.)

HSTS. What the heck is going on? Why would we ever need this? After the history of certificates, green ‘costly’ certificates, demoting self signed certificates, now the browser is storing DNS entries and caching not only web-content but also web routing. Bye bye accelerating the web and imposing a new cache hell to web-developers.

Huawei gets blocked for the false reason. Why are other countries following suit? Where are the proofs? The US has been caught multiple times in spying, creating backdoors, tampering the BGP routes, imposing operators or the Swift network to spy into their systems, yet we are not blocking Cisco, Facebook, …. because of … maybe the US is not involved in any wars while the others are. This is all a huge lie.

Edward Snowden and Julian Assange. The last part of demonizing those that want the truth to be told and lies to be revealed. Poor guys who dared to tell the public what for large parts we knew already.

QUIC – (aka HTTP/3) a proprietary protocol by Google that wants you to use UDP for content streaming just like audio streaming. They only talk about the benefits. There are several downsides to it: it cannot be cached, if bundled with SSL, how are corporate firewalls going to handle it? It also adds complexity because retransmission is handled by the application and no longer by the network layer. In essence, it makes browsers bigger and more complex just for the interest of some of the big players such as Facebook and Google.

Blocking certain countries to access open source repositories such as sourceforge or github? Who is deciding what? Who is the bad guy and who is the good guy? Its like saying, lets starve a population to death because we don’t like its leaders.

Privacy as a technology concept or privacy by human rights

There are some legitimate reasons why we want to intercept privacy. I give some examples: parents controlling their children, networks that block bad content, companies wanting to protect their interests, countries that want to apply their legislation.

We should not give the right to big companies to control your content and at the same time propose solutions that make controlling by the one who is entitled to control impossible. Putting new protocols in place because you do not agree with what certain governments are doing is not the right thing to do.

Protocols are open and should be easily adopted by all players of the market. Yes, one can develop and propose an enhancement, but being a major player in the market does not mean that you are allowed to impose your choices. Please play it nice. It is not because there are bad offenders in the world that you should become a bad offender of a different kind.

Bash tricks

Colouring grep output, modifying welcome message.

Reference on colours.

Some ways to do it

grep --color=always
grep --color -E 'pattern|$' file
grep --color 'pattern\|$' file
egrep --color 'pattern|$' file
export GREP_OPTIONS='--color=always' 

Alternatively, use ack. No file required, recursive by default.

ack -i pattern

The ultimate solution, use ack --cathy! Do not forget to install it first.

sudo apt-get install ack