Kubuntu 11.10 不显示ibus 的选词框和系统托盘

折腾了一下,把自己的电脑换成了Kubuntu 11.10 ,但结果发现用装好(aptitude install ibus-pinyin-db-open-phrase ibus-qt4 ibus-gtk ibus-gtk3 ibus-pinyin)ibus-pinyin 输入法之后,它怎么也不会显示出选词框和系统右下角的托盘。

解决办法:用ibus-daemon -x -v 命令启动ibus 服务可以发现一些错误提示;安装gnome-icon-theme 可以解决这个问题。

Problems

If you're having board problems I feel bad for you son.
I got 99 problems, but a switch ain't one.
The year is 94 I need voltage to fall and all over my project write up Kirchoff's motherfuckin' law.
I got two choices yall raise impedence OR
Cut the power in half, throw some batteries on the floor.
Now I ain't trying to see no arcs or sparks today,
Plus I got a few resistors I can lower the rate
At which these amperes flow to get the coulumbs low,
Then I think what am I trying to change this boolean expression fo'?
Because it's a one not a zero don't want an LED to glow,
Plus I don't have spare logic gates to invert the output yo.
Am I doing things write or should I change some code?
I don't do wiring diagrams so sometimes I don't know.
Maybe we engineers need to lower the bar
Fuck that I got an academic rep I can't affort to mar.
But for a second I was stumped that much I can admit
Until I realized that I just had to tweak my wiring a bit.
Regulate all this switch bounce and keep my volts controlled not whack but all engineers know you need capacitors for that.
So throw one in parallel to something
Just a little capacitance like .02 farads or something
That clears things up lowers voltage a bit
Enough that an LED in series won't always be lit.
Realize how I could've just stopped current and it makes me feel kind of dumb...I got 99 problems but a switch ain't one.

Well done, redditor!

我希望。。。

我希望Gmail 能有像Hotmail 那样的“别名(Alias)”功能。

我希望Windows 平台上的Chrome 浏览器能够使用DirectWrite 来渲染字体。

我希望Google 搜索不要每次都为中国的IP 地址默认设置成“从新窗口打开连接”。

我希望我可以在Opera上面用鼠标选定图片。

Windows 8 first impressions

其实很少啦,该评论的网上其他人都评了,再大概是因为显卡驱动的原因,Metro 风格下我一个app 也打不开(包括Metro 风格的IE),所以我想说的确实很少。

对于我来说变化最大的莫过于Windows Live ID 的加入了。

Windows 8 account setup

可以用Windows Live ID 登录了!这样就可以同步很多的用户配置文件了

Windows 8 sync options

这让我觉得:以后每个人最重要的应该就是Google帐号、Facebook帐号和Windows Live ID了。Facebook 帐号可以用来方便快捷地注册、登录其它网站(这点Facebook connection 比生来即以此为目的OpenID 却成功得多);Windows Live ID 因为有了Windows 8的推动,在这个以Windows 为主的世界里,用户是很难不去用它的(更何况它的用户本来就不少了,对吧?);Google 帐号在我看来似乎作用是前2者的结合,但影响力实际上还不及前2者。另,推测:按照微软和Facebook 的关系,很有可能某一天Facebook 帐号是会与Windows Live ID 更好的连接甚至融合的。总之,保管好这3个帐号的密码吧。

扯远了哈,继续说Windows 8 的事。本来在用Windows Live ID 登录进Windows 8 后,我以为会出个丑:打开IE,输入hotmail网址,可能还会要我输入密码甚至帐号,哈哈哈哈!但结果并不是这样!我不需要再次输入hotmail 的密码了,直接就可以进入的了。

No need to input password again

仔细看,面板式的窗口(我想不起这个描述的正式名称了)的按钮有了点变化——多出了个“向上”的箭头。

The new "Up Arrow"

但是真的有必要多这么一个“向上”箭头吗?地址栏里不是已经就有了上级目录?而且不止一级!哦,点那个似乎会在地址栏下拉菜单留下历史记录,而“向上”箭头则不会……多周到!

The good side of Google Chrome’s shortcut apps

Ever thought Google Chrome’s shortcut apps (e.g. Gmail, Youtube…) were really suck?

I bet you do! What’s the point of this kinda so-called apps anyway? Aren’t Chrome’s Most visited page and bookmark bar better than this?

But… surprise! I just found the good side of some of these shitty apps!

Before install the Youtube app, the error message is really ugly, unfriendly, even makes you can’t tell which part is the real article’s content:

After install the Youtube app:

Ah! It makes sense now.

Another example:

I’m in China, Youtube has been blocked here for a long time (fuck this!), any web page that embedded Youtube’s videos would cause the web browsers to generate error massages, which is really annoying. This Chrome apps’ new feature, helps me a lot.

Gnome 3 还好

