顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

2008/9/24

0

Stackswitch - Compiz Fusion 新特效超炫

發表評論
這次一樣感謝smlsun的推薦,他的桌面跟著時代潮流換裝,每次總能趕上流行先端。

這個桌面3D效果實在太炫了,說太多沒意義,讓我們直接進VIDEO吧!

2008/8/7

0

Linux下的超棒MSN Client - Galaxium

發表評論
Galaxium是一款很漂亮的Messenger Client(目前支援MSN,未來或許還會加入其他IM的支援),提供的功能應該能說是目前最強的,支援離線訊息、漂亮的列表顯示...等!用了就知道。

Ubuntu可加入以下的apt sources,就能用 sudo apt-get update && sudo apt-get install galaxium
deb http://ppa.launchpad.net/galaxium/ubuntu hardy main
deb-src http://ppa.launchpad.net/galaxium/ubuntu hardy main


*Bug Fix: 對話視窗在使用GCIN輸入法時,可能碰到ENTER鍵失效問題,目前已知SCIM比較沒問題,可以在輸入區按下右鍵,將輸入法改為SCIM(當然系統也要安裝),這樣在使用Galaxium時就能夠自動切換成SCIM輸入法。

Available Features (0.7.4):
* Full contact list management
* Fully customizable interface
* Multi-protocol client allowing third party addins
* Personalized content (display pictures, personal messages, custom emoticons)
* Conversation history tracking
* Adium theme support
* GStreamer audio support
* Communicate with Yahoo contacts (MSN)
* Communicate over HTTP protocol (MSN)
* Communicate through SOCKS5 or HTTP(S) proxies
* Indirect file transfers (MSN)
* Group chat (MSN)
* Offline messaging (MSN)
* Roaming profiles (MSN)



2008/8/4

0

Picasa FileSystem 相簿變硬碟 Linux篇

發表評論
Linux的FUSE讓開發者很容易設計各種用途的檔案系統,方便在Linux系統下掛載,因此各種提供儲存空間的網路服務,也可透過FUSE變成在本地電腦上的掛載點,使用起來就跟一般磁碟一樣方便,檔案可以方便地複製搬移。GDataFS(前身是PicasaFS)就是可以將Google的網路相簿服務Picasa掛載的程式,它使用Java開發,存取Google提供的API來達成相片檔案的存取。

What is GDataFs
Gdatafs is a FUSE implemtation that mount your account at google's picassa web to your filesystem. The filesystem support full read/write and delete of album and photos.
PreRequests
  • Install FUSE (in ubuntu type: "sudo apt get install fuse" and add the fuse group to your user)
  • Install java 1.5 or newer (tested only with suns vm)
Usage
run gdatafs [mountpoint] [username_for_picassaweg] [password_for_picassaweg]

2008/7/18

2

解決mplayer播放srt字幕的亂碼問題

發表評論
OS: Ubuntu 8.04.1

在Ubuntu中使用mplayer(或SMPlayer)播放影片,如果字幕是中文的SRT格式,可能會發生亂碼問題,這時候就必須手動編輯設定檔作點修正。

# ~/.mplayer/config
font=/usr/share/fonts/truetype/arphic/ukai.ttc
subcp=utf-8


ukai.ttc是系統中已經存在的中文字型檔,若缺少這個檔案或想使用其他自行,可以查看/usr/share/fonts/truetype資料夾中是否有其他可用字型。ttf-arphic-ukai這個套件通常是預設就安裝的,若沒有可以自己補上。

使用UTF-8的文字編碼可以讓問題少一點,但一般網路下載影片附帶的SRT檔,通常編碼都是用BIG5,這時候必須用iconv作轉換:
iconv -f big5 -t utf-8 Your_movie.srt > Your_movie.utf8.srt

2008/7/13

0

BackTrack 3 - linux live distribution focused on penetration testing

