Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

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]

Sunday, December 6, 2015

eID-Software in 5 steps on Ubuntu 12.04 Lts, 14.04 Lts, 15.04


Card Reader: ACR38 usb:
(But any generic card reader should work)


In Belgium, the eID (Electronic ID card) is widely used to sign-on into many governmental services. (ex. Fedict, Student@work, beConnected, eBirth, myBelgium, TaxonWeb, Horeca@work, MyPension, eBox ...)

Installing an eID card-reader in Linux is not as strait forward as it could be.

I've used the following procedure to install it on Ubuntu 12.04 LTS & 14.04 LTS and on Crouton version of 14.04 LTS of my Chromebook.


I will explain in 5 steps how to get your ACR38 eID card reader working in Linux.
(For Ubuntu 12.04, 14.04 & 15.04, but probably works on other Debian based distro's as well )

Wednesday, November 25, 2015

Unknown username "whoopsie" in message bus configuration file (Crouton)

For some time I had this notification "Unknown username 'whoopsie' in message bus configuration file" coming up when I started my Ubuntu-server on my Chromebook via crouton. It seemed not to do anything wrong but hey, I hate to see error messages popping up on the screen and not knowing what it really means.

In my search I've learned that the user 'whoopsie'  is being used for the error reporting daemon in Ubuntu.

System Description:

Toshiba Chromebook 2:
Intel® Celeron® Processor N2840
Intel® HD Graphics
4GB DDR3 1600MHz 
16GB solid state flash memory (eMMC)
13.3" widescreen FHD TruBrite® LED Backlit Display (1920x1080)
Stereo speakers tuned by Skullcandy
Dual array microphone,HD webcam
Intel® Dual Band Wireless-AC 7260 Plus Bluetooth 4.0
Lithium Polymer (44Wh, 3-Cell) up to 9hrs
HDMI® output port
1-USB (2.0) port,1-USB (3.0) port
SD Card Reader + SanDisk Extreme Pro 64GB (95Mb/sec)


Monday, October 5, 2015

Skype 4.3 on Chromebook & Crouton-Ubuntu 14.04

To install Skype on your chrome book & crouton - Ubuntu 14.04 LTS, you need to make sure you have added the i386 architecture, (yes I know, a shame Skype hasn't been updated to 64 bit Linux systems) and also enabled the canonical partner repositories in your settings. 

Or to make it simple, type the following command-line instructions in a terminal session. 
(CTRL + ALT + T to start a terminal session)
  • sudo dpkg –add-architecture i386
  • sudo apt-get update
  • sudo add-apt-repository “deb http://archive.canonical.com/ $(lsb_release -sc) partner”
  • sudo apt-get update 
  • sudo apt-get install skype 
Enjoy skype with crouton/Ubuntu on your Chrome book.
Tested on Toshiba Chromebook 2 | Development mode, and Crouton/Ubuntu 14.04.03 LTS.

Thursday, March 20, 2014

Dynamically change screen resolution in Virtual Box for Linux host/guests.


If you install a new virtual Ubuntu machine (guest), in a Ubuntu system (host), by default the screen resolution is fixed to either 640x480; 800x600 or 1024x768.

You might want to change that to a system where the guest screen resolution is dynamically adjusted to the size of your window.

To do that you need to change some settings and make sure you have installed the guest additions correctly.


Procedure:

  1. Turn off 3D Acceleration in the VM settings

  2. Open Terminal screen and run these commands:

    sudo apt-get update  
    sudo apt-get upgrade  
    sudo apt-get install dkms  
    sudo apt-get install build-essential
    
    
  3. From the Devices menu, select "install the Guest Additions (Host-D)".
    Normally the auto-run application will start to install the guest additions. If not, a new CDROM will appear on the desktop / file manager. Open the device and (Rightclick) start Autorun.
  4. Restart the virtual machine
  5. Now if you resize the window or choose Full Screen mode, it will resize the desktop screen resolution properly.

Friday, December 13, 2013

Changing Meta Info of video files with ffmpeg (command line)

If you want to add or change the meta information of your video/audio files, you probably can find a GUI driven software that does just that for you. But if you happen to work on your media server in command line, and want to change a file here and there via the command line.

You have some options as:

mencoder, ogmtools, mkvtoolsnix, ffmpeg.

Of all the above, ffmpeg seems to support the largest set of container formats.


Example: 

You have a video file: videofile.mkv
and want to add or change some meta data:

title = "My Title",
comments = "My Comments"


Here is how you do it @ the command line, given you have ffmpeg and the needed codexes installed properly.


ffmpeg -i videofile.mkv -vcodec copy -acodec copy -metadata title="My Title" -metadata comments="My Comments" NewFile.mkv



Other meta tags you can manipulate for audio & video files are:


album        -- name of the set this work belongs to
album_artist -- main creator of the set/album, if different from artist.
                e.g. "Various Artists" for compilation albums.
artist       -- main creator of the work
comment      -- any additional description of the file.
composer     -- who composed the work, if different from artist.
copyright    -- name of copyright holder.
creation_time-- date when the file was created, preferably in ISO 8601.
date         -- date when the work was created, preferably in ISO 8601.
disc         -- number of a subset, e.g. disc in a multi-disc collection.
encoder      -- name/settings of the software/hardware that produced the file.
encoded_by   -- person/group who created the file.
filename     -- original name of the file.
genre        -- <self-evident>.
language     -- main language in which the work is performed, preferably
                in ISO 639-2 format. Multiple languages can be specified by
                separating them with commas.
performer    -- artist who performed the work, if different from artist.
                E.g for "Also sprach Zarathustra", artist would be "Richard
                Strauss" and performer "London Philharmonic Orchestra".
publisher    -- name of the label/publisher.
service_name     -- name of the service in broadcasting (channel name).
service_provider -- name of the service provider in broadcasting.
title        -- name of the work.
track        -- number of this work in the set, can be in form current/total.
variant_bitrate -- the total bitrate of the bitrate variant that the current stream is part of
 
 
 

Sunday, October 13, 2013

Ubuntu 12.04: No sound when headphones are plugged in. (HP Dv7-6190ed)

On my HP Pavilion dv7-6190ed, after every Kernel update, the Audio switch to Headphones seems to stop working. I'm pretty sure the following fix (work-around) works on other laptops too.

  • Open the terminal and enter the following commands:
cd /usr/share/pulseaudio/alsa-mixer/paths/
sudo cp analog-output-headphones.conf analog-output-headphones.bak sudo nano analog-output-headphones.conf
  • Look for the section called [Element Speaker],
    change it so that it looks like this:
Element Speaker]
switch = on
volume = ignore 
  • Save the changes and then reboot.
  • Create a backup of the corrected analog-output-headphones.conf file, so you can simply copy the backup back after each new kernel update rather than repeating the whole procedure. 
cd /usr/share/pulseaudio/alsa-mixer/paths/
sudo cp analog-output-headphones.conf analog-output-headphones.fixed

If this does NOT do the trick, Try adding the following the following:

  • Open the terminal once again, and enter the following commands:
sudo nano /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
  • Comment out the following line as shown:
[Jack_InputDevice]
#required-any = any
  • Save the file and then issue this command to restart pulseaudio:
pulseaudio -k

Conclusion.

So far I've had no issues with this fix, and I have plugged and UN-plugged my headphones – sound switches between the headphones and speaker just fine again. Cheers, and thanks to all the helpful tips on the net that made this write-up possible.


Thursday, April 18, 2013

Splitting PDF-File via Command-Line

To Split a PDF file, or lets say, cut-out some pages, and save them as a new PDF file in Linux, you don't need to install any extra software. Of course you can use a nice GUI driven program to do this, but it is actually not that hard to do in command line. (I like to keep my system clean with the least amount of clutter, so I prefer to use the tools available by default)

If you want to use the command line function for this manually, it is a bit of a pain, so I recommend to create an alias for this PDF splitting/extract function.
You do that by adding the following code in your ~/.bashrc file.


1. open a terminal screen. (Ctrl + T)

2. type:  gedit ~/.bashrc

Monday, September 10, 2012

Remap Keyboard: Assign not working keys to different keys


Laptop keyboards are not always the greatest quality, and after some time it might have a key or few keys not working. When they are vital keys, it really is a game stopper. In my case I had the "BackSpace" and "Enter/Return" keys not working.
"PgUp" and "PgDn" are handy but you can go without them. So I decided to give the "PgUp" key the BackSpace function, and the "PgDn" the Enter/Return function.
Here is How:



First find the Keycode:

In a terminal screen, type xev to find key codes. type "BackSpace", "Return/Enter", "PgUp", "PgDn", and then close the xev function.
You should see following:

Monday, July 30, 2012

Install Gimp 2.8 in Ubuntu 12.04 (Pricise Pangolin)

Gimp 2.8 comes with many updated features. Unfortunately, it hasn't made it in the repo's of Precise (Ubuntu 12.04 Lts) yet. But no worries, it is easy to install by using a third-party ppa. (Note always be careful when adding ppa's, only add trusted ones to prevent malware) This ppa is provided and maintained by "Otto-Kesselgulash"




1. adding the ppa to your sources:

open terminal screen (Ctrl + Alt + T) and type the following:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update

At this stage of the installation, you can either continue in command-line, or open the software center and install the latest version of gimp from there:

2.1. Command line:

sudo apt-get install gimp gimp-plugin-registry 


2.2. Software center:


(make sure to add the add-ons too)


3. Adding one more very powerful plug-in to the installation:
(optional)


sudo apt-get install gimp-resynthesizer


finished!

Wednesday, July 18, 2012

Gaming: Increasing the Brightness for Urban Terror in Ubuntu 12.04

The only game I ever play is Urban Terror, but since Ubuntu 11.04, 11.10 and now 12.04 LTS, even the maximum brightness setting in UT is still very dim on my laptop. So I ended up using a script to start the program with the following settings to increase the brightness.

In the assumption you have installed UT in the ~/Games/UrbanTerror folder, type at the command prompt: (substitute the correct folder if yours is different)
 



gedit ~/Games/UrbanTerror/utstart


copy and paste the following code and save/exit.


#!/bin/bash
xgamma -gamma 2.2
~/Games/UrbanTerror/./ioq3-urt
xgamma -gamma 1


If "-gamma 2.2" is not bright enough for you, you can increase this value.



Adding this script-file to the Menu so you can fire it up from the dashboard:
open main menu editor and add and item in the games section:



In our case the command is: ~/Games/UrbanTerror/./utstart































enjoy the game.





Sunday, July 1, 2012

CUPS Printing: Clear a locked print job from the print Queue

When you are using a CUPS print server on your network, you might find print jobs locked in the queue due to a variety of reasons. (paper jam, power off while printing, network interruptions.....and many others

  • The most obvious way to delete a print job is via the web interface at http://localhost:631, Unfortunately, this might not always work on print jobs that somehow got stuck.
 

Tuesday, June 19, 2012

Ubuntu 12.04 Lts, Suspend / Hybernation / Standby not working

Suspend/standby/hibernation & Resume has always worked on my HP dv7-6190ed, until recent.  After update to kernel 3.2.0-24 or 25 it caused issues where the system would resume to a black lit screen. Ctrl+Alt+F1 console works and you can restart that way but it's pretty much all you can do at this point. (Going back to gdm, with Ctrl+Alt+F7  doesn't work either) 
So using this fix seems to do the trick for now.
(NOTE:  Suspend/Standby/Hybernation & Resume worked flawless with 11.10 on the same laptop!!)


1. Open Terminal session, and create a script:
sudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd

  2. Insert (paste this code):
#!/bin/sh
# File: "/etc/pm/sleep.d/20_custom-ehci_hcd".
TMPLIST=/tmp/ehci-dev-list

case "${1}" in
        hibernate|suspend)

        ;;
        resume|thaw)

     chvt 1
     chvt 7
        ;;
