OpenBSD xfce firefox scim中文桌面安装

秀秀桌面并和大家分享一下自己的经验。

版主: lionux天地乾坤

回复
f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

OpenBSD xfce firefox scim中文桌面安装

帖子 f5b » 2013-09-07 11:10

OpenBSD xfce firefox scim中文桌面安装

1. 按OpenBSD FAQ安装了含x界面OpenBSD
还有,以下操做均在root用户下完成

2. pkg_add xfce firefox-esr-i18n-zh-CN zh-wqy-bitmapfont scim-fcitx

3. 仔细阅读 /usr/local/share/doc/pkg-readmes/ 目录下的相关文文件,根据需要做相应设置

4. 编辑 vi ~/.xinitrc,内容如下

代码: 全选

# Chinese support

# input support 前面两行pkg-readmes例子中是scim,实际上改成xim才可以
    export GTK_IM_MODULE="xim"  
    export QT_IM_MODULE="xim"
    export XMODIFIERS="@im=SCIM"
    /usr/local/bin/scim -d



# character display & encoder in terminal and other app

  export LC_CTYPE=zh_CN.UTF-8
  export LC_MESSAGES=zh_CN.UTF-8


# startxfce4
/usr/local/bin/startxfce4

5.
# startx就可以启动xfce桌面啦
如果需要开机自动启动login窗口,rc.conf.local应该添加以下代码。

代码: 全选

xdm_flags=    #用户目录下面还得有.xsession文件,内容与.xinitrc相同
pkg_scripts="dbus_daemon"
# reboot,搞定。

想要更漂亮的login窗口,可安装slim



6. 非root用户在xfce桌面中的关机问题
非root用户用电脑的电源按钮关机更方便,其他方式配置麻烦


7. 需要更多程序?
请# pkg_add xfce-extras


于2020年4月13日更新, 关键更新是scim改为xim,测试环境为OpenBSD amd64 的6.7 beta 版本

头像
bsdplus
铁 Fe
帖子: 77
注册时间: 2013-08-16 12:02

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 bsdplus » 2013-09-09 10:51

打开terminal,命令行下运行“halt -p”关机
=acheng

f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 f5b » 2013-09-09 20:13

bsdplus 写了:打开terminal,命令行下运行“halt -p”关机
补充,非root用户要在sudo里面做相应的设置才能关机

levi
铁 Fe
帖子: 87
注册时间: 2011-09-08 14:06

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 levi » 2013-09-09 20:42

根据经验,

代码: 全选

/usr/local/bin/scim -d
这句可以不要。

关机,习惯用 sudo halt -p

f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 f5b » 2013-09-10 8:25

这里有个疑问
按电源 关机 和 halt -p关机效果完全一样么?例如,自动保存和退出了某些程序?

f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 f5b » 2013-09-10 10:30

levi 写了:根据经验,

代码: 全选

/usr/local/bin/scim -d
这句可以不要。

关机,习惯用 sudo halt -p
经过测试,有

代码: 全选

/usr/local/bin/scim -d
才能正常按 ctrl+space 激活 scim-fcitx 里面的拼音输入法,否则只能激活scim

详情请
# cat /usr/local/share/doc/pkg-readmes/scim-1.4.9p12

头像
unreal
银 Ag
帖子: 1072
注册时间: 2010-06-07 18:52

帖子 unreal » 2013-09-10 12:02

sudo我不会。我是用 wheel组用户登录,su root 再执行 shutdown -ph now 关机。
另外,经常遇到系统 sync disk 假死,i386 和 loongson 平台都有。

f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

Re:

帖子 f5b » 2013-09-10 14:51

unreal 写了:sudo我不会。我是用 wheel组用户登录,su root 再执行 shutdown -ph now 关机。
另外,经常遇到系统 sync disk 假死,i386 和 loongson 平台都有。
假死可能有3种原因

硬盘有问题?
/etc/fstab设置?
acpi电源驱动不支持?

头像
unreal
银 Ag
帖子: 1072
注册时间: 2010-06-07 18:52

帖子 unreal » 2013-09-10 18:19

f5b 写了: 硬盘有问题?
/etc/fstab设置?
acpi电源驱动不支持?
可能acpi的嫌疑比较大~开机时间短的话关机就没问题;开机时间大于半小时,关机的时候假死的概率就很高,以前是loongson经常这样,一直认为是龙芯机器的电路设计不好,但有一次升级后这个问题就正常了,可以再升级后这问题又回来了。i386 以前没有,后来也出这样的问题,我这太dell d420是洋垃圾拼装货,有小问题也不奇怪。反正关机前只要手工 sync 一下,shutdown 就正常。

