Linux下编译安装QTerm小结


   Linux要安装软件的话还是比较烦的,虽然在Ubuntu可以有deb包,Fedora有rpm包,这些都是双击就可以自动安装的了(这个跟windows的exe文件一样),但是很多时候你并不能找到这些已经编译好的安装包,网上更多的是一些源文件的资料包,这时就要我们自己编译安装了,这也是每个Linuxer必须得学会的一项技能吧,要不然就不可能在Linux环境下安装各种软件.

   回顾安装QTerm的历程,一开始个人认为自己编译安装软件是一件特麻烦的事情,所以在用Ubuntu的时候就直接找了个deb包直接把qterm给装上了,但是现在用的是fedora12,在网上找了半天rpm包,却没有收获,很多都是只提供源文件包,要自己编译的.看来想用QTerm上bbs还是得自己编译安装才行.

   要想自己编译安装QTerm就得先去网站下载个源文件包,这里你可以选择适合自己系统的版本.接下来就是自己编译了,在网上找了半天,发现都是一大堆垃圾信息(后来才发现是在官网的Wiki上面弄下来的,www.bkjia.com而且又只是拷贝了一部分,看得我云里雾里的....那些转载的人也不知自己有没试过就随便转载,结果Google搜出一大堆一样的东西....),下面就附上官网的安装指南:(http://qterm.sourceforge.net/wiki/index.php/Documentation)

Requirements
Since QTerm is written in Qt, To run QTerm you need a working X environment with Qt 4.2 or above.
If you want sound support, you should install Qt with Phonon support.
For the SSH support, you need OpenSSL package.
If you want to compile QTerm, you need the development package of X, Qt, OpenSSL (optional).
Getting QTerm
Download the latest source from our download page. Currently the stable version is 0.4, but the code is very old and outdated. On the other side the unstable version is almost stable enough for everyday use, so we recommend using the unstable version.

Usually we will provide binary packages: rpm ,deb etc, you can easily install them just like other packages. But because of the lacking of man power, you might need to download the source package and compile it by yourself. Don't be afraid, we will show you how to compile QTerm in the following part.

If you enjoy hunting bugs and committing patches, the SVN source is your best choice. You can find instructions in the download page too.


Configuring QTerm
Suppose you need to compile QTerm by yourself, the first thing you need to do is unpacking the source package and configuring QTerm:

$tar -xvf qterm-0.5.6.tar.bz2 $cd qterm-0.5.6 $mkdir build $cd build $cmake ..
By default, QTerm will be installed to /usr/local, if you want to install it to some other place, use the following option

$cmake .. -DCMAKE_INSTALL_PREFIX=/the/new/path
There are a few other useful variables to control the configuration process:

QTERM_ENABLE_SSH

$Enable/disable SSH support (default: ON)
QTERM_ENABLE_DBUS

$Enable/disable DBus support (default: ON)
QTERM_ENABLE_SCRIPT

$Enable/disable script support (default: ON)
QTERM_ENABLE_PHONON

$Enable/disable Phonon support (default: ON)
QTERM_ENABLE_SCRIPT_DEBUGGER

$Enable/disable script debugger support (default: OFF)
For example, if you want to install QTerm to /usr/local/qterm and enable script debugger, you can run cmake with

$cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/qterm -DQTERM_ENABLE_SCRIPT_DEBUGGER=ON
Compiling QTerm
Now you can start the compilation by typing

$make
You can install QTerm with

$make install
provided that you have write permission in the installation directory.

If all went well, you can run QTerm by typing

$qterm
 
   经过这次自己的编译安装经历,我发现其实网上很多东西都是互相转来转去的,转载的人也没经过自己的尝试就把别人写错的东西也转来了,结果只是给互联网增添垃圾信息而已.所以最好的学习方法还是去看官网的东西,里面的东西才是最有价值的.虽然英文看起来有点累,但是里面的东西确实是挺有用的.

   装完qterm后就是设置的问题了,最好能够在第一次使用软件就把里面的设置配置好,这样才能让你的软件最大化地为你服务,我也是用了linux后才习惯用软件之前先配置参数.qterm的配置我也不多说了,就只说个字体的问题,很多人都遇到linux环境下字体的显示问题(比较常见的像chrome浏览器的显示问题...),经过自己各种尝试,也参考了网上大家的配置,最后还是发现 ASCII font用DejaVu Sans Mono general font 用微软雅黑还是挺不错的(至少是上水源特有感觉)。

相关内容