2010年11月26日 星期五

Radio Tray 在system tray 播放音樂程式

本來要自己寫一個簡單的radio播放程式,
結果找到這個程式符合我的需求,
正好推薦給大家.
他的好處是可以編輯自己想聽的電台列表

  • 使用gstreamer libraries來播放音樂
  • 支援PLS 格式音樂 (Shoutcast/Icecast)
  • 支援 M3U 格式
  • 支援 ASX, WAX and WVX playlist format(hichannel 應該有支援)
相關程式

2010年11月21日 星期日

.xprofile+fluxbox設定備份

為了設定gcin和fluxbox正常的工作花了一點時間調整,


記錄一下以免下次忘記.我之前是設定gcin在fluxbox的startup底下啟動,結果都要重啟才能打中文.


原來是要設定在.xprofile底下才能正常.


.xprofile 設定

export LC_CTYPE=zh_TW.UTF-8
export XMODIFIERS=@im=gcin
gcin &



.fluxbox/startup



#!/bin/bash
# LANGUAGE SETTING
export LANG=en_US.UTF-8
export LC_MESSAGES=en_US.UTF-8
export LC_CTYPE=zh_TW.UTF-8
gnome-settings-daemon &
gdlinux &
kpowersave &
zhtw conky &
DISPLAY=:0.1 google-chrome &
.dropbox-dist/dropbox &
pidgin &
#msnbot
xset m 7 &
feh --bg-center .fluxbox/backgrounds/bg.jpg &
xterm &
exec fluxbox

2010年11月13日 星期六

Linux 無法自動 mount usb disk的解決方法

之前把gdm換掉改用slim,沒想到好用的auto mount 卻失靈了,
急著copy檔案卻發現usb無法mount,找了以下幾種解決方案,
最後是修改policy kit這個方法才成功的.

解法1 Policy Kit的問題
修改底下檔案

"/usr/share/polkit-1/actions/org.freedesktop.udisks.policy"

把<allow_any>no</allow_any>改成<allow_any>yes</allow_any>


解法2 使用非GDM下執行gnome-session

在 ~/.xinitrc 下執行gnome

exec ck-launch-session gnome-session

解法3 使用users-admin

執行users-admin,把使用者改成administrator,

點進階選項把mount的選項打開


資料來源

[policy kit]

https://bbs.archlinux.org/viewtopic.php?pid=789028

[ck-launch-session]

https://bbs.archlinux.org/viewtopic.php?pid=725983

[users-admin]

http://www.art.ubuntuforums.org/showthread.php?t=1336847&page=2

2010年11月8日 星期一

使用Zoundry Raven 來編輯blog

終於成功的使用Zoundry Raven 這套軟體在Ubuntu上面
來寫blog了,真是不簡單啊.
一開始是無法顯示中文,
搞定了中文顯示之後,卻發現無法輸入中文,再搞了老半天之後,總算把兩者都搞定了.
接下來再研究如何使gcin在English的Wine下輸入中文字
Free Image Hosting at www.ImageShack.us

2010年11月6日 星期六

改變Wine字型小記

在.wine/drive_c/windows/Fonts/ 底下安裝字型,字型名AR PL New Sung

建立一個font.reg,內容如下




REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink]

"FontLinkControl"=dword:00004000

"FontLinkDefaultChar"=dword:00003000

[HKEY_CURRENT_USER\Software\Wine\X11 Driver]

"ClientSideAntiAliasWithCore"="Y"

"ClientSideAntiAliasWithRender"="Y"

"ClientSideWithRender"="Y"

[HKEY_CURRENT_USER\Control Panel\Desktop]

"FontSmoothing"="2"

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]

"Arial Baltic,186"="AR PL New Sung,186"

"Arial CE,238"="AR PL New Sung,238"

"Arial CYR,204"="AR PL New Sung,204"

"Arial Greek,161"="AR PL New Sung,161"

"Arial TUR,162"="AR PL New Sung,162"

"Courier New Baltic,186"="AR PL New Sung,186"

"Courier New CE,238"="AR PL New Sung,238"

"Courier New CYR,204"="AR PL New Sung,204"

"Courier New Greek,161"="AR PL New Sung,161"

"Courier New TUR,162"="AR PL New Sung,162"

"Helv"="AR PL New Sung"

"Helvetica"="AR PL New Sung"

"MS Shell Dlg"="AR PL New Sung"

"MS Shell Dlg 2"="AR PL New Sung"

"PMingLiU"="AR PL New Sung"


"新細明體"="AR PL New Sung"


"Tahoma"="AR PL New Sung"


"Times"="AR PL New Sung"


"Times New Roman Baltic,186"="AR PL New Sung,186"


"Times New Roman CE,238"="AR PL New Sung,238"


"Times New Roman CYR,204"="AR PL New Sung,204"


"Times New Roman Greek,161"="AR PL New Sung,161"


"Times New Roman TUR,162"="AR PL New Sung,162"


"Tms Rmn"="AR PL New Sung"






[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]


@="AR PL New Sung"


"Arial"="AR PL New Sung"


"Fixedsys"="AR PL New Sung"


"Microsoft Sans Serif"="AR PL New Sung"


"MingLiU"="AR PL New Sung"


"MS UI Gothic"="AR PL New Sung"


"PMingLiU"="AR PL New Sung"


"Simsun"="AR PL New Sung"


"Songti"="AR PL New Sung"


"System"="AR PL New Sung"


"Tahoma"="AR PL New Sung"


"Terminal"="AR PL New Sung"






[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]


"Microsoft Sans Serif"="fireflysung.ttf,AR PL New Sung"


"SimSun"="fireflysung.ttf,AR PL New Sung"


"Tahoma"="fireflysung.ttf,AR PL New Sung"


"PMingLiU"="fireflysung.ttf,AR PL New Sung"


"Lucida Sans Unicode"="fireflysung.ttf,AR PL New Sung"


[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]






"BorderWidth"="1"






"CaptionFont"=hex:f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,88,00,00,00,22,44,00,72,00,6f,00,69,00,64,00,20,00,53,00,61,00,6e,00,73,00,20,00,46,00,61,00,6c,00,6c,00,62,00,61,00,63,00,6b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

"CaptionHeight"="18"

"CaptionWidth"="18"

"MenuFont"=hex:f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,88,00,00,00,22,44,00,72,00,6f,00,69,00,64,00,20,00,53,00,61,00,6e,00,73,00,20,00,46,00,61,00,6c,00,6c,00,62,00,61,00,63,00,6b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

"MenuHeight"="18"

"MenuWidth"="18"

"MessageFont"=hex:f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,88,00,00,00,22,44,00,72,00,6f,00,69,00,64,00,20,00,53,00,61,00,6e,00,73,00,20,00,46,00,61,00,6c,00,6c,00,62,00,61,00,63,00,6b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

"ScrollHeight"="16"

"ScrollWidth"="16"

"Shell Icon Size"="32"

"SmCaptionFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,88,00,00,00,00,4d,00,53,00,20,00,53,00,68,00,65,00,6c,00,6c,00,20,00,44,00,6c,00,67,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

"SmCaptionHeight"="18"

"SmCaptionWidth"="13"

"StatusFont"=hex:f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,88,00,00,00,22,44,00,72,00,6f,00,69,00,64,00,20,00,53,00,61,00,6e,00,73,00,20,00,46,00,61,00,6c,00,6c,00,62,00,61,00,63,00,6b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00


開啟regedit,匯入上述reg檔.

下載Displayset程式並安裝,對字型再微調