2010-04-18

GameConqueror进入Debian Sid | GameConqueror is included in Debian Sid

如题,非常高兴。
继续盘算下一个版本需要实现的东西。
链接: http://code.google.com/p/scanmem/


As titled I'm quite happy with this.
Still considering possible features in next version.
Link: http://code.google.com/p/scanmem/

2010-04-11

Empathy 不能连 MSN 的问题 | Empathy cannot get MSN accounts online

症状是总报 Network Error, 重连也不行

根据http://aslakjohansen.wordpress.com/2009/07/27/empathy-gives-network-error/ 把telepathy-butterfly杀掉就可以了。


So it always report "Network error", reconnecting has no luck.

According to http://aslakjohansen.wordpress.com/2009/07/27/empathy-gives-network-error/ , just simply kill the "telepathy-butterfly" process, then it'll be fine.

Google Reader 总显示 "kept unread" 列表的问题 | Solution to the annoying "kept unread" list in Google Reader

不知道从什么时候开始我的Google Reader首页上总会显示一个kept unread列表,但是进去以后却是显示已读,此时点mark all as read或者挨个浏览这些item都没有任何效果。

今天在http://groups.google.com/group/google-reader-howdoi/browse_thread/thread/a68ae3f9a7761e26/11eb862ab44a67c3 找到了解法:

给每个kept unread的条目加星
去加星条目列表,挨个浏览每个条目(不要点mark all as read)
去掉这些条目的星

然后就正常了。 这个应该是Google Reader的bug吧。。。

There's been a "kept unread" list in my Google Reader home page for some time, and I didn't know why. In the list, each item seems be already ready, and clicking "mark all as read" or navigating each of them have no effect.

Today I found the solution on http://groups.google.com/group/google-reader-howdoi/browse_thread/thread/a68ae3f9a7761e26/11eb862ab44a67c3

