Showing posts with label ibus. Show all posts
Showing posts with label ibus. Show all posts

Sunday, October 16, 2011

arch下ibus在gnomeshell中的自启动

执行下面的命令
cp /usr/share/applications/ibus.desktop ~/.config/autostart/ibus.desktop

Wednesday, September 28, 2011

arch build system-howto

/usr/share/vim/vimfiles/doc/Untitled.html
arch的安装包管理机制类似debian的deb包管理机制

昨天ibus更新导致无法激活中文输入,上irc问了问才知道需要重新编译ibus-sunpinyin.

于是 https://wiki.archlinux.org/index.php/ABS 根据wiki学习了一下.

首先需要安装abs
# pacman -S abs
然后安装编译环境
# pacman -S base-devel

然后根据需要编辑/etc/abs.conf
# vim /etc/abs.conf
去除你想编译的包的源,比如:
REPOS=(core extra community !testing)

接着下载ABS tree
# abs
你的ABS tree 将在/var/abs目录创建.

你也可以单独下载你需要编译的软件包:
# abs <repository>/<package>
(比如 # abs community/ibus-sunpinyin)

The ABS tree

When you run abs for the first time, it synchronizes the ABS tree on the Arch Linux server to your computer. The ABS tree is an SVN directory hierarchy located under /var/abs and looks like this:

| -- core/
|     || -- base/
|     ||     || -- acl/
|     ||     ||     || -- PKGBUILD
|     ||     || -- attr/
|     ||     ||     || -- PKGBUILD
|     ||     || -- ...
|     || -- devel/
|     ||     || -- abs/
|     ||     ||     || -- PKGBUILD
|     ||     || -- autoconf/
|     ||     ||     || -- PKGBUILD
|     ||     || -- ...
|     || -- ...
| -- extra/
|     || -- daemons/
|     ||     || -- acpid/
|     ||     ||     || -- PKGBUILD
|     ||     ||     || -- ...
|     ||     || -- apache/
|     ||     ||     || -- ...
|     ||     || -- ...
|     || -- ...
| -- community/
|     || -- ...

The ABS tree has exactly the same structure as the package database:

    First-level: Category directories
    Second-level: Package name directories
    Third level: PKGBUILD (contains information needed to build a package) and other related files (patches, other files needed for building the package)

The source code for the package is not present in the ABS directory. Instead, the PKGBUILD file contains a URL that will download the source code when the package is built.

创建软件目录
$ mkdir -p $HOME/abs
然后拷贝你需要编译的软件到你的abs目录(比如ibus-sunpinyin)
$ cp -r /var/abs/community/ibus-sunpinyin ~/abs
然后进入工作目录
$ cd ~/abs/ibs-sunpinyin
编辑PKGBUILD文件(add or remove support for components, to patch or to change package versions, etc. (optional):)
$ vim PKGBUILD
然后以普通用户编译(with -s switch to install with automatic dependency handling)
$ makepkg -s
然后以root安装
# pacman -U ibus-sunpinyin-2.0.3-1-x86_64.pkg.tar.xz

ibus 1.4 can't input chinese

update the ibus to 1.4 ,so can't trigger the sunpinyin to input chinese

through the irc find this  https://bbs.archlinux.org/viewtopic.php?pid=995934#p995934


bug report https://bugs.archlinux.org/task/26124


so rebuild the ibus-sunpinyin to fix this problem


 https://wiki.archlinux.org/index.php/ABS

Thursday, September 15, 2011

gnome shell hijack to show ibus(顶栏显示ibus状态)

~/gnomeshellibus.html
 1 现在使用gnomeshell因为ibus状态栏在底部通知栏,使用vim,gvim还有firefox的pentadactly扩展
 2 的时候老看不到输入法状态,导致很多快捷键无法运行,很是恼火。
 3 
 4 
 5 近日看了看gnome-shell的通知区域的设计,发现gnomeshell本意是把ibus放在顶面板的,由于和ibus
 6 输入法的沟通没有做好,导致通知区域的的ibus名称不正确,所以,我们的ibus也就毫无办法的到了
 7 底部通知栏...
 8 
 9 察看原码
10 
11 statusIconDispatcher.js文件在/usr/share/gnome-shell/js/ui目录下
12 
13 
14 
15 const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
16     'bluetooth-applet': 'bluetooth',
17     'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet
18                                              // when moved to control center
19     'gnome-sound-applet': 'volume',
20     'nm-applet': 'network',
21     'gnome-power-manager': 'battery',
22     'keyboard': 'keyboard',
23     'a11y-keyboard': 'a11y',
24     'kbd-scrolllock': 'keyboard',
25     'kbd-numlock': 'keyboard',
26     'kbd-capslock': 'keyboard',
27     'ibus-ui-gtk': 'input-method'//看到没有ibus-ui-gtk多少年前的东西了..
28 };
29 
30 一个简单的小hack只要把'ibus-ui-gtk'改为'main.py'就可以了
31 
32 const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
33     'bluetooth-applet': 'bluetooth',
34     'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet
35                                              // when moved to control center
36     'gnome-sound-applet': 'volume',
37     'nm-applet': 'network',
38     'gnome-power-manager': 'battery',
39     'keyboard': 'keyboard',
40     'a11y-keyboard': 'a11y',
41     'kbd-scrolllock': 'keyboard',
42     'kbd-numlock': 'keyboard',
43     'kbd-capslock': 'keyboard',
44     'main.py': 'input-method'//就是这里,改了就ok了..
45 };
46 
47 写成脚本就是下面的了:
48 ibus extensions
49 
50 1   StatusIconDispatcher = imports.ui.statusIconDispatcher;
51 2
52 3   function main() {
53 4       StatusIconDispatcher.STANDARD_TRAY_ICON_IMPLEMENTATIONS['main.py'] = 'ibus';
54 5   }