How to install intel drivers on Fedora 24


So Fedora 24 came out recently and just like me you ran and did yourself a fresh install. Now you want those video drivers and Intel Graphics installer tells you that your distribution is not supported.

To fix all we need to do is fool the installer into believing that we are still on fedora 23.

If you don’t already have it installed

for 64 bit


for 32 bit


then install with

sudo dnf install ./intel-linux-graphics-installer-1.4.0-23.intel20161.x86_64.rpm


Now to edit the file that tells the installer which version we are running

edit /etc/fedora-release with either nano or vim

vim /etc/fedora-release

and change

Fedora release 24 (Twenty Four)


Fedora release 23 (Twenty Three)


now we can run the installer with

sudo intel-linux-graphics-installer

it should detect Fedora 23. install the necessary files and ask to restart.

Restart, and on the next boot change your /fedora-release file back to the original

Fedora release 24 (Twenty Four)


Works for me. Enjoy!

How to fix .local dns resolution on Fedora 23

Most likely in your nsswitch file you have a line like

hosts:      files mdns4_minimal [NOTFOUND=return] dns myhostname mymachines

The default settings instructs the pc to resolve all .local addresses with multicast dns instead of normal dns.. which is not always what we want, plus if no result is found the NOTFOUND part just gives up. To fix we can just remove those parts. In my case I just use

hosts:      files dns myhostname mymachines

UPDATE (June 7th 2016)
Instead of removing the mdns part completely we can just move ‘dns’ to be before it. For example:

hosts:      files dns mdns4_minimal [NOTFOUND=return] myhostname mymachines

Restart your machine and your addresses should resolve properly

How to fix large chrome address bar and tabs in linux

Close ALL instances of chrome

In the terminal type

google-chrome --high-dpi-support=1 --force-device-scale-factor=1

you can add those flags in the necessary palaces to keep the change.

In my case, Xubuntu 16.04, i opened the Menu Editor, found chrome and changed the command from

/usr/bin/google-chrome-stable %U


/usr/bin/google-chrome-stable --high-dpi-support=1 --force-device-scale-factor=1 %U


How to run a command at startup in Linux

There are two main ways to do this

  1. Put commands or program in the rc.local file
nano /etc/rc.local

or 2. Use the special crontab @reboot

so, access crontab with

crontab -e

and add your command following the layout below

@reboot command



How to create a python virtual environment in Linux

Install pip

sudo apt-get install python3-pip
# replace apt-get with dnf or zypper or whatever your distro uses

Install the python virtualenv package

pip3 install virtualenv

Make your main virtualenv directory

mkdir ~/.virtualenvs

Create the Virtual Environment

virtualenv --python=`which python3` ~/.virtualenvs/myvenv

Activate the virtual Environment with

source ~/.virtualenvs/myvenv/bin/activate


How to fix no public key available for the following key IDs in debian

On new debian servers, upon attempting to apt-get update you may see the following error

[email protected]:~# apt-get update
Get:1 wheezy/updates Release.gpg [1571 B]
Get:2 wheezy/updates Release [102 kB]
Get:3 wheezy Release.gpg [2390 B]
Reading package lists... Done
W: There is no public key available for the following key IDs:
W: There is no public key available for the following key IDs:

The easiest way i’ve found to solve this problem is to do the following.

apt-get install debian-keyring debian-archive-keyring

Try to update again

apt-get update

And voilia! No more errors

How To Install Linux, Nginx, MySQL & PHP (LEMP) on Debian 8

As always we start off with

apt-get update
apt-get upgrade

Install MySQL Server

apt-get install mysql-server

You will be prompted to input a password, put anything “secure”

Now let’s secure our database.


This will ask you a few questions

– Enter “secure” password set previously
– Change Password : n
– Remove Anonymous Users : Y
– Disallow root login remotely : Y
– Remove test database : Y
– Reload privilege tables : Y


Install and Configure PHP (+optional modules)

Install php and a few important modules with the following command

apt-get install php5-fpm php5-mysqlnd php5-mcrypt

Now in /etc/php5/fpm/php.ini change the following lines (you need to search for each one)

upload_max_filesize = 2M
post_max_size = 8M


upload_max_filesize = 12M
post_max_size = 16M

Install and Configure NGINX

apt-get install nginx

Nginx is now installed and if you go to your IP address you should see the welcome page

To configure nginx to work with php, edit /etc/nginx/sites-availiable/default with the following changes. (lines with edits are highlighted)

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # SSL configuration
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        # include snippets/snakeoil.conf;

        root /var/www/html;

        # Add index.php to the list if you are using PHP
        index index.php index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;

        # pass the PHP scripts to FastCGI server listening on
        location ~ \.php$ {
        #       include snippets/fastcgi-php.conf;
        #       # With php5-cgi alone:
        #       fastcgi_pass;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        location ~ /\.ht {
                deny all;

Lets not forget to restart nginx

service nginx restart


Finishing off

Create a test page and try it out at http://my.ip.address/info.php

echo "<?php phpinfo(); ?>" > /var/www/html/info.php