Recently in 《Petit Chose》 Category
最近下载了一些软件,是各种格式的磁盘镜像文件,在MacOSX下无法mount,因此通过搜索研究了一下转换方法,转换成了 .iso格式这样既可以在Mac下mount也可以在Windows虚拟机里使用。
*CloneCD Image
下载的软件包括三个文件: software.ccd, software.img, software.sub
通过Macports安装 ccd2iso:
sudo port -v install ccd2iso
然后运行:
ccd2iso software.img software.iso
700m左右的文件在我的MB上只花了两三分钟就转换成功了。
*Alchohol 120% image
下载下来的软件包括两个文件: software.mdf, software.mds
通过Macports安装 mdf2iso:
sudo port -v install mdf2iso
然后运行:
mdf2iso software.mdf software.iso
*Nero Burning Rom image
下载的软件包括一个software.nrg文件。
有人说 nrg2iso可以转换,我通过Macports安装了 nrg2iso,然后运行
nrg2iso software.nrg software.iso
转换是成功的,但是转换后的iso无法mount。因此这个方法暂时存疑,可能是nrg2iso程序需要改进。
Toast Titanium 9可以直接mount .nrg文件,然后可以刻录或者将里面内容直接复制出来。
*CDRWin .bin/.cue image
下载的软件包含software.bin和software.cue。
通过Macports安装 bchunk:
sudo port -v install bchunk
然后运行
bchunk software.bin software.cue software.iso
Firmware version: 1.3
iPod Touch (8G)
Firmware version: 1.14
Jailbroken with iJailbreak 0.60
weDict
安装完weDict和几个字典后发现无法使用,搜索任何单词都是not found,经过google搜索发现有人提到,如果在安装weDict之前先安装了字典,那么就无法使用。我正是先安装了字典的。需要uninstall所有字典和weDict然后重新安装weDict再安装字典。
Terminal.app中中文使用
set output-meta on
在~/.profile中设置locale:export LC_ALL=zh_CN.UTF-8export LANG=zh_CN.UTF-8
一、 Ubuntu (7.10)下安装
参考了 http://www.emacs.cn/Gnus/Leafnode 和 http://learn.tsinghua.edu.cn:8080/2002315162/gnus_leafnode.html。
Ubuntu 7.10 有 leafnode 包(版本为最新稳定版 1.11.6)。通过Synaptic安装即可。
/etc/cron.d/leafnode 抄了 http://learn.tsinghua.edu.cn:8080/2002315162/gnus_leafnode.html:
# Cron entries for Leafnode
0-59/15 * * * * news if [ -x /etc/news/leafnode/do-fetch-news ];
then /etc/news/leafnode/do-fetch-news; fi
Ubuntu作为Debian系统,配置目录在 /etc/news/leafnode 下。
News spool目录为 /var/spool/news。
修改 /etc/hosts,设定hostname为 news.cyberhut.org。
(hosts里设置让我觉得怪异,我设置在 127.0.0.1 居然不行,里面本来有的 127.0.1.1 行中设置才可以。需要找时间研究下为什么。)
/etc/news/leafnode/config 中设置:
server = news.gmane.org
server = yaako.com
expire = 20000
(我准备用leafnoe作为新闻组的本地archive,所以不需要expire。设一个大的数字就可以了。2000天差不多等于54年)
initialfetch = 100
maxage = 20000 (原因和expire同)。
先通过 sudo fetchnews -vvv 把组列表取下来。
然后订阅一些组后,为了取下旧的文章,使用 sudo fetchnews -vvv -x 2000 (为了控制数据量。有些组因为文章数巨大,还需要加大 x 值直到把文章全部取下来。
在Gnus中设置nntp为localhost即可。
注:经过使用leafnode2,决定Ubuntu下也从源码安装leafnode。
Ubuntu源码安装需要先安装 libpcre3-dev包,通过 synaptic,apt-get或者aptitude安装即可。
安装很简单,不过为了使用ubuntu安装已经建立的配置目录和文件,configure时候使用sysconfdir指定原来目录。
./configure --sysconfdir=/etc/news/leafnode (--prefix=/usr/local)
make
sudo make install
然后修改 /etc/inetd.conf, 将leafnode路径修改为 /usr/local/sbin/leafnode。
leafnode2 中有些配置从config中挪到了filters中,作相应修改即可。
由于本地存储文件格式的变化,需要运行一次以下命令来更新格式:
sudo fetchnews -f
二、 MacOSX 下安装
Mac Mini G4 (MacOSX 10.4.10 PPC)
MacOSX下的安装配置本以为很简单,结果发现不是。主要参考 http://www.kutilek.de/technik/news-macosx.en.php (万分感谢,否则我还搞不定)。
由于 Macports 里没有 leafnode,只能通过源码自己安装。于是我选择了安装 leafnode 2 ( http://www.dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/ ),所用为最新的 snapshot 2.0.0.alpha 20070602a。
由于/usr/local/ 已经交给 Macports,我就直接选择安装进 /usr。
所需的 pcre 已经通过 Macports 安装。
需要建用户 news,通过控制面板中的 Accounts 增加一个用户 news即可。没有这个news用户,configure会失败。
安装:
./configure --prefix=/usr --sysconfdir=/Library/Leafnode --enable-spooldir=/private/var/spool/news
make
sudo make install-strip (现在的snapshot中不是 strip-install)
进入 /Library/Leafnode,cp config.example config,然后编辑 config:
sudo emacs config
主要设置和上面Ubuntu提到的差不多。 leafnode2中config文件结构有变化。server设置在global设置之后。
hostname没有向参考文章中一样在config设置,而是通过系统端。这也是leafnode FAQ中所建议的。
由于我家中 Mac使用ADSL上网,MacOSX 从10.4.6开始hostname改成自动设置(PPPOE连接后自动获取),这对leafnode运行造成麻烦。
MacOSX下像 GNU/Linux一样通过修改/etc/hosts设置是无效的。必须修改 /etc/hostconfig,将
HOSTNAME=~AUTOMATIC~
修改为
HOSTNAME=home.cyberhut.org
设置leafnode运行方式,使用Tiger所建议的Launch Daemon 方式,在 /Library/LaunchDaemons下建立
org.cyberhut.home.leafnode.plist,内容如下:
Label
org.cyberhut.home.leafnode
Program
/usr/sbin/leafnode
ProgramArguments
/usr/sbin/leafnode
Sockets
Listeners
SockServiceName
nntp
UserName
news
inetdCompatibility
Wait
我没有参照参考文章设置bonjour。
然后装载并启动leafnode:
sudo launchctl load /Library/LaunchDaemons/org.cyberhut.home.leafnode.plist
sudo launchctl start org.cyberhut.home.leafnode
现在用手动方式运行fetchnews,需要研究下如何使用 launchd 来定期运行fetchnews,或者通过crontab设置运行。
Emacs repos (read only):
Official CVS:
HEAD:
export CVS_RSH=”ssh”
cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co emacs
GNU Arch Location: http://arch.sv.gnu.org/archives/emacs
The branches currently available are: emacs-devo-0 emacs-lexbind-0 emacs-tiling-0 emacs-unicode-0 gnus-devo-0 gnus-rel-5.10
Mercurial (HEAD only): hg clone http://hg.intevation.org/emacs
git: git-clone git://git.sv.gnu.org/emacs.git
create a local branch from emacs-unicode-2 for building:
git checkout -b my-emacs23 origin/emacs-unicode-2
(then you can use "git checkout master / git checkout my-emacs23" to switch between two branches.
Build under MacOSX: ./configure --prefix=/usr --enable-carbon-app
Carbon port is dead, long live Carbon port!
./configure --with-ns --without-x --enable-ns-app --prefix=/usr/local --without-freetype
