十二月 2006

Monthly Archive

在 Opensuse Linux 輸入中文

Posted by on 30 十二月 2006 | Tagged as: 浩氣

Linux 的中文輸入法比在 Windows 更多,更方便。。。

一下子我就有齊十多種輸入法,而且全是免費,太好了!

1) 在 Control Center -> Language 加入 Traditional Chinese

2) 在 Control Center -> Sessions :: Startup Programs tab 加入 scim -d

session.png

3) Restart

4) 按 Ctrl + Space bar, SCIM Window 就會彈出

scim_traditional_chinese.PNG

Reference: Chinese Input for Ubuntu Hoary ( http://www.ubuntuforums.org/showthread.php?p=124214)

Dual Monitors in VMware

Posted by on 30 十二月 2006 | Tagged as: 浩氣

一直為 WordPress 的 album 功能而苦腦, 我用的 plugin (ANIga) 太多工, upload 廿張相要成半個鐘… 把心一橫, 不如自己寫一個 plugin… 但一開始就為安裝 Linux 而花了很多時間, 之後, VMware 又不支持 Dual Monitors… 唉, 一波三節:

For Windows: How to setup VMware for fullscreen, dual monitors

1) Modify your .VMX file for the width of your monitors. My monitors are configured for 1280×1025 so I added:
svga.maxWidth = “2560″
svga.maxHeight = “1024″

2) Modify your .VMX file to add more video memory. For me I increased the video size to 64MB:
svga.vramSize = 67108864

3) Set your Windows taskbar to Autohide

4) Install Ultramon ( http://www.realtimesoft.com/ultramon). Under Options–>Hotkeys – assign a hotkey for the action “Maximize window to destop"

5) Start VMWare and under the View menu select Quick Switch Mode (F11) and Autofit Guest options. You should also turn off Favorites and Tab. At this point VMWare should be filling the entire first monitor.

6) To get it fill both monitors, move the mouse to the top of the screen which causes the VMWare title bar to appear. While the mouse is over the title bar, press the hotkey keys you assigned in step 4. This should cause VMWare to fill the entire screen of both monitors.

7) Start your VM session and it should autofit full screen after it starts. At this point you should only see your VM session filling both monitors entirely.

One of the issues I found was that your desktop for the VM is now truly 2560×1024 so if you maximize an app it will fill that desktop. I wanted the capability to maximize an app to one “screen" or the other without having to manually drag the window around. Ultramon to the rescue again ;-).

Just install Ultramon on the VM, download the 2 scripts called VMonMaximizeWnd3.vbs and VMonMoveWnd3.vbs. The first script will maximize an app to the defined screen area you designated. The other will move an app from one screen to the other. For both scripts you need to change the line: MONITORS = Array() to MONITORS = Array(“0,0,1280,990″,"1280,0,2560,990″). This will define your virtual desktop arrangement. After you do this, assign 2 hotkeys to “Run application or script" and select the above scripts.

Now you can easily maximize an app to a screen or move it back and forth.

We currently run the above configuration in our development group and it has worked like a charm for months now.

Let me know if you have any issues and enjoy your dual monitor, fullscreen experience ;-)

在 Opensuse, 我要改 xorg.conf:

Section “Modes"
Identifier “Modes[0]"
Modeline “800×600″ 48.91 800 840 920 1040 600 601 604 627
Modeline “1280×1024″ 135.00 1280 1296 1440 1688 1024 1025 1028 1066 +HSync +VSync
ModeLine “2558×1024″ 100 2560 2600 2700 2800 1024 1100 1200 1300 +HSync +VSync

EndSection

Section “Screen"
Identifier “Screen[0]"
Device “VMware SVGA"
Monitor “vmware"
# Don’t specify DefaultColorDepth unless you know what you’re
# doing. It will override the driver’s preferences which can
# cause the X server not to run if the host doesn’t support the
# depth.
Subsection “Display"
# VGA mode: better left untouched
Depth 4
Modes “640×480″
ViewPort 0 0
EndSubsection

