ericmauser.de - Notes about Linux/UNIX, Cross-Compiling and more Hardware Linux Guides Impressum
INFO: This website is autogenerated.
Since I'm tired of wasting my time on maintaining a website, I just started to parse my personal note-textfile. Please use the search function of your webbrowser (e.g ctrl+f) to navigate. If you wish to view or to download the original file, follow this link.

Hardware

raspberry pi

Notes

About: http://de.wikipedia.org/wiki/Raspberry_Pi CPU: Broadcom BCM 2835 700Mhz ARM1176JZF-S RAM: 256 MB

Sources & Links

https://github.com/raspberrypi/firmware (firmware + libraries) https://github.com/raspberrypi/linux (kernel) https://github.com/raspberrypi/tools (tools, e.g imagetool-uncompressed.py) http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3-armv6j_hardfp (stage tarball)

Partitioning

mmcblk0p1:
type: vfat	
flags: boot
mmcblk0p2
type: ext4
flags: -

Boot

- bootcode.bin - loader.bin - start.elf - cmdline.txt:
root=/dev/mmcblk0p2 rootdelay=3

CFLAGS

CFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CXXFLAGS="${CFLAGS}"

Toolchain

crossdev -S armv6j-hardfloat-linux-gnueabi

Kernel

make ARCH=arm bcmrpi_cutdown_defconfig 
make ARCH=arm CROSS_COMPILE=/usr/bin/armv6j-hardfloat-linux-gnueabi- oldconfig
make ARCH=arm CROSS_COMPILE=/usr/bin/armv6j-hardfloat-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=/usr/bin/armv6j-hardfloat-linux-gnueabi- -j5
make ARCH=arm CROSS_COMPILE=/usr/bin/armv6j-hardfloat-linux-gnueabi- INSTALL_MOD_PATH=/path/to/rootfs modules_install
imagetool-uncompressed.py /path/to/kernel/arch/arm/boot/image 
cp kernel.img /boot

pandaboard

About

Processor: Cortex-A9 DualCore Processor @1Ghz. Layout: OMAP4430-SoC RAM: 1GB wikipedia: https://de.wikipedia.org/wiki/PandaBoard

Links

http://elinux.org/PandaBoard (elinux) http://dev.gentoo.org/~armin76/arm/pandaboard/install.xml (gentoo guide)

Toolchain

crossdev -S armv7a-hardfloat-linux-gnueabi

UBoot

wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 
tar xjpf u-boot-latest.tar.bz2 && cd u-boot-*
make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- omap4_panda_config
make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-

Kernel

make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- omap2plus_defconfig
make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- uImage

Partitioning

mmcblk0p1:
type: vfat
flags: boot

mmcblk0p2:
type: ext4
flags: -

Flashing

cp u-boot-*/MLO /mnt/mmcblk0p1
cp u-boot-*/u-boot.img /mnt/mmcblk0p1
cp kernel/arch/arm/boot/uImage /mnt/mmcblk0p1

odroid-x

About

Processor Samsung Exynos4412 Cortex-A9 Quad Core 1.4Ghz with 1MB L2 cache Memory 1024MB LP-DDR2 3D Accelerator Mali-400 Quad Core LAN 10/100Mbps Ethernet

Links

http://dev.odroid.com/projects/linux (Kernel) http://dev.odroid.com/projects/opengles-linux (OpenGL ES) http://dev.odroid.com/projects/4412boot (Boot Sequence) http://dev.odroid.com/projects/uboot (uboot)

Kernel

source: git clone https://github.com/hardkernel/linux.git export: ARCH,CROSS_COMPILE,INSTALL_MOD_PATH
make odroidx_ubuntu_defconfig
make zImage modules modules_install

Uboot

source: git clone https://github.com/hardkernel/u-boot.git export: ARCH,CROSS_COMPILE,INSTALL_MOD_PATH
make distclean 
make smdk4412_config
make

Bootscript

mkimage -A arm -T script -C none -n "Boot.scr for odroid-x" -d boot.txt boot.scr

Flashing

http://dev.odroid.com/projects/4412boot/wiki/FrontPage?action=download&value=boot.tar.gz 

Serial Console

T0:23:respawn:/sbin/getty -L ttySAC0 115200 vt100

nokia n900

About

Processor: TI Omap3 ARMv7 Processor rev 3 (v7l) 500 Mhz Hardware: Nokia RX-51 board Board Layout: omap3 Default Kernel: 2.6.28.10

Sources

http://tablets-dev.nokia.com/maemo-dev-env-downloads.php (flasher) http://tablets-dev.nokia.com/nokia_N900.php (firmware)

