[问题]非root用户不能切换zhcon的输入法,也不能用ctrl+alt+h

我是ubuntu6.0.6+AMDK6-2机器

从源码安装zhcon0.2.5后,出现下列怪事:

先以root帐号登录,启动zhcon后,然后换成非root帐号,可以用ctrl+f1...f2...切换输入法和用ctrl+alt+h在线帮助;

先以非root帐号登录,启动zhcon后,用ctrl+space换成中文输入法只有第一个默认的全拼能用,不能用ctrl+f1..f2..切换中文输入法,也不能用ctrl+alt+h在线帮助;然后换成root帐号,也不能切换和在线帮助了;

我初步怀疑是某个配置文件被屏蔽了非root用户的读权限,但是不知道是哪个文件。

同样的问题发在http://forum.ubuntu.org.cn/viewtopic.php?t=21311&highlight=处求助

终于搞定ubuntu6.0.6的控制台中文环境

我的机器配置如下:AMD K6-2 450, 144M, 10.2G, 17', s3 2M PCI Video card, Ubuntu 6.0.6 LTS

因为我想在控制台(文本模式)下使用中文环境,经过2周时间的曲折探索,编译过2次内核(冤枉的),终于基本搞定。

现在我的控制台的中文环境如下:zhcon0.2.5 + xemacs + w3m

碰到并解决下列几个问题:

  1、怎样启动进入文本模式?

  采用 sysv-rc-conf 去掉了图形界面的gdm在运行级别2中的启动,详见:

