2009年4月29日星期三

把gOS的桌面改成KDE

首先,打开终端,输入

sudo apt-get install kubuntu-desktop

终端提示要下载159MB左右的文件,遇到提示时全部选“Y”,接下来是长时间的等待(取决于你的带宽情况,毕竟要下载159MB左右的文件)。下 载完成 后,终端自动进行配置,之后变成一个蓝屏的文字窗口,寻问你要选择Kdm 还是gdm,这个看个人喜好,因为这只是开机登陆窗是KDE的还是GNOME的差别而已。我选择的是gdm,按回车,解下来自动配置。

安装好后,按组合键Ctrl+Alt+Backspace 重启Xwindows,在登陆窗的“会话”中选择KDE,登陆后就是变成KDE了。(如果想回到ubuntu的话,可以在“会话”中改成gnome)

需要说明的是,此时你在ubuntu下安装的一切软件都可以在Kubuntu下使用,同理,Ubuntu下也可以使用KDE的软件。简言之,所以软件是共用的。

另外,此时默认的KDE为英文界面,可以使用这条命令 安装中文环境。

sudo apt-get install language-pack-kde-zh language-pack-kde-zh-base language-pack-zh language-pack-zh-base language-support-zh

大概下载50M的安装包,安装后,按组合键Ctrl+Alt+Backspace 重启Xwindows,这样就变成中文的了。


使用了一段时间后,发现KDE比gnome漂亮多了。

2009年4月28日星期二

编译gtk+,导致桌面程序出问题了

在gOS上编译gtk+/directfb,导致很多东西都不正常,包括thunderbird,nautilus等,看来还是得把不确定的东西放到虚拟机上去跑,否则可能导致工作桌面不正常,感觉正常后,再放到桌面上来。

现在正在下载ubuntu 9.04,下载后在虚拟机上跑跑,如果可以,把桌面换换。

2009年4月27日星期一

在gOS(Ubuntu)下,命令行下看到中文

Ubuntu下的终端(不是GNOME下的终端)会出中文显示乱码的问题:

1. 安装zhcon:$sudo apt-get install zhcon
2. 进入终端时,执行:$zhcon --utf8 --drv=vga,为了以后使用方便,可以为此命令作一个别名,方法是在/etc/bash.bashrc中添加这么一行:
alias zhcon='zhcon --utf8 --drv=vga'
3. 注意:进入终端执行zhcon命令时,如果出现花屏或黑屏的话,这时需要启动Linus kernel 的framebuffer模块。
4。重启!OK!

gOS(ubuntu)下支持framebuffer

需要在ubuntu中配置以让其启动framebuffer支持,参考以下方法
默认屏蔽了framebuffer模开,所以无法在grub参数上加vga=xxx来启用frame buffer.
解决解决方法:
首先,编辑你的 /etc/initramfs-tools/modules 文件
加入如下三行内容
fbcon
vesafb
vga16fb

最重要的一步,要把文件/etc/modprobe.d/blacklist-framebuffer.conf里面的vesafb和vga16fb这两行给注释掉。
这样你就可以在内核后面加入vga=xxx这样的启动参数了。

最后,在/boot/grub/menu.lst的kernel后加入了vga=0x0317,是1024x768的16位色。

最后刷新一下
代码:
sudo update-initramfs -u
重启,ok

2009年4月21日星期二

gOS中使用gdesklets

使用下面的命令:
sudo apt-get install gdesklets-data
sudo apt-get install gdesklets
安装gdesklets

编写my.display文件
<“?xml version="1.0" encoding="UTF-8"?>

<“display window-flags="sticky" bg-color="white">
<“label value="这是 knoppix 的桌面" font="Serif 20" color="red"/>
<”/display>

注意这个文件用utf-8编码。

运行下面的命令:
gdesklets open my.display&
这样就可以在桌javascript:void(0)面上看到my.display

注意:用鼠标中键移动widgets。用ps看,好像是python解析gdesklets,难道gdesklets使用python解析的,需要进一步的了解。
由于xml文件在这个blog中不能显示出来,所以加上了“号

