Dienstag, 14. Mai 2013

Switch speaker left/right (Lautsprecher links/rechts vertauschen) on Ubuntu

So you have changed the order of your speakers and recognize, left and right speakers are switched? No problem!

open a terminal (Strg+Alt+t) and type in:

sudo gedit /etc/pulse/default.pa

Now, add the following lines to the bottom of the file:

load-module module-remap-sink sink_name=reverse-stereo master=0 channels=2 master_channel_map=front-right,front-left channel_map=front-left,front-right
set-default-sink reverse-stereo

save and restart pulse:

pulseaudio --kill
pulseaudio --start

thats it! :-)


---

Du hast deine Lautsprecher neu angeordnet und links mit rechts vertauscht? Kein Problem! Öffne das Terminal (Strg+Alt+t) und gib folgendes ein:

sudo gedit /etc/pulse/default.pa

Füge in der letzten Zeile nachfolgenden Eintrag hinzu:


load-module module-remap-sink sink_name=reverse-stereo master=0 channels=2 master_channel_map=front-right,front-left channel_map=front-left,front-right
set-default-sink reverse-stereo

Speichere und starte pulse neu:

pulseaudio --kill
pulseaudio --start

Das wars! :-)

Freitag, 3. Mai 2013

Print black/white (monochrome) with Canon under Ubuntu

Hey guys,

if you want to print monochrome with your Canon printer (in my case the mp495), you can do the following:

  1. Open Printer
  2. Select your printer, right click and choose properties
  3. Go to job options
  4. On the bottom there is a field where you type in "CNGrayscale" and hit add.
  5. Now type behind your new entry CNGrayscale "TRUE" and click on apply.
That's it. If you want to print in color again, just change this entry to FALSE.

Donnerstag, 2. Mai 2013

Install Ubuntu 13.04 raring on 2 drives with LVM

Hey guys,

if you want to install the new release of Ubuntu (13.04) on 2 drives you can do this with the following step by step manual. My notebook is a Sony Vaio vpcz1 and therefore your first steps may differ from mine!



0. (vpcz1) Prepare the disks:
  • Open up the BIOS on boot (by pressing F2). Go to the options where you can show the raid system on booting (it is under the Intel raid option) and enable that (while you're at it, make sure you boot from external device!)
  • Press F10 to save and exit the BIOS
  • Now you should see after the vaio splashscreen the information about your disks. Press Strg+I to enter the raid setup menu
  • In the raid setup you choose option 3 and reset all your discs by selecting them with space and lastly pressing enter (for German keyboard layouts: if you want to confirm the questions with y you have to press z!)
  • Exit and reboot

1. Setting up the LVM
  • Boot into the Ubuntu live Desktop
  • Open a terminal on the live Desktop and check your drives by typing in
    sudo fdisk -l
    and note your drives (in my case it is sdb and sdc)
  • ---begin---
  • Now we have to create partitions of the type "Linux LVM"
    sudo fdisk /dev/sdb
  •  Delete all Partitions "d", make a new one "n", choose primary partition "p", number of partition "1" and cylinders first/last default (press ENTER each time), then press "t" for change a partition's system id and type in the HEX-code "8e" and write the table to disk and exit via "w".
  • ---repeat (exactly!) from ---begin--- for all your drives---
  • It is time to create the physical volumes (change it to your names)
    sudo pvcreate /dev/sdb1
    sudo pvcreate /dev/sdc1
  •  Create the Volumegroup (change VOLUMEGROUPNAME as you like)
    sudo vgcreate VOLUMEGROUPNAME /dev/sdb1 /dev/sdc1
  • (optional) If you missed one you can add it later with the command
    sudo vgextend VOLUMEGROUPNAME /dev/sdX1
  • Type in the next command to get a logical volume (with the name you like)
    sudo lvcreate -l 100%FREE -n LOGICALVOLUMENAME VOLUMEGROUPNAME
  • (optional) If you want to create volumes with a specific size, use the following command:
    sudo lvcreate -L 3G -n LOGICALVOLUMENAME
    VOLUMEGROUPNAME
  • Lastly check your drive with
    sudo lvdisplay
  • If you ever have to resize a Partition:
    sudo lvreduce -L -5G /dev/mapper/VOLUMEGROUPNAME-LOGICALVOLUMENAME
    (I reduced the size of my created LVM and added with lvcreate a Swap partition)

2. Install Ubuntu
  • Proceed as usual and choose "other options"
  • Select your newly created partition and change it to ext4 and mountingpoint "/"
  • The Bootloader (GRUB) goes to /dev/sdb
  • Continue
3. Fix GRUB (chroot-methode)
  • Ok, as usually my GRUB didn't work correct, so boot once again into the live desktop
  • Type in a terminal the following commands:
    sudo mount /dev/mapper/VOLUMEGROUPNAME-LOGICALVOLUMENAME /mnt
    sudo mount -o bind /dev /mnt/dev

    sudo mount -o bind /sys /mnt/sys

    sudo mount -t proc /proc /mnt/proc

    sudo cp /proc/mounts /mnt/etc/mtab

    sudo chroot /mnt /bin/bash
  • You are now on your Ubuntu system. To repair GRUB proceed with (without sudo):
    grub-install /dev/sdb

    grub-install /dev/sdc

    update-grub
  • Exit with Strg+D and your system should boot normally :-)

Good Luck!