發表評論
from [http://www.remote-exploit.org/backtrack.html]
BackTrack is the most Top rated linux live distribution focused on penetration testing. With no installation whatsoever, the analysis platform is started directly from the CD-Rom and is fully accessible within minutes. It's evolved from the merge of the two wide spread distributions - Whax and Auditor Security Collection. By joining forces and replacing these distributions, BackTrack has gained massive popularity and was voted in 2006 as the #1 Security Live Distribution by insecure.org. Security professionals as well as new comers are using BackTrack as their favorite toolset all over the globe. BackTrack has a long history and was based on many different linux distributions until it is now based on a Slackware linux distribution and the corresponding live-CD scripts by Tomas M. (www.slax.org) . Every package, kernel configuration and script is optimized to be used by security penetration testers. Patches and automation have been added, applied or developed to provide a neat and ready-to-go environment.

BackTrack 3 在 6 月底發佈 Final release,提供LiveCD、LiveUSB、VMWare Image三個版本。

2008/7/7

0

Playing SVN with Ubuntu

發表評論
Subversion 是一套好用的版本控制工具,一般簡稱為 SVN,可跨平台、跨開發工具支援,除了作為程式碼專案的版本控制管理,拿來當文件管理、備份、分享系統也相當實用。在 SVN 成為普遍使用的工具之前,最常被使用的工具是CVS(Current Version System),以Eclipse開發工具來說,CVS是很早就已內建支援的團隊協同(team collaboration)開發工具,而SVN通常必須加上3rd Party的延伸套件(Subclipse)才能支援(成為預設套件應該只是時間上的問題,目前3.4已經提供Subversive - SVN Team Provider,只是要另外加裝3rd Party Connectors)。由於SVN的易學易用,並有許多具親和力的圖形介面工具、可與Windows檔案瀏覽器(Explorer)整合(Tortoisesvn),即使是Visual Studio .NET的開發者,也有AnkhSVN可以選擇(當然使用人口沒微軟自家的Team System多啦)。集合起各種作業系統、開發環境平台的使用者,SVN儼然成為時下的主流。

這篇文章提供Ubuntu安裝SVN伺服器的初步說明,希望能幫助還未上手的朋友能在短時間內學會使用這個好工具。

安裝 Subversion

要善用Ubuntu超級豐富的APT套件庫,不但省時省力、日後也好維護。
sudo apt-get install subversion
一道指令解決。

設定 SVN 伺服器

自己架設伺服器也只需要很少的幾個步驟。
sudo apt-get install xinet.d
這道指令並非與SVN直接相關,而是安裝一個xinetd的daemon程式,它就像一個伺服器服務程式的管家,負責幫忙接待想透過網路連結服務的客戶。

建立新檔案在 /etc/xinet.d/svn ,檔案內容如下:
# default: off
# description: svnserve is the server part of Subversion.
# server_args = -i -r /var/lib/svn/repositories
service svn
{
disable = no
port = 3690
socket_type = stream
protocol = tcp
wait = no
user = svn
server = /usr/bin/svnserve
server_args = -i -r /home/svn
}

* /home/svn 是自行指定的 repository 存放目錄

接著建立 svn 的 user 及 home directory:
sudo mkdir /home/svn
sudo useradd -d /home/svn svn
sudo chown svn.svn /home/svn

重新啟動 xinetd ,測試SVN服務:
sudo /etc/init.d/xinetd restart
telnet localhost 3690

當telnet程式連線成功,並出現以下訊息,則表示SVN daemon已經啟動成功:
( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline svndiff1 absent-entries ) ) )

建立新的 repository

cd /home/svn
sudo svnadmin create NEW_REPO
sudo chown svn.svn NEW_REPO -R

完成之後,就能已 svn 指令(SVN client)操作。
svn list svn://localhost/NEW_REPO
當然,因為都還沒有丟檔案,回傳一定是空的。

如果要操作權限(例如有帳號密碼可讀寫,訪客只能讀不能寫),則需要編輯 NEW_REPO/conf/svnserve.conf,設定以下三行(取消註解):
anon-access = read
auth-access = write
password-db = passwd

並在 NEW_REPO/conf/passwd 下新增帳號及密碼,例如:
[users]
jacky = pwd_is_blank

---= Q&A =---

SVN server在運作一段時間後,可能出現資料庫錯誤的狀況,訊息如下:
Could not open the requested SVN filesystem

此時必須使用 db_recover 指令進行修復,以Ubuntu Linux來說,安裝db4.*-util套件即可取得此程式。

以下示範在 Ubuntu Linux 的流程:

先搜尋有哪些db4.*-util版本可以安裝。
apt-cache search db4.*-util
db4.6-util - Berkeley v4.6 Database Utilities db4.2-util - Berkeley v4.2 Database Utilities db4.3-util - Berkeley v4.3 Database Utilities db4.4-util - Berkeley v4.4 Database Utilities db4.5-util - Berkeley v4.5 Database Utilities
我選擇的是db4.4-util,因此開始apt-get安裝。
apt-get install db4.4-util

安裝完成後,就會多一道 db4.4_recover 指令,切換到 svn repository directory 下執行這道指令即可修復。

