ubuntu 15.10 编译安装conkeror
Table of Contents
- 1. why conkeror
- 2. compile and install
- 3. make as default browser for emacs
- 4. make as default browser for OS and emacs org mode
1 why conkeror
conkeror几年前我用过,还是一个不错的浏览器,最大的特点是可以保持emacs的击键习惯, 除了博客编写/视频播放需要鼠标辅助下外, 其他操作几乎完全由键盘完成,真是懒人必备啊。自Ubuntu 13.10开始已经没有官方的conkeror安装源,那就编译吧,
2 compile and install
当然还是要首先clone到源代码:
git clone git://repo.or.cz/conkeror.git
然后根据官方文档的提示安装依赖库并编译
apt-get install fakeroot quilt debhelper fakeroot debian/rules binary
一切顺利。然后复制目录:
sudo cp -r ./debian/conkeror/usr/share/conkeror /usr/share/
还要修改一下配置文件:我的代码目录是/opt/conkeror, 所以打开文件/opt/conkeror/debian/bin/conkeror
将一开始的值设置为
#!/bin/sh # Wrapper around xulrunner/firefox to start the xulrunner application conkeror # Written by Axel Beckert <abe@deuxchevaux.org> for the Debian Project # Find an appropriate xulrunner binary XULRUNNER='firefox -app'
好了,现在创建链接:
ln -s /opt/conkeror/debian/bin/conkeror /usr/bin/conkeror chmod +x /usr/bin/conkeror
好了,运行命令conkeror,可以看到漂亮的浏览器了。
3 make as default browser for emacs
first make sure the directory exists
mkdir -p ~/.local/share/applications/
then edit the file ~/.local/share/applications/conkeror.desktop and put the following contents in
[Desktop Entry] Version=1.0 Type=Application Terminal=false Icon=conkeror.png Name=Conkeror Comment=Emacs like Web Browser GenericName=Web Browser Exec=conkeror %u Categories=GNOME;GTK;Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;
Now, You can search "conkeror" in Ubuntu unity search interface.
在init.el中设置
;; browser (setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "conkeror")
现在在emacs中点击链接,conkeror启动了。或者在M-x中运行命令browse-url-generic,然后输入url,就可以启动conkeror.
4 make as default browser for OS and emacs org mode
append the following into ~/.profile file, then relogin Ubuntu
export BROWSER=conkeror
in org-mode, type C-c C-e h o, the html file generated from org file will be opened by conkeror now.
Created: 2016-02-01 一 10:37