บันทึกการติดตั้งปรับแต่งเดเบียน Sid

สมมุติว่าติดตั้งเดเบียนจาก debootstrap พร้อมทั้งทำ apt-proxy ไว้เรียบร้อยแล้ว

แก้ไข source.list และปรับปรุงแพกเกจ
# vi /etc/apt/source.list
deb	http://server1.example.com:9999/debian main contrib non-free
deb-src	http://server1.example.com:9999/debian main contrib non-free
deb	http://server1.example.com:9999/debian-multimedia main
# aptitude update
# aptitude dist-upgrade
เก็บตกแพกเกจที่จำเป็นเบื้องต้น
# aptitude install ssh vim-full less screen

ปรับแต่ง vimrc ปริยาย (ดู vi โดยย่อ ประกอบ)

# vi /etc/vim/vimrc.local
set tabstop=4
set expandtab
set autoindent
set smartindent
set nu!
syntax on

ปรับ vim ให้เป็น editor ปริยาย

# update-alternatives config editor

เลือก vim-full

สร้างผู้ใช้ชั่วคราว
# useradd temp1
# passwd temp1
ติดตั้ง GNOME
# aptitude install gnome xorg

ถ้ามีผู้ใช้หลายคน ควรปรับค่าปริยายของ GNOME เวลาเราเพิ่มผู้ใช้คนใหม่ ค่าเหล่านี้จะกลายเป็นค่าปริยาย

ปรับคีย์บอร์ดไทย ตาม th.gnome.org: เกร็ดการปรับตั้งค่าคีย์บอร์ดภาษาไทย

# gconftool-2 --direct \
	--config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
	--type list --list-type string \
	--set /desktop/gnome/peripherals/keyboard/kbd/layouts [us,th]
# gconftool-2 --direct \
	--config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
	--type list --list-type string \
	--set /desktop/gnome/peripherals/keyboard/kbd/options \
		["grp	grp:alt_shift_toggle"]

ยกเลิกการล๊อกจอภาพอัตโนมัติ

# gconftool-2 --direct \
	--config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
	--type bool \
	--set /apps/gnome-screensaver/lock_enabled false

ตั้งให้การเมานต์ usb และ cdrom เป็น utf8 โดยอัตโนมัติ ตาม เกร็ดการแก้รหัสอักขระ usb drive
ตามตัวอย่างเป็นการตั้งที่ iso9660 udf และ vfat ตามลำดับ
(เฉพาะ iso9660 อาจต้องปรับร่วมกับไฟล์ /etc/fstab ในภายหลัง)

# gconftool-2 --direct \
	--config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
	--type list --list-type string \
	--set  /system/storage/default_options/iso9660/mount_options [uid=,utf8,iocharset=utf8]
# gconftool-2 --direct \
	--config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
	--type list --list-type string \
	--set  /system/storage/default_options/udf/mount_options [uid=,utf8,iocharset=utf8]
# gconftool-2 --direct \
	--config-source xml:readwrite:/etc/gconf/gconf.xml.defaults \
	--type list --list-type string \
	--set  /system/storage/default_options/vfat/mount_options [shortname=lower,uid=,utf8,iocharset=utf8]
ติดตั้งแพกเกจกันเหนียวอื่น ๆ
# aptitude install smbfs
สร้างผู้ใช้
สมมุติว่าผู้ใช้ชื่อ user1 จะให้อยู่ในกลุ่ม mygroup

ของระบบคือ

# useradd -m -g mygroup \
	-G lp,dialout,cdrom,floppy,audio,video,plugdev,lpadmin \
	-s /bin/bash user1
# passwd user1
  • -m คือให้ยึดโครงสร้างไดเรกทอรี /home/user1 ตามแบบโครงสร้างใน /etc/skel
  • -g คือกลุ่มหลัก
  • -G คือกลุ่มที่ผู้ใช้คนนี้จะเข้าไปเป็นสมาชิก
  • -s คือเปลี่ยนเชลล์ จาก /bin/sh ไปเป็น /bin/bash ซึ่งปรับแต่งได้มากกว่า

ของ samba คือ

# smbpasswd -a -s user1
ปรับแก้ sudo
# vi /etc/sudoers
...
%mygroup    ALL=(ALL) ALL
..
ภาษาไทย
# aptitude install libthai0 ttf-thai-tlwg otf-thai-tlwg

หรือพม่า

# aptitude install ttf-sil-paduak

หรือลาว

# aptitude install ttf-lao

หรือเขมร