更多參考資源在:

2008/7/6

0

Google-Gadgets for Ubuntu 8.04

發表評論
Google Gadgets能幫Linux桌面添加更多樂趣,更令人興奮的是在Ubuntu中不必自己動手編譯,只要增加兩行套件來源,輕輕鬆鬆就能裝好google-gadgets。

套件來源(for google-gadgets only):
deb http://ppa.launchpad.net/googlegadgets/ubuntu hardy main
deb-src http://ppa.launchpad.net/googlegadgets/ubuntu hardy main


安裝指令:
apt-get install google-gadgets

簡單的步驟就能安裝好。現在,您需要的是能容納更多桌面小玩意的大螢幕了!


2008/7/4

0

Config Ubuntu to enable Open-SSH X11 Forwarding

發表評論
In server-side, edit "/etc/ssh/sshd_config" file, check settings below:
X11Forwarding yes
X11DisplayOffset 10


Default settings in Ubuntu hardy are X11 forwarding enabled, because of the X11Forwarding is set to yes.

If the configuration file modified, please reload sshd using "/etc/init.d/ssh restart" command.

Parameters must added when client-side using ssh command to connect remote host, two commands below will establishing X11 forwarding connection.
  • ssh -Y user@remote_hostname
  • ssh -X -C user@remote_hostname
Description of parameters is shown below.
-X Enables X11 forwarding.
-Y Enables trusted X11 forwarding.
-C Requests compression of all data.

If something was wrong, there will be some error messages when execute X11 applications on remote host, like "xclock", messages maybe like:
Error: no display specified
To solve this problem, using "ssh -X -v user@remote_hostname" to show all debug messages. This provide information like:
debug1: Remote: No xauth program; cannot forward with spoofing.
The sample error message tell us need to install "xauth" on remote host. It's a program X11 forward required. Just type "apt-get install xauth" to perform installation.

2008/6/22

0

Cookie/Session 與 Server timestamp

發表評論
這個囧問題浪費了我不少時間~.~

徵狀:Session/Cookie皆無法正確儲存(有些瀏覽器, ex. Firefox會沒問題)
原因:Server系統時間不正確,使每次HTTP送出的Cookie(超過時限)無法保存。
預防:伺服器運作一段時間後,就必須以ntpdate指令更新系統時間。

雖然是個小問題,但很容易被忽略,因為伺服器已設定ntpd常駐,正常來講時間會每天校正,但好死不死ntpd自己掛點,一些網頁程式就無法正常運作了。

2008/4/26

2

Vodafone with Ubuntu 8.04 Hardy AMD64 完美安裝動手作

發表評論
眾所期待的Ubuntu 8.04(Hardy)終於讓大家等到release的一天,在開放下載當天我就將手邊數台電腦全部重灌新版,當然包括隨身的NB,不過每次重灌新版後的問題,就是3.5G的連線軟體必須重新安裝。

Huawei E220的連線軟體當然首推Vodafone Mobile Connect Card Driver,這套軟體讓Linux下也能享有和Windows的Mobile Connect有相似的3.5G連線、設定專用介面。Vodafone的介紹與設定調整,先前已有多篇介紹,在此就不再重提。

本次要分享的是,在Ubuntu 8.04 Hardy AMD64版本中,如何自行建立arch專屬的deb包(由於Vodafone已提供deb的相關設定,因此步驟相當簡單)。如果是安裝一般x86版本的Ubuntu,Vodafone已有提供i386 arch的deb包下載,並不需要自己動手包。

步驟一、下載所需原始安裝檔、解壓縮
wget https://forge.vodafonebetavine.net/frs/download.php/118/vodafone-mobile-connect-card-driver-for-linux_2.0.beta1.tar.gz
tar zxvf vodafone-mobile-connect-card-driver-for-linux_2.0.beta1.tar.gz
cd vodafone-mobile-connect-card-driver-for-linux-2.0.beta1

步驟二、安裝dpkg-buildpackage依賴的相關套件
sudo apt-get install dpkg-dev fakeroot build-essential debhelper python-setuptools libusb-dev

步驟三、執行dpkg-buildpackage建立deb包
dpkg-buildpackage

步驟四、安裝建立好的deb包
cd ..
dpkg -i vodafone-mobile-connect-card-driver-for-linux_2.0.beta1_amd64.deb
sudo apt-get -f install

