Next to Richard Stallman

我这个人一般不八卦,你知道的。但是个别时候实在是情难以堪。

Bug 626593 – Gnome ate my boyfriend! Help!
https://bugzilla.gnome.org/show_bug.cgi?id=626593

这位女士在GNOME bugzilla上提交bug,bug提交在empathy项目下。(注 dict empathy: 心意相通)

先不看正文,备注信息就极具幽默感:
Status: RESOLVED INVALID
Product: empathy
Component: User Guide
Version: unspecified
OS: Windows
Importance: Normal critical

是不是真的RESOLVED就不知道了。

事情的直接原因是上周海牙GUADEC,此男cancel了周末和这位reporter的约会。此女不堪长期忍受此男、Linux、Maemo、C等等,彻底爆发了。

He even tried to put Linux on my computer and I simply could not take it. I came home from work one day and my computer said “UNIX” all over it!
这句有力的证明了我曾经看到的一句箴言,给女生装linux,对她们、对电脑、对linux都是一种折磨。

接下来搞笑开始了。一楼就是一位极缺乏幽默感的大叔:
Akhil Laddha 2010-08-11 06:45:46 UTC
This is a GNOME bug tracking system, not any family consultancy.

二楼是位好心人,提出了一个Linux week计划,还一厢情愿整了个交易计划:
for each bug you report, he has to spend one night with you without the computer.

八楼精华:
David Liang 2010-08-12 08:53:16 UTC
不得不顶

九楼亮出一个家属俱乐部的邮件列表:
gnome-women-list@gnome.org,说你要是在家属圈子里麻将打得无敌手,自然你的boyfriend就崇拜你了,到时你就是爷了

高潮在十楼出现了,“你不说这男的是谁我们怎么帮你?”

紧接着十一楼一位神秘人士笑而不语。

十四楼比较直接
#apt-get remove boyfriend –purge

十九楼知道宁拆十座庙的道理,建议先查看一下情况再说:
cat /dev/boyfriend | grep love

最冷的是十六楼说咱们有这么个项目的:
http://projects.gnome.org/outreach/women/

你以为故事就这么结束了,你错了。
没想到男主人公的网站被我不经意间人肉出来了:
http://zachgoldberg.com

一上来第一篇就说这事:
HELP! My Girlfriend Learned How To Use A Bug Tracker

I never thought it would happen.

此男字字珠玑:
It all started one night when I got home very late from work (where I get to play with Linux all day… who would ever go home?). I got the usual “you need to pay more attention to me” and “Linux will never have sex with you!”. I sat through it all and when it was over she went to sleep and I…. opened up my Laptop (running Ubuntu Linux, of course) and started hacking. All is right with the world.

于是他发现自己上了LWN的Quote of the Week,和RMS的新闻并列,然后又被转载到hacker news, geek.com, slashdot。他感叹道 I never imagined my entry into the “slashdot number of zero” (think Erdos or Kevin Bacon) club would happen in this way.

最后他说他要开一个bugs.zachgoldberg.com专门解决这类的问题,If you want your own component in the bugtracker to help you and your loved one vent your problems all you need to do is ask!

哈哈哈哈

补充个精华链接:http://www.reddit.com/r/linux/comments/d02j6/bug_626593_gnome_ate_my_boyfriend/

最后daf同学总结性地指出,她不会学习使用bug tracker。

The post is brought to you by lekhonee v0.7

Douban provider for Alexandria

Alexandra is a desktop book collection manager on gnome written in ruby. With an extensible architecture, Alexandria uses different sources to retrieve book’s data, including Amazon and many local sites.

Douban.com is considered to be most applicable data source for books published in Chinese. So I write this provider according to Alexandria’s SPI. Now it’s possible to add Chinese books and manage reading lists.

alexandria

Now the code can be found in Alexandria’s bug tracker:
http://rubyforge.org/tracker/index.php?func=detail&aid=28160&group_id=205&atid=865

However, the patch file of book_providers.rb in that list is for svn trunk head version only. To use it with currently stable version of Ubuntu, first, make sure you have Alexandria version 0.6.5-0ubuntu1 and libjson-ruby1.8 installed.

Download douban.rb from rubyforge:
http://rubyforge.org/tracker/download.php/205/865/28160/4923/douban.rb
Copy the file to /usr/lib/ruby/1.8/alexandria/book_providers/ with super user privileges.
Use this patch to /usr/lib/ruby/1.8/alexandria/book_providers.rb

310a311,323
<     begin
<       begin
<         require 'json'
<       rescue LoadError
<         require 'rubygems'
<         require 'json'
<       end
<       require 'alexandria/book_providers/douban'
<     rescue LoadError =< ex
<       log.error{ex}
<       log.warn {'Fail to load douban as provider'}
<     end
<

