存档

文章标签 ‘Ubuntu’

Gnome 的电子表格软件:Gnumeric

2007年11月25日

Gnumeric 是一款适用于 GNOME 桌面环境的电子表格软件,它隶属于 Gnome Office 的一部分。Gnumeric 是开放源代码的自由软件,具有能够快速处理大量电子表格、内嵌函数和工具可以保证精确的计算等特点,Gnumeric 还支持插件,可以不断扩展功能。而且 Gnumeric 的启动速度很快,在我的 Ubuntu 7.10 上启动不用一秒,要知道 OpenOffice.org 要七八秒才能启动(在开启快速启动后基本和 Gnumeric 持平)。

Gnumeric 支持的文件格式

  • Microsoft Excel 97/2000/XP (.xls)
  • Microsoft Excel 95 (.xls)
  • OASIS XML, OpenOffice.org XML, StarOffice (.sxc)
  • Comma/Character Separated Values (.csv)
  • Data Interchange Format (.dif)
  • Applix version 4 (.as)

Gnumeric 的安装十分简单,可以直接使用源或到官方网站下载,最新版本为 1.7

sudo apt-get install gnumeric

Gnumeric 的界面和 MS Excel 基本相同,相信很快就能上手

screenshot-book1-gnumeric-gnumeric-07-11-25.png

Gnumeric 的函数支持非常丰富,完全满足了日常需要,不过有点可惜的是不能搜索函数,只能从函数分类中找,当然,如果您知道函数名,可以直接在单元格上输入,和 MS Excel 一样,也是 “=函数名” 的格式。

screenshot-gnumeric-function-selector-07-11-25.png

screenshot-book1-gnumeric-eg-01-07-11-25.png

一个电子表格软件时除了支持函数外,图表也是必不可少的

screenshot-book1-gnumeric-charts-07-11-25.png

单元格的格式化方式也十分类似 MS Excel ,这里就不多说了

screenshot-format-cells-format-07-11-25.png

screenshot-book1-gnumeric-format-07-11-25.png

Gnumeric 的内存占用率

screenshot-gnumeric-memory-07-11-25.png

Gnumeric 的插件管理界面

screenshot-gnumeric-plugin-manager-07-11-25.png

当然,Gnumeric 的功能不止这些,这里就让各位去发现吧。

Software , ,

在 Ubuntu 7.10 上安装 ATI Driver 8.03 和 compiz 0.6.99 (update 2008/3/6)

2007年11月22日

(更新于 08-3-6)
下载:ATI Driver 8.03,并假设放到 “/home/我的用户名/” 下

我的硬件环境:

  • CPU:AMD DualCore Athlon 64 X2, 2000 MHz (10 x 200) 3800+
  • 主板:Biostar(映泰) TForce 570 U
  • 显卡:ATI Radeon X1600 Pro (RV530)
  • 硬盘:西数 WD1600JB-00REA0
  • 网卡:主板自带
  • 声卡:主板自带

删除旧有驱动
如果您的是新装的系统,可以忽略该步,否则输入

sudo lrm-manager
sudo apt-get autoremove –purge fglrx*

安装必须的编译环境

sudo apt-get update
sudo apt-get install module-assistant build-essential fakeroot dh-make debhelper debconf libstdc++5 linux-headers-$(uname -r)

屏蔽fglrx核心模块

sudo gedit /etc/default/linux-restricted-modules-common

将里面的

DISABLED_MODULES=”"

改为

DISABLED_MODULES=”fglrx”

创建deb包并安装

bash *.run –buildpkg Ubuntu/gutsy
sudo dpkg -i *.deb
sudo apt-get -f install

配置驱动

sudo aticonfig –initial -f
sudo aticonfig –ovt=Xv

编辑 xorg.conf

sudo gedit /etc/X11/xorg.conf

在文件尾端添加

Section “Module”
load “dri”
load “dbe”
load “glx”
EndSection

Section “DRI”
Mode 0666
EndSection

Section “Extensions”
Option “RENDER” “true”
Option “DAMAGE” “true”
Option “Composite” “true”
Option “XVideo” “true”
EndSection

