linux下命令行浏览器w3m,Linux 终端浏览器 w3m

三款比较有名的 w3m、links2、lynx、其中w3m 对中文的支持很好,没出现乱码,而那两款都会有乱码

w3m 安装

sudo apt-get install w3m

sudo apt-get install w3m w3m-img

如果出现乱码,可以用w3m打开任意网页,键盘键入o,然后将显示语言调整为chinese

如果你的locale不是gbk的话还是会乱码的。所以运行 export LC_ALL=zh_CN.GBK

w3m支持鼠标拖拽功能,w3m的基本键

a 在文本框里输入文字

g 页面顶端

s 切换历史(buffer)

S 保存网页至文件

v 网页/源码切换

h j k l 左下上右,和vim同

w 以word右进

Tab 在各连接之间切换

H 显示帮助

q 退出,会有提示的

j,k,l,h 移动光标,就像vim中一样

J/K 向下/向上滚屏

> 左右滚屏

T 打开一个新标签页

Esc-t 打开所有标签页,供你选择,使用jk来上下移动

{/} 在标签页中切换 当然也可以用鼠标点击切换

U 输入新的网址

B 后退

Ctrl+q 关闭当前标签页

/ 向后查找当前页

? 向前查找当前页

w3m -help可以显示帮助信息,一些w3m的基本命令

下面是w3m -help 回显的内容:

usage: w3m [options]

options:

-t tab set tab width

-r ignore backspace effect

-l line # of preserved line (default 10000)

-I charset document charset

-O charset display/output charset

-B load bookmark

-bookmark file specify bookmark file

-T type specify content-type

-m internet message mode

-v visual startup mode

-M monochrome display

-N open URL of command line on each new tab

-F automatically render frame

-cols width specify column width (used with -dump)

-ppc count specify the number of pixels per character (4.0...32.0)

-ppl count specify the number of pixels per line (4.0...64.0)

-dump dump formatted page into stdout

-dump_head dump response of HEAD request into stdout

-dump_source dump page source into stdout

-dump_both dump HEAD and source into stdout

-dump_extra dump HEAD,source,and extra information into stdout

-post file use POST method with file content

-header string insert string as a header

+ goto line

-num show line number

-no-proxy don't use proxy

-4 IPv4 only (-o dns_order=4)

-6 IPv6 only (-o dns_order=6)

-no-mouse don't use mouse

-cookie use cookie (-no-cookie: don't use cookie)

-pauth user:pass proxy authentication

-graph use graphic character

-no-graph don't use graphic character

-s squeeze multiple blank lines

-W toggle wrap search mode

-X don't use termcap init/deinit

-title[=TERM] set buffer name to terminal title string

-o opt=value assign value to config option

-show-option print all config options

-config file specify config file

-help print this usage message

-version print w3m version

-reqlog write request logfile

-debug DO NOT USE

w3m 设置用户名密码自动登录

w3m 有一个功能是自动登录需要用户名和密码的网站

追加 ~/.w3m/passwd 文件:

host host-name

port port-number

realm Username for *****: ***** 的那一部分

login user

password password

注意一点,realm的值是后面星号的部分。比如

提示 "Username for trac:",那 realm 对应的值是 trac

最后将 passwd的访问权限改成600

总结

以上是编程之家为你收集整理的Linux 终端浏览器 w3m全部内容,希望文章能够帮你解决Linux 终端浏览器 w3m所遇到的程序开发问题。

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值