Flashing

the emmc image:
/path/to/flasher -F <emmc-image>.bin -f
hold down the "u" key on the phone, and connect it to the PC the firmware image
/path/to/flasher -F <firmware-image>.bin -f -R
hold down the "u" key on your phone, and connect it to your PC

extra-repository (maemo)

create a new entry:
catalog name: extras
web address: http://repository.maemo.org/extras 
distribution: (empty)
components: free non-free

Root

package: gainroot repository: extra

Tethering

package: mobile-hotspot repository: extra

eCafe

About

Processor: ARMv7 800 Mhz Hardware: Hercules MX51 eCAFE Board: IMX51 Resolution: 1024x600 Graphic: IMX51 Backlight: 255 Steps Storage: - 8 GB iNAND (eMMC) - 1 internal MMC Card Slot - 1 external MMC Card Slot

Sources

http://package.ecafe.hercules.com/Sources/ (toolchain/kernel[v4C]/documentation) http://ecafe.hercules.com/us/download-and-services/ (system restore image)

Kernel

1. build
export ARCH=arm 
export CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-mulitlib-1.0/arm-fsl-Linux-gnueeabi/bin//arm-fsl-Linux-gnueabi-
export INSTALL_MOD_PATH=./
make ecafe_defconfig
make uImage
make modules
make modules_install
2. NAND Install:
dd if=uImage of=/dev/mmcblk0 bs=1M seek=1

Linux

http://distfiles.gentoo.org/releases/arm/autobuilds/ (Gentoo) http://archlinuxarm.org/os/omap/ (Archlinux) ... see debian debootstrap-cross (Debian)

WiFi

copy /etc/Wireless folder from the ubuntu-tarball to rootfs

Udev

udev patch because hercules only delivers an outdated kernel: https://github.com/archlinuxarm/PKGBUILDs/blob/01d2c127d2501088cf4f1b971392e6561e2ab11f/core/udev-oxnas/pre-accept4-kernel.patch

mplayer

mplayer -vo sdl -autosync 30 -framedrop -cache 8192

Video acceleration (on archlinux)

pacman -S xf86-video-imx
chmod 777 /dev/gsl_kmod
http://packages.efikamx.info/pool/main/i/imx-graphics/libkgsl-imx_1.0.3-20110310_armel.deb (libraries) -> unpack and move libkgsl.so.1.0 to /usr/lib create symlinks:
cd /usr/lib
ln -s libkgsl.so.1.0 libkgsl.so.1
ln -s libkgsl.so.1.0 libkgsl.so

carambola

Toolchain

source: git clone https://github.com/8devices/carambola carambola
./scripts/feeds update -a
./scripts/feeds install -a
make kernel_menuconfig
make menuconfig
make

patching Kernel's VLAN Settings

//Note to myself: Is this still needed? source: http://8devices.com/community/viewtopic.php?f=6&t=42 /build_dir/linux-ramips_rt305x/linux-2.6.39.4/arch/mips/ralink/rt305x/mach-carambola.c: replace:
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
with:
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
result:
=> eth0: WAN Port 
=> eth1: LAN Port

flashing

package: atftp config:
TFTPD_ROOT="/home/eric/share"
TFTPD_OPTS="--daemon --user nobody --group nobody"
Connect serial cable to carambola. this message appears, press "2":
Please choose the operation: 
  1: Load system code to SDRAM via TFTP. 
  2: Load system code then write to Flash via TFTP. 
  3: Boot system code via Flash (default).
  4: Entr boot command line interface.
  9: Load Boot Loader code then write to Flash via TFTP.

cubox-i4 pro

prepare

build the toolchain:
crossdev -S armv7a-hardfloat-linux-gnueabi
sdcard: make sure the first partition has an offset of 1MB otherwise the bootloader will destroy your first partition.
cfdisk /dev/mmcblk0
mkfs.ext4 /dev/mmcblk0p1
#mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 /dev/sdX1

gentoo

source: http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3-armv7a_hardfp/
tar xfjp stage3-armv7a_hardfp-*.tar.bz2 -C /mnt/mmcblk0p1
openssl passwd -1
# add the hash to your /mnt/mmcblk0p1/etc/shadow

inittab (serial login)

s0:12345:respawn:/sbin/agetty -L 115200 ttymxc0 vt100

u-boot