Section “ServerFlags”
Option “AIGLX” “Enable”
EndSection

找到 Section “Device” 并添加

Option “XAANoOffscreenPixmaps” “on”
Option “TexturedVideo” “on”
Option “Textured2D” “on”
Option “TexturedXrender” “on”
Option “BackingStore” “on”

ok,可以重启系统了,确认一下自己的驱动是否安装成功

fglrxinfo
glxinfo | grep render

如果出现以下的结果说明安装成功

suxixb@su:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: Radeon X1600 Series
OpenGL version string: 2.1.7412 Release

suxixb@su:~$

suxixb@su:~$ glxinfo | grep render
direct rendering: Yes
OpenGL renderer string: Radeon X1600 Series
suxixb@su:~$

以下是我的测试成绩

suxixb@su:~$ glxgears
34023 frames in 5.0 seconds = 6804.570 FPS
36599 frames in 5.0 seconds = 7319.708 FPS
36467 frames in 5.0 seconds = 7293.291 FPS
36344 frames in 5.0 seconds = 7268.694 FPS
36448 frames in 5.0 seconds = 7289.572 FPS
36506 frames in 5.0 seconds = 7301.147 FPS

suxixb@su:~$

安装 compiz fusion
到此,我们已经安装好 ATI 驱动并能正常使用了,是时候开始安装 compiz fusion,首先添加下列的源

deb http://kwatrow.nl/repo Gutsy compiz-fusion-git
wget http://kwatrow.nl/repo/Quattro.gpg -O- | sudo apt-key add -

执行一次更新

sudo apt-get update
sudo apt-get upgrade

首先把系统自带的 compiz 删除干净,去新立得里搜索 compiz ,把已经安装了的包全部彻底删除,或者用下面的命令

sudo apt-get autoremove –purge compiz compiz-*

安装新的 compiz

sudo apt-get install compiz compiz-core compiz-fusion-plugins-extra compiz-fusion-plugins-unsupported

等待安装完成以后,到 “系统” ─ “首选项” ─ “外观” ─ “视觉效果” ,选择一个您喜欢的特效,怎样,效果还可以吧。当然,我们还需要更多的设置选项,继续下面的安装。

sudo apt-get install compizconfig-settings-manager emerald emerald-themes

让 compiz 使用 emerald 的主题

sudo gedit /usr/bin/compiz

找到下面的内容

# Defines the decorator and arguments.
# Set it to empty to make the script use the best decorator for your environment
DECORATOR=”"
DECORATORARGS=”"

改为下面的内容

# Defines the decorator and arguments.
# Set it to empty to make the script use the best decorator for your environment
DECORATOR=”emerald”
DECORATORARGS=”–replace”

ok,登出并重新登录 X ,世界变得更美妙了。

screenshot-desktop01-2008-03-04.png

screenshot-desktop02-2008-03-04.png

参考资料

  1. AIGLX
  2. 提升ati8.2驱动在compiz下的性能 by zhuqin_83
  3. ati官方驱动(非开源)的安装配置 by zhuqin_83
  4. gutsy下安装最新的 compiz 0.6.99(源) by zhuqin_83

Configure, Software , , ,

使用全局热键控制 Rhythmbox

2007年11月18日

我是一直使用 Rhythmbox 作为我的首选音乐播放软件的,之前也使用过 AmarokBanshee,这两个都原生支持自定义全局热键,唯独在 Rhythmbox 的首选项里找不到相关的设置,其实 Rhythmbox 也一样支持全局热键的,只需配合 GNOME 的 “键盘快捷键” 和 “首选应用程序” 。

打开 “系统” — “首选项” — “键盘快捷键”,看到那个 “音效” 选项,对了,就是他,只要把我们想要的动作的快捷键填上,例如我这里就加上了音量升高、音乐降低、播放/暂停、停止等,而且这些设置是全局的,即使将 Rhythmbox 最小化也适用,如下图所示

screenshot-keyboard-shortcuts-07-11-18.png

