Monday, November 30, 2009

slackware-13 notes

-- power off after shutdown
# vim /etc/rc.d/rc.modules
-- remove # before /sbin/modprobe apm

-- into X automatic
# vim /etc/inittab
-- id:4:initdefault:

-- set locale
-- vim /etc/profile.d/lang.sh
-- set export LANG=C
-- set export LANG=en_US.UTF-8
-- set export LC-LOLLATE=C

-- active/inactive net card:
# ifconfig eth0 up|down

-- start/shutdown network:
# /etc/rc.d/rc.inetd start|stop

-- get the dynamic if address:
# ifconfig eth0 --dynamic
-- note: only for current session, will expire after reboot.

-- set sound for non-root user
-- add user to audio group
-- it will be better do this when create user, such as:
useradd -m -d /home/username -g users -G floppy,audio,video,cdrom,plugdev -s /bin/bash username

-- configure the fcitx, after install fcitx
# vim /etc/profile.d/lang.sh
-- add lines as follows:
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

-- xpdf support chinese
# cat /usr/share/xpdf/chinese-simplified/add-to-xpdfrc /etc/xpdfrc
-- edit the fontfile's path if necessary.

-- install evermore office(永中)
-- if you have problem while running ./setup
Gtk-WARNING **: cannot open display:
-- that is because root user can not use X under other user's environment.
-- please run sudo ./setup (you may need to add the user to group sudoer, just visudo)

-- use src2pkg
-- download src2pkg-1.9.9-noarch-3.tgz from web site
-- install src2pkg
# installpkg src2pkg-1.9.9-noarch-3.tgz
# src2pkg --setup

-- use dropbox
$ cd
$ wget -O dropbox.tar.gz http://www.getdropbox.com/download?plat=lnx.x86
$ tar zxvf dropbox.tar.gz
$ mv .dropbox-dist ~/.dropbox-dist
$ mkdir ~/Dropbox
-- start dropbox and configure to connect to server
$ ~/.dropbox-dist/dropboxd &
-- autostart
$ ln -s ~/.dropbox-dist/dropboxd ~/.kde/Autostart/