git clone https://github.com/SolidRun/u-boot-imx6.git
cd u-boot-imx6
export ARCH=arm
export CROSS_COMPILE=/usr/bin/armv7a-hardfloat-linux-gnueabi-
make mx6_cubox-i_config
make
files:
SPL
u-boot.img
uEnv.txt:
bootfile=/boot/uImage
mmcargs=setenv bootargs root=/dev/mmcblk0p1 rootwait video=mxcfb0:dev=hdmi consoleblank=0 console=ttymxc0,115200
install:
dd if=SPL of=/dev/mmcblk0 bs=1K seek=1
dd if=u-boot.img of=/dev/mmcblk0 bs=1K seek=42
cp uEnv.txt /mnt/mmcblk0p1

kernel

export ARCH=arm
export CROSS_COMPILE=/usr/bin/armv7a-hardfloat-linux-gnueabi-
git clone https://github.com/SolidRun/linux-imx6.git
cd linux-imx6
make imx6_cubox-i_hummingboard_defconfig
make uImage
make modules
install:
INSTALL_MOD_PATH=/mnt/mmcblk0p1 make modules_install
mkdir /mnt/mmcblk0p1/boot
cp arch/arm/boot/uImage /mnt/mmcblk0p1/boot

Linux

Scroll in GNU/Screen in gnome-terminals

into ~/.screenrc:
# enable scrolling
termcapinfo xterm ti@:te@
# bind page up/down
bindkey -m "^[[5;2~" stuff ^b
bindkey -m "^[[6;2~" stuff ^f 

KDE enable samba for dolphin

In most cases, dolphin tries to download files from samba shares, instead of streaming them / giving the path to the application (vlc, mplayer). To tell KDE to open the files directly, put the following in the applicaions dir:
cp /usr/share/applications/mplayer.desktop /home/$USER/.local/share/applications
add the following to /home/$USER/.local/share/applications/mplayer.desktop:
X-KDE-Protocols=http,ftp,smb
works with mplayer and vlc and maybe some others too.

Add the same timestamp to all files

timestamp could be 201403270000
find . | xargs touch -h -t $timestamp

Resize DD-Image to max-size

bzcat image-file.img > /dev/mmcblk0
sync
eject sdcard, insert sdcard to make sure every partition gets reloaded
fdisk /dev/mmcblk0
p
d
2
n
p
2
<return>
<return>
w
q
sync
eject sdcard, insert sdcard to make sure every partition gets reloaded
resize2fs /dev/sdb2
sync

List all modules needed by lspci

this prints all modules which are known drivers for lspci detected hardware:
LC_ALL=c lspci -mvk | grep ^Driver | awk '{print $2}' | uniq

Basic pipe-knowledge

as the "<" looks often confusing for some people:
vim - < filename
the same as:
cat filename | vim -

sed basics

replace

sed 's/alt/neu/g' filename > changed_file
sed -i 's/alt/neu/g' filename

delete

sed -i '/this will be deleted/d' filename

disable kernel sysrq calls in userland

sysctl -w kernel.sysrq = 0

GTK Scrollbars

get ubuntu-like scrollbars (so called overlay-scrollbars): source: https://launchpad.net/ayatana-scrollbar gentoo: http://gpo.zugaina.org/x11-misc/overlay-scrollbar/
layman -Sa stuff
emerge -av overlay-scrollbar

Gnome3 on Gentoo

packages: layman [git] gnome3 is still "keyworded" in gentoo [06/2013], the easiest way to install, is to use the gnome-overlay:
  layman -Sa gnome
  ln -s /var/lib/layman/gnome/status/portage-configs/package.use.gnome3 /etc/portage/package.use/gnome3.use
  ln -s /var/lib/layman/gnome/status/portage-configs/package.use.mask.gnome3 /etc/portage/package.use/mask-gnome3.use
  ln -s /var/lib/layman/gnome/status/portage-configs/package.keywords.gnome3 /etc/portage/package.keywords/gnome3.keywords
  ln -s  /var/lib/layman/gnome/status/portage-configs/package.unmask.gnome3 /etc/portage/package.unmask/gnome3.unmask
  eselect profile set 4
  emerge -avuND world gnome

Gnome3 Gsettings