esac

3. Change permissions, (make executable):
sudo chmod 755 /etc/pm/sleep.d/20_custom-ehci_hcd


Hope this does the trick for now.

Merging PDF files via Command line (Build in tools)

Merging several PDF-files into one PDF file; In Linux, you don't have to install any additional software to do this. Everything can be done on the command line with a few simple lines of code. If you however don't like to work on the command line, you might want to install additional software (example: PDF-mod)
To make your life easier, I recommend creating an alias for the PDF merge function. You do that by adding the following code to your .bashrc file in the home folder.

Wednesday, June 13, 2012

Evolution & Ubuntu 12.04 - Google Addressbook issue

Evolution  is not the default  email client in Ubuntu 12.04 Lts,
but you can easily install it via the software centre.
If you Use a google address-book, you might have noticed that at first start the address-book often won't be populated, and throw and error.

Ubuntu 12.04: Disabling touchpad

It seems that most laptops with a hardware button to toggle touch-pad on/off work just fine. However, the soft-touch keys as it is on "HP-dv7-6190ed" seem not to work.

I found this script on the net.
(don't know where, so I repeat the post. thanks to the original coder)

1. You need to have python (pref. 2.7x) installed on your system.
Open "Ubuntu Software Center" and search for "python"
it will be listed as: "interactive high-level object-oriented language ( default version)"


Thursday, June 7, 2012

Ubuntu 12.04: Brightness buttons not working HP dv7-6190ed

In Ubuntu 12.04 the screen brightness up/down seems not to work for  HP dv7-6190ed and a few other models.

A general fix for most of the laptops with this problem: (does not work on all laptops)

Reset Stalled, Non-Responsive Linux system

At times even a Linux box might stall or become non-responsive, not even giving you an option to open a terminal screen. In that case, you can use one of the following 2 options to restart your system.


1. [Riding Shiny Elephants Is Not Utterly Boring]-Method.

Alt-key + PrtSc-key + r
Alt-key + PrtSc-key + s
Alt-key + PrtSc-key + e

Monday, April 30, 2012

Ubuntu 11.10 / 12.04 & Realtek network card RTL8111/RTL8168B driver installation

My HP Pavilion dv7-6190ed uses a Realtek Lan adapter (RTL8111/RTL8168B PCI Express Gigabit), known to cause trouble with Ubuntu 11.10 & 12.04  (automatically installs RTL8169 drivers)
The default RTL8169 driver seems to work at first, but keeps loosing connection, and has high packet losses. *Not very useful.

Solution:
Install the correct driver (from the manufacturer)