tisdag 22 juni 2010

Set UTF8 as default in MySQL

Hi! If you want mysql to use utf8 as default when you create databases and tabels, add the following text to /etc/mysql/my.cnf

[mysqld]
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'

[client]
default-character-set=utf8

Found the solution at http://notes.timeghost.net/2008/10/utf-8-and-mycnf.html

måndag 31 maj 2010

Cannot find demux plugin for MRL dvbpipe.m2t

Solved this by uninstalling Kaffeine through the GUI and then installed it by following the instructions at: https://help.ubuntu.com/community/Kaffeine. No more "Cannot find demux plugin for MRL dvbpipe.m2t" after this :)
_____________________

I did uninstall Kaffeine through the GUI, but I do not think there is any difference between uninstalling through terminal. Here is a solution with the terminal only.

sudo apt-get remove kaffeine

sudo apt-get update && sudo apt-get upgrade

sudo apt-get install kaffeine libxine1 libxine1-all-plugins phonon-backend-xine


This solution is tested on Ubuntu Lucid (10.04) 64bit. But should work on 32bit and Ubuntu Karmic (9.10). As you may see the key in the solution is installing the extra packages "libxine1 libxine1-all-plugins phonon-backend-xine". Of course all needed packages should be installed when installing Kaffeine, but for some reason it does not.

söndag 30 maj 2010

Manipulate date in EXIF

Hi! My camera had the wrong date set. I noticed this first when I imported all my pictures in a program (Fspot) that sorts based on date in EXIF. The solution was to use exiv2 to correct the date, or at least the year.

The following commands helped a lot:

Take all pictures in subfolders and subtract 22years from exif date.
find . -type f -name \* -exec exiv2 -Y -22 ad {} \;

Take all pictures in current folder that start with IMG_ and add 22years (I had to correct some pictures which I had subtracted 22years from twice).
exiv2 -Y +22 ad IMG_*

_______________________

I have noticed that FSpot do support manipulation of EXIF date also! So all this can probably be done in FSpot.

lördag 22 maj 2010

Acer recovery problem 0xa0000001

Hi! My friend couldn't use recovery on his Acer. He got the 0xa0000001 error when trying. After much searching we found an solution. I was little skeptic about it, but it did work!
First of, backup all important data! You might loose it all otherwise. Note that we did delete the special partition with Asus mini OS. Maybe it's not necessary, but my friend did not use it anyway.

Solution (as we did it):
Delete all partitions except the first, pqservice. Create a primary partition for windows, after that a partition which is 10gb ntfs. Then create a extended partition with one partition for linux and one for linux-swap. You get the following partition structure: PQService|NTFS|NTFS|Extended{ext4|swap}

Install linux (I installed ubuntu 10.04) on the ext4. Use the "swap" as swap. This installs grub which can load acer recovery (at least it could for me).

Boot ubuntu or the distro you have installed. Copy PQService to the 10gb large NTFS partition. Open a terminal and use following command:
dd if=/dev/sda1 of=/dev/sda3 (this is specific for hardware setup, sda might be wrong for you).

Restart and start recovery. Start the first one at the harddrive, not the copy (did not show up for me). I thought it was something wrong as I create a copy of a partition but don't use it. However it did work.

Found solution at: http://forum.notebookreview.com/acer/137664-help-recovery-issue-my-new-aspire-5920g-2.html

fredag 21 maj 2010

Stopping multiple soundcards from switching

I recently got a problem with my X-fi soundcard switching identification number with my ATI HDMI. I use 2:0 in my configuration. But this do not work always as the id is "randomly" assigned.

Solution:
cat /proc/asound/modules
sudo gedit /etc/modprobe.d/alsa-base

At the bottom add the following lines:
options snd_hda_intel index=0
options cx88_alsa index=1
options snd_ctxfi index=2

Where the names (snd_hda_intel...) is those you did get from the first command (cat...) It is not necessarily three as in my case.

Here is the original solution: http://ubuntuforums.org/showthread.php?t=205449

söndag 9 maj 2010

Can't click at flash applications in Ubuntu?

This might by your solution! http://helpforlinux.blogspot.com/2009/11/i-cannot-click-on-flash-in-ubuntu.html

Note that it stands "i386", my first thought was that it's wrong for me as I am running x86_64. However it did work for me anyway.

Install Samsung scx-5x30 on Ubuntu 10.04

Hi. Samsung provides a .ppd file. But when you try to use this a error occures. You must install "rastertosamsungspl" is written. To do this you must copy a file from the downloaded driver.

sudo cp ./cdroot/Linux/x86_64/at_root/usr/lib64/cups/filter/rastertosamsungspl /usr/lib/cups/filter/

I found the solution here: http://ubuntuforums.org/showthread.php?p=8926494