show settings:
gsettings list-recursively org.gnome.desktop.media-handling 
deactivate automount:
gsettings set org.gnome.desktop.media-handling automount 'false'
gsettings set org.gnome.desktop.media-handling automount-open 'false' 
resize with rigth click:
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true
disable overlay (dashboard) key "Super_L":
gsettings set org.cinnamon.muffin overlay-key ''
desktop font:
gsettings set org.nemo.desktop font 'Sans 8'
keyboard shortcuts:
gsettings set org.gnome.desktop.wm.keybindings minimize "['<Alt>s']"
gsettings set org.gnome.desktop.wm.keybindings close "['<Alt>c']"
gsettings set org.gnome.desktop.wm.keybindings toggle-maximized "['<Alt>v']"
gsettings set org.gnome.desktop.wm.keybindings toggle-fullscreen "['<Alt>f']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Shift><Alt>Left']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "['<Shift><Alt>Right']"
gsettings set org.gnome.settings-daemon.plugins.media-keys screensaver '<Super>l'
gsettings set org.gnome.settings-daemon.plugins.media-keys terminal '<Super>1'
gsettings set org.gnome.settings-daemon.plugins.media-keys www '<Super>2'
gsettings set org.gnome.settings-daemon.plugins.media-keys home '<Super>3'

Gnome Terminal Internal Padding

add the following to ~/.config/gtk-3.0/gtk.css
 TerminalScreen {
   -VteTerminal-inner-border: 10px 10px 10px 10px;
 }

Cinnamon Gsettings

since version 2.0+ cinnamon is using its own config strings, the gnome settings from above will not work anymore show settings:
gsettings list-recursively org.cinnamon.desktop.media-handling
deactivate automount:
gsettings set org.cinnamon.desktop.media-handling automount 'false'
gsettings set org.cinnamon.desktop.media-handling automount-open 'false' 
resize with rigth click:
gsettings set org.cinnamon.desktop.wm.preferences resize-with-right-button true
disable overlay (dashboard) key "Super_L":
gsettings set org.cinnamon.muffin overlay-key ''
desktop font:
gsettings set org.nemo.desktop font 'Sans 8'
keyboard shortcuts:
gsettings set org.cinnamon.muffin.keybindings minimize "['<Alt>s']"
gsettings set org.cinnamon.muffin.keybindings close "['<Alt>c']"
gsettings set org.cinnamon.muffin.keybindings toggle-maximized "['<Alt>v']"
gsettings set org.cinnamon.muffin.keybindings toggle-fullscreen "['<Alt>f']"
gsettings set org.cinnamon.muffin.keybindings move-to-workspace-left "['<Shift><Alt>Left']"
gsettings set org.cinnamon.muffin.keybindings move-to-workspace-right "['<Shift><Alt>Right']"
gsettings set org.cinnamon.settings-daemon.plugins.media-keys screensaver '<Super>l'
gsettings set org.cinnamon.settings-daemon.plugins.media-keys terminal '<Super>1'
gsettings set org.cinnamon.settings-daemon.plugins.media-keys www '<Super>2'
gsettings set org.cinnamon.settings-daemon.plugins.media-keys home '<Super>3'

Cinnamon Systray Icon Size

the tray icon size is defined in: /usr/share/cinnamon/applets/systray@cinnamon.org/applet.js

Xdefaults

colored manpages:
*colorIT:      #BEC040
*colorBD:      #728CA6
*colorUL:      #73C040

Screen

shelltitle "$ |terminal"
msgwait 2
vbell off
altscreen on
term screen-256color

bindkey "^[Od" prev  # change window with ctrl-left
bindkey "^[Oc" next  # change window with ctrl-right
hardstatus alwayslastline "%{= w}%-w%{= bw} %n %t %{-}%+w %-=%{b}%c:%s"

zsh youtube

1. installation package: youtube-dl (git), mplayer 2. zshrc
youtube() {
  mplayer -cache 2048 `youtube-dl "$1" -g` 2>&1
}

mplayer-webcam

package: mplayer use flag: v4l2 record:
mencoder -tv driver=v4l2:fps=25:height=600:width=800 -ovc raw -vf scale=800:600 -o $1 tv:// -nosound
view:
mplayer tv:// -tv driver=v4l2:width=800:height=600:device=/dev/video0

minidlna

package: minidlna /etc/conf.d/minidlna:
# /etc/conf.d/minidlna 
# Should minidlna rescan the entire collection on startup?
# Warning: This may take a long time!
RESCAN="false"
# The location of the config file
#CONFIG="/etc/minidlna.conf"
# Specify the user/group minidlna should run as
M_USER="eric"
M_GROUP="users"
/etc/minidlna.conf:
port=8200
#network_interface=eth0
#   + "A" for audio  (eg. media_dir=A,/home/jmaggard/Music)
#   + "V" for video  (eg. media_dir=V,/home/jmaggard/Videos)
#   + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
media_dir=/mnt/storage/public/
friendly_name=calypso
db_dir=/home/eric/minidlna/
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg
inotify=yes
enable_tivo=no
strict_dlna=no
notify_interval=900
serial=12345678
model_number=1

