LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1927|回复: 8

[请教]LFS6.3 w3m 如何显示图片? 安装 elinks 无法显示中文。

[复制链接]
发表于 2010-2-1 18:48:09 | 显示全部楼层 |阅读模式
[color="Blue"]1)LFS6.3之后安装w3m浏览网页没有图片显示啊? 那位前辈的w3m可以显示图片截张图给我瞧瞧。

网上不少方法说是安装 w3m-img 软件包。但是没要找到此包源码下载....这是怎么回事?
参考链接
fbterm+ucimf+w3m+w3m-img设置小技巧

http://www.linuxsir.cn/bbs/thread361648.html

http://hi.baidu.com/zhancang/blog/item/3cc6257bb8f559f00bd18731.html

-----------------------------------------------------------------
我安装完elinks后不能显示中文网页
参考网上所给方法也无法实现。
无论是直接启动elinks
还是zhcon下启动elinks
还是fbterm下启动elinks都无法显示中文网页

参考链接如下
http://blog.daviesliu.net/2005/03/22/153633/

http://www.linuxsir.cn/bbs/showthread.php?t=91067

PS:宿主是LFS6.3
系统内核打了youbest的补丁。
也安装了zhcon0.26
安装了 fbterm + fbterm_ucimf
[color="Red"]上面三种情况我都试了。依旧无法显示中文。不知道是不是由于我的LFS字体配置有问题?因为我没有写 配置fonts.conf,只是把中文字体库放到了
/usr/share/fonts下面

追加:
------------------------------------------------------------------------------------------------------------------
刚刚建立了字体配置文件(我也不知道该怎么写。下面这个配置文件可以使fbterm fbterm_ucmif显示需要的中英文)
~/.fonts.conf
如下
-bash-3.2$ cat .fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>

<!-- Font directory list -->

        <dir>/usr/share/fonts</dir>

        <dir>~/.fonts</dir>
<!-- 增加黑体+Courier的混合字体 -->
<alias>
[color="Red"]<family>mono</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Microsoft YaHei</family>
</prefer>
</alias>
</fontconfig>

附上 fbterm 的配置文件相关部分
-bash-3.2$ cat .fbtermrc
# Configuration for FbTerm

# Lines starting with '#' are ignored.
# Note that end-of-line comments are NOT supported, comments must be on a line of their own.


# font family names/pixelsize used by fbterm, multiple font family names must be seperated by ','
# and using a fixed width font as the first is strongly recommended
#font-names=DejaVu Sans Mono,Unibit
#font-names=DejaVu Sans Mono,Microsoft  YaHei
#font-names=Courier,Microsoft  YaHei
[color="Red"]font-names=mono
font-size=18

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2010-2-1 18:59:55 | 显示全部楼层
好像不算水,什麼回事?

刪還是不刪?如不用刪,請改正標題。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-2-1 22:36:50 | 显示全部楼层
是这样
本来我是问了一个elinks启动界面显示的问题。我以为是elinks在我的机器上无法显示菜单栏。后来发现是我自己没有掌握正确操作方法。所以我编辑了首贴的内容,使之看起来稍微不是那么水了。给您造成的困扰,抱歉,我已经重新编辑首贴,和标题
我想实现 perfect console 计划中的效果。看来是困难重重啊。
首先其中的不少包在LFS6.3上已经编译不过了。那里面提供的包不少已经太旧。或者停止开发了 。

附上
完美控制台计划
http://www.linuxsir.cn/bbs/thread245239.html
回复 支持 反对

使用道具 举报

发表于 2010-2-4 14:57:18 | 显示全部楼层
忘了了是 links2 还是 elinks 了,有些网站的中文显示正常,有些则不然。
所以还是乖乖地用 w3m。
再加上 imlib2,在 fbterm 下浏览网页时图片显示也很正常。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-2-5 13:31:40 | 显示全部楼层
楼上的,我安装了 imlib2 后,
./configure --without-x (不加此无法编译通过)
make
make install
重新编译安装w3m 出错。出错信息大意是说没有 X的一些文件

还有w3m无法显示图片.那位w3m可以显示图片结账图给我瞅瞅。。谢谢
回复 支持 反对

使用道具 举报

