2012年2月2日 星期四

Linux 下 dhcp client 相關問題

記下幾個與 dhcp client 啟動相關問題:
  • dhclient 前後可附加的行為
  • 無碟系統中 initramfs 階段使用 dhcp 所提供的 hostaname
  • 有碟系統啟動網路後使用 dhcp 所提供的 hostaname

以 Debian/Ubuntu 為例, /sbin/dhclient-script 中描述在啟動前會呼叫 run_hookdir /etc/dhcp3/dhclient-enter-hooks 並於結束前 run_hookdir /etc/dhcp3/dhclient-exit-hooks 所以
  • /etc/dhcp3/dhclient-enter-hooks.d/ 

Reference:
  • http://lugwash.org/linux-users/200312/0127.html
  • http://blog.sumostyle.net/robg/2010/05/26/ubuntu-dhcp-and-hostnames/
  • http://moto.debian.tw/viewtopic.php?f=12&t=11382

Ubuntu 120.4 (Precise) 轉移記錄

記錄些使用 Unity 常調整的項目

# 設定 system tray 顯示所有
$ gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

# 常用套件
$ sudo apt-get install hime(or gcin) ssvnc ubuntu-restricted-extras gparted openjdk-7-jre vim tree gthumb audacious easytag sound-juicer pidgin stardict gimp inkscape vlc openshot openssh-server wine

# 安裝 Java plugin for Firefox
sudo apt-get install icedtea-7-plugin

# 啟用 nonfree/third-party 軟體
* enable "Canonical partner software"
$ sudo apt-get install skype acroread

# Install common codecs
$ sudo apt-get install non-free-codecs libxine1-ffmpeg gxine mencoder totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 mpg321 mpg123libjpeg-progs

# 安裝 dvd 相關函式庫
$ sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list ; sudo apt-get --quiet update ; sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring ; sudo apt-get --quiet update
$ sudo apt-get install libdvdcss2

# 安裝壓縮/解壓縮工具
sudo apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack lha arj cabextract file-roller

# 進階需要套件
$ sudo apt-get install git subversion debmirror nmap

# Wine 相關
http://www.unixmen.com/install-and-configure-wine-to-play-latest-windows-games-in-linux-ubuntu-linuxmint-fedora/

# 安裝 Ubuntu Tweak
$ sudo add-apt-repository ppa:tualatrix/ppa
$ sudo apt-get update && sudo apt-get install ubuntu-tweak

# 安裝 Indicator
* Weather Applet
$ sudo apt-get install indicator-weather

* System Monitor Applet
$ sudo add-apt-repository ppa:indicator-multiload/stable-daily; sudo apt-get update
$ sudo apt-get install indicator-multiload

Reference:
http://www.unixmen.com/201204-top-things-to-do-after-installing-ubuntu-2/

===========================
# 變更  Nautilus 位置以路徑顯示
gsettings set org.gnome.nautilus.preferences always-use-location-entry true|false

# 設定 Launcher 套用哪些設定
gsettings set com.canonical.Unity.Launcher favorites "['/home/ceasar/.local/share/applications/gnome-terminal.desktop', '/home/ceasar/.local/share/applications/nautilus-home.desktop', 'pidgin.desktop', 'firefox.desktop', 'thunderbird.desktop', 'stardict.desktop', 'audacious2.desktop', 'gedit.desktop', 'easytag.desktop', 'ssvnc.desktop', 'filezilla.desktop', 'virtualbox.desktop','radiotray.desktop']"

# 變更預設目錄sudo vi .config/user-dirs.dirs

# 安裝 dvd 相關函式庫sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list ; sudo apt-get --quiet update ; sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring ; sudo apt-get --quiet update
sudo apt-get install libdvdcss2

# 安裝  nautilus-gksu in Unity nautilus
sudo apt-get install -y nautilus-gksu
sudo cp /usr/lib/nautilus/extensions-2.0/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/
# restart nautilus
pkill nautilus

# Adobe PDF reader 安裝
1. Ubuntu軟體中心→編輯→軟體來源→其它軟體→把 Canonical夥伴 打勾→關閉
2. sudo apt-get install acroread
http://wiki.ubuntu-tw.org/index.php?title=AdobeReader

# PDF 中文方框問題
sudo sed -i '/DejaVu/d ; /Bitstream Vera/d ; /WenQuanYi Bitmap Song/d' /etc/fonts/conf.avail/69-language-selector*

# 便條紙程式 tomboy
sudo add-apt-repository ppa:remi.rerolle/unity-lens-tomboy
sudo apt-get update
sudo apt-get install unity-lens-tomboy

# Disable Overlay Scrollbars
sudo apt-get remove overlay-scrollbar liboverlay-scrollbar3-0.2-0 liboverlay-scrollbar-0.2-0
# Disable Global Menu (AppMenu)
sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt Reference: http://www.webupd8.org/2011/10/things-to-tweak-after-installing-ubuntu.html

http://www.techdrivein.com/2011/10/15-things-i-did-after-installing-new.html
http://blog.sudobits.com/2011/12/02/10-things-to-do-after-installing-linux-mint-12/
http://www.noobslab.com/2011/11/things-to-do-after-installing-linux.html

系統轉移常備份之文件 :
/etc/{fstab,rc.local,crontab,resolv.conf, /network/interfaces,/apt/sources.list}

個人轉移常備份之文件 :
~/{.ssh, .gnupg, .vnc, .filezilla, .gcin, .Skype, }

Ceasar's Photo

www.flickr.com