Add start for each of them
In "starred items", navigate each of them (don't click "mark all as read")
Remove these temporary stars

Then that list would be gone. This must be a bug of Google Reader...

2010-04-10

gnome桌面便笺 | best sticky note application

最近需要搞个桌面上的todo list, 以前是用screenlets,现在不用了,而且为一个插件就开这个庞然大物太浪费了。

我在用gnote,但是这个不适合放在桌面上。gnome-panel的一个小插件也是sticky note,但是不能锁定在桌面上,一点就消失了。

另外搜到的xpad,但是我这里有bug,一个灰色的窗口,什么都么有。网上搜到了解决的patch,但是不想折腾了。

最后看到某人论坛留言: 在桌面建一个文本文件,然后把图标放大。。。顿时豁然开朗,一开始遇到这个特性时还觉得有些烦人,但是现在需要时反而想不起来了。。。

效果不错,缺点是不能弄太多文字。


Recently I found that I need a sticky note on my desktop. I used screenlets before, but not anymore now. It's a waste to enable it only for such a gadget.

Now I'm using gnote, which is rather a nice software, but it's not suitable for 'sticky' notes. There's also a stickynote applet for gnome-panel, but I don't know how to attach the notes to desktop -- every time I click somewhere, the notes disappear.

I googled some software called 'xpad', but on my computer it's nothing but a gray empty window -- an annoying bug, although I've googled a patch for this, I've got no feeling for it.

Finally I got someone's comment on some bbs -- "create a paint text file on the desktop, and then stretch the icon large enough..." -- that's it! It was quite an annoying feature to me at the first time, but now I cannot even remember it when I do need it now...

This trick works well, except for that there cannot be too many words.

2010-04-05

Webkit 下中文字体问题的解决 | Solution to the problem of unexpected Chinese fonts in webkit

也许是仅局限于webkitgtk

之前尝试epiphany的时候就发现了这个问题,但是由于epiphany对我来说只是一个备用浏览器,所以没管它。 今天给empathy搞adium主题时这个问题再次蹦了出来,我决定干掉它。

https://bugs.launchpad.net/ubuntu/+source/webkit/+bug/502610 这里有些讨论,里面有个链接指向了改fontconfig的办法,但是我想我这里并不是这个问题,因为我在~/.fonts.conf里已经之定好了我希望的中文字体(主要是serif, sans-serif, monosapce这几个列表),我还是觉得这个是webkit的问题。

empathy有个选项可以开启webkit debug模式:/apps/empathy/conversation/enable_webkit_developer_tools 我用它查看元素,发现字体总是sans...目前解决方法是手工改css,找到.msg的定义,加入 font-family: "font name 1", "font name 2";

另外就是epiphany,虽然它不能给各个语言指定字体,但是好歹支持用户css,于是加入如下内容:

@charset "UTF-8"; // 如果字体名有中文
* {
font-family: "font name 1", "font name 2" ! important;
}

这样问题基本可以解决




Or maybe it's only a bug for webkitgtk, I'm not sure.

Days before I encountered this bug when I was trying epiphany, but I didn't pay much attention on it since I use it only as a backup one. However today the bug came out and started to trouble me again when I was applying an adium theme for empathy, and then I decided to get rid of it.

There are quite some discussions in https://bugs.launchpad.net/ubuntu/+source/webkit/+bug/502610 , and someone there provided a solution that to modify config files of fontconfig. But I think it's not the case at least for me, since I've specified my preferred fonts of the generic font families (serif, sans-serif, monospace). I think it should be webkit's fault.

Enabling "/apps/empathy/conversation/enable_webkit_developer_tools" will enable the debug mode of empathy, where I can inspect the HTML elements (that's cool!), I found the font of messages are all "Sans", and I got no solution except for manually modifying the css file of the theme, just add the following lines in the ".msg" block

font-family: "font name 1", "font name 2";

About epiphany, I wonder why I cannot specify font for different languages/charsets just like firefox, but at least it supports user specified css, so I created one with the following content:

@charset "UTF-8"; // since the name of the font I'm using contains Chinese characters
* {
font-family: "font name 1", "font name 2" ! important;
}

and it works like a charm :)

2010-04-03

ubuntu flash 中文乱码的解决

症状是所有中文都显示为方块

网上搜了很多方法,看上去都很暴力。另外在https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/207198有很多讨论。

所有的方法都集中在/etc/fonts/conf.d/49-sansserif.conf这个文件上,不是修改就是删除。

(以下为个人猜测)

这个文件的用途是给没有通用字体名的字体加上sans-serif这个名字,比如说我想在标题栏上使用Comic Sans, 但是如果出现了中文怎么办?一般对中文的支持都是在serif, sans-serif,monospace这三个列表里加上中文字体,但是如果我指定的是Comic Sans,系统如何知道去哪里找中文字体呢。

所以这个文件就有用了,它给没有制定通用字体名(sans,sans-serif,monospace之一)的字体强行加上一个sans-serif,这样看上去就比较合理了。

而flash是怎么回事我就不知道了,因为不是所有的flash上显示中文都是乱码,youtube上的是乱码。

我在~/.fonts.conf里给sans-serif列表前端加了两个字体,一个英文一个中文,中文在后,这样可以让两种语言都能正确显示(因为中文字体对应的字符集包含英文的)。但是结果是flash就认第一个,不能匹配到第二个。我猜是flash请求时的问题,当然也可能是fontconfig的问题。如果我去掉了第一个字体,flash倒是正常了,但是所有字符都用那个中文字体显示了,不爽,所以这个文件不能动。

至于sansserif.conf这个文件,直接删除自然是不大合理,不知道会匹配到哪里去。目前的临时解决办法是把最后那个sans-serif改成我指定的那个中文字体,想了一下从逻辑上讲的通。

但是这个毕竟不是办法,让一般用户改这个还是不合理。如果是flash的问题自然好办,如果不是的话,我觉得可以给50-user.conf更高一点的级别,让用户自由度更大。

2010-04-02

compiz 鼠标指针问题

症状是gnome里改了指针主题以后,(在打开compiz的情况下)标题栏,gnome-panel上的鼠标指针还是以前的(不知道是哪里来的),总是是不会跟着改变。

https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/459647上某人提到了修改/usr/share/icons/default/index.theme,我看了一下,是一个link,而且是带有alternative的。

于是用update-alternatives更改了一下,重启X,一切OK。

另外怀疑创建~/.icons/default/index.theme也可以解决问题,没有验证。

利用共享内存加速firefox

被同学怂恿了半天,禁不住诱惑,改了一下,确实变快了

方法是 about:config 修改 browser.cache.disk.parent_directory 为 /dev/shm/firefox
然后重启firefox

Debian系 ipv6 6to4 tunnel 脚本

有个在线生成脚本的网站,很不错 http://debian6to4.gielen.name/

不过也许改成自动根据ipv4地址进行配置会更好

[转]ubuntu 下由于没有公钥,下列签名无法进行验证: 解决方法

Link: http://www.noteip.com/?p=983

W: GPG签名验证错误: http://linux.dropbox.com karmic Release: 由于没有公钥,下列签名无法进行验证: NO_PUBKEY FC918B335044912E

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5044912E

若缺少其他公钥,则将命令中两处5044912E改为NO_PUBKEY FC918B335044912E中最后8位即可!

grub2 配置命令备忘

之前装Windows把grub搞挂了,用ubuntu 9.10的盘不能恢复,才发现grub2时代已经来了

又搞了个ubuntu 9.04的盘恢复以后,索性就升级到了grub2。当时有很多问题,尤其是分辨率那个。现在装了10.04,似乎没什么问题了,常用配置命令整理如下

旧版升级:
sudo upgrade-from-grub-legacy

去掉memtest:
sudo chmod -x /etc/grub.d/20_memtest86+

修改背景图片/颜色:
sudo vim /etc/grub.d/05_debian_theme 注意背景black表示透明,否则会挡住背景图片

修改控制台分辨率:
sudo vi /etc/grub.d/00_header 在 set gfxmode=${GRUB_GFXMODE} 后加入 set gfxpayload=keep
注意同时要修改/etc/default/grub里面的 GRUB_GFXMODE

其他参数:
修改 /etc/default/grub, 里面的注释写的很清楚的

更新grub菜单,重新搜索内核等等
sudo update-grub
这个很不错,一个是能自动搜索windows loader,另一个就是再也不用为“是(hd0,4)还是(hd0,5)”之类的问题发愁了

windows server 2008 r2 当桌面系统使用的配置

我原来的windows 7 rc到期了,所以搞了个免费的学生号装windows server 2008r2,效果不比windows 7差,就是需要折腾一些服务设置啥的。

最近在http://weblogs.asp.net/israelio/archive/2008/02/21/windows-server-2008-as-workstation.aspx恰好又看到了,因此转过来备忘:

  1. Disable shutdown event tracker
    Start->Run->"gpedit.msc" -> Administrative tools->System-> Display Shutdown event tracked -> Disable
  2. Disable IE Security
    Start->Server Manager->Configure IE Sec->Off both options.
  3. Enable Wireless Support
    Start->Server Manager->Features->Add Feature->Wireless LAN Services
  4. Enable Audio support
    Start->Run->"Service.msc"->Windows Audio -> Automatic
    Start->Run->Services.msc"->Windows Audio Endpoint Builder->Automatic
  5. Install hardware drivers
    I am using ThinkPad t60p so my driver list is here
    Note that mobility center is missing from windows 2008 server so there is no need to install it.
    IBM Network access connection will crash on you if you will not enable the wireless support (Look above)
  6. Enable Vista Experience (look & feel including Aero, Media Player etc.)
    Start->Server Manager->Features->Add Feature->Desktop Experience

    More info including how to enable sleep support on windows 2008 server you may find over this kb: http://support.microsoft.com/kb/947036)
  7. Enable Themes
    Start->Run->"Service.msc"->Themes->Automatic
  8. Enable .NET 3.0
    Start->Server Manager->Features->Add Feature->.NET Framework 3.0 Features
  9. Enable Windows Search (for searching outlook emails)
    Start->Server Manager->Roles->Add Roles->File Services->Windows Search
  10. Enable SuperFetch
    Start->Run->"regedit"

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters

    Add a new DWORD by the name of EnablePrefetcher and assign is the value of 3
    Add a new DWORD by the name of EnableSuperfetch and assign is the value of 3

    Start->Run->"services.msc"->SuperFetch->Automatic
  11. Install Messenger
    Latest Live Messenger will not install on Windows 2008 Server, you should install a former version (8.1 and not 8.5) and then you may copy the Live Messenger folder from a working machine and work with it.
    http://www.microsoft.com/downloads/details.aspx?FamilyID=d78f2ff1-79ea-4066-8ba0-ddbed94864fc&DisplayLang=en
  12. Install Skype
    Latest Skype version will crash 2 seconds after login, you need to install a former skype version Skype 3.1.0.152 works great.
    http://filehippo.com/download_skype/2473/
  13. Install Office 2007
  14. Install Visual Studio 2008
  15. Setting Processor Scheduling
    Start->Control Panel ->System ->Advanced system settings-> Advanced -> Performance -> Settings->Advanced->Adjust best performance->Programs
    update:
  16. Changing DEP Mode
    Start->Control Panel ->System ->Advanced system settings-> Advanced -> Performance -> Settings-> Data Execution Prevention-> Turn On DEP for essential Windows programs and services.
    update2:
  17. Fixing ASP.NET Development Server
    After installing visual studio you might want to start working with Casini, the asp.net dev server but it seems that the ie cant find it.
    Edit the hosts file located at: C:/windows/system32/drivers/etc

    comment the following line :
    ::1 localhost
    by replacing it with:
    #::1

    (the "::1" is use for the localhost for ipv6)

有一些其实我这里不需要,但是也转过来了。