发表于 2010-2-6 14:11:11 | 显示全部楼层
图片是压缩过的。
1.是 imlib2, 不是 imlib
2.还要相应图片格式的库来支持,比如 libpng, libjpeg 之类的。
3.这是在 fbterm 下的截图,直接在 fb 下的图片显示在我这一直不正常。
4.可以用 links2 -g 来显示图片,那样更方便,只是中文显示是个问题。
5.很多问题 google, baidu 回答得更快。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-2-6 17:46:29 | 显示全部楼层
楼上的。俺就是装的imlib2 .
您是不是装X了?我这系统上没有X。
装了imlib2之后,再编译 w3m,总是出错。无法编译通过。
出错信息如下
gcc  -I../.. -I../.. -I. -g -O2 -I./libwc    -DHAVE_CONFIG_H  -c x11_w3mimg.c
x11_w3mimg.c:11:22: 错误:X11/Xlib.h:没有那个文件或目录
x11_w3mimg.c:12:23: 错误:X11/Xutil.h:没有那个文件或目录
In file included from x11_w3mimg.c:13:
/usr/include/Imlib2.h:133: 错误:expected ‘)’ before ‘*’ token
/usr/include/Imlib2.h:134: 错误:expected ‘)’ before ‘*’ token
/usr/include/Imlib2.h:135: 错误:expected ‘)’ before ‘colormap’
/usr/include/Imlib2.h:136: 错误:expected ‘)’ before ‘drawable’
/usr/include/Imlib2.h:137: 错误:expected ‘)’ before ‘mask’
/usr/include/Imlib2.h:163: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/Imlib2.h:164: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/Imlib2.h:165: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘imlib_context_get_colormap’
/usr/include/Imlib2.h:166: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘imlib_context_get_drawable’
/usr/include/Imlib2.h:167: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘imlib_context_get_mask’
/usr/include/Imlib2.h:197: 错误:expected ‘)’ before ‘*’ token
/usr/include/Imlib2.h:198: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/include/Imlib2.h:236: 错误:expected ‘)’ before ‘*’ token
/usr/include/Imlib2.h:238: 错误:expected ‘)’ before ‘*’ token
/usr/include/Imlib2.h:241: 错误:expected ‘)’ before ‘pixmap’
/usr/include/Imlib2.h:267: 错误:expected ‘)’ before ‘mask’
/usr/include/Imlib2.h:270: 错误:expected ‘)’ before ‘*’ token
/usr/include/Imlib2.h:273: 错误:expected ‘)’ before ‘mask’
/usr/include/Imlib2.h:283: 错误:expected ‘)’ before ‘mask’
x11_w3mimg.c:32: 错误:expected specifier-qualifier-list before ‘Display’
x11_w3mimg.c: 在函数 ‘x11_init’ 中:
x11_w3mimg.c:141: 错误:‘struct x11_info’ 没有名为 ‘imageGC’ 的成员
x11_w3mimg.c:142: 错误:‘struct x11_info’ 没有名为 ‘imageGC’ 的成员
x11_w3mimg.c:142: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:142: 错误:‘struct x11_info’ 没有名为 ‘parent’ 的成员
x11_w3mimg.c:143: 错误:‘struct x11_info’ 没有名为 ‘imageGC’ 的成员
x11_w3mimg.c: 在函数 ‘x11_finish’ 中:
x11_w3mimg.c:158: 错误:‘struct x11_info’ 没有名为 ‘imageGC’ 的成员
x11_w3mimg.c:159: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:159: 错误:‘struct x11_info’ 没有名为 ‘imageGC’ 的成员
x11_w3mimg.c:160: 错误:‘struct x11_info’ 没有名为 ‘imageGC’ 的成员
x11_w3mimg.c: 在函数 ‘x11_clear’ 中:
x11_w3mimg.c:180: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:180: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:180: 错误:‘False’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:180: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
x11_w3mimg.c:180: 错误:所在的函数内只报告一次。)
x11_w3mimg.c: 在函数 ‘x11_active’ 中:
x11_w3mimg.c:193: 错误:‘struct x11_info’ 没有名为 ‘imageGC’ 的成员
x11_w3mimg.c: 在函数 ‘x11_set_background’ 中:
x11_w3mimg.c:201: 错误:‘XColor’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:201: 错误:expected ‘;’ before ‘screen_def’
x11_w3mimg.c:210: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:210: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:211: 错误:‘screen_def’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:211: 错误:‘exact_def’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:212: 错误:‘struct x11_info’ 没有名为 ‘background_pixel’ 的成员
x11_w3mimg.c:214: 错误:‘Pixmap’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:214: 错误:expected ‘;’ before ‘p’
x11_w3mimg.c:215: 错误:‘GC’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:215: 错误:expected ‘;’ before ‘gc’
x11_w3mimg.c:216: 错误:‘XImage’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:216: 错误:‘i’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:218: 错误:‘p’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:218: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:218: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:219: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:220: 错误:‘gc’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:220: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:220: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:223: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:223: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:227: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:227: 错误:‘ZPixmap’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:230: 错误:‘struct x11_info’ 没有名为 ‘background_pixel’ 的成员
x11_w3mimg.c:232: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:233: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c: 在函数 ‘x11_sync’ 中:
x11_w3mimg.c:246: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:246: 错误:‘False’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c: 在函数 ‘x11_load_image’ 中:
x11_w3mimg.c:377: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:377: 错误:‘struct x11_info’ 没有名为 ‘parent’ 的成员
x11_w3mimg.c:378: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:381: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:381: 错误:‘struct x11_info’ 没有名为 ‘imageGC’ 的成员
x11_w3mimg.c:381: 错误:‘struct x11_info’ 没有名为 ‘background_pixel’ 的成员
x11_w3mimg.c:382: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:382: 错误:‘Pixmap’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:382: 错误:expected ‘)’ before ‘img’
x11_w3mimg.c:383: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:384: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:385: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:386: 错误:‘Drawable’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:386: 错误:expected ‘)’ before ‘img’
x11_w3mimg.c: 在函数 ‘x11_show_image’ 中:
x11_w3mimg.c:577: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:577: 错误:‘Pixmap’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:577: 错误:expected ‘)’ before ‘img’
x11_w3mimg.c: 在函数 ‘x11_free_image’ 中:
x11_w3mimg.c:616: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:616: 错误:‘Pixmap’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:616: 错误:expected ‘)’ before ‘img’
x11_w3mimg.c: 在函数 ‘w3mimg_x11open’ 中:
x11_w3mimg.c:750: 错误:‘XWindowAttributes’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:750: 错误:expected ‘;’ before ‘attr’
x11_w3mimg.c:751: 错误:‘Window’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:751: 错误:expected ‘;’ before ‘root’
x11_w3mimg.c:763: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:764: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:768: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:768: 错误:expected ‘;’ before ‘atoi’
x11_w3mimg.c:770: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:770: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:771: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:774: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:774: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:774: 错误:‘attr’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:779: 错误:expected ‘;’ before ‘p_window’
x11_w3mimg.c:781: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:781: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:781: 错误:‘root’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:781: 错误:‘struct x11_info’ 没有名为 ‘parent’ 的成员
x11_w3mimg.c:782: 错误:‘children’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:783: 错误:‘p_window’ 未声明 (在此函数内第一次使用)
x11_w3mimg.c:783: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:785: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
x11_w3mimg.c:791: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:794: 错误:‘struct x11_info’ 没有名为 ‘window’ 的成员
x11_w3mimg.c:799: 错误:‘struct x11_info’ 没有名为 ‘display’ 的成员
make[2]: *** [x11_w3mimg.o] 错误 1
make[2]: Leaving directory `/home/prife/pic/w3m-0.5.2/w3mimg/x11'
make[1]: *** [x11] 错误 2
make[1]: Leaving directory `/home/prife/pic/w3m-0.5.2/w3mimg'
make: *** [w3mimg] 错误 2
-bash-3.2$

但要是不装Imlib2的话,是可以正常编译通过w3m的。。
回复 支持 反对

使用道具 举报

发表于 2010-2-7 09:15:41 | 显示全部楼层
1.是的,我是在装完 X 后,用 imlib2 重新编译的 w3m
2.你试试 --enable-image=fb --with-imagelib=imlib2 之类的参数,看看能否过编译。
3.看看 ./configure --help,还是很有帮助的。
4.LFS-6.6-rc1 都出来了,可以适时地跟上,至少 6.5,不然会不期然地遇到版本配合的问题,尤其是像我这样喜欢无聊了追新的。
回复 支持 反对

使用道具 举报

发表于 2010-3-16 16:02:43 | 显示全部楼层
楼主,安装w3mimgfb,这个可软件可以替代w3mimgdisplay在w3m中显示网页图片
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表