manual linux router-setup

hostap-daemon

package: hostapd /etc/hostapd/hostapd.conf:
interface=wlan0
driver=nl80211
ssid=YOUR_ESSID_GOES_HERE
channel=YOUR_CHANNEL
wpa_passphrase=YOURPASSWORD
ignore_broadcast_ssid=0
country_code=DE
ieee80211d=1
hw_mode=g
ieee80211n=1
beacon_int=100
dtim_period=2
macaddr_acl=0
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
auth_algs=3
wmm_enabled=1
wpa=2
rsn_preauth=1
rsn_preauth_interfaces=wlan0
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_group_rekey=600
wpa_ptk_rekey=600
wpa_gmk_rekey=86400

DHCP-Server

package: dnsmasq /etc/dnsmasq.conf:
# DHCP-Server aktiv für Interface
interface=wlan0
# DHCP-Server nicht aktiv für Interface
no-dhcp-interface=eth0
# IP-Adressbereich / Lease-Time
dhcp-range=interface:wlan0,10.4.4.2,10.4.4.200,infinite
# static ips
#dhcp-host=<MAC-Adresse>,<Name>,<IP-Adresse>,infinite
#dhcp-host=f1:f1:f1:f1:f1:f1,,10.4.4.2,infinite

Routing

package: iptables NAT eth0 through wlan0:
iptables -F
iptables -t nat -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=1
sysctl -p

debian

debootstrap (cross)

creating rootfs-tarball for foreign architecture:
debootstrap --foreign --no-check-gpg --arch=armhf testing /debian-armhf http://ftp.debian.org/debian/ 
... boot ...
/debootstrap/debootstrap --second-stage

debootstrap (native)

creating rootfs-tarball for native architecture:
debootstrap --no-check-gpg testing /debian http://ftp.debian.org/debian/ 

apt-get source

build packages out of deb-src repositories:
apt-get source <package>
cd <package>/
vim <stuff>
apt-get -b source <package>
dpkg -i <package>

color-changing urxvt

instant color switching in rxvt-unicode: change cursor color (blue):
printf '\33]12;12\007'

change background color (dark-grey):
printf '\33]11;%s\007' "#333333"

auto-change

.zshrc:
appearance() {
  if (( EUID != 0 )); then
	  printf '\33]12;12\007' # blue user cursor
  else
	  printf '\33]12;9\007' # red root cursor
  fi
}
appearance
 
 
su() {
  [ -n "$1" ]
	  printf '\33]12;8\007' # changes cursor color
	  /bin/su $@
	  appearance
}
 
ssh() {
  [ -n "$1" ]
	  printf '\33]12;10\007' # changes cursor colo
	  /usr/bin/ssh $@
	  appearance
}
 
chroot() {
  [ -n "$1" ]
	  printf '\33]12;13\007' # changes cursor color	
	  /bin/chroot $@
	  appearance
}

awesome irssi notify

irssi plugin

~/.irssi/scripts/autorun/awnotify.pl:
use strict;
use Irssi;
 
sub hilight {
  my ($dest, $text, $stripped) = @_;
  if ($dest->{level} & MSGLEVEL_HILIGHT) {
	  filewrite($dest->{target}. " " .$stripped );
  }
}
 
sub filewrite {
  my ($text) = @_;
  $text =~ s/\n/ /;
  $text =~ s/[<@&]//g;
 
  my @values = split(' ', $text, 4);
 
  `echo '$values[1] $values[3]' >> /var/tmp/irssi-notify`;
  `notify-send '<span color="#aaaaaa">$values[1]</span> $values[3]'`;
}
 
sub del_notify {
  `echo > /var/tmp/irssi-notify`;
}
 
Irssi::signal_add_last("print text", "hilight");
Irssi::signal_add('gui key pressed', 'del_notify');

notify-daemon

~/.config/autorun/awnotify.sh:
#/bin/sh 
while true; do
echo -n `echo "irssiwidget.text = ' [<span color=\"#aaaaaa\">im </span><span color=\"#ffffff\">"``cat /var/tmp/irssi-notify | grep -c ">"`"</span>] '"  | awesome-client
sleep 1
done &

awesome-config

~/.config/awesome/rc.lua:
irssiwidget = widget({ type = "textbox" })
 
mywibox[s].widgets = {
 
  [...]
  irssiwidget,
  [...]
}

archlinux aur bash/zsh function

