发新话题
打印

用X.Org和Fluxbox在NAS上搭建桌面环境

用X.Org和Fluxbox在NAS上搭建桌面环境

1. 介绍


NAS1200(1)采用的ARM9处理器带有显示接口和2-D图像加速引擎,可以很好支持X Window系统,在X Window系统中可以使用以下的分辨率和刷新率:
  640x480-60
  640x480-72
  640x480-75
  640x480-85
  640x480-100
  800x600-56
  800x600-60
  800x600-72
  800x600-85
  800x600-100
  1024x768-60
  1024x768-70
  1024x768-75
  1024x768-85
  1280x720-60


本文介绍如何用X.Org(2)和Fluxbox(3)在NAS1200上搭建桌面环境。X.Org是目前绝大多数Linux发行版所使用的X Window系统,Fluxbox是一个轻量级的X windowmanager。


 


2. 安装和配置桌面环境


(1) 安装X.Org和Fluxbox


由于NAS1200的操作系统为完整的Debian Linux 4.0(4),可以方便地利用包管理软件apt-get来安装X.Org和Fluxbox。此外这里还需要安装一个frame buffer的设置工具fbset。


用su命令登陆到超级用户,然后输入以下命令:
apt-get install xorg
apt-get install fluxbox
apt-get install fbset
当安装xorg时,系统会提示选择” Video modes to be used by the X server”,这里可以直接按OK。



(2) 配置X.Org


输入下面的命令来配置X.Org:
dpkg-reconfigure xserver-xorg


然后按照提示输入以下信息:
  Attempt to autodetect video hardware? No
  X server driver:  fbdev
  Identifier for your video card: Generic Video Card
  Video card's bus identifier: 直接按Ok
  Amount of memory (kB) to by used by the video card:直接按Ok
  Use kernel framebuffer device interface? Yes
  Autodetect keyboard layout? No
  Keyboard layout: us
  XKB rule set to use: xorg
  Keyboard model: pc104
  Keyboard variant: 直接按Ok
  Keyboard options: 直接按Ok
  Mouse port: /dev/input/mice
  Mouse protocol: ImPS/2
  Emulate 3 button mouse? Yes
  X.Org server modules that should be loaded by default: 默认Ok
  Write default Files section to configuration file? Yes
  Attempt monitor autodetection? No
  Identifier for the monitor: Generic Monitor
  Video modes to be used by the X server:
    1024x768 (这里只使用1024x768的分辨率)
  Method for selection the monitor characteristics: Advanced
  Monitor's horizontal sync range: 28-51
  Monitor's vertical refresh range: 43-60
  Write monitor sync ranges to the configuration file? Yes
  Desired default color depth in bits: 16



(3) 启动X Window


启动X Window之前要先用fbset来设置分辨率和刷新率,然后用startx启动X Window,例如:使用1024x768的分辨率和75Hz的刷新率,可用以下命令:
fbset "1024x768-75"
startx
注:可以使用普通用户权限执行上面命令。


Fluxbox的界面如下图所示,按Ctrl+Alt+Backspace键可以返回命令行状态。
 


这里没有安装GDM, KDM之类的图形登陆界面,因为NAS1200主要用于网络文件储存共享,通常为远程使用,不需要图形界面。另外就是因为X.Org对于NAS1200这类嵌入式系统来说,是比较耗费处理器和内存资源的,所以X.Org只推荐给高级用户或者开发人员作为调试或者测试使用。


除了X Window系统之外,NAS1200还支持QT(5) + OPIE(6)的桌面方案。此方案占用资源极少,可在NAS1200上流畅运行,但相对X.Org来说,支持的软件较少,主要用于手持设备,例如PDA,GPS导航等。如果用户需要QT + OPIE的方案细节,请联系[email protected]


 


3. 安装应用软件


安装了X.Org之后,就可以安装X Window下的应用软件的,例如浏览器Iceweasel (Debian下基于Firefox的浏览器),编辑器Emacs,PDF阅读器Xpdf等。这些应用软件都可以用apt-get来安装,例如安装Iceweasel,只用输入下面命令:
apt-get install iceweasel


下图是Iceweasel在NAS1200上的运行截图:
 


 


4. 参考资料


(1) NAS1200产品中文主页:http://www.eracore.com/products/nas1200_cn.html
(2) X.Org官方网站:http://www.x.org
(3) Fluxbox官方网站:http://www.fluxbox.org
(4) Debian Linux官方网站:http://www.debian.org
(5) QT官方网站:http://trolltech.com
(6) OPIE官方网站:http://opie.handhelds.org


 



有关产品的更多信息,请访问Eracore Technologies的官方网站http://www.eracore.com,或者请联系[email protected]


 

TOP

发新话题
最近访问的版块