Linux Chrome Flash 音乐破音
最近发现新的Chrome听 xiami.com 的音乐会有破音,豆瓣电台也一样。
这对遇喜欢写代码时塞着耳塞的我来说,相当难受。
想到Chrome是直接包含了Flash插件的,一看它的安装目录里面有个 libgcflashplayer.so 文件,跟正常的官方的Flash插件的不同。
于是就直接换用Adobe官方的 libflashplayer.so
第一步:
sudo cp /usr/lib/flashplugin-nonfree/libflashplayer.so /opt/google/chrome/ |
PS:请先确认你已经安装了flashplugin-nonfree
第二步:
在Chrome中打开 about:plugins -> 点开右上角的 Details.
看到 Shockwave Flash 下有两个文件,禁用其中的 libgcflashplayer.so ,Done!
PS:libgcflashplayer.so 和 libflashplayer.so 两个文件的大小完全一样,md5sum 不同,不知道是出了什么差错。
Debian上真机开发OPhone应用
前面一篇文章介绍过Nexus One在Debian系统上无法被ADB识别的解决办法,这两天在弄移动的OMS平台,发现需要使用同样的办法解决同样的问题。Debian 调试 Nexus One 的设置
OPhone1.5 插上 USB会有5个选项,选中"adb"就可以了。
OPhone2.0 插上 USB只有4个,选”同步“。
lsusb 找到手机对应的制造商和设备的ID,在/etc/udev/rules.d/51-android.rules上照样写一行就好了。
Debian 调试 Nexus One 的设置
问题:无法在Nexus One上调试,adb无法识别设备。
richard@r:~$ adb devices List of devices attached ???????????? no permissions |
原因:USB 设备ID无法被系统识别。(参考)
解决方法:
创建或修改文件(参考)
sudo vim /etc/udev/rules.d/51-android.rules |
添加一行
SUBSYSTEMS=="usb", SYSFS{idVendor}=="18d1", SYSFS{idProduct}=="4e12",
MODE="0666", OWNER="YOUR_USERNAME" |
改权限
chmod a+r /etc/udev/rules.d/51-android.rules |
重新载入USB设备
sudo service udev reload |
看效果
richard@r:~$ adb devices List of devices attached HT9CXP811756 device |
Debian fcitx 设置
最近Debian 下 fcitx 更新到3.6.3.
这个版本的fcitx相关文件位置从 ~/.fcitx/ 移到了 ~/.config/fcitx/。
然后我就发现我原来的fcitx配置不能用了,在把config移动到~/.config/fcitx/config 后还是不行。
怀疑启动设置方式有问题,找来了正统的设置方法:
新建文件 /etc/X11/Xsession.d/95xinput,添加如下内容:
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE="fcitx"
export QT_IM_MODULE="fcitx"
fcitx
重启X后发现还是没启动。
terminal 下执行 fcitx 提示说配置文件有错。
于是从 /usr/share/fcitx/data/config 把文件cp 过来,适当修改后, fcitx能启动了,但是输入状态条是灰色的.
修改 /usr/lib/gtk-2.0/2.10.0/immodule-files.d/libgtk2.0-0.immodules
找到 "xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh"
后面的语言列表里面加上"en"就可以了,因为我的系统Locale是en_US.UTF-8
另外一个Fcitx 的设置方法,似乎更加"正统"。
im-switch -z all_ALL -s fcitx
Eclipse崩溃一则
Eclipse 在proposals弹出框按下回车后崩溃。
控制台下出错信息如下:
richard@r:~/bin/eclipse$ ./eclipse
The program 'Eclipse' received an X Window System error.
This probably reflects a bug in the program.
The error was 'RenderBadPicture (invalid Picture parameter)'.
(Details: serial 61307 error_code 169 request_code 150 minor_code 7)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
系统是 Debian sid
看信息是图形方面的问题,想到早上刚更新过,打开history 一看唯一可能导致这问题的就只有 libcairo2 从1.8.8-2 升级到了 1.8.10-1。
重新安装了 apt archives 下 libcairo2_1.8.8-2_i386.deb 后问题解决。
给debian提交了bug report
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571192
更新:此bug已fix, 更新libcairo2到1.8.10-2即可。
Debian下Java程序不能访问网络
现象: 1. mvn *** 命令不能下载到任何文件 (任何Java程序都不能正常访问网络)
2. eclipse 不能安装插件,或者升级
3. svn 更新, 提示错误: "Network is unreachable"
原因: 简单来说, Debian对IPv6的默认设置使 Java 虚拟机网络不能正常工作.
解决: 修改文件 /etc/sysctl.d/bindv6only.conf
"net.ipv6.bindv6only = 1" -> "net.ipv6.bindv6only = 0"
参考: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560142