Sunday, January 10, 2010

Git 書籤

Git 初學筆記 - 指令操作教學
http://plog.longwin.com.tw/my_note-unix/2009/05/19/git-learn-initial-command-2009

Git 初學筆記 - 實作測試
http://plog.longwin.com.tw/my_note-unix/2009/05/20/git-learn-test-command-2009

Git 中文教程
http://www.bitsun.com/documents/gittutorcn.htm

使用 Git 管理源代碼
http://www.ibm.com/developerworks/cn/linux/l-git/index.html

Git 原始碼管理
http://www.qweruiop.org/nchcrails/posts/49

Everyday GIT With 20 Commands Or So
http://people.debian.org.tw/~jesse/git/everyday_zhtw.html

grub

ubuntu 9.10 default come with grub 1.97, dont know start from which version, menu.lst had done.
Now it use grub.cfg as the configuration file. It's format and syntax is not so easy to understand, and modify.

There are two place to modify with :
/etc/grub.d/ -> lots template and stage, seems allow to add extra grub menu item
/etc/default/grub -> some general setting apply to all items

My target is remove the kernel bootsplash, also make a graphic console, so below settings satisfied me :

__
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4" # removed splash

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=800x600
__
Also it wont accept vga=xxx as kernel cmdline now, need to GRUB_GFXMODE=???x??? instead.

Test result :
1.
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 vga=791"
#GRUB_TERMINAL=console
GRUB_GFXMODE=800x600
-> grub in 800x600 mode, and linux console in 1024x768 mode

2.
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 vga=791"
GRUB_TERMINAL=console
GRUB_GFXMODE=800x600
-> grub in text mode, and linux console in text mode

Conclusion :
Seems both grub should be in graphic mode ( by assign GRUB_TERMINAL,GRUB_GFXMODE )
And also linux kernel ( by assign vga=791 ), otherwise linux console wont be in graphic mode.

Older grub/syslinux, only vga=791 would be enough

Saturday, January 09, 2010

dvtm - Tiling window inside console

很多的 embedded 開發者, 平常都是用 vm 裝著 linux, 然後 host 開著 Windows 進行著 W皮L骨的開發。雖然我習慣直接用 Linux host 開發, 但是近來改用 Mac 後, 實在捨不得把漂漂的 Mac 改成 Linux 工作。所以也就開始開著 VM 裝著 Linux 研究, 在 VM 下的 Linux, 其實也是開著 terminal 工作居多。所以多半是用 awesome wm 來便利工作, 有些時候不想切到 VM console, 改用 ssh 連線時, 就缺少了 tiled window 的功能。

dvtm 是用來解決的
http://www.brain-dump.org/projects/dvtm/
http://www.brain-dump.org/projects/dvtm/screenshot1.png

default mod key 是 ctrl-g

darwin port 也有 porting 這個 package 到 mac, 所以 mac 下也可以用啦~

Keyboard commands
Mod Each keybinding begins with Mod which defaults to ^g but can be changed in config.h or with the -m
command line option.

Mod-c Create a new shell window.

Mod-x Close focused window.

Mod-l Increases the master area width about 5% (all except grid and fullscreen layout).

Mod-h Decreases the master area width about 5% (all except grid and fullscreen layout).

Mod-j Focus next window.

Mod-k Focus previous window.

Mod-[1..n]
Focus the nth window.

Mod-. Toggle minimization of current window.

Mod-u Focus next non minimized window.

Mod-i Focus prev non minimized window.

Mod-m Maximize current window (change to fullscreen layout).

Mod-PageUp
Scroll up.

Mod-PageDown
Scroll down.

Mod-Space
Toggle between defined layouts (affects all windows).

Mod-Enter
Zooms/cycles current window to/from master area.

Mod-t Change to vertical stack tiling layout.

Mod-b Change to bottom stack tiling layout.

Mod-g Change to grid layout.

Mod-s Shows/hides the status bar.

Mod-r Redraw whole screen.

Mod-G Escape the next typed key.

Mod-X Lock screen.

Mod-B Toggle bell (off by default).

Mod-M Toggle dvtm mouse grabbing. Mod-q Quit dvtm.

Ubuntu 文字模式開機

sudo update-rc.d -f gdm remove

or
echo false > /etc/X11/default-display-manager

/etc/X11/default-display-manager 記錄了用哪個 display-manager
如果是 gdm, 多半是 : /usr/sbin/gdm

另, 以下講的更完整:
http://www.cyberciti.biz/faq/prevent-xorg-from-starting-in-linux/