好了,快捷键设置好了,但是我们还要告诉 GNOME 这些快捷键是控制哪个多媒体播放器的,打开 “系统” — “首选项” — “首选应用程序”,去到 “多媒体” 选项卡,选择 “Rhythmbox音乐播放器”,ok,我们可以使用全局热键来控制 Rhythmbox 了。

screenshot-preferred-application-07-11-18.png

Software ,

设置 wine 的中文显示

2007年11月11日

一般情况下,ubuntu 软件仓库里 wine 的版本比较旧,例如在写这篇文章时,ubuntu 7.10 官方源里的 wine 版本是 0.9.46,而最新的已经是 0.9.49 了,所以有必要使用其他的源来安装最新的 wine ,例如使用 wine 官方源

添加 wine 官方源

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

  1. For Ubuntu Gutsy (7.10):

    sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/winehq.list

  2. For Ubuntu Feisty (7.04):

    sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list

  3. For Ubuntu Edgy (6.10): *不支持 64 位*

    sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/edgy.list -O /etc/apt/sources.list.d/winehq.list

  4. For Ubuntu Dapper (6.06): *不支持 64 位*

    sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/dapper.list -O /etc/apt/sources.list.d/winehq.list

  5. For Debian Etch (4.0):

    sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/etch.list -O /etc/apt/sources.list.d/winehq.list

安装最新的 wine

sudo apt-get update
sudo apt-get install wine

设置 wine

  1. 在安装完成后,先不要运行 wine 来模拟程序,因为 wine 需要进行一些必要的设置,运行

    winecfg

    点 “Audio” 选项卡,按照下图设置,其中 “Sound Drivers” 处需要根据自己的情况来选择合适的驱动,可以按旁边的 “Test Sound” 按钮测试是否成功。

    screenshot-wine-configuration-audio-07-11-11.png

  2. Google 搜索或到 windows xp 的 Fonts 目录下,把 simsun.ttc (即宋体)复制到 ~/.wine/drive_c/windows/fonts

    screenshot-windows-fonts-wine-fonts-nautilus.png

  3. 把下列内容另存为 fonts.reg,保存到 ~/.wine/ 目录下

    REGEDIT4

    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
    “Arial”=”simsun”
    “Arial CE,238″=”simsun”
    “Arial CYR,204″=”simsun”
    “Arial Greek,161″=”simsun”
    “Arial TUR,162″=”simsun”
    “Courier New”=”simsun”
    “Courier New CE,238″=”simsun”
    “Courier New CYR,204″=”simsun”
    “Courier New Greek,161″=”simsun”
    “Courier New TUR,162″=”simsun”
    “FixedSys”=”simsun”
    “Helv”=”simsun”
    “Helvetica”=”simsun”
    “MS Sans Serif”=”simsun”
    “MS Shell Dlg”=”simsun”
    “MS Shell Dlg 2″=”simsun”
    “System”=”simsun”
    “Tahoma”=”simsun”
    “Times”=”simsun”
    “Times New Roman CE,238″=”simsun”
    “Times New Roman CYR,204″=”simsun”
    “Times New Roman Greek,161″=”simsun”
    “Times New Roman TUR,162″=”simsun”
    “Tms Rmn”=”simsun”

  4. 导入上一步保存的 fonts.reg

    regedit ~/.wine/fonts.reg

好了,中文显示基本上没有问题了,并且可以用 scim 输入法输入中文

screenshot-wine-notepad-07-11-11.png

Virtual , ,

使用 FlashGot + d4x 实现图片批量下载

2007年11月10日

d4x(download for X)本身并不支持批量下载,在 Linux 下只能通过 shell 脚本+wget 或使用 Firefox 扩展 Batch Download,其实 FlashGot 本身就提供了这个功能 —— “建立图库” 。

screenshot-flashgot-photo1.png

例如现在我们要下载 100 张图片,他们的 url 分别如下

http://www.abc.com.cn/01.jpg

http://www.abc.com.cn/02.jpg

http://www.abc.com.cn/03.jpg

………………

http://www.abc.com.cn/100.jpg

留意这些图片的 url,他们之间不同之处是最后的 01.jpg、02.jpg、03.jpg,知道后就简单了,把上面的 url 写成

