2009-11-05

ubuntu tips

Ubuntu Server Settings
  • pppoe: sudo pppoeconf
  • Network Time Protocol: sudo apt-get install ntp
  • How-To: Manage services with "update-rc.d"
    sudo update-rc.d _service_name_ defaults 99
  • Internet Connection Sharing: dnsmasq(dns+dhcpd) + Firewall(ufw)
    sudo ufw allow 22
    sudo ufw allow 80
    sudo ufw allow from 10.1.1.0/24

    # to enable DHCPD on eth0:
    sudo ufw allow in on eth0 from any port 68 to any port 67 proto udp
    check also "ufw Masquerading"
  • Firewall (ufw) setting for vsftpd:
    sudo ufw allow ftp
    sudo ufw allow 20/tcp
  • DynDNS
  • gitosis: step to restore git repositories
    • restore ssh keys to /etc/ssh
    • restore git directory to /home/git
    • chown -Rf git:git git


2009-11-01

Ubuntu 安裝中文字型

從 vista 安裝標楷體、細明體等字型到 ubuntu :
sudo mount /dev/sda2 /mnt
sudo mkdir /usr/share/fonts/truetype/ttf-microsoft
cd /mnt/Windows/Fonts
sudo cp mingliu.ttc kaiu.ttf simkai.ttf simfang.ttf \
            simhei.ttf simsunb.ttf simsun.ttc msjh* \
            /usr/share/fonts/truetype/ttf-microsoft/
sudo fc-cache -f -v

sudo apt-get install ttf-mscorefonts-installer


參考文章:
[Ubuntu] 安裝中文字型(文鼎字型、微軟正黑體)
「親愛的」搞定ttf-mscorefonts-installer安裝時出現的錯誤

2009-10-29

Install dotProject on CentOS 5

Install required tools
  1. sudo yum install mysql-server gd php-gd php-ldap php-mysql
  2. sudo /sbin/chkconfig --levels 235 mysqld on
  3. sudo service mysqld start
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
/usr/bin/mysql_secure_installation

References

Installing dotProject on Centos 5
Installing dotProject
使用 DotProject 架設 Project Server,整合 LDAP
CentOS - Apache server with SSL 的作法

2009-10-15

[Ubuntu Netbook Remix] 如何不讓視窗自動放大?

在 Ubuntu Netbook Remix 中開啟的應用程式總是將視窗自動放大,可以用 gconf-editor 來關閉這個功能, 方法如下:
  1. "Alt-F2" 鍵,跳出執行程式的輸入視窗
  2. 輸入 "gconf-editor" ,再點「執行」
  3. "apps->maximux" 中點選 "no_maximize",以關閉視窗自動放大的功能
  4. 完成
  5. 參考討論文章

2009-05-26

Setup Dual Head for EeePC with Ubuntu


  1. refer to How to setup Dual Head for Intel Graphics with RandR 1.2
  2. edit /etc/X11/xorg.conf for Section "Screen"
    SubSection "Display"
    Depth 32

    Virtual 2048 2048

    EndSubSection

  3. restart X with "ctrl-alt-backspace"
  4. confirm the maximum "Screen 0" size is 2048x2048 with "xrandr -q"
  5. set the screen layout
    xrandr --output VGA --pos 0x0
    xrandr --output LVDS --pos 0x1024

EeePC model: 904
Linux distribution: Ubuntu 8.04 LTS

2009-05-04

Build EMC2 on CentOS 5.3 (x86_64)

Required packages:
  • pth-devel
  • bwidget
  • tcl-devel
  • tk-devel
  • libtermcap-devel
  • readline-devel
  • libXmu-devel
  • tkinter
sudo yum install pth-devel bwidget tcl-devel tk-devel libtermcap-devel readline-devel libXmu-devel tkinter
cd /usr/share/tcl8.4; sudo ln -sf ../../share/bwidget1.8.0 BWidget

edit src/hal/utils/Submakefile
  1. locate for ../bin/halrmt
  2. remove $(READLINE_LIBS) from its dependent list
  3. add $(READLINE_LIBS) to "@$(CXX) $(LDFLAGS) -o $@ $^ -lpthread"


../bin/halrmt: $(call TOOBJS, $(HALRMTSRCS)) ../lib/libemcini.so.0 ../lib/libnml.so.0 ../lib/libemchal.so.0
$(ECHO) Linking $(notdir $@)
@$(CXX) $(LDFLAGS) -o $@ $^ -lpthread $(READLINE_LIBS)


cd src
./configure --enable-simulator --enable-run-in-place
make
cd ../; . ./scripts/emc-environment
unset LD_LIBRARY_PATH # to disable incorrect xilinx library search path
emc

2009-05-03

Build EMC2 on Windwos

1. GNU PTH Library
2. BWidget:
  • download BWidget-*.tar.bz2 from tclib.sf.net
  • uncompress and copy it to /usr/share/BWidget
  • verify the installation with 'tclsh'
  • % set auto_path
  • % package require BWidget
Build emc2
  1. cd src
  2. ./configure --enable-simulator --enable-run-in-place
  3. make (stuck at here: cannot build libnml on Windows)
    # Before running the software, set the emc environment:
    # . (top dir)/scripts/emc-environment
    # To run the software type
    # emc
  4. libnml is forked from rcslib
  5. rcslib can be built with MinGW; cannot be built with cygwin
  6. replace libnml with rcslib?
  7. port libnml to cygwin?
  8. skip emc2 and try orocos?