# aptitude install ttf-khmeros
ถ้าเราอยู่หลัง proxy ควรปรับตั้งให้ wget ใช้สำหรับดาวน์โหลดได้
# vi /etc/wgetrc
...
http_proxy = http://server1.example.com:8080/
ftp_proxy = http://server1.example.com:8080/
...
ตัวติดตั้งแพกเกจของ GNOME
# aptitude install gdebi
เบราว์เซอร์ ปกติ epiphany ใช้งานได้ดีและเร็วอยู่แล้ว แต่หากต้องการความสามารถเพิ่ม อาจติดตั้ง iceweasel เพิ่มได้
# aptitude install iceweasel flashplugin-nonfree
ออฟฟิศ
# aptitude install openoffice.org
มัลติมีเดีย
# aptitude install mplayer xmms gxine vlc audacity toolame \
	k3b w32strongcs
การทำงานเกี่ยวกับภาพ
# aptitude install imagemagick jhead jpegtran
MSN
# aptitude install pidgin

เมื่อเรียบร้อยแล้วก็ให้เริ่ม gdm ใหม่ได้เลย

# /etc/init.d/gdm restart

ผู้ใช้ที่ได้ล็อกอินเข้าไป คงเหลือเพียงเพิ่มสถานะของภาษาลงบนพาเนล

คลิกขวาบนพาเนล -> Add to Panel -> Keyboard Indicator -> Add

แล้วก็จะสามารถทำงานได้ทันทีครับ

ฝากเสริมด้านเดสก์ท็อปให้ด้วยนะครับ

Re: บันทึกการติดตั้งปรับแต่งเดเบียน Sid

ถ้ามีผู้ใช้หลายคน ควรปรับค่าปริยายของ GNOME ตาม th.gnome.org: เกร็ดการปรับตั้งค่าคีย์บอร์ดภาษาไทย

ใช้วิธีปรับที่ xserver-xorg เลยจะดีไหมครับ? (เข้าใจว่าถ้าเซ็ตที่ GNOME อาจมีคำเตือนตอนเข้า GNOME ว่าค่าตั้งของ GNOME กับของ X ไม่ตรงกัน แล้วถามว่าจะใช้ค่าไหน)

/etc/X11/xorg.conf:

Section "InputDevice"
  Identifier  "Generic Keyboard"
  Driver      "kbd"
  ...
  Option      "XkbLayout"   "us,th"
  Option      "XkbOptions"  "grp:alt_shift_toggle"
EndSection

ในเครื่องผม ผมใช้ผัง TIS-820.2538 โดยใช้ Alt ขวาเป็น level-3 shift แล้วก็ สลับปุ่ม Ctrl กับ CapsLock เพื่อให้กด Ctrl ได้ถนัดโดยไม่ต้องเกร็งนิ้วก้อยซ้ายมาก (คือกลับไปใช้แป้นพิมพ์แบบสมัย IBM PC/XT/AT):

  Option      "XkbLayout"   "us,th"
  Option      "XkbVariant"  "basic,tis"
  Option      "XkbOptions"  "grp:alt_shift_toggle,lv3:ralt_switch,ctrl:swapcaps"

สำหรับ level-3 shift ใช้คีย์ตัวอังคั่นคู่ (๚) ได้ เป็นการเพิ่มปุ่มเดียวที่ขาดอยู่ใน TIS-820.2538 ผลก็คือ ผังนี้สามารถคีย์อักขระ TIS-620 ได้ครบทุกตัว รวมถึงฟองมัน (๏) กับโคมูตร (๛) ด้วย

ค่าพวกนี้ ป้อนได้ตอน reconfig xserver-xorg

# dpkg-reconfigure xserver-xorg

Re: บันทึกการติดตั้งปรับแต่งเดเบียน Sid

ตอนเข้า Gnome ไม่มีคำเตือนครับ
แต่วิธีของคุณเทพก็เจ๋งดีครับ :)

Re: บันทึกการติดตั้งปรับแต่งเดเบียน Sid

คงใช่ครับ การเตือนจะเกิดเมื่อมีการเปลี่ยนค่าตั้งที่ทำให้เงื่อนไขไม่เหมือนกับ session ก่อนที่เคยเข้า (เช่น มีการแก้ X config ระหว่างนั้น) แต่สำหรับ session แรกที่ยังไม่เคยเข้ามาก่อน คงไม่มีอะไรให้เปรียบเทียบ..

แต่เหตุผลจริง ๆ ที่ผมคิดว่าเซ็ตที่ X ดีกว่าก็คือ มันมีผลกับทุก desktop ไม่ใช่เฉพาะ GNOME เท่านั้น เช่น ถ้าลง KDE, XFCE, WindowMaker, fluxbox ฯลฯ ไว้ด้วย ก็จะมีผลกับเดสก์ท็อปเหล่านั้นทันที

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <blockquote> <img> <h3> <h4> <h5>
  • Lines and paragraphs break automatically.
  • E-Mail addresses are hidden with reCAPTCHA Mailhide.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.