2008年11月26日 星期三
如何新增一個.fon字型到wine裡
直接編輯system.reg, 尋找字型的位置, 新增一個項目(類似"Name"="FontPath"), FontPath為字型檔的路徑, 可將字型放在wine的字型目錄裡, 就不用打路徑, 只需要檔名(以安裝在/usr/local/wine為例, 字型目錄為/usr/local/wine/share/wine/fonts)
2008年11月17日 星期一
for Foxit Reader, convert linux path to windows-style path
#!/bin/bash
# Purpose: To convert Linux-style filename to Windows-style to pass as an argument to wine when starting Foxit Reader
Filename="z:"${1//\//\\}
#assuming you use the default installation folder for Foxit in Wine
App='eval wine "C:\Program Files\foxitreader\FoxitReader.exe" "'$Filename'"'
$App
# Purpose: To convert Linux-style filename to Windows-style to pass as an argument to wine when starting Foxit Reader
Filename="z:"${1//\//\\}
#assuming you use the default installation folder for Foxit in Wine
App='eval wine "C:\Program Files\foxitreader\FoxitReader.exe" "'$Filename'"'
$App
Linux的環境變數
在 Linux 系統裡,一般是利用 LC_* 等環境變數來決定應用程式所該採用的語系。(至於該系統是否支援該 locale 則另當別論)
而一般設定 LC_* 等環境變數的地方有數個:
/etc/default/locale:設定全系統變數,Debian 官方的作法
/etc/profile:使用 bash 登入時會讀取的系統設定檔。
~/.profile:使用 bash 登入時會讀取的個人設定檔。
~/.bashrc:呼叫 bash 時會讀取的個人設定檔。
/etc/X11/xinit/xinitrc:用 startx 進入 X 時會讀取的系統設定檔。
~/.xinitrc:用 startx 進入 X 時會讀取的個人設定檔。
~/.xsession:用 GDM/KDM/XDM 進入 X 時會讀取的個人設定檔。
而至於要使用哪一個則視個人喜好了。如果您是使用 startx 來進入 X 的話,敝人建議使用 ~/.xinitrc。
而一般設定 LC_* 等環境變數的地方有數個:
/etc/default/locale:設定全系統變數,Debian 官方的作法
/etc/profile:使用 bash 登入時會讀取的系統設定檔。
~/.profile:使用 bash 登入時會讀取的個人設定檔。
~/.bashrc:呼叫 bash 時會讀取的個人設定檔。
/etc/X11/xinit/xinitrc:用 startx 進入 X 時會讀取的系統設定檔。
~/.xinitrc:用 startx 進入 X 時會讀取的個人設定檔。
~/.xsession:用 GDM/KDM/XDM 進入 X 時會讀取的個人設定檔。
而至於要使用哪一個則視個人喜好了。如果您是使用 startx 來進入 X 的話,敝人建議使用 ~/.xinitrc。
2008年10月21日 星期二
2008年10月14日 星期二
pulse audio & alsa 混音完美解決方法
網上流行的解決方法:
方法1. 把軟體都改用pulseAudio輸出; 不支援PulseAudio的,就在ALSA中模擬一個channel到pulseAudio。(asound的修改)
參考http://ubuntuforums.org/showthread.php?p=4928900
方法2. 移除PulseAudio,轉回ALSA。
例如: sudo apt-get remove gstreamer0.10-pulseaudio
------------------------------------------------------------
我的特別解決辦法:(又更新了)
既然Ubuntu 8.04嘗試把所有軟體搬到PulseAudio上,那麼就讓已經在成功運行於PulseAudio的繼續基於PulseAudio。只支援ALSA的軟體,繼續使用ALSA。
方法--修改/etc/pulse/default.pa
sudo gedit /etc/pulse/default.pa
找到:
#load-module module-alsa-sink ...
改為
load-module module-alsa-sink device=dmix
找到:
load-module module-suspend-on-idle
改為
#load-module module-suspend-on-idle
(重新logout再login)
Optional:
找到: (解決錄音問題,如skype)
load-module module-hal-detect
改為:
#load-module module-hal-detect
這 樣,通過使用dmix,PulseAudio就不會霸佔整個audio系統。PulseAudio將成為alsa的其中一個Mix Channel。然後,ALSA和PulseAudio便能很好地共存。以後都不再需要什麼libflashsupport for pulseaudio了。
*************************************
還有,安裝PulseAudio的控制器,好好享受PulseAudio的優勢吧~
sudo apt-get install padevchooser
方法1. 把軟體都改用pulseAudio輸出; 不支援PulseAudio的,就在ALSA中模擬一個channel到pulseAudio。(asound的修改)
參考http://ubuntuforums.org/showthread.php?p=4928900
方法2. 移除PulseAudio,轉回ALSA。
例如: sudo apt-get remove gstreamer0.10-pulseaudio
------------------------------------------------------------
我的特別解決辦法:(又更新了)
既然Ubuntu 8.04嘗試把所有軟體搬到PulseAudio上,那麼就讓已經在成功運行於PulseAudio的繼續基於PulseAudio。只支援ALSA的軟體,繼續使用ALSA。
方法--修改/etc/pulse/default.pa
sudo gedit /etc/pulse/default.pa
找到:
#load-module module-alsa-sink ...
改為
load-module module-alsa-sink device=dmix
找到:
load-module module-suspend-on-idle
改為
#load-module module-suspend-on-idle
(重新logout再login)
Optional:
找到: (解決錄音問題,如skype)
load-module module-hal-detect
改為:
#load-module module-hal-detect
這 樣,通過使用dmix,PulseAudio就不會霸佔整個audio系統。PulseAudio將成為alsa的其中一個Mix Channel。然後,ALSA和PulseAudio便能很好地共存。以後都不再需要什麼libflashsupport for pulseaudio了。
*************************************
還有,安裝PulseAudio的控制器,好好享受PulseAudio的優勢吧~
sudo apt-get install padevchooser
2008年9月23日 星期二
how to backup Ultraedit's configuration and transfer to another new PC
the configuration file is contained in
C:\Documents and Settings\user account name\Application Data\IDMComp\UltraEdit\
or correctly %appdata%\IDMComp\UltraEdit\
and you can keep it by copying them to another place
C:\Documents and Settings\user account name\Application Data\IDMComp\UltraEdit\
or correctly %appdata%\IDMComp\UltraEdit\
and you can keep it by copying them to another place
*.mfg - menu configuration files
*.pfg - popup menu configuration files
*.tfg - toolbar configuration files
Uedit32.* - currently used configuration files
ini - your current settings
kbd - your current key mappings (< v12.20 of UE)
uek - your current key mappings (>= v12.20 of UE)
mnu - your current menu
pmu - your current popup menu
tbr - your current toolbars
Wordfile.txt - syntax highlighting definition file
Htmltidy.cfg - HTMLTidy configuration file, if you have created it manually
Uetmplte.dat - UltraEdit templates (see template list)
taglist.txt - UltraEdit tags (see tag list)
*.mac - your macro files
*.in1 - environment settings (part of the INI)
*.mb1 - menu configuration files
*.pb1 - popup menu configuration files
*.tb1 - toolbar configuration files (also *.tb0)
*.te1 - environment template files
Uedit32.* - currently used configuration files
ini - your current settings
uek - your current key mappings
2008年8月14日 星期四
用HAL mount ntfs-3g時, 如何使用中文與強制reset log
先安裝 NTFS-3G 套件:
$ sudo aptitude install ntfs-3g
於 /etc/hal/fdi/policy/preferences.fdi 檔案內的 區段加入下面內容:
ntfs-3g
ntfs-3g
locale=
dmask=000
fmask=111
有前輩對HAL的設定方式比較熟悉的嘛?
上面的 hal 設定檔中,volume.mount.valid_options 裡面我就算設定好 locale / iocharset 等為 UTF8 都無法作用。
只好用網路查的方式,轉個彎解決:
sudo rm /sbin/mount.ntfs-3g
建立 /sbin/mount.ntfs-3g 並加入下面內容
------
#!/bin/bash
/usr/bin/ntfs-3g $1 $2 $3 $4 -o locale=zh_TW.UTF-8
------
$ sudo chmod +x /sbin/mount.ntfs-3g
$ sudo aptitude install ntfs-3g
於 /etc/hal/fdi/policy/preferences.fdi 檔案內的
有前輩對HAL的設定方式比較熟悉的嘛?
上面的 hal 設定檔中,volume.mount.valid_options 裡面我就算設定好 locale / iocharset 等為 UTF8 都無法作用。
只好用網路查的方式,轉個彎解決:
sudo rm /sbin/mount.ntfs-3g
建立 /sbin/mount.ntfs-3g 並加入下面內容
------
#!/bin/bash
/usr/bin/ntfs-3g $1 $2 $3 $4 -o locale=zh_TW.UTF-8
------
$ sudo chmod +x /sbin/mount.ntfs-3g
訂閱:
文章 (Atom)