將產生的vodafone-mobile-connect-card-driver-for-linux_2.0.beta1_amd64.deb檔案備份下來,下次重灌就不需要重新打包了(只要執行步驟四)。

2008/4/23

0

Ubuntu 8.04 Hardy DVD release

發表評論
DVD版搶先開跑…

ftp://releases.ubuntu.com/cdimage/dvd/20080423/


不過目前下載速度不快…可能要抓個一天@@

今年最期待的作業系統版本誕生!

2008/4/6

0

讓Ubuntu的pure-ftpd支援symbolic links

發表評論
在Linux系統上,建立檔案系統的符號連結(symbolic links)是很自然的一件事,這麼做帶來系統管理很多的彈性與好處。
例如將某FTP資料夾連結到家目錄中:
ln -sf /home/ftp/share ~/share
或是將不同硬碟分割區連結到同一資料夾下:
ln -sf /media/sdb1 /home/ftp/disk2
ln -sf /media/sdc1 /home/ftp/disk3

但是,Ubuntu Linux中以預設參數執行pure-ftpd時,符號連結將會失效。以FileZilla為例,錯誤訊息如下:
狀態: 正在取得目錄列表中...
指令: CWD share
回應: 550 Can't change directory to share: No such file or directory
錯誤: 無法取得目錄列表!

在Mandriva Linux系統上,預設執行pure-ftpd並沒有這種問題,而Ubuntu必須再調整設定,這個問題很多人都遇到,但google搜尋結果大多是只有問題沒有解答,今天發現其實設定很簡單:
編輯 /etc/default/pure-ftpd-common
將 VIRTUALCHROOT=false 改為 VIRTUALCHROOT=true


重新啟動pure-ftpd(/etc/init.d/pure-ftpd restart),FTP Client必須斷線重連後才會生效。

怎麼找到設定? 在 /etc/init.d/pure-ftpd 中,可以看到 virtualchroot 參數的啟用與否,是參考$VIRTUALCHROOT的設定,而這個設定值則是保存在 /etc/default/pure-ftpd-common,而一般的設定則是在 /etc/pure-ftpd/conf 資料夾下。

2008/4/2

0

*.gz Log檔的資料查詢

發表評論
Ubuntu等系統會將 /var/log/syslog 的較舊資料壓縮成syslog.N.gz檔案,若要使用grep檢索需要的資料,就必須先解壓縮才能用,但gunzip指令其實提供一個-c參數,可以將解壓縮出來的資料直接dump在console stdout,而不建立檔案,這樣用起來是比較方便的。

ex. 列出保存的syslog中,有關於pure-ftp的相關訊息紀錄:
gunzip -c /var/log/syslog.*.gz grep pure-ftp

2007/12/27

0

vodafone-mobile-connect-card-driver-for-linux

發表評論
Linux發行版本:Ubuntu 7.10 (Gutsy)
3.5G網卡:Huawei E220

在最近的一次系統更新後,原本安裝的Vodafone Driver突然失效了。

以下再貼一下這次修復的過程。

先移除舊的安裝
dpkg --purge vodafone-mobile-connect-card-driver-for-linux

下載需要的檔案:
vodafone-mobile-connect-card-driver-for-linux_1.0_gutsy_i386.deb
vodafone-mobile-connect-card-driver-for-linux-1.99.16.tar.gz

開始安裝
sudo dpkg -i vodafone-mobile-connect-card-driver-for-linux_1.0_gutsy_i386.deb
tar zxvf vodafone-mobile-connect-card-driver-for-linux-1.99.16.tar.gz
cd vodafone-mobile-connect-card-driver-for-linux-1.99.16/
sudo python setup.py install

為什麼安裝完deb還需要解開tarball再裝一次呢?目前不清楚原因,但只裝完deb後啟動會發生python package import的Exception,從tarball再覆蓋安裝就可以解決。

2007/8/22

0

CentOS 5, yum repository

發表評論
以往都不太想碰Red Hat Enterprise,直到最近接管一台server預裝rhel4,才開始又回到與RPM奮戰的日子(過去RH7/8時代也曾經歷過一陣子)。不過,無論是自己抓rpm來裝、或是從tarball安裝,總是覺得太缺乏效率(很多IT人員之所以經常需要熬夜、瑣碎工作多到處理不完,我想是跟選擇的開發工具、系統平台,有某種程度的關係吧!)。最後決定裝上yum、換上CentOS的repository,雖然yum也是跑得很慢,但至少一條指令下完就可以先處理其他事。

