apt-get install cdbs debhelper build-essential fakeroot dkms git-core cd /usr/src git clone http://github.com/scottferg/multitouch.git cd multitouch dpkg-buildpackage -rfakeroot -b cd .. dpkg -i multitouch-kernel-source* reboot
Donnerstag, 26. August 2010
Apple Magic Mouse on Ubuntu 10.04 (Multitouch)
Donnerstag, 17. Juni 2010
Change your MySQL, Apache2 and PHP character-encoding to UTF-8
MySQL
Edit /etc/mysql/my.cnf and find skip-external-locking and append the following linesdefault-character-set=utf8 default-collation=utf8_general_ci character-set-server=utf8 collation-server=utf8_general_ci init_connect = 'SET collation_connection = utf8_general_ci' init_connect = 'SET NAMES utf8'Now find [mysqldump] and [mysql] append this line to each of them
default-character-set=utf8
Apache2
Append to /etc/apache2/apache2.confAddDefaultCharset UTF-8
PHP5
Edit /etc/php5/apache2/php.ini and replace/append default_charsetdefault_charset = "UTF-8"Alternatively you can add this line to your PHP root file
ini_set('default_charset', 'UTF-8');
Now restart Apache2 and Mysql
/etc/init.d/apache2 restart /etc/init.d/mysql restart
Mittwoch, 12. Mai 2010
XBMC & Music Player Daemon (MPD) on Zotac MAGHD-ND01
apt-get install python-software-properties apt-add-repository ppa:team-xbmc/ppa apt-add-repository ppa:nvidia-vdpau/ppa apt-get update
Install kernel, XBMC and X
apt-get install linux-image-2.6.32-22-generic rebootAfter the Reboot install XBMC and it's dependencies
apt-get install xbmc xbmc-standalone XBMC has a lot dependencies. Don't worry!
Autologin / Autostart XBMC without Gnome/KDE
Install rungettyapt-get install rungettyTo autologin the user xbmc replace in /etc/init/tty1
#exec /sbin/getty -8 38400 tty1 exec /sbin/rungetty --autologin xbmc tty1After the autologin x11 and XBMC should be started. Add a line to your .bashrc
echo "xinit xbmc-standalone" >> /home/xbmc/.bashrc
Sound via HDMI and FrontAudio
add-apt-repository ppa:ricotz/unstable apt-get update apt-get install pulseaudio pulseaudio-utils gstreamer0.10-pulseaudio pavumeter pavucontrol paprefs alsa-base alsa-utilscreate/edit /etc/asound.conf
pcm.!default { type hw card 0 device 3 }
Windows-Share / Samba
I want to fill my MAG Shares without entering a Username or Password. Backup /etc/samba/smb.conf and overwrite:cp /etc/samba/smb.conf /etc/samba/smb.conf.ori echo "[global] # Browsing / Identification netbios name = mag server string = smb.MAG workgroup = workgroup # Auth security = user encrypt passwords = true map to guest = bad user guest account = nobody passdb backend = tdbsam obey pam restrictions = yes invalid users = root dos charset = 1255 unix charset = UTF-8 display charset = UTF-8 unix extensions = yes # Symlink Patch follow symlinks = yes wide symlinks = yes unix extensions = no [Audio] comment = "MAG Audio files" path = /media/Audio writeable = yes read only = no guest ok = yes create mask = 0777 directory mask = 0777 group = entertainment [Video] comment = "MAG Video files" path = /media/Video writeable = yes read only = no guest ok = yes create mask = 0777 directory mask = 0777 group = entertainment " >> /etc/samba/smb.confSetup folders and permissions
mkdir /media/Audio mkdir /media/Video chown xbmc:entertainment /media/Audio chown xbmc:entertainment /media/Video chmod 777 /media/Audio chmod 777 /media/Video
Music Player Daemon MPD
While XBMC uses the HDMI Audio Output, MPD should use Front-Audio to play movies (with sound on a TV) and music at the same time.Open /etc/mpd.conf with an Editor of your choice and find the commented lines and replace them as shown here.
#zeroconf_enabled "yes" zeroconf_enabled "yes" #zeroconf_name "Music Player" zeroconf_name "MAG Music Player" #default_permissions "read,add,control,admin" default_permissions "read,add,control,admin"Know that MPD is configures without a password. This is a security risk!
Setup your audio device. You must Change "mixer_control" to "Front", because "PCM" (which is default) doesn't influence the Volume. Comment out all
audio_output { type "alsa" name "My ALSA Device" device "hw:0,0" # optional format "44100:16:2" # optional mixer_control "Front" # optional }Set permissions for mpd to use alsa and pulse
usermod -a -G pulse-access mpd usermod -a -G audio mpdStop all instaces of mpd and create a Database. You should put music to /var/lib/mpd/music before you do that.
mpd --kill mpd --create-db
nVidia 195.36.24 on Ubuntu 10.04 Lucid Lynx
Uninstall Noveau
sudo apt-get remove nvidia* apt-get remove xserver-xorg-video-nouveauAdd this lines to /etc/modprobe.d/blacklist.conf
blacklist nouveau blacklist nvidiafb
Install driver from Packet Source
Install nVidia driver from Ubuntu repository to later upgrade it to the latest Version. I know it's not a clean way, but after hours of trying this is a working.apt-get install libvdpau-dev libvdpau1 nvidia-kernel-common nvidia-185-modaliases nvidia-glx-185 nvidia-settingsDownload the latest driver from nVidia Support and extract them
wget http://de.download.nvidia.com/XFree86/Linux-x86_64/195.36.24/NVIDIA-Linux-x86_64-195.36.24-pkg2.run chmod a+x NVIDIA-Linux-x86_64-195.36.24-pkg2.run ./NVIDIA-Linux-x86_64-195.36.24-pkg2.run -xYou will also need your kernel headers. Download them if you haven't done yet.
apt-get install linux-headers-`uname -r` ln -s /usr/src/linux-headers-`uname -r` /usr/src/linuxYou cannot install the nVidia drivers while X is running.
ERROR: You appear to be running an X server; please exit X before installing. For further details, please see the section INSTALLING THE NVIDIA DRIVER in the README available on the Linux driver download page at www.nvidia.com.Let's switch the runlevel to kill X. The bootsplashscreen made some trouble for me so you'd better switch it off first and reboot.
Open /boot/grub/grub.cfg and find your first menuentry. In my case:
### BEGIN /etc/grub.d/10_linux ### menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set ba89659b-be12-4e7e-b075-5a5ffc80e65f linux /vmlinuz-2.6.32-22-generic root=/dev/mapper/MAG-root ro quiet splash initrd /initrd.img-2.6.32-22-generic }remove "quiet splash", safe the file and reboot.
### BEGIN /etc/grub.d/10_linux ### menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set ba89659b-be12-4e7e-b075-5a5ffc80e65f linux /vmlinuz-2.6.32-22-generic root=/dev/mapper/MAG-root ro initrd /initrd.img-2.6.32-22-generic }Now you can open TTY1 by pressing [Ctrl] + [Alt] + [F1], login as root (or use sudo) and execute
init 1Select "drop to a root shell" (you do not need networking). The nVidia installer doesn't like the single mode, so now go to
init 3Now run NVIDIA-Linux-x86_64-195.36.24-pkg2.run! If you use 64bit, please see 32bit OpenGL Modules to fix.
./NVIDIA-Linux-x86_64-195.36.24-pkg2/nvidia-installer
32bit OpenGL Modules
Warning: Unable to perform the runtime configuration check for 32-bit library 'libGL.so.1' ('/usr/lib32/libGL.so.195.36.24'); this is typically caused by the lack of a 32-bit compatibility environment. Assuming successful installation.
sudo apt-get install ia32-libs linux32 lib32asound2
Samstag, 8. Mai 2010
Google Chromium unter Ubuntu >= 9.10
Dein Netbook wird es dir danken!
Zum Lesen vorab:
- Unterschiede zwischen Chrome und Chromium
- V8 JavaScript-Engine (Wikipedia/deutsch)*
Installation
unter Ubuntu 9.10 Karmic Koala oder Ubuntu 10.04 Lucid Lynxsudo su apt-add-repository ppa:chromium-daily/ppa apt-get update apt-get install chromium-browser chromium-codecs-ffmpeg-extra chromium-codecs-ffmpeg-nonfreeEs lohnt sich die HTML5 beta von youtube.com zu testen.
Freitag, 30. April 2010
Ubuntu 10.04 Lucid Lynx 64bit für Asus 1005PE (1008P)
Bleibt noch das seltsame Verhalten der Helligkeitssteuerung und das nicht funktionierende Mikrofon.
Öffne die /etc/apt/sources.list mit einem Texteditor und ersetze
# deb http://archive.canonical.com/ubuntu lucid partner # deb-src http://archive.canonical.com/ubuntu lucid partnerdurch
deb http://archive.canonical.com/ubuntu lucid partner deb-src http://archive.canonical.com/ubuntu lucid partner
Backlight fix
Öffne die /etc/defaults/grubvim /etc/defaults/grubSuche nach GRUB_CMDLINE_LINUX_DEFAULT und ergänze die Optionen um "acpi_osi=Linux"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"Aktualisierung der /boot/grub.conf via
sudo update-grub2
Mikrofon für Skype
Installation der ALSA-Backports und pavucontrolsudo su apt-get update apt-get install linux-backports-modules-alsa-lucid-generic pavucontrol pavucontrolIm "Volume Control" pavucontrol kann das [Input Device] "Internal Audio Analog Stereo" konfiguriert werden. Dazu sollten die Channels nicht gelockt sein. Front Left = 90%, Front Right = 10%. In den Skype Einstellungen sollte das Mixer Ajustment ausgeschaltet werden (Sound Devices), da ansonsten diese Einstellung überschrieben wird.
Neustart
Den nun anstehenden Neustart nutzen wir, indem wir die Xorg.conf generieren. Mit "[Strg] + [Alt] + [F1]" zur Konsole wechseln, einloggen und ins Runlevel 1 wechseln.sudo init 1"Drop to a root shell" (Netzwerk wird nicht gebraucht)
Xorg -configure cp /root/Xorg.conf.new /etc/X11/xorg.conf reboot
Referenzen
- Ubuntu Wiki: Netbooks #Asus Eee PC 1005PE
- Debian Wiki DebianEeePC/Model/1005p
Freitag, 23. April 2010
sshfs Mounts via Samba im LAN freigeben
Im Vorteil ist wer einen Homeserver sein Eigen nennt. Eine Kombination aus SSHFS und Samba erlaubt es die Verzeichnisse von den Webservern via SFTP zu mounten und sie anschließend im lokale Netzwerk zugänglich zu machen.
Die folgenden Schritte sind dazu auf einem Debian 5 Lenny 64bit nötig. Für den Umweltbewussten User schöner ist sicherlich den DSL-Router, der ohnehin dauerhaft läuft, für dieses Vorhaben zu zweckentfremden. (siehe DD-WRT, OpenWRT ...)
su root apt-get update apt-get install samba sshfs ssh mv /etc/samba/smb.conf /etc/samba/smb.conf.ori touch /etc/samba/smb.conf
Diee leere /etc/samba/smb.conf bearbeiten:
[global] # Browsing / Identification netbios name = NAS server string = smb.NAS workgroup = mydomain # Auth security = user encrypt passwords = true map to guest = bad user guest account = nobody passdb backend = tdbsam obey pam restrictions = yes invalid users = root dos charset = 1255 unix charset = UTF-8 display charset = UTF-8 unix extensions = yes # Symlink follow symlinks = yes wide symlinks = yes unix extensions = no
Um die Verzeichnisse auf dem Webserver automatisch (ohne Passworteingabe) via SFTP mounten zu können, muss falls noch nicht vorhanden ein öffentlicher RSA Schlüssel generiert und auf den Server übertragen werden.
# Generiere RSA-Key mit 4096 bit Länge ssh-keygen -t rsa -b 4096 # Public-Key übertragen ssh-copy-id -i ~/.ssh/id_dsa.pub user@remote-system
Nun sollten der Public-Key (id_rsa.pub) und der Private-Key (id_rsa) im NAS-Verzeichnis ~/.ssh/
liegen. Der Public-Key wurde der Datei ~/.ssh/authorized_keys auf dem Remote-System angefügt.
mkdir -p /media/sshfs/server1_htdocs
Nachdem leere Verzeichnisse als Mountpoints für sshfs erstellt wurden, muss ein Eintrag in die /etc/fstab gemacht werden. Wichtig hierbei ist die Option "allow_other", die es Samba erlaubt den sshfs mount zu verwenden:
sshfs#root@remote-system:/var/www /media/sshfs/server1_htdocs fuse user,allow_other 0 0
Zum Schluss wird /media/sshfs in der /etc/samba/smb.conf als Share eingerichtet:
[SSHFS] path = /media/sshfs/ writeable = yes guest ok = no
Das Rechte Management erfordert ein wenig Geschick mit Samba. Vorallem empfielt sich "force create mode" und "force directory mask" in der Samba-Konfiguration zu verwenden, um kein Sicherheitsproblem auf dem Webserver zu verursachen. Das wird an dieser Stelle allerdings zu speziell und findet sicher bald in einem eigenen Blogpost Platz.