f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

Re:

帖子 f5b » 2013-09-10 20:59

unreal 写了:
f5b 写了: 硬盘有问题?
/etc/fstab设置?
acpi电源驱动不支持?
可能acpi的嫌疑比较大~开机时间短的话关机就没问题;开机时间大于半小时,关机的时候假死的概率就很高,以前是loongson经常这样,一直认为是龙芯机器的电路设计不好,但有一次升级后这个问题就正常了,可以再升级后这问题又回来了。i386 以前没有,后来也出这样的问题,我这太dell d420是洋垃圾拼装货,有小问题也不奇怪。反正关机前只要手工 sync 一下,shutdown 就正常。
我的Dell d430经常安装OpenBSD和升级,没有任何问题,基本可以判定你的d420硬件问题了。
loogson没有机器,谁捐一台给我折腾呢:)

头像
unreal
银 Ag
帖子: 1072
注册时间: 2010-06-07 18:52

帖子 unreal » 2013-09-11 15:54

可是我那d420之前一年一直是winxp,关机没假死的问题。

刚才去中科梦兰的淘宝店看了,龙芯2F的笔记本都没了,估计库存已经甩光了。居然看见售卖 预装win7的Intel酷睿四核i5-540、外观高仿Apple iMac 的一体机,这神马情况撒 :confused:

levi
铁 Fe
帖子: 87
注册时间: 2011-09-08 14:06

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 levi » 2013-10-17 20:37

根据我在 OpenBSD i386 上使用 scim-pinyin 的经验,不在 .xinitrc 文件中加入”/usr/local/bin/scim -d“这句,照样可以用 Ctrl+Space 组合键激活 scim-pinyin 输入法。

f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 f5b » 2013-11-20 12:13

补充信息

X11如何设置最佳分辨率

仔细看http://www.openbsd.org/faq/faq11.html

特别是“如何退出X”,首选CTRL-ALT-Backspace,也要保留ssh服务开放登陆
This might be a really good time to talk about ways of exiting X when started in this way. In order of preference:

CTRL-ALT-Backspace: This hopefully causes X to immediately terminate, along with all X applications that are running. Of course, during the configuration process, you don't have any applications running, so this is not a problem (and in fact, at this point, this is your best way to exit X).
SSH into the box, and "pkill Xorg", which may kill the X process, and may return you to a usable console.
SSH into the box and reboot it.
Reset or power button. Sometimes things go really bad. Yes, it is usually good to get X running before you load critical applications on the system. Sometimes, a bad X configuration will hang the entire machine to the point that only a hard reset will resolve the problem.

Fortunately for us, CTRL-ALT-Backspace does the job here, and we are returned to a command prompt. So now we need to see if we can figure out what is wrong. First, we should look at what Xorg thinks is going on, and that is recorded in the file /var/log/Xorg.0.log. In this case, it appears that X thinks all is running fine, there are no obviously significant errors shown in the log (lines that start with an "(EE)" are errors).


个人总结


1. 生成基本的xorg.conf.new文件

# X -configure

文件自动生成在 /root/xorg.conf.new

测试xorg.conf.new

# X -config xorg.conf.new ## 确定鼠标可以移动,CTRL-ALT-Backspace退出X


2. 设置显示器的最佳分辨率

生成最佳分辨率参数
# gtf 1600 1200 60 ###指定目标分辨率和刷新率,注意空格

# 1600x1200 @ 60.00 Hz (GTF) hsync: 74.52 kHz; pclk: 160.96 MHz
Modeline "1600x1200_60.00" 160.96 1600 1704 1880 2160 1200 1201 1204 1242 -HSync +Vsync

编辑xorg.conf.new,
把 “Modeline …… ”整行添加到 Section "Monitor"



再测试xorg.conf.new

# X -config xorg.conf.new ## 确定鼠标还可以移动,CTRL-ALT-Backspace退出X



# cp /root/xorg.conf.new /etc/X11/xorg.conf


# startx


这样显示器就不需要依赖于任何桌面软件的设置就能以最佳分辨率正常显示了

fengjunfan
铬 Cr
帖子: 44
注册时间: 2013-11-18 15:47

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 fengjunfan » 2014-04-18 15:13

f5b 写了:OpenBSD xfce firefox scim中文桌面安装