像我這種沒太多時間可以管系統的人,只有apt-get、yum、urpmi(smart)才是王道阿!電腦自己能搞定的事情,何必多花費人力呢。

2007/4/30

2

拯救啞巴企鵝 Ubuntu 7.04 + alsa 1.0.14rc3

發表評論
自從Ubuntu 7.04(feisty)的kernel更新至2.6.20-14 / 2.6.20-15,我的Linux系統就陷入一片寂靜,用Google找不到有效的解決方法,只好先裝alsa 1.0.14rc3救急,沒想到真的有用*_*。

我的Notebook是ASUS M9J(hda-intel, AD198x Analog [AD198x Analog])

1.下載alsa-driver
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.14rc3.tar.bz2
2.解壓縮
tar jxvf alsa-driver-1.0.14rc3.tar.bz2
3.編譯&安裝
cd alsa-driver-1.0.14rc3
./configure --with-kernel=/usr/src/linux-headers-$(uname -r) --with-cards=hda-intel --with-oss=yes
make
sudo make install

4.重開機&放點音樂吧..

參考文件: 完整音效問題解決指南 (from Ubuntu正體中文站 論壇)

2007/4/7

0

CurlFtpFS - A FTP filesystem based on cURL and FUSE

發表評論
Description

CurlFtpFS is a filesystem for acessing FTP hosts based on FUSE and libcurl.

Features

CurlFtpFS diferentiates itself from other FTP filesystems because it features:

* SSLv3 and TLSv1 support
* connecting through tunneling HTTP proxies
* automatically reconnection if the server times out
* transform absolute symlinks to point back into the ftp file system

*從v0.9開始有支援utf8編碼

使用方法 =>
mount:
$ curlftpfs -o utf8 -o allow_other ftp://USERNAME:PASSWORD@HOSTNAME/ MNT_NAME/
-o utf8: Try to transfer file list with UTF-8 encoding. Send OPTS UTF8 ON at the beginning of file list transfer.
-o allow_other: Allow access to other users. By default the mount point is only accessible to the user that mounted it and not even to root.

umount:
$ fusermount -u sunet/

2007/4/5

0

Linux在UTF-8環境下的檔案分享伺服器(ftp,samba)

發表評論
  1. 設定Locales
    zh_TW.utf8(Mandriva在/etc/sysconfig/i18n設定檔,也可使用draklocale變更)
  2. 設定Samba
    dos charset = UTF8
    unix charset = UTF8
    display charset = UTF8
  3. 使用smbmount
    smbmount //your_host/res_name mount_path -o iocharset=utf8,codepage=unicode,unicode
  4. 設定PieTTY/PuTTY
    主選單將字元編碼切換為Unicode UTF-8即可。
  5. 設定FileZilla
    在「站台管理員」建立或選擇一個FTP站台,編輯"進階設定",將Use UTF8 on server if available設定為Force。
  6. 安裝Unicode-at-on(UAO)
    Windows灌個UAO可以解決一些亂碼問題。
  • 建議使用pure-ftpd加入RFC 2640支援, 可以解決UTF-8編碼問題
  • 測試的系統為Mandriva Linux 2007.0 (x86)
0

Linux下發簡訊的Perl Script

發表評論
一些 SMS 的 function提供的script稍加修改, 可以在UTF-8的console下發送emome的簡訊。
#!/usr/bin/perl

# Usage: sms-emome #PHONE MSG

use HTML::Form;
use WWW::Mechanize;
use Text::Iconv;

use strict;

die "Usage: sms-emome #PHONE MSG\n" if $#ARGV<1;

my ($target, $msg) = @ARGV;

my $converter = Text::Iconv->new("utf8", "big5");

&sendsms('手機號碼', '密碼', $target, $converter->convert($msg));

sub sendsms
{
my ($username, $password, $receiver, $msg) = @_;

my $agent = WWW::Mechanize->new();
$agent->agent_alias('Windows IE 6');
$agent->get('http://www.emome.net/cgi-bin/MASP/jsp/membersvc/AuthServlet?serviceId=5235');

$agent->form('myform');
$agent->field('MSISDN', $username);
$agent->field('PASSWD', $password);
$agent->submit();

$agent->get('http://websms1.emome.net/sms/sendsms/new.jsp?msg=');

$agent->form('form1');
$agent->field('phonelist', $receiver);
$agent->field('data', $msg);
$agent->field('language', 1); # 1 == 中,2 == 英
$agent->current_form()->action('http://websms1.emome.net/sms/sendsms/send.jsp');
$agent->submit();
}