Fixed yoga 910 screen flicker in Ubuntu 17.10

To fix it, create or edit the file at /usr/share/X11/xorg.conf.d/20-intel.conf as root with the following:

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "sna"
    Option "TearFree" "true"
    Option "DRI" "3"

And add this:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash i915.enable_rc6=0″

to: /etc/default/grub
cmd: sudo update-grub
restart computer.


Ubuntu install PHP mail function

It is not installed by default so you have to install it and then a little configuration is required.

sudo apt install sendmail

The run the following command and choose Y for all the options.

sudo sendmailconfig

Now edit the host file:

sudo nano /etc/hosts

And add or edit as:    localhost localhost.localdomain your_machine_name

To get your_machine_name run:


Raspberry PI enable ssh without a monitor

I spent a dozens of minutes today to learn, how to enable ssh to Raspberry Pi without a monitor. SSH is disable by default after October 2016. Here is a one minute solution.

Attach the sd card to your computer and add an empty file SSH on the root of the sd card partition.

Ubuntu 16.04 – PhpStorm – configure xdebug with PHP 7.0

Today I spent a couple of hours to figure out that ONLY the following configuration works. It is not covered in any video/tutorial.

This is the settings that MUST be added to all the files:

[xDebug] zend_extension=/usr/lib/php/20160303/
xdebug.remote_autostart = on
xdebug.remote_start = on



The files are :



Change Widnows Password from Ubuntu in dual boot – chntpwd

Follow the following simple steps to change windows password from within ubunut.

1. Install chntpw

  sudo apt-get install chntpw

2. Mount your windows partition (change sda3)

  mkdir win7
  sudo mount /dev/sda3 win7/

3. Apply chntpw to change password. Change directory to win7/Windows/System32/config.
List windows users

  cd win7/Windows/System32/config
  sudo chntpw -l SAM

Change password

   sudo chntpw -u alex SAM

From the options select (1) Clear password and then save file (y). Now restart system and boot to windows with blank password.

Apache2 virtualhost 403 forbidden?

I was faced with this issue. But I didn’t like the idea of changing the group of my home directory to www-data. This problem can simply be solved by modifying the configuration file for the virtualHost. Simply configure the Directory tag to include these

   Order allow,deny
   Allow from all
   Require all granted

In my case I also needed to do this “chmod +x /home/(username)”

yii2 vagrant directory assets is not writable

The vagrant shares the code folder as NFS (Network file share) on the guest machine and therefore you cannot change the permissions of the vagrant or assets directory inside guest machine using local file permissions eg chmod etc.

There are two solutions.
1. Add user www-data (apache is run under this) to vagrant group by using command:

       sudo usermod -a -G vagrant www-data


2. Change apache file /etc/apache2/envvars so that apache runs under user/group vagrant.

     sudo nano /etc/apache2/envvars


Find line

 export APACHE_RUN_USER=www-data 

and change it to:

 export APACHE_RUN_USER=vagrant 

Restart apache2

 sudo service apache2 restart