widget engine(转)

  In computer software, a widget engine is a software service available to users for running and displaying desktop widgets on the desktop. Desktop widgets are physically inspired applets that give access to information and frequently used functions such as clocks, calendars, news aggregators, etc.
  The term widget engine is not to be confused with that of a widget toolkit. Toolkits are destined to GUI programmers, who combine several widgets to form a single application. A widget in a toolkit provide a single, low level interaction, and is prepared to communicate with other widgets in the toolkit. On the other hand, widget engines are intended for end users and each desktop widget is a stand-alone, task-oriented application which can be composed of several related interactions on its own.
  The desktop widget model is attractive because of ease of development. Most of these widgets can be created with a few images and about 10 to several hundred lines of XML/JavaScript/VBScript source code. A single host software system, such as a web browser, runs all the loaded widgets. This allows several desktop widgets to be built sharing resources and code.
  Contents
  * 1 Desktop widgets
  * 2 Mobile widgets
  * 3 Information flow of Desktop Widgets
  * 4 See also
  * 5 Notes and references
  * 6 External links
  Desktop widgets
  Examples of desktop widgets, shown here in DesktopX
  Examples of desktop widgets, shown here in DesktopX
  The Wikipedia Widget, in Dashboard running under Mac OS X v10.4
  The Wikipedia Widget, in Dashboard running under Mac OS X v10.4
  Early developer version of Plasma Desktop with Plasmoids
  Early developer version of Plasma Desktop with Plasmoids
  Widgets are downloadable interactive virtual tools that provide services such as showing the user the latest news, the current weather, the time, a calendar, a dictionary, a map program, a calculator, desktop notes, photo viewers, or even a language translator, among other things.
  Examples of widget engines include:
  * Dashboard widgets of Apple Macintosh
  * Microsoft gadgets in Windows Vista and in the Windows Live system
  * Plasmoids are widgets in Plasma the workspace for the KDE desktop environment.
  * gDesklets of Linux systems.
  * Panels or gadgets in Google Desktop
  * Yahoo! Widgets
  * Klips in Klipfolio
  * Mobile widgets, WidSets
  Originally, desk accessories were developed to provide a small degree of multitasking, but when real multitasking OSes became available, these were replaced by normal applications.
  Early examples of widgets were desk accessories on Mac OS (these, however, cannot access the internet). The Active Desktop system, developed by Microsoft, was the first system to enable desktop objects with internet access.[verification needed] Widgets resemble the tiny freeware apps that were developed by enthusiasts during the 80s.
  On 9 November 2006, the Web Application Formats Working Group in W3C released the first public working draft of Widgets 1.0.[1] Widget is on its way to standardization.
  Mobile widgets
  Most mobile widgets are like desktop widgets, but for a mobile phone. Mobile widgets can maximize screen space use and may be especially useful in placing live data-rich applications on the device home-screen/"phone-top". Several J2ME-based mobile widget engines exist including WidSets, WidX, Webwag and BluePulse. However the lack of standards-based APIs for Java to control the mobile device home-screen make it harder for these engines to expose widgets on the phone-top.
  Several AJAX-based widget platforms are also available for mobile devices including Access' NetFront, Openwave's MIDAS and Opera's Opera Platform.
  Information flow of Desktop Widgets
  A desktop widget is a small footprint application, which resides on the user’s desktop using a small desktop space and computer resources, such as the HDD and RAM. Its purpose is to provide relevant information to the user in a non-intrusive manner and using few resources. Basically, desktop widgets enable the user view on demand, capsuled information from predetermined data sources. Ideally, a desktop widget must present personalized content, based on the user’s preferences. It is supposed to beam the most important information that a user requires on a day to day basis. Most of the desktop widgets are available as free downloads from the vendors’ Web sites.

2009年4月19日星期日

widgets(转)

十年前的一天,苹果电脑工程师Rose的在自己的苹果操作系统桌面玩一个可以更换皮肤的MP3播放器时忽发奇想:如果在我桌面上运行的所有工具都能够更换皮肤或外观,那将是一件很酷的事情。2002年的一天,Rose遇到了一个工程师Perry。两人拥有对于此事同样的构想,于是一拍即合,开始共同为了这个炫酷的玩意儿在深夜努力工作。终于在2003年2月10日的深夜,一个运行在苹果操作系统之上的小工具--Konfabulator正式发布了,其中的主运行文件叫做Widget,在Rose头脑中酝酿了5年的想法终于第一次问世了,并且向所有人宣布它是运行在用户桌面上最独一无二的工具:你希望它是什么样子,它就能按照你的想法而改变。2004年的11月,基于Windowns操作系统的Widget1.8版本正式对外发布了,由此开始Widget进入了一个新的时代,成为了跨平台的产品。使用Windows和Mac操作系统的用户都可以使用和开发自己喜欢的Widget工具。当然这还仅仅只是一个开端。

