Linux Work Enviroment Build Record

1, Install Debian Squeeze
select standard system tools category only

2, Switch distribute to Wheezy
a, edit /etc/apt/sources.list, the contect is follow
[crayon lang=”sh”]deb http://mirrors.ustc.edu.cn/debian/ testing main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free[/crayon]

b, fetch package list
execute follow command in root console
[crayon lang=”sh”]#aptitdu update[/crayon]

c, update system to Wheezy
execute follow command in root console
[crayon lang=”sh”]#aptitude dist-upgrade[/crayon]

d, reboot system after update process is complete.

3, Configure system
a, locales
execute follow command in root console
[crayon lang=”sh”]#dpkg-reconfigure locales[/crayon]

select all en_US/zh_CN/zh_TW locale, the default locale is en_US.UTF-8

b, console resolution
execute hwinfo –framebuffer will display your graphic card support resolution
edit /etc/default/grub, add the line as follow
[crayon lang=”sh”]GRUB_GFXMODE=1920x1080x32[/crayon]

edit /etc/grub.d/00_header, add follow line after 132 line
[crayon lang=”sh”]set gfxpayload=keep[/crayon]
if grub2 not display corrent with this resolution, it’s can change keep to corrent resolution.

general /boot/grub/grub/cfg, execute follow command in root console
[crayon lang=”sh”]#grub-mkconfig -o /boot/grub/grub.cfg[/crayon]

c, timezone
edit /etc/default/rcS, change UTC=yes to UTC=no

4, Install package from network
execute follow command in root console
[crayon lang=”sh”]#aptitude install sudo unzip unrar vim emacs rcconf build-essential hwinfo git xorg iceweasel ibus ibus-table-wubi xfonts-wqy ttf-wqy-zenhei ttf-wqy-microhei fonts-droid feh scrot alsa-base alsa-utils[/crayon]

5, Install Google Chrome
create text file /etc/apt/sources.list.d/google-chrome.list with follow contect
[crayon lang=”sh”]deb http://dl.google.com/linux/chrome/deb/ stand main[/crayon]

then update package list and install package, the command as follow
[crayon lang=”sh”]#aptitude update
#aptitude install google-chrome-stable[/crayon]

6, Compile Window Manager
download dmenu source code from it’s homepage
then execute follow command in root console
[crayon lang=”sh”]#tar zxvf dmenu-x.x.tar.gz
#cd dmenu-x.x
#make clean install[/crayon]

dmenu will install to /usr/local/bin/ directory

create script file dmenu_path in /usr/local/bin/ with follow contect, mode is 0755
[crayon lang=”sh”]#!/bin/sh

CACHE=$HOME/.dmenu_cache
IFS=:

uptodate() {
test -f “$CACHE” &&
for dir in $PATH
do
test ! $dir -nt “$CACHE” || return 1
done
}

if ! uptodate
then
for dir in $PATH
do
cd “$dir” &&
for file in *
do
test -x “$file” && echo “$file”
done
done | sort | uniq > “$CACHE”.$$ &&
mv “$CACHE”.$$ “$CACHE”
fi

cat “$CACHE”[/crayon]

download Musca source code from it’s homepage
then exectue follow command in root console
[crayon lang=”sh”]#tar zxvf musca-x.x.x.tar.gz
#cd musca-x.x.x
#make
#cp apis /usr/local/bin/
#cp musca /usr/local/bin/
#cp xlisten /usr/local/bin[/crayon]

7, Configure X
a,Xorg
the X server xorg haven’t configure by manual, it’s work well by itself.

b,musca
create musca config file ~/.musca_start with follow contect
[crayon lang=”sh”] set window_open_frame empty
set border_width 0
border off
pad 0 0 0 0
hook on ^add pad 0 0 0 0
name Management
add Programming
add Internet
add Multimedia
use 0
bind on Mod4+e exec emacs
bind on Mod4+b exec google-chrome
bind on Mod4+0 use 0
bind on Mod4+1 use 1
bind on Mod4+2 use 2
bind on Mod4+3 use 3[/crayon]

c,xinit
create X lunchar file ~/.xinitrc with follow contect
[crayon lang=”sh”] export XMODIFIERS=”@im=ibus”
export XIM=ibus
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
exec ibus-daemon &
exec musca[/crayon]

d,XTerm
default, XTerm english font is too small, and can’t display chinese, so change the default font
XTerm config is build-in ~/.Xdefault, the contect as follow
[crayon lang=”sh”] Xft.dpi: 96
Xft.antialias: true
XTerm*locale: true
XTerm*utf8: true
XTerm*utf8Title: true
XTerm*renderFont: true
XTerm*preeditType: Root
XTerm*xftAntialias: true
XTerm*fontMenu*fontdefault*Label: Default
XTerm*faceName: Droid Sans Mono:antialias=true:pixelsize=13
XTerm*faceNameDoublesize: WenQuanYi Zen Hei:antialias=true:pixelsize=13
XTerm*cjkWidth: false
XTerm*background: black
XTerm*foreground: white
XTerm*SaveLines: 3000
XTerm*VT100.Translations: #override \
Ctrl V: insert-selection(CLIPBOARD,PRIMARY,CUT_BUFFER0) \n\
: select-end(CLIPBOARD,PRIMARY,CUT_BUFFER0) \n\
Ctrl P: print() \n[/crayon]

文件服务器

1,使用windows,打开文件共享,其身份验证即可使用AD方式,也可添加服务器本地用户来控制。

2,使用windows,安装ftp服务器,身份验证由ftp服务器完成。

3,使用unix/linux,安装ftp服务器,既可由ftp服务器进行身份验证,也可以OS完成。

4,使用unix/linux,安装samba,既可用samba或模拟成AD完成身份验证,也可结合ldap完成。

 

对于即将要升级的文件服务器,我还无法确实使用SMB还是FTP,这真是一个头疼的问题。

远程连接XDMCP

当XDMCP配置了可以远程连接以后(gnome可以“登录窗口”中设置),如何使用客户端是个问题,在win下有Xmanager和X-win 32可以使用,但这两个都是商业软件,颇为难的一件事。而在linux/unix下则方便了,首先是在xdm/gdm/kdm都可以远程连接到XDMCP,当然也可以使用X,命令为:

X -quiet -query the.host.address