我把Ubuntu 从11.04 升级到了11.10 的开发版。(令我感到意外的是——尽管升级过程并不顺利(强迫重启了2次),但升级后的新系统记过一些调整后却很似乎很稳定,没见到太多的软件包本身的bug,比之前从10.10 升级到11.04 alpha 轻松多了。)

升级后,我并没感到Unity 桌面环境有什么大的改进。相反,对于新的ctrl+tab 的功能设置我实在无法接受,我以前都用它切换浏览器标签的。。。

11.10 的一个好处是GNOME shell 可以和Unity 共存,所以我又安装了GNOME shell,这东西比我想象中的要好。最主要的就是响应速度上了,比那个基于糟糕compiz 的Unity 好太多了。举个例子,在GNOME shell 和Unity 环境中分别按下Windows 键,GNOME shell 几乎是立即就弹出那个Acitivites 界面了,而Unity 底下往往得卡个一两秒钟。。

GNOME shell 另一个明显强于Unity 的地方就是屏幕左边那个“panel”了。使用Unity 时,鼠标往屏幕左边移动时都得很小心,以防止把那个panel 给激活了;而在GNOME shell 中则是无需担心的,屏幕左上角才是用户需要“担心”的。

目前就这点感觉吧。。。

Nginx with SSL

因为有了StartSSL 这样的可以免费申请SSL证书的机构,所以我觉得把自己的一些站点放到https 下还是值得去做了的。(至少,总还是会有一部分人会对在非SSL加密下的登录页面感到不舒服吧)

SSL 的性能问题

SSL 增强了安全,但它有些问题。它会导致服务器的资源消耗比http 大(但对现在一般的机器来说似乎已经不再是个问题了)。很多情况下人们对于https 的链接还是有一个感觉——慢,准确点来说应该是初次连接到服务器时会感觉慢,而一旦连接建立后,速度上感觉是与明文的http相差无几的。这主要是因为本地浏览器与服务器端初次建立连接握手时需要进行(非对称)密钥交换,密钥交换的协议和密钥的加密算法、长度都会对这个时间有影响。但是连接建立后,内容是以密钥长度短得多的对称加密的方式在传输,而且现代的浏览器同样也能对https链接的内容进行缓存等操作,所以也就感觉不到什么差别了。

因为慢,所以要对它作些调节。但知道了原因后也就好办了。

  • 密钥交换协议的选择。可以在Nginx 配置文件的ssl_ciphers 指令中添加“!kEDH”禁用先对耗时更长的DH 密钥交换机制,而使用RSA【1】。从1.0.5 版本开始,Nginx 默认的SSL ciphers是“HIGH:!aNULL:!MD5”,我们可以把它改为“HIGH:!aNULL:!MD5!kEDH”。应该看到如下变化:


使用DHE_RSA 进行key 交换

更改后的使用RSA key交换机制

  • 服务器公钥长度的选择。长度越长的服务器公钥一般来说是越安全的,但建立连接的时间也会越长,所以这就需要作些取舍了。像Google 和Facebook 这两家规模巨大但提供了许多全程加密的web 服务的公司就使用了相对“弱”的1024位公钥(openssl s_client -connect domain.com:443 查看),这也许降低了建立连接的安全性,但更重要的是降低了连接建立时间。(BTW,Google 还在传输过程中对Chrome 浏览器使用了比HTTP 更快的SPDY 协议,并且key exchange 机制也是RSA 的。)

其它还有要注意的地方有服务器ssl_session_cache, ssl_session_timeout, keepalive_time 等指令的使用等。

——

一些有用的链接:

【1】. http://matt.io/technobabble/hivemind_devops_alert:_nginx_does_not_suck_at_ssl/ur

http://nginx.org/en/docs/http/configuring_https_servers.html

http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html

http://blog.httpwatch.com/2011/01/28/top-7-myths-about-https/

http://blog.httpwatch.com/2009/01/15/https-performance-tuning/

Iptables default DROP 策略和hitcount

记一下。当使用了默认为DROP 的策略时,iptables 限制连接次数的脚本应该可以这么写:

[sourcecode language=”bash”]
#!/bin/sh

# Flush all existing rules.
iptables -F

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

iptables -A INPUT -i $INET_IF -p tcp -d $INET_ADDR –dport 22 -m state –state NEW -m recent –update –seconds 300 –hitcount 5 -j DROP
iptables -A INPUT -i $INET_IF -p tcp -d $INET_ADDR –dport 22 -m state –state NEW -m recent –set -m state –state NEW,ESTABLISHED -j ACCEPT

[/sourcecode]

使用default DROP 策略时,–update 应该是要位于–set 之前的。因为之前把iptables 和PF 有些记混了,记成了iptables 也是“最后匹配”的,所以写成了先–set, 然后–update 的顺序,结果测试发现根本就无法达到限制连接数的作用。
PS:之所以限制SSH server 端口的连接次数只是为了让auth.log 简洁一点,算不上什么安全策略。确保SSH server 安全正确的做法应该还是禁止密码验证方式吧。