经过几年的发展,如今的Widget已经由当初的曲高和寡逐步发展成与博客、播客、RSS、SNS等Web2.0名词一样被越来越多的人提起。

1. Widget是什么?
简单说Widget可以理解为“应用小插件”,一种可供用户制作和自由下载的小工具,它包含了娱乐、工作、学习等多种实用功能。目前的Widget应用大体可分为三种:Desktop Widget、WEB Widget以及Mobile Widget。
1.1 Desktop Widget
Desktop Widget 可以在电脑桌面上独立执行,用户无需通过浏览器便连接到网络。时至今日,很多人已对苹果、雅虎、Google及微软开发的Desktop Widget比较熟悉。通过这些小型应用软件,用户可把各类网上信息(如天气、新闻头条、图片等)放到桌面上。如果用户不关闭这些Widget而回到浏览器的话,它们将一直处于打开状态。

图1 Desktop Widget之Google Gadget



图2. Desktop Widget之Yahoo! Go

1.2 Web Widget
Web Widget 是一种可以容易地嵌入到网页的模块。从程序员的角度,Web Widget就是一小段程序代码,用户不需要做任何修改或者编译就可以将其嵌入并在任何 HTML网页上运行。因此通过它们我们可以把新闻、信息、游戏、娱乐等整合到我们的网站上,也可以用来装饰我们的网站。Web Widget可以很方便地实现聚合。用户可把从某个网站上搜集的数据置入另一个网页中。比如把定制化搜索框加入到用户的博客中,或把某个YouTube视频加入到某位用户的 MySpace网页之中,甚至创建一个综合了用户Gmail、RSS供应及网络相册等内容的完整Widget页面。如果用户使用TypePad博客服务,还能使用非常丰富的Widget工具。
下图是一个iGoogle的定制个人门户,用户根据自己的爱好和兴趣定制Widget,完全不需要关心数据是从哪里来的,只需要关注上面的内容,通过Widget可以直接把其他网站的服务嵌入到自己的门户上了,这种承载了网络服务的门面的个人门户技术平台也体现了Web2.0时代倡导的用户参与的精神。


图3 Web Widget之iGoogle

1.3 Mobile Widget
Mobile Widget 实际上是运行在移动设备上的Desktop Widget。最闻名遐迩的Mobile Widget莫过于诺基亚维信了。诺基亚公司为了实现其战略转型,由设备运营商进入移动互联网领域,推出了维信,短短一年多的时间就吸引了3000多个widgets(精灵)的加入。用户在诺基亚机器上安装(或者已经预装)了维信软件之后,可以通过自主添加维信精灵的方式实现你想要的各种功能。


图4 基于Mobile Widget的诺基亚维信手机截图



1.4 无孔不入的Widget
当然Widget的应用并不限制在这三个领域,甚至已经渗入到家电行业。
三星电子在近日的消费电子大展上展出新款高清晰度电视,其中将安装雅虎的Widget应用软件,该款电视的“Internet@TV” 互联网内容服务将让观众通过互联网查看新闻、股价、视频、图片。雅虎副总裁帕特里克-巴里表示:“这一合作使雅虎将互联网的丰富选择、个性化特点和三星电子的产品创新、全球覆盖特点结合起来,为全球用户提供新的感受.” 该电视将能连接到雅虎Flickr、新闻、天气预报、财经等内容,也能访问 YouTube、eBay、Showtime等网站。三星电子视觉显示部门执行副总裁Boo-Keun Yoon表示:“与雅虎的合作让观众前进了一步。新界面让他们能与很多最受欢迎的万维网服务进行个性化互动,不再是被动地看节目。毫无疑问,这代表了未来的电视.”


图5. 安装雅虎Widget应用软件的三星高清晰电视


几乎是同时,MySpace、英特尔和雅虎联合发布了一款电视版社交网络软件--MySpace Widget。利用这款软件,用户可以在观看电视节目的同时在电视上与MySpace好友联系。用户在看电视时,激活电视屏幕底部的这款widget就可以与MySpace好友交换信息,或浏览MySpace上的照片。利用MySpace Widget,用户无需浏览器就能够访问MySpace.com,直接在电视上接收好友的更新信息,查看好友的档案。 MySpace发言人说,用户可以通过遥控器使用这款widget,利用电视屏幕上显示的软键盘输入信息。MySpace Widget将被预装在能够上网的消费电子产品中,例如机顶盒、蓝光影碟机和电视。