Thursday, August 18, 2016

Ubuntu 16.04.01LTS: Screenshot shortcut "prt sc" not working on my HP pavilion dv7

After upgrading to Ubuntu 16.04 LTS I've noticed that the normal screenshots shortcuts didn't work anymore. 

Normally: 
  • (prt sc) Print Screen Take a screenshot 
  • Alt + Print Screen Take a screenshot of Window
  • Shift + Print Screen Take a screenshot of an area of screen. Use crosshair to drag and select an area.

However, it seems that I can do:

  • fn + delete to take a screenshot
  • fn + alt + delete to take a screenshot of the active Window
  • fn + shift + delete to take a screenshot of a screen area. 

there might be an elegant solution to this problem, but hey, this works for me just fine, and maybe also for you. 


Monday, May 23, 2016

UEFI - Windows Product Key retrieval in Lunux

Trying to install a fresh copy of windows 8.1 or newer? or Install a copy as a virtual machine in your linux? 

On newer (win 8.1 + ) versions you won't find a sticker with the product key to install a fresh copy of windows on your machine. So you either have to retrieve it beforehand from your firmware using windows tools, or gather it after installing Linux on the drive. 

You have paid for this license and the Product key is in your UEFI firmware. You can retrieve this and write it into a text-file by typing the following command in a terminal screen.



sudo hexdump -s 56 -e ' "MSDM key: " /29 "%s\n" ' /sys/firmware/acpi/tables/MSDM > /home/[username]/filename.txt



Note
Usually your copy of windows is pre-installed on your original hardware, in case of disk-failure or disk-swap, you might need to download a fresh copy (.iso-file) from Microsoft. (this will only work if you download the correct version = same as your original version. otherwise your product key will not work) 


URL redirect/rewrite using the .htaccess file on Linux Servers. (redirect non-www-address to the www-address)



By default your website can be accessed with both www.example.com and example.com. Allowing both can confuse search engines, in fact, Google penalizes this (duplicated content).
You should restrict the access to either www.example.com or example.com. Some search engines may have already indexed your website under both addresses.

If you run your web-site on a Linux server, you can force this restricted behavior simply by adding the following code to your ".htaccess" file in the public_html folder of your web-ste.




Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]