Monday, January 18, 2010

linux setup for open suse 11.2

Here's what I did to customize my computer when installing opensuse 11.2:

I like emacs, but I dislike some of the default settings, so here are the things I added to my .emacs file:

0. I changed the EDITOR env variable to /usr/bin/emacs in my ~/.bashrc file

1. enable hippie-expand. In .emacs add

(global-set-key "\M- " 'hippie-expand)

2. copy and paste was messed up. I found this link http://www.oreillynet.com/lpt/wlg/6162 and added the following to the .emacs file

(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)

3. enable copy and paste with c-ins s-ins, s-del, c-left, c-right, etc.. (for some reason c-ins was mapped to insert-file, same as c-x i, kind of wierd) as per http://www.emacswiki.org/emacs/PcSelectionMode

(if (fboundp 'pc-selection-mode)
(pc-selection-mode)
(require 'pc-select))

4. enable alt backspace to delete word backwards:

;;; I want alt-backspace to send backward-kill-word
(global-set-key [(meta backspace)] 'backward-kill-word)

5. disable splash screen:

;;; Remove splash screen
(setq inhibit-splash-screen t)

6. some tab settings for coding:

;;; use only space for tabs:
(setq-default indent-tabs-mode nil)

;;; set tab to 8 spaces
(setq tab-width 8)

7. change the color scheme, personal preference--light on dark

;;to set foreground color to white
(set-foreground-color "white")

;;to set background color to black
(set-background-color "black")


Then there were some repositories to add

*restricted formats:
http://opensuse-community.org/Restricted_Formats/11.2

* Add the required software repositories:

zypper addrepo -f http://ftp.skynet.be/pub/packman/suse/11.2 packman
zypper addrepo -f http://www.opensuse-guide.org/repo/11.2 libdvdcss

* Install the packages:

zypper install ffmpeg flash-player libdvdcss libxine1-codecs w32codec-all lame

* seems like dvd still isn't playing try installing libdvdplay and upgrade libxine1-codecs, k3b-codecs, libdvdplay0, and some others as dependencies... cool it works!

* sudo zypper ar http://download.opensuse.org/repositories/openSUSE:Factory:Contrib/openSUSE_11.2 openSUSE:Factory:Contrib:openSUSE_11.2


I forgot how much I dislike opensuse not putting /sbin and /usr/sbin on the path, so I added these to my path in ~/.bashrc b/c I'm accustomed to using sudo instead of su


my favorite firefox plugins:

1. http://del.icio.us, (install page for ff at http://delicious.com/help/installff )
2. tree structured tabs ( https://addons.mozilla.org/en-US/firefox/addon/5890 )
3. a new one that I just started liking: cooliris.com

I wish this were default
sudo zypper install -y findutils-locate
sudo updatedb
in /etc/sysconfig/locate, set RUN_UPDATEDB_AS = root, so updatedb will index everything

# Installing htk

1. when compiling I got this error:

akazemzadeh@coldfire:~/htk> make all
(cd HTKTools && make all) \
|| case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory `/home/akazemzadeh/htk/HTKTools'
if [ ! -d /usr/local/bin -a X_ = X_yes ] ; then mkdir -p /usr/local/bin ; fi
if [ xHSLab = xHSLab ] ; then \
gcc -o HSLab -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I../HTKLib -DPHNALG HSLab.c ../HTKLib/HTKLib.a -L/usr/X11R6/lib -lm -lX11 ; \
else \
gcc -o HSLab -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I../HTKLib -DPHNALG HSLab.c ../HTKLib/HTKLib.a -L/usr/X11R6/lib -lm ; fi
/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.4/../../../libX11.so when searching for -lX11
/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libX11.so when searching for -lX11
/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make[1]: *** [HSLab] Error 1

2. I tried installing xorg-x11-libX11-devel-32bit b/c maybe htk requires 32 instead of 64...
1. Yep, that seems like it was the problem...

# Colored man pages:
1. install "termcap"
2. add the following to .bashrc:

export GROFF_NO_SGR=yes
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

# Mysql:

1. it seems like mysql is already installed, but I installed some more mysql tools from yast
2. sudo rcmysql start
3. sudo mysqladmin -u root password '*********' (same pw as root user)

# Groovy

1. first I needed to add a repo: http://download.opensuse.org/repositories/home:/robert_munteanu/openSUSE_Factory/
2. then use zypper/yast to install: groovy, groovy-doc, gant, grails, grails-doc
3. export GROOVY_HOME=/usr/share/java/groovy/
4. change the java from openjdk to sun: sudo update-alternatives * for * = java javac java_sdk_1.6.0 javaplugin jre_1.6.0
5. was getting some error about asm so I installed some java asm packages from yast.

# Real time kernel setup

1. Install kernel sources using YaST (Software/Software management then search for "kernel source," check the "kernel-source" package. You also need the compiler, linker, and make utilities: Set the YaST "Filter" to "Patterns" and select the "Development / Basis development" pattern, then "Accept" button, etc. to complete the installation)
2. cd to /usr/src/linux
3. copy the current configuration to the file ".config" in this directory: "cp /boot/config-2.6.18.2-34-default .config"
4. run "make xconfig" this is a nice graphical interface to help you edit the kernel parameters in the .config file before recompilation (or make menuconfig if it gives any warnings...)
5. select "Option/Show All Options" in menu
6. Under "Processor type and features" set "Timer frequency" to 1000 Hz
7. Save changes and close the configuration tool.
8. Run "make install" to install the newly-compiled kernel, and "make clean" to remove some intermediate files and free up some disk space in the source directories.
9. Reboot (if the new kernel is not supposed to be the default, edit the grub conf/menu.lst accordingly)
10. Preempt The Big Kernel Lock" and "Preemptible Kernel (Low-Latency Desktop)
11. Run "make" with the option "all": "make all" (run "make help" for info) to compile the kernel and its modules
12. Run "make modules_install" to install the newly-compiled modules

No comments: