How to solve the “changed its ‘Origin’ value from ‘Google, Inc.’ to ‘Google LLC'” APT error

If you are on Debian or Ubuntu and using Google official repositories for Google Chrome Remote Desktop, you might have received the following error while updating your system.

E: Repository 'http://dl.google.com/linux/chrome/deb stable Release' changed its 'Origin' value from 'Google, Inc.' to 'Google LLC'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

Just run

sudo apt update

And you will be prompted to accept the new Origin of the repository

Do you want to accept these changes and continue updating from this repository? [y/N] 

And that’s it.

Turn off beep / bell on linux terminal

Working with the terminal using a command interface is very fast and effective way of doing stuff. But have you tried working with the terminal, listening to a music via headphones and having a terminal warning or tab-completion beep / bell turned ON at the same time? Well it can be very annoying. Listening to the PC Speaker beeps via headphones is very close to a feeling of hitting your head with a hammer. Even without headphones this beeping bell sound is very annoying.

Continue reading “Turn off beep / bell on linux terminal”

Security & bug fix releases PHP 5.6.37, 7.0.31, 7.1.20, 7.2.8

The PHP development team announces the immediate availability of PHP 5.6.37. This is a security release. Several security bugs have been fixed in this release. All PHP 5.6 users are encouraged to upgrade to this version.

The PHP development team announces the immediate availability of PHP 7.0.31. This is a security release. Several security bugs have been fixed in this release. All PHP 7.0 users are encouraged to upgrade to this version.

The PHP development team announces the immediate availability of PHP 7.1.20. This is a security release. Several security bugs have been fixed in this release. All PHP 7.1 users are encouraged to upgrade to this version.

The PHP development team announces the immediate availability of PHP 7.2.8. This is a security release which also contains several minor bug fixes.
All PHP 7.2 users are encouraged to upgrade to this version.

How to fix python SSL CERTIFICATE_VERIFY_FAILED

Here I explain how to fix Python SSL errors when trying to access DirectAdmin API using the https protocol in Python (e.g. by using the urllib, urllib2. httplib or requests). This error looks like:

    raise ApiError("HTTP Error: %s" % e.reason)
directadmin.api.ApiError: HTTP Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)

Server certificate verification by default has been introduced to Python recently in 2.7.9. This protects against man-in-the-middle attacks, and it makes the client sure that the server is indeed who it claims to be.

As a quick (and insecure) fix, you can turn certificate verification off, by:

1. Set PYTHONHTTPSVERIFY environment variable to 0. For example, run

export PYTHONHTTPSVERIFY=0
python your_script

or

PYTHONHTTPSVERIFY=0 python your_script

2. Alternatively, you can add this to your code before doing the https request

import os, ssl

if (not os.environ.get('PYTHONHTTPSVERIFY', '') and
    getattr(ssl, '_create_unverified_context', None)):
    ssl._create_default_https_context = ssl._create_unverified_context