http://www.abc.com.cn/[01-100].jpg

意思是中括号处由 01 到 100 之间的数字代替包括 01 和 100。其格式是 [开始-结束;跨度] 或者用函数表示,跨度默认是 1,或者可以省略,当跨度是 2 时,表示 http://www.abc.com.cn/01.jpg 的下一张是 http://www.abc.com.cn/03.jpg ,跳过中间的 http://www.abc.com.cn/02.jpg 。把这个 url 复制到 FlashGot 的 “建立图库” 处。

screenshot-flashgot-photo3.png

确定后,FlashGot 便会生成一个临时的 html 文件,里面包含了 http://www.abc.com.cn/[01-100].jpg 这 100 张图片,然后我们点右键菜单的 “使用 FlashGot 下载全部链接” ,或者直接按 “Ctrl+F3”,先询问下载的存放路径,确定后便开始下载了。

下面是使用中的一些截图

screenshot-flashgot-photo4.png

screenshot-flashgot-photo5.png

screenshot-flashgot-photo6.png

screenshot-webdownloader-for-x-start-download.png

Software , , ,

推荐 BT 下载工具:Deluge

2007年11月1日

Deluge 是一个基于 Python 和 GTK+ 的 BT 客户端,适用于 Gnome 和 XFCE 桌面环境,能用于Linux 和 Windows。而且有不少实用功能,例如可以选择下载 Torrent 里的文件;支持插件;支持 DHT;支持 UPnP、NAT 端口映射、加密传输;支持代理和具有一个 WebUI 管理页面等等。

我们可以通过源安装或者到官方网站下载,不过源里的版本是 0.5.4.1 比较旧,而最新已经去到 0.5.6.2 ,而且源里的不支持 WebUI,这里有份 Deluge 的 WebUI 的试用报告。如果要通过源安装的请用新立得搜索 deluge。下面是一些截图:

  1. 程序界面

    screenshot-deluge.png

  2. 插件界面

    screenshot-p.png

  3. 网络设置界面

    screenshot-deluge-net.png

  4. 代理设置界面

    screenshot-deluge-proxy.png

  5. 选择下载文件界面

    screenshot-deluge-file-selection.png

Software ,

Ubuntu 上的离线 Feed 阅读器:Liferea

2007年10月31日

Liferea(全称:Linux Feed Reader)是一个 GTK/GNOME 上简单的 Feed 阅读器,他支持 Atom、RSS 和 OPML 格式的导入和导出并可实现离线浏览。下面是导入我的 Google Reader 后的截图。

screenshot-liferea.png

可以直接使用源里的或者到其主页下载。

sudo apt-get install liferea

在 “Ctrl++” 可以放大字体,按 “Ctrl+-” 缩小字体(小键盘上的);按 “Ctrl+N” 阅读下条未读条目;按 “Ctrl+A” 更新所有条目;点 “视图”—“组合视图” 可以实现 Google Reader 式的浏览界面;选择 “订阅”—“脱机工作” 后便能实现离线阅读;支持代理;支持 wget 等下载工具;支持分类收藏、OPML 订阅、以及社会化书签等实用功能。

screenshot-liferea-1.png

screenshot-liferea-2.png

Software ,

推荐一个看漫画的工具:Comix

2007年10月30日

以下引用自 Cmoix 的介绍

Comix 是一个为处理漫画书而特别设计的图像浏览器。它能读取 Zip、RAR 和 tar 文件(包括 gzip 或者 bzip2 压缩过的)和普通的图像文件。

由于以前下载回来的漫画都是压缩成 zip 或 rar 格式的,而以前在 Windows 上一直使用 ComicsViewer 看漫画,可以直接浏览压缩包内的图片而无须解压,还支持带有密码的压缩包。转到 ubuntu 后,一直想找到相关的软件,今天无意中给我发现了 Comix 这个软件,使用后发现 Comix 基本上拥有了 ComicsViewer 所有的功能,而且 Cmoix 还有 “收藏库” 的功能,可以很方便的管理硬盘上的漫画,还有书签等实用功能。不过遗憾的是 Cmoix 不支持带密码的压缩包。