Feel free to report issue here.

Virtual Machine Searcher for Gnome Deskbar Applet

Very glad to announce another daily-coding work: an extension for gnome deskbar applet to search and launch virtual machine. There is a plugin for gnome-do that does the same job. That’s what I create the the plugin for. I switched to deskbar because gnome-do’s Do.exe reminds me nightmares when I was a M$ Windows user. The deskbar applet has been a great replacement, however, the virtualbox plugin in Do is really impressive while deskbar doesn’t provide me the same functionality.

You can ignore words above and just take a look at the screenshot:
deskbar-virtualbox

Download

Download the extension from (the highlighted one):
http://bitbucket.org/sunng/daily-coding/downloads/?highlight=5137

You can also trace the development at bitbucket project. However, the repository is mixed with other small code snippets. Currently, mercurial doesn’t support subdirectory pull. So there is no way to grab the deskbar-applet individually.

Installation

copy this file to /usr/lib/deskbar-applet/deskbar-applet/modules-2.20-compatible/ (Ubuntu installation for example) with super user privilege. Right click desktbar applet, select Preference, Searchers tab, hit “Reload” button, then check the Virtualbox Deskbar Module.
deskbar-preference

Issue

Feel free the report issues on bitbucket:
http://bitbucket.org/sunng/daily-coding/issues/

使用gnome-dictionary和dictd

最近琢磨字典多一些,以前一直不知道gnome自带的gnome-dictionary如何使用,因为默认的字典源里都没有中文字典,而且离线更是无法使用。其实不然,字典服务可以自架,并且可以使用自己的字典。

在自己的机器上架设dictionary server,以ubuntu为例:

安装dictd / dict
sudo apt-get install dictd dict

前者是字典服务器,后者是字典服务客户端。还可以从仓库里安装已经打包好的字典,如
sudo apt-get install dict-stardic
是一个英汉字典

dictd安装好后会默认自启动,也可以通过
sudo service dictd start
来控制dictd的启动、重启和关闭。

通过dict测试服务的状况
dict -D
命令会列出可用的数据库(即字典)

在gnome-dictionary中添加字典源 Edit->Preference->Source->Add
Name: 自定义的字典名
Transport: Dictionary Source
Hostname: 127.0.0.1
Port: 2628

Close之后可以到主界面打开侧边栏,在Dictionary Source中双击选定此字典,在Aailable Dictionaries里双击选中目标字典,于是就可以在gnome-dictionary里使用本地的字典服务了。

接下来安装自己的字典。stardict的网站上有很多中文字典,上面也都标示了授权协议。要在dictd里使用这些字典,需要进行一个简单的格式转换。安装一个工具
sudo apt-get install dictconv

它的使用方法:
dictconv -o OUTPUT_FILE INPUT_FILE

在input_file指定stardict的.ifo文件,在output_file指定要生成的dictd的.index文件。这个转换非常耗时,需要有足够的耐心。这个操作将会生成.index和.dict文件。对.dict文件进行压缩:
dictzip OUT.dict

转换完成后,编辑/var/lib/dictd/db.list文件,在其中添加一个database定义
database YOUR_DB_NAME{
data PATH_TO_DICT_DZ
index PATH_TO_INDEX
}

其中PATH_TO_DICT_DZ是上一步的.dz文件,PATH_TO_INDEX是到上一步生成的.index文件的路径。编辑完成后,重启dictd服务
sudo service dictd restart

使用dict -D可以查看启用的字典。

建议备份/var/lib/dictd/db.list文件,因为每次从apt-get安装字典后,这个文件都会被覆盖。

dictd服务也可以在fantasdic里访问。

Patch for Fantasdic Google Source

I found fantasdic a great powerful dictionary tool with friendly UI and supports multiply sources. Unfortunately, this project seems to be no longer maintained. The latest version is 1.0-beta7.
fantasdic-google

The google translate source was created in 2007. As the google translate service page changed, this module doesn’t work any more, so I just picked up my vim then created this patch for those still want to use it.

This patch has dependency with ruby’s json module, so before you apply it, run:
sudo gem install json
or
sudo apt-get install libjson-ruby1.8

Download the patch at:
https://bugzilla.gnome.org/attachment.cgi?id=152835

Patch it (Ubuntu installation as example):
cd /usr/lib/ruby/1.8/fantasdic/sources/
sudo patch google_translate.rb /home/sun/google_translate.rb.diff

Restart fantasdic, then your get it works! And this bug is tracked at:
https://bugzilla.gnome.org/show_bug.cgi?id=605641