定制ubuntu启动时加载的服务(原名:加速Ubuntu开机过程)(转 (1篇)

 

  2、怎样修改文本模式下的分辨率?

  原来的dsv6422 pci显卡不被内核支持,换成s3 pci显卡解决,我以为是原来的内核不支持framebuffer,结果冤枉编译两次内核,反而不对。内核编译的时间有很大一部分在编译driver模块。2.6.*的内核编译成了*.o的模块文件还要再编译成*.ko模块文件。一个教训是不明白的东西不要去掉。我新编的两个内核均成不支持framebuffer,不是framebuffer选项没有选,而是可能去掉了它所需要的配套选项,我也不知配套选项是什么。

  详见:

linux文本模式的分辨率设置(转) (7篇)

  3、中文输入法?(使用任何中文环境需要先启动它,不启动它命令提示也会有乱码)

  下载一个zhcon-0.2.5解决,不过现在还有点小问题。详见:

[问题]非root用户不能切换zhcon的输入法,也不能用ctrl+alt+h



  4、编辑器?

  vim支持中文,下载一个xemacs21支持中文(这是在ubuntu6.0.6中,我安装的Redhat linux9.0中的emacs自动的支持中文,也许是redhat自己加的中文支持);

  5、浏览器?

  lynx支持utf-8编码的中文网页不好,使用w3m解决。详见:

linux控制台下w3m网页浏览器的使用(转) (0篇)

ubuntu6.0.6 linux下面我的/etc/X11/xorg.conf

我的AMD K6-2 450 , PCI S3 2M display card, OK-520 双飞燕2D 串口鼠标 老机还花了一些时间来配置显卡和鼠标,记在这里参考。

这里在系统默认的配置文件上有两点改动:

1、显卡的

默认是


Section "Device"

Identifier "Generic Video Card"

Driver "s3"

BusID "PCI:0:8:0"

EndSection

不能进入图形界面,把Driver改成 vesa解决。“ VideoRam 2048”好像不是必须的。

2、鼠标

原来的OK-520 双飞燕2D 串口鼠标在图形界面下不能用,添加如下内容解决(转自:http://atoz.org.cn/blog/?cat=8


在Ubuntu 5.10中配置使用串口鼠标

Filed under: Ubuntu 5.10 (Breezy), Linux, System Admin — jjheng @ 10:30 am

1、在Ubuntu中使用串口鼠标需要手工对xorg.conf文件进行配置

$ sudo vi /etc/X11/xorg.conf

2、在xorg.conf文件中搜索“Section “InputDevice” ”,并在其下添加如下内容:

Section "InputDevice"

Identifier  "Serial Mouse"

Driver      "mouse"

Option      "Protocol" "Microsoft"

Option      "Device" "/dev/ttyS0"

Option      "SendCoreEvents"  "true"

EndSection

3、在xorg.conf文件中搜索“Section “ServerLayout””,并在其中加入如下行:

InputDevice    "Serial Mouse" "CorePointer"

修改之后的“Section “ServerLayout””内容如下所示:

Section "ServerLayout"

Identifier      "Default Layout"

Screen          "Default Screen"

InputDevice     "Generic Keyboard"

InputDevice     "Configured Mouse"

InputDevice     "Synaptics Touchpad"

InputDevice     "Serial Mouse" "CorePointer"

EndSection

4、使用“Ctrl+Alt+Backspace”组合键重新启动X-Window后就可以正常使用串口鼠标了。

配置文件正文

****************************************************************************************************************

# /etc/X11/xorg.conf (xorg X Window System server configuration file)

#

# This file was generated by dexconf, the Debian X Configuration tool, using

# values from the debconf database.

#

# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.

# (Type "man /etc/X11/xorg.conf" at the shell prompt.)

#

# This file is automatically updated on xserver-xorg package upgrades *only*

# if it has not been modified since the last upgrade of the xserver-xorg

# package.

#

# If you have edited this file but would like it to be automatically updated

# again, run the following command:

#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"

FontPath "/usr/share/X11/fonts/misc"

FontPath "/usr/share/X11/fonts/cyrillic"

FontPath "/usr/share/X11/fonts/100dpi/:unscaled"

FontPath "/usr/share/X11/fonts/75dpi/:unscaled"

FontPath "/usr/share/X11/fonts/Type1"

FontPath "/usr/share/X11/fonts/100dpi"

FontPath "/usr/share/X11/fonts/75dpi"

# path to defoma fonts

FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

EndSection

Section "Module"

Load "i2c"

Load "bitmap"

Load "ddc"

Load "dri"

Load "extmod"

Load "freetype"

Load "glx"

Load "int10"

Load "type1"

Load "vbe"

EndSection

Section "InputDevice"

Identifier "Generic Keyboard"

Driver "kbd"

Option "CoreKeyboard"

Option "XkbRules" "xorg"

Option "XkbModel" "pc104"

Option "XkbLayout" "us"

EndSection

Section "InputDevice"

Identifier "Configured Mouse"

Driver "mouse"

Option "CorePointer"

Option "Device" "/dev/input/mice"

Option "Protocol" "ExplorerPS/2"

Option "ZAxisMapping" "4 5"

Option "Emulate3Buttons" "true"

EndSection

Section "InputDevice"

  Driver        "wacom"

  Identifier    "stylus"

  Option        "Device"        "/dev/wacom"          # Change to

                                                      # /dev/input/event

                                                      # for USB

  Option        "Type"          "stylus"

  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY

EndSection

Section "InputDevice"

  Driver        "wacom"

  Identifier    "eraser"

  Option        "Device"        "/dev/wacom"          # Change to

                                                      # /dev/input/event

                                                      # for USB

  Option        "Type"          "eraser"

  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY

EndSection

Section "InputDevice"

  Driver        "wacom"

  Identifier    "cursor"

  Option        "Device"        "/dev/wacom"          # Change to

                                                      # /dev/input/event

                                                      # for USB

  Option        "Type"          "cursor"

  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY

EndSection

Section "InputDevice"

  Identifier "Serial Mouse"

  Driver     "mouse"

  Option     "Protocol" "Microsoft"

  Option     "Device"   "/dev/ttyS0"

  Option     "SendCoreEvents" "true"

EndSection

Section "Device"

Identifier "Generic Video Card"

Driver "vesa"

BusID "PCI:0:8:0"

   VideoRam 2048

EndSection

Section "Monitor"

Identifier "719BF"

Option "DPMS"

EndSection

Section "Screen"

Identifier "Default Screen"

Device "Generic Video Card"

Monitor "719BF"

DefaultDepth 16

SubSection "Display"

Depth 1

Modes "1024x768" "800x600"

EndSubSection

SubSection "Display"

Depth 4

Modes "1024x768" "800x600"

EndSubSection

SubSection "Display"

Depth 8

Modes "1024x768" "800x600"

EndSubSection

SubSection "Display"

Depth 15

Modes "1024x768" "800x600"

EndSubSection

SubSection "Display"

Depth 16

Modes "1024x768" "800x600"

EndSubSection

SubSection "Display"

Depth 24

Modes "1024x768" "800x600"

EndSubSection

EndSection

Section "ServerLayout"

Identifier "Default Layout"

Screen "Default Screen"

InputDevice "Generic Keyboard"

InputDevice "Configured Mouse"

InputDevice     "stylus" "SendCoreEvents"

InputDevice     "cursor" "SendCoreEvents"

InputDevice     "eraser" "SendCoreEvents"

        InputDevice     "Serial Mouse" "CorePointer"

EndSection

Section "DRI"

Mode 0666

EndSection

zh_CN.GBK或zh_CN.UTF-8的locale下无-*-gbk-0的字体影响linux性能(

转自:http://hzhr.blogeden.cn/post/30874/3943

找到了 Wine 运行慢的原因

hzhr | 15 二月, 2006 22:03

前几天花了九牛二虎之力在(pure) Debian下把 Xgl 编了(有时间整理一下过程),然后发现wine跑程序特别慢,一直以为是Xgl的问题。后来在论坛上看见有人老说wine很慢,http://www.linuxsir.org/bbs/showthread.php?t=240185 ,觉得很奇怪,他们说的问题我可一直没碰到过啊,难道换成Xgl就有问题?可他们好像不是用的Xgl啊,更怪的是在zh_CN.GB2312下没问题,在zh_CN.GBK和zh_CN.UTF-8下就有。

我就喜欢怪问题,于是把wine的代码找来看了一下,发现是wine支持OverTheSpot风格的XIM输入法时引入的一个BUG,OverTheSpot要求X-client传回fontSet给XIM Server,结果wine中就这样写:

    // dlls/x11drv/xim.c, X11DRV_CreateIC

    fontSet = XCreateFontSet(display,

                      "*", /*FIXME*/

                      &list, &count, NULL);

这个函数会根据当前的locale和匹配条件去找XFontSet,本来也没什么不对。但是仔细想想,在zh_CN.GBK和zh_CN.UTF-8下, XFontSet中需要-*-gbk-0的字体,如果系统中没有-*-gbk-0的字体,那会是个什么样的情况,上面的查找将会遍历整个X core font,速度当然一下子就慢了。

解决办法当然很简单,加上gbk字体,马上就OK了:)

zh_CN.GB2312多古老啊,还是赶快回到21世纪吧,那就是 zh_CN.UTF-8:)

BTW: Xgl不读配置文件,那只好在命令行上指定字体路径了。

 #

Linux • 评论 (0) •

自编译安装zhcon0.2.6的方法(转)

节自:http://forum.ubuntu.org.cn/viewtopic.php?t=18891&highlight=zhcon

自编译安装zhcon0.2.6的方法(最新版本,支持utf-8,已经做成deb包了)

到 http://sourceforge.net/projects/zhcon/ 下载最新的源码包zhcon-0.2.5.tar.gz和补丁包zhcon-0.2.5-to-0.2.6.diff.gz

我用代理,在下载补丁包的时候,浏览器把源代码直接显示出来了,如果是我这种情况的话

请把浏览器上显示出来的代码复制下来另存为zhcon-0.2.5-to-0.2.6.diff

然后

代码:

gzip zhcon-0.2.5-to-0.2.6.diff

下面就可以开始安装zhcon了,在编译zhcon之前

请先

代码:

sudo apt-get install libncurses5-dev

然后

代码:

tar zxf zhcon-0.2.5.tar.gz

cd zhcon-0.2.5

zcat ../zhcon-0.2.5-to-0.2.6.diff.gz | patch -p1

sudo ./configure

sudo make

sudo make install

好了

代码:

zhcon --utf8

linux控制台下w3m网页浏览器的使用(转)

节自:(http://forum.ubuntu.org.cn/viewtopic.php?t=14002&highlight=zhcon

几个必用键

a 在文本框里输入文字

g 页面顶端

G 页面底部

b 空格 翻页

s 切换历史(buffer)

S 保存网页至文件

v 网页/源码切换

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

w 以word右进

Tab 在各连接之间切换

windowsXP下折磨人的网络受限或无连接

这两天帮人看电脑,总是报告网络受限或无连接。这台电脑是在共享adsl上网的局域网中。局域网中共有7台电脑。开始,以为是网线或接口的毛病。结果有朋友解决这个问题,是设置方面的毛病(在部分windows xp系统的部分电脑上会出现。)

解决方法如下:

原来的默认值是Auto Negotiation,需要改成其它的值。这里是10Mbps/Half Duplex。

真是学无止境呀,三人行必有我师也!