1. 按OpenBSD FAQ安装了含x界面OpenBSD
还有,以下操做均在root用户下完成

2. pkg_add xfce firefox-i18n-zh-CN zh-wqy-bitmapfont scim-fcitx

3. 仔细阅读 /usr/local/share/doc/pkg-readmes/ 目录下的相关文文件,根据需要做相应设置

4. 编辑 vi ~/.xinitrc,内容如下

代码: 全选

# Chinese support

# input support
    export GTK_IM_MODULE="scim"
    export QT_IM_MODULE="scim"
    export XMODIFIERS="@im=SCIM"
    /usr/local/bin/scim -d



# character display & encoder in terminal and other app

  export LC_CTYPE=zh_CN.UTF-8
  export LC_MESSAGES=zh_CN.UTF-8


# startxfce4
/usr/local/bin/startxfce4

5.
# startx就可以启动xfce桌面啦
如果需要开机自动启动login窗口,rc.conf.local应该添加以下代码。

代码: 全选

xdm_flags=    #用户目录下面还得有.xsession文件,内容与.xinitrc相同
pkg_scripts="dbus_daemon"
# reboot,搞定。

想要更漂亮的login窗口,可安装slim



6. 非root用户在xfce桌面中的关机问题
非root用户暂时只能用电脑的电源按钮关机(按1下),无法通过xfce的shutdown helper实现。不知道到其他同学如何实现?


7. 需要更多程序?
请# pkg_add xfce-extras


参看 11 - The X Window System
http://www.openbsd.org/faq/faq11.html


我安装xfce4后,安装scim
scim scim-pinyin scim-tables zh-wqy-zenhei-ttf ;
然后 
编辑 vi ~/.xinitrc,内容如下

代码: 全选

# Chinese support

# input support
    export GTK_IM_MODULE="scim"
    export QT_IM_MODULE="scim"
    export XMODIFIERS="@im=SCIM"
    /usr/local/bin/scim -d



# character display & encoder in terminal and other app

  export LC_CTYPE=zh_CN.UTF-8
  export LC_MESSAGES=zh_CN.UTF-8


# startxfce4
/usr/local/bin/startxfce4

5.
# startx就可以启动xfce桌面啦
如果需要开机自动启动login窗口,rc.conf.local应该添加以下代码。

代码: 全选

xdm_flags=    #用户目录下面还得有.xsession文件,内容与.xinitrc相同
pkg_scripts="dbus_daemon"
然后 运行命令  #scim-setup,我启动 firefox后死活 scim输入法弹不出来,用 ctrl+space ;我是在openbsd 5.4 amd64版本下面安装的,不知我哪里错了……

fengjunfan
铬 Cr
帖子: 44
注册时间: 2013-11-18 15:47

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 fengjunfan » 2014-04-19 12:12

在 ,profile 里,加上:
###
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
export XMODIFIERS="@im=SCIM"
/usr/local/bin/scim -d
# export LC_CTYPE=en_US.UTF-8

export LC_CTYPE=zh_CN.UTF-8
export LC_MESSAGES=zh_CN.UTF-8

$
就可以打开输入法了 ctrl+空格键

头像
optimus
钠 Na
帖子: 4
注册时间: 2014-11-02 2:09

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 optimus » 2014-11-05 4:04

f5b 写了:2. pkg_add xfce firefox-i18n-zh-CN zh-wqy-bitmapfont scim-fcitx
楼主:请问一下,我是否必要安装xfce,zh-wqy-bitmapfont 呢?

我的操作系统是OpenBSD 5.6 (64位数),默认安装,英语版。我没有安装任何桌面环境(desktop environment)。

f5b
锆 Zr
帖子: 642
注册时间: 2011-10-22 20:43

Re: OpenBSD xfce firefox scim中文桌面安装

帖子 f5b » 2014-11-09 9:47

optimus 写了:
f5b 写了:2. pkg_add xfce firefox-i18n-zh-CN zh-wqy-bitmapfont scim-fcitx
楼主:请问一下,我是否必要安装xfce,zh-wqy-bitmapfont 呢?

我的操作系统是OpenBSD 5.6 (64位数),默认安装,英语版。我没有安装任何桌面环境(desktop environment)。

xfce就是一个轻量级的桌面环境,当然可以选用其它kde或gnome类更强大的桌面,zh-wqy-bitmapfont 是非常好的中文字体,没有这些字体,用firefox看中文网页很多问题。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 7 访客