ubuntu 15.10 编译安装conkeror

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.

Author: Dean Chen

Created: 2016-02-01 一 10:37

Validate


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值