dependency: wget add the following to ~/.bashrc or ~/.zshrc
function aur() {
  if [ "$1" = "-Ss" ]; then
    wget 'https://aur.archlinux.org/packages/?O=0&K=$2' -O /tmp/parse.html &> /dev/null
    grep "\/packages\/" /tmp/parse.html | grep -v "?K=" | cut -d \> -f 3 | cut -d \< -f 1 | grep "$2" --color=always
    rm /tmp/parse.html
  elif [ "$1" = "-S" ]; then
    mkdir ~/aur &> /dev/null || true
    cd ~/aur
    wget https://aur.archlinux.org/packages/${2:0:2}/$2/$2.tar.gz -N &> $2.tar.gz.log
    tar -xzf $2.tar.gz
    cd $2
    makepkg -si
  fi
}

the alx network driver

On some distributions the ALX network driver of my Dell XPS One 27 PC wont work. This will install the correct driver:
wget https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/04/compat-drivers-2013-03-04-u.tar.bz2 
./scripts/driver-select alx
make
su -c make install

top 10 commands

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10

KDE Kmix Tray Scroll Step

in [Globals] in ~/.kde4/share/config/kmixrc
VolumePercentageStep=2

MP3 remove silence

depends on package: sox Remove silence on the beginning and the end of MP3 files:
#!/bin/bash
echo `date` > /tmp/trimp3.log
for i in *.mp3; do
  echo -n "removing silence from: $i"
  sox "$i" "$i".tmp.mp3 silence 1 0.1 0.1% reverse silence 1 0.1 0.1% reverse &>> /tmp/trimp3.log
  mv "$i".tmp.mp3 "$i"
  echo "  ... done"
done

Xorg Display Resolution Scaling

this will fake a FullHD resolution for a display with only 1600x900:
xrandr --output LVDS1 --mode 1600x900 --scale 1.2x1.2

Add Useless-Gap support for awesomewm (3.5+)

Apply this patch file to: /usr/share/awesome/lib/awful/layout/suit/tile.lua
--- tile.lua	2013-01-29 17:01:13.461898665 -0600
+++ uselessgap.lua	2013-01-30 12:59:41.794402805 -0600
@@ -63,11 +63,46 @@
  geom[height] = math.floor(unused * fact[i] / total_fact) - cls[c].border_width * 2
  geom[x] = group.coord
  geom[y] = coord
-        geom = cls[c]:geometry(geom)
  coord = coord + geom[height] + cls[c].border_width * 2
  unused = unused - geom[height] - cls[c].border_width * 2
  total_fact = total_fact - fact[i]
  used_size = math.max(used_size, geom[width] + cls[c].border_width * 2)
+
+        -- Useless gap.
+        if useless_gap > 0
+        then
+            -- Top and left clients are shrinked by two steps and
+            -- get moved away from the border. Other clients just
+            -- get shrinked in one direction.
+
+            top = false
+            left = false
+
+            if geom[y] == wa[y] then
+                top = true
+            end
+
+            if geom[x] == 0 or geom[x] == wa[x] then
+                left = true
+            end
+
+            if top then
+                geom[height] = geom[height] - 2 * useless_gap
+                geom[y] = geom[y] + useless_gap
+            else
+                geom[height] = geom[height] - useless_gap
+            end
+
+            if left then
+                geom[width] = geom[width] - 2 * useless_gap
+                geom[x] = geom[x] + useless_gap
+            else
+                geom[width] = geom[width] - useless_gap
+            end
+        end
+        -- End of useless gap.
+
+        geom = cls[c]:geometry(geom)
    end
  
    return used_size
in your rc.lua set a fefault value for the gap:
useless_gap = 15
and keybinds to change it:
awful.key({ modkey,           }, "Up",   function ()  
					useless_gap = useless_gap + 5 
					awful.tag.incmwfact(0) -- only for repaint...
				    end),
awful.key({ modkey,           }, "Down", function ()  
					useless_gap = useless_gap - 5    
					awful.tag.incmwfact(0) -- only for repaint...
				    end),
				    

Guides

Install Archlinux with FullDisk Encryption

Setup the live environment

loadkeys de-latin1 wifi-menu

Setup the partitions

cfdisk /dev/sda mkfs.ext4 /dev/sda1 -L boot cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/sdX2 cryptsetup luksOpen /dev/sda2 rootfs mkfs.ext4 /dev/mapper/rootfs -L system mount /dev/mapper/system /mnt mkdir /mnt/boot mount /dev/sda1 /mnt

Main installation

