Wednesday, July 30, 2008

Fedora8系统Gnome桌面环境下安装EVA QQ

1 安装EVA所依赖的开发包:
sudo yum install qt qt-devel kdelibs kdelibs-apidocs kdelibs-devel arts arts-devel

2 解压缩eva(不一定要把安装文件移动到这个位置,其他位置也可以)
mv ~/eva-20080127_1.tar.bz2 /usr/local/src/
tar xvjf /usr/local/src/eva-20080127_1.tar.bz2
cd /usr/local/src/eva

3 开始配置
sudo ./configure --prefix=/usr/local/QQ --with-qt-dir=/usr/lib/qt-3.3/ --with-qt-includes=/usr/lib/qt-3.3/include/ --with-qt-libraries=/usr/lib/qt-3.3/lib/

4 编译、安装
sudo make
sudo make install

这样就可以到/usr/local/QQ/bin下找到eva程序,运行,就可以登陆QQ了。
由于eva是为kde设计的,所以在gnome下面运行会有错误提示。
QQ本身做得也必是很完善,中文的字体显示都有问题,所以实在是不好用。

install JRE on Firefox (Fedora 8)

sudo rpm -iv jre-6u2-linux-i586.rpm

sudo ln -s /usr/java/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-2.0.0.16/plugins/

sudo ln -s /usr/java/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins

use sudo without password


有时候我们只需要执行一条root权限的命令也要suroot,是不是有些不方便?这时可以用sudo代替

Fedora默认新建的用户不在sudo组,需要编辑/etc/sudoers文件将用户加入,该文件只能使用visudo命令,首先需要切换到root

在文件末尾加上下面的一行:
yourUserName ALL=(ALL) NOPASSWD:ALL

install xmms on Fedora 8

yum -y install xmms xmms-mp3

Upgrade to firefox 3 on Fedora 8

wget http://rpms.famillecollet.com/remi-release-8.rpm

sudo rpm -Uvh remi-release-8.rpm

sudo yum --enable remi update firefox

Friday, July 25, 2008

Fedora8 change start mode: text or graphic mode

edit file /etc/inittab

at the beginning of the file:

# if graphic mode
id:5:initdefault:

# if text mode
id:3:initdefault:

gnome-terminal: set environment variables

The gnome-terminal does not automatically load the .bash_profile when it is opened. If you want to load .bash_profile you can click the gnome-terminal's menu "Edit--> Profiles..... --> Edit(Default Profile) --> Title and Command --> Run command as a login shell". So when gnome-terminal starts it will load .bash_profile. Of course you can set some environment variables in .bash_profile.

How to use ssh without password

1.首先在client上建立public Key和private key,需要使用ssh-keygen命令

[user_name@localhost .ssh]# ssh-keygen –t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/user_name/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): 按enter
Enter same passphrase again: 按enter
Your identification has been saved in /user_name/.ssh/id_rsa.
Your public key has been saved in /user_name/.ssh/id_rsa.pub.
The key fingerprint is:
e8:8a:5e:ae:c7:13:45:d0:81:cd:3f:e6:1e:f8:88:5a
root@localhost.localdomain
#這樣會產生 id_rsa和id_rsa.pub 二個檔案:前者是private key後者是:public key.


2.然后将Private Key 放在client上的宿主目录, 一般放在/user_name/.ssh/目录中, 并修改权限为user可读


3 最后,将Public Key 放在任何一个您想登陆主机server中的某user的宿主目录下的.ssh/子目录人证文档中,
执行more id_rsa.pub >> authorized_keys即可。
scp id_rsa.pub username@server_hostname:~/.ssh/ #把id_rsa.pub 放到您要連線電腦的帳號中的.ssh

#注意 ~/.ssh 預設是沒有的,有二個方面可以產生 :第一種是手動建立. 並把目錄屬性更改為 700, 第二種是先用手動ssh到別的主機 ,第一次會有 認證的訊息出來按yes之後 .ssh的目錄就會自己產生了