安装很简单,可以从源里安装,或者到 Comix 的主页下载。

sudo apt-get install comix

about-comix.png

安装完成后,去到 “应用程序”—“图像”—“Comix” 打开,我安装后界面已经是中文的,点 “文件”—“打开” ,选一个压缩文件便可以浏览了,按 “F” 键全屏,按 “Z” 键使用放大镜,不过这个放大镜有点不够人性化,反应不够灵敏,可能是我机子的问题吧。

screenshot.png

如果您硬盘上漫画的数目有几十本以上,在使用 ComicsViewer 时要管理起来会变得很麻烦,而 Comix 有 “收藏库” 功能,如下图

screenshot-comix-1.png

双击上面的缩略图便能打开相关的漫画。当然,还有很多实用的功能等着您去发现。

Software ,

在 ubuntu 上配置 samba 服务

2007年10月27日

在通常情况下,要想实现 ubuntu 和 windows 之间的资源共享,需要借助 samba 服务,而ubuntu 自带的“共享文件夹”功能比较单一,需要进行一番设置才能实现共享的。以下是我在 7.10 上配置 samba 的过程。

安装 samba

sudo apt-get install samba smbfs

配置 smb.conf

sudo gedit /etc/samba/smb.conf

查找下列文字

; security = user

将其代替为

security = user
username map = /etc/samba/smbusers

继续查找下列文字

workgroup = MSHOME

将其代替为

workgroup = WORKGROUP
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936

添加允许网络访问的用户

sudo gedit /etc/samba/smbusers

输入下列内容。注意 suxixb 是我的登录名,需要换成您的,下同

suxixb = “network username”

更改用户的网络访问密码,可以不同于系统的登录密码

sudo smbpasswd -a suxixb

重启一下 samba 服务

sudo /etc/init.d/samba restart

好了,要在 windows 上访问 ubuntu的资源,只需在 “开始”—“运行” 里打 “\\ip 地址”,输入用户名和密码,ok。在 ubuntu 上需要用 “smb://ip 地址” 访问,不过需要在 windows 上赋予相关的权限

附:

  1. 删除上面添加的网络使用者的帐号

    sudo smbpasswd -x suxixb

  2. ubuntu 上添加共享
    去到 “系统”—“系统管理”—“共享的文件夹”,点 “添加”,选择要共享的目录,选是否给予写权限,点 “确定”。

Configure , ,

在 Ubuntu 上使用 Mozilla Nvu 网页编辑器

2007年10月24日

Nvu 是一套同样以 Mozilla 为核心的网页编辑器(就像市面上常见的 FrontPage 或是 Dreamweaver 等等网页编辑程式),目前由 Linspire(以前的 Lindows)主导开发。承袭了Mozilla的特色, NVU是一套开放源码(Open Source)、跨平台(Cross Platform)、免费的程式,任何人都可以自由下载使用。

  1. 首先下载最新的 nvu 繁体中文版,选择 Linux 2.6.10 版本。目前还没有官方的简体中文版,不过我们可以安装简体中文语言扩展来实现。
  2. 把下载回来的压缩文件解压到 /opt 下。

    tar xjvf nvu-1.0-linux2.6.10-gnu-zhTW.tar.bz2
    sudo mv -R nvu-1.0 /opt

  3. 把启动器添加到 “应用程序”—“编程” 下,在终端里输入

    sudo gedit /usr/share/applications/Mozilla-Nvu.desktop

    复制并粘贴下面的内容

    [Desktop Entry]
    Name=Nvu
    Comment=以 Mozilla 为核心的网页编辑器
    Exec=/opt/nvu/nvu
    Icon=/opt/nvu/icons/mozicon50.xpm
    Terminal=false
    MultipleArgs=false
    Type=Application
    Categories=Application;Development;

  4. 转换为简体中文界面,首先下载简体中文语言扩展,打开 Nvu,在 “工具”—“擴充套件”,点 “安装” ,选择下载回来的扩展(Nvu_zh-CN_0.21.xpi),重启一下 nvu,ok,完成。

nvu.png

Software , ,