I want to be a complete engineer - technical genius and sensitive humanist all in one!

Wednesday, September 2, 2009

ubuntu上使用scim和gajim技巧两则

Howto run Gajim with root privileges

Gajim 0.12.1 says that he can’t run with root privileges. This is new feature that appeared in Fedora 10. In earlier versions it was normaly running under root. Anyway let’s turn off this feature in case that you need to run Gajim under root.

Open /usr/bin/gajim with your favorite text editor, find 24th line and just comment out this part of code:

if test $(id -u) -eq 0; then
echo "You must not launch Gajim as root, it is INSECURE"
exit 1
fi

After commenting it should look like

#if test $(id -u) -eq 0; then
# echo "You must not launch Gajim as root, it is INSECURE"
# exit 1
#fi

Save file. Thats it.

-------------------------------------------------------------------------------

root 下的中文显示问题解决方法如下

9.04中选择root进入系统,无法显示中文桌面,而且选择中文后也没有作用, 而在/etc/environment中,"LANGUAGE=zh_CN:zh:en_US:en"是不用修改的,改后有没问题还不清楚。

解决方法:

在root下打开隐藏文件.profile。
修改root下隐藏文件.profile,把最后的两行  LANG=C 和LANGUAGE=C改为如下所示后重启。
以下是修改过的。

# ~/.profile: executed by Bourne-compatible login shells.

if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi

mesg n
# Installed by Debian Installer:
# no localization for root because zh_CN.UTF-8
# cannot be properly displayed at the Linux console
LANG=C #修改此行为:LANG="zh_CN.UTF-8"
LANGUAGE=C #修改此行为:LANGUAGE="zh_CN:zh"

然后重启,选择以root进入系统,即可显示中文。

No comments:

Labels

Followers