pacstrap /mnt base base-devel pacstrap /mnt grub-bios pacstrap /mnt <your software> genfstab -p -U /mnt > /mnt/etc/fstab

System configuration

arch-chroot /mnt vi /etc/locale.gen
de_DE.UTF-8 UTF-8
en_GB.UTF-8 UTF-8
locale-gen echo LANG=de_DE.UTF-8 > /etc/locale.conf export LANG=de_DE.UTF-8 vi /etc/vconsole.conf
KEYMAP="de-latin1-nodeadkeys"
FONT=Lat2-Terminus16
FONT_MAP=
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime echo HOSTNAME > /etc/hostname

Modify the initramfs

vi /etc/mkinitcpio.conf - Add "keymap" and "encrypt" before "filesystems" in the HOOKS mkinitcpio -p linux

Bootloader

grub-install /dev/sda vi /etc/default/grub
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:main"
grub-mkconfig -o /boot/grub/grub.cfg

Finish the installation

passwd exit reboot

Install Archlinux on Multimedia PC

This describes howto install archlinux with xbmc and hardware video decoding for an AMD APU (E-350) using the opensource radeon drivers.

Setup the live environment

loadkeys de-latin1 wifi-menu

Setup partitions

cfdisk /dev/sda mkfs.ext4 /dev/sda1 -L system mount /dev/sda1 /mnt

Main installation

pacstrap /mnt base base-devel pacstrap /mnt syslinux genfstab -p -U /mnt > /mnt/etc/fstab arch-chroot /mnt

System configuration

vi /etc/locale.gen
de_DE.UTF-8 UTF-8
en_GB.UTF-8 UTF-8
locale-gen echo LANG=de_DE.UTF-8 > /etc/locale.conf export LANG=de_DE.UTF-8 vi /etc/vconsole.conf
KEYMAP="de-latin1-nodeadkeys"
FONT=Lat2-Terminus16
FONT_MAP=
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules echo HOSTNAME > /etc/hostname

Software installation

pacman -S xorg xorg-xinit xbmc libva-vdpau-driver wicd systemctl enable wicd

Create and setup a new user

passwd useradd eric -m -G users,audio,video,games,network,optical,storage,wheel passwd eric su -l eric -c "echo xbmc-standalone > /home/eric/.xinitrc"

Make use of the video decoding on the new OSS radeon drivers

vi /etc/profile.d/radeon.sh
export LIBVA_DRIVER_NAME=vdpau
export VDPAU_DRIVER=r600
chmod +x /etc/profile.d/radeon.sh

Bootloader

syslinux-install_update -i -a -m vi /boot/syslinux/syslinux.cfg
PROMPT 1
TIMEOUT 50 
DEFAULT arch

LABEL arch
    LINUX ../vmlinuz-linux
    APPEND root=/dev/sda1 rw quiet radeon.dpm=1 radeon.audio=1 clocksource=hpet hpet=enable
    INITRD ../initramfs-linux.img

Finish the installation

exit reboot

Blu-Ray

for bluray support follow this instructions: http://vlc-bluray.whoknowsmy.name/ this will make it possible to watch some encrypted blurays.

Install Trinity Core on Debian based Systems

Guides

http://collab.kpsn.org/display/tc/How-to_Linux http://collab.kpsn.org/display/tc/How-to_First_step_into_Trinity_Core

Downloads

server: git://github.com/TrinityCore/TrinityCore.git database: http://www.trinitycore.org/f/files/download/5-tdb-full-updates/

Install dependencies

sudo apt-get install build-essential autoconf libtool gcc g++ make cmake git-core patch wget links zip unzip unrar sudo apt-get install openssl libssl-dev libmysqlclient15-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libncurses5-dev libace-dev

Build the Server

git clone git://github.com/TrinityCore/TrinityCore.git 
mkdir TrinityCore/build
cd TrinityCore/build
cmake ../ -DSERVERS=1 -DTOOLS=1 -DPREFIX=/home/trinity/server -DSCRIPTS=1
make -j5
make install

Build Library for Map extraction

sudo apt-get install automake1.10
cd ~/TrinityCore/dep/libmpq/
sh ./autogen.sh
./configure
make
sudo make install

Map Generation