subsection “Display"
Depth 24
modes “800×600″ “1024×768″ “1280×1024″ “2558×1024″
ViewPort 0 0
EndSubsection
EndSection

VMware 的 Dual Monitors 問題大概解決了, 接下來的問題是如何在 Linux 安裝 PHP, Apache, MySQL…, 另外, 心中想用的 PHP IDE 是 eclipse, 但不知如何是好…

黃仔的確肥了, 小黃變肥黃, 又肯俾人影相, 變啦… 世界變啦…

十二月 projects 手記

Posted by on 28 十二月 2006 | Tagged as: 浩氣

又是記錄過去一個月做過的 DIY project 了…
1) Linux in 3D

上一回我為了體驗 Windows Vista 的新 3D 界面而買了一部新電腦, 用了幾日, 由於很多軟件仍未支持 Windows Vista, 結論是等… 但 3D 界面不是 Windows Vista 獨有, Linux 有好幾個選擇…

A) X server:

  • XGL
  • AIXGL

B) Compositing Windows Manager:

  • Compiz
  • Beryl

但不是所有的 Video Card 都支持 XGL/AIGLX 的, 可以先在這裏查一查: HARDWARE Video Card Support Under XGL
AIGLX 應該比 GLX 好, 如果 Video Card + Linux Distribution 可以用 AIGLX 的話, 就用 AIGLX, 但用 Compiz 還是 Beryl, 就見仁見智, Beryl 其實是 Compiz 的變種, 基本上是沒有大分別, 主要分別如下:

  • The window decorator, formerly known as cgwd, is now named emerald. Currently, a cgwd theme can be ported to emerald by changing the extension from .cgwd to .emerald.
  • Uses flat file backend instead of gconf, almost no GNOME dependency.
  • Has a large variety of extra plugins, and enhanced features in other plugins.
  • It has three themeable decorator: Emerald, Heliodor, and Aquamarine.
  • It has a theme manager called emerald-theme-manager.
  • Changes frequently: new features are added on a daily basis.
  • Made by a community at Beryl Project Forums. (Source: Beryl (window manager) )

fc6-beryl-2.png Beryl in Fedora

compiz_cube.jpg Compiz in Ubuntu

一個最方便體驗 Compiz 的方法是 用 Live CD: Kororaa
想體驗 Beryl, 可以用 OpenSuse 的 Live DVD: OpenSuse 10.2

2) 百毒不侵的共用電腦 (reference: Create an Indestructible Shared PC)

目標: 為中信安裝六部共用電腦

1) 分割硬盤:

工具: SystemRescueCD (Free)

2) 安裝 Windows XP (SP2) + Office 2003

3) 安裝 User Profile Hive Cleanup + Shared Computer Toolkit
4) Build + Deploy 影像

工具:
a) SystemRescueCD (Free)
b) DriveImage XML + Bart’s PE builder

3) Bootable USB thumb drive with Linux

1) Transfer boot sector to USB thumb drive

a) download tools:mkbt20.zip
b) extract the zip file and run mkbt from command prompt
c) mkbt ussage:

Usage:
mkbt [switches]The source file/drive which contains the bootsector to install
The target file/drive to install the bootsector on

Switches: -v Verbose mode
-c Copy mode (no install) used for copying the
bootsector(s)
-x Expert mode (do not check drive A or B only)
USE WITH CAUTION!
-l= Set Volume Label to

Returns errorlevel 0 when OK, 1 when some error occurred.

Examples:
To install bootsector from file “bootsect.bin" onto drive A:
-> mkbt c:osdos622bootsect.bin a:

To install bootsector from file “bootsect.bin" onto floppy image “288.img"
-> mkbt c:osdos622bootsect.bin c:tmp288.img

To copy bootsector from a bootable floppy in drive A: to a file called
“bootsect.bin"
-> mkbt -c a: c:osdos622bootsect.bin

so, to transfer bootsect.bin to USB drive (says z:) would be: mkbt -x bootsect.bin z:

2) copy Linux to thumb drive:

Download Slax from Pendrivelinux.com

Reference: Pendrivelinux.com

3) Add module if need:

Download Slax modules: SLAX modules