cd <your WoW client directory>
mkdir vmaps mmaps
/home/<username>/server/bin/mapextractor
/home/<username>/server/bin/vmap4extractor
/home/<username>/server/bin/vmap4assembler Buildings vmaps
cp Buildings/* ./vmaps
/home/<username>/server/bin/mmaps_generator
cp dbc maps mmaps vmaps /home/<username>/server/data

Database

mysql -u root -p < ./TrinityCore/sql/create/create_mysql.sql
mysql -u root -p auth < ./TrinityCore/sql/base/auth_database.sql 
mysql -u root -p characters < ./TrinityCore/sql/base/characters_database.sql
mysql -u root -p world < ./path/to/your/tdb.sql
cd ./TrinityCore/sql/updates/world
for i in *; do mysql -u trinity --password=trinity world < $i; done

Configure

cp worldserver.conf.dist worldserver.conf
cp authserver.conf.dist authserver.conf
worldserver.conf:
LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"     
WorldDatabaseInfo = "127.0.0.1;3306;trinity;trinity;world"     
CharacterDatabaseInfo = "127.0.0.1;3306;trinity;trinity;characters"
vmap.enableLOS = 1
vmap.enableHeight = 1
vmap.petLOS = 1
vmap.enableIndoorCheck = 1
mmap.enablePathFinding = 0
authserver.conf:
LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth"

Start Server

cd ./server/data
../bin/authserver
../bin/worldserver

Add Accounts

account create <user> <pass>
account set gmlevel <user> 3 -1

GM Commands

check quests:
.lookup quest questname
.quest complete questid

Impressum

Angaben gemäß § 5 TMG:

Eric Mauser Stuttgarterstr. 105 70469 Stuttgart Feuerbach ericmauser@gmail.com   Quelle: Erstellt durch den Impressum Generator der Kanzlei Siebert

Haftungsausschluss

Haftung für Inhalte

Die Inhalte unserer Seiten wurden mit größter Sorgfalt erstellt. Für die Richtigkeit, Vollständigkeit und Aktualität der Inhalte können wir jedoch keine Gewähr übernehmen. Als Diensteanbieter sind wir gemäß § 7 Abs.1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG sind wir als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen. Verpflichtungen zur Entfernung oder Sperrung der Nutzung von Informationen nach den allgemeinen Gesetzen bleiben hiervon unberührt. Eine diesbezügliche Haftung ist jedoch erst ab dem Zeitpunkt der Kenntnis einer konkreten Rechtsverletzung möglich. Bei Bekanntwerden von entsprechenden Rechtsverletzungen werden wir diese Inhalte umgehend entfernen.

Haftung für Links

Unser Angebot enthält Links zu externen Webseiten Dritter, auf deren Inhalte wir keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten verantwortlich. Die verlinkten Seiten wurden zum Zeitpunkt der Verlinkung auf mögliche Rechtsverstöße überprüft. Rechtswidrige Inhalte waren zum Zeitpunkt der Verlinkung nicht erkennbar. Eine permanente inhaltliche Kontrolle der verlinkten Seiten ist jedoch ohne konkrete Anhaltspunkte einer Rechtsverletzung nicht zumutbar. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Links umgehend entfernen.

Urheberrecht

Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede Art der Verwertung außerhalb der Grenzen des Urheberrechtes bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers. Downloads und Kopien dieser Seite sind nur für den privaten, nicht kommerziellen Gebrauch gestattet. Soweit die Inhalte auf dieser Seite nicht vom Betreiber erstellt wurden, werden die Urheberrechte Dritter beachtet. Insbesondere werden Inhalte Dritter als solche gekennzeichnet. Sollten Sie trotzdem auf eine Urheberrechtsverletzung aufmerksam werden, bitten wir um einen entsprechenden Hinweis. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Inhalte umgehend entfernen.

Datenschutz

Die Nutzung unserer Webseite ist in der Regel ohne Angabe personenbezogener Daten möglich. Soweit auf unseren Seiten personenbezogene Daten (beispielsweise Name, Anschrift oder eMail-Adressen) erhoben werden, erfolgt dies, soweit möglich, stets auf freiwilliger Basis. Diese Daten werden ohne Ihre ausdrückliche Zustimmung nicht an Dritte weitergegeben. Wir weisen darauf hin, dass die Datenübertragung im Internet (z.B. bei der Kommunikation per E-Mail) Sicherheitslücken aufweisen kann. Ein lückenloser Schutz der Daten vor dem Zugriff durch Dritte ist nicht möglich. Der Nutzung von im Rahmen der Impressumspflicht veröffentlichten Kontaktdaten durch Dritte zur Übersendung von nicht ausdrücklich angeforderter Werbung und Informationsmaterialien wird hiermit ausdrücklich widersprochen. Die Betreiber der Seiten behalten sich ausdrücklich rechtliche Schritte im Falle der unverlangten Zusendung von Werbeinformationen, etwa durch Spam-Mails, vor.