命令 update-manager -d
2008年11月1日星期六
2008年9月29日星期一
post-installation script 返回了错误号 1或2 的解决方法
删除 /var/lib/dpkg/info/软件包名.postinst 重新 apt-get update
Link
ubuntu8.04 GDM显示过大的解决方法
备份xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup编辑xorg.conf
sudo gedit /etc/X11/xorg.conf找到
Virtual 1400 1050改成你想要的分辨率,如:
Virtual 1024 768
Link
2008年9月27日星期六
Using Mutt with Gmail
$ sudo apt-get install ssmtpThere is a single configuration file to be altered: /etc/ssmtp/ssmtp.conf. Below is the required configuration for a Gmail server:
root=Email Address # Your email address
mailhub=smtp.gmail.com:587 # Gmail details
UseSTARTTLS=YES # Send SSL/TLS messages to Gmail
AuthUser=Gmail Username # Your Gmail Username
AuthPass=Gmail Password # Your Gmail Password
rewriteDomain=gmail.com # So the message appears to come from Gmail
FromLineOverride=YES # So the message appears to come from Gmail
hostname=Hostname # Hostname: use hostname -f in a Terminal$ sudo apt-get install muttmutt configuration (~/.mutt/.muttrc)
# mail check optionsSuccessfully use Mutt with Gmail
set pop_host="pops://name:password@pop.gmail.com:995"
set pop_last
unset pop_delete
# mail send options
set sendmail="~/bin/gmailout"
# check for new mail on startup
exec fetch-mail
using mutt with Gmail
2008年9月18日星期四
Ubuntu可直接安装ibus输入法
如果你是Ubuntu用户,直接打开终端,执行以下指令即可安装ibus输入法。注:如果你的源里没有,请加cn99这个源。sudo apt-get install ibus ibus-pinyin ibus-table其中ibus-table是一些额外码表,有五笔、郑码、仓颉等,可以根据自己的需要进行选择。
安装后,在自己的~/.profile文件中增加如下几行,重新登录后即可使用ibus
export XMODIFIERS=”@im=ibus”
export GTK_IM_MODULE=”ibus”
ibus &
2008年9月4日星期四
GDM font size
Have a look in /usr/share/gdm/themes. Then go into the directory with the same name as your login theme and take a look at the
You can change the font/font-size, etc in here. But make sure you keep a backup copy of the original .xml file - say
2008年9月2日星期二
ubuntu8.04 安装微软雅黑
1、在fonts下新建一个vistaFonts目录,准备把从windows下拷贝过来的字体都放在这个目录里,这里就是把雅黑字体放进来
代码:
sudo mkdir -p /usr/share/fonts/vistaFonts
sudo cp Yahei.ttf /usr/share/fonts/vistaFonts/
然后,改变权限:
代码:
sudo chmod 644 /usr/share/fonts/vistaFonts/Yahei.ttf (改成755也没问题的,但起码要444)
开始安装:
cd /usr/share/fonts/vistaFonts/
sudo mkfontscale
sudo mkfontdir
sudo fc-cache -fv
至此雅黑安装完成。
2008年8月21日星期四
快速重装软件的技巧
导出软件列表了dpkg --get-selections|grep -v "deinstall" > installed ,保存好installed文件
在重装完成后,先sudo apt-get install dselect
再 sudo dpkg --set-selections < installed
这是根据刚才的installed文件重新标记待安装文件。。。
由于dselect程序在中文环境下会乱码,所以我们只好暂时进入英文环境了: export LANG=en_US.UTF-8
然后就sudo dselect吧,选install就行了,然后一路yes。
2008年8月19日星期二
ubuntu8.04不能正常自动关机(出现nm_hal_deinit(): libhal shutdown failed)
关机时都会出现的信息:
Network Manager:
Network Manager: nm_dbus_signal_device_status_change: assertion 'cb_data -> data -> dbus_connection' failed
解决方法:首先试一下acpi=force的内核参数
先重启电脑,bios信息后,出现Grub时按一下ESC键,选择启动linux的内核的那一行编辑,如选择 "kernel /boot/......"这一行按一下 "e" 键开始编辑这行,在这行的末尾添加acpi=force参数,然后按一下回车再按 "b"启动。
如果你的机子正常了,那么把这个参数"acpi=force"加到Grub中,在终端中运行:sudo gedit /boot/grub/menu.lst
输入你的密码,回车。
寻找下面的内核选项行:# defoptions=nosplash locale=it_IT
加入下面一行acpi=force
保存退出,运行sudo update-grub
依照这篇文章试了一下,发现不行,还是无法关闭,搜了一下发现一个开机时有如下提示的和我的一样:
(0.000000)ACPI: no DMI BIOS year: acpi=force is required to enable acpi.
可惜没有解决方法
于是去google搜索了英文,有大发现哦在Ubuntu的官方网站上有一个用户与我几乎一样:
http://ubuntuforums.org/showthread.php?s=a52bb7df6dce6b9eb8c348ef4d165850&t=603054&page=2
可惜是英文的,不过看了一下,综合起来可以用如下方法解决:
1、在终端中输入:sudo gedit /etc/modules
2、在文件末尾加上:apm power_off=1
保存关闭。
3、在终端中继续输入:sudo gedit /boot/grub/menu.lst
4、找到如下几行:title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=419086cc-9136-45e9-9369-d7fe44edff76 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
5、在以kernel开头的那句的最后面加上acpi=force apm=power_off
6、加上后如下所示:title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=419086cc-9136-45e9-9369-d7fe44edff76 ro quiet splash acpi=force apm=power_off
initrd /boot/initrd.img-2.6.22-14-generic
7、保存关闭,然后重启即可
这个方法试过,能够正常关机。有同样问题的Ubuntu 8.04用户可以试试。
2008年8月15日星期五
安装Aurora GTK+引擎
Aurora Gtk Engine可以在这里下载到:
http://www.gnome-look.org/content/show.php/Aurora+Gtk+Engine?content=56438
下载的压缩包里面有两个文件,解压后,其中aurora-1.4.tar.gz是引擎相关的,gtkrc_themes.tar.bz2是引擎自带的三个主题,你可以自己试用之。
将其中的aurora-1.4.tar.gz解包,假设解压至主目录~/aurora-1.4。
接下来我们要编译aurora了,确认你已经安装好了相关开发包,如果没有的话,请打开终端执行sudo apt-get install gnome-core-devel
准备好以后,就开始编译吧!打开你的终端,然后执行下面的指令:
cd ~/aurora-1.4
./configure --prefix=/usr --enable-animation(其中enable-animation这个参数用于启用动画效果,aurora引擎具备一些动画效果)
make
sudo make install(或者你可以用sudo checkinstall来打包)
2008年8月12日星期二
Ubuntu8.04下firefox中flash显示中文
备份49-sansserif.conf这个字体配置文件
sudo cp /etc/fonts/conf.d/49-sansserif.conf /etc/fonts/conf.d/49-sansserif.conf.bak
删除49-sansser做完后重启firefox就可以了。 if.conf文件
sudo rm /etc/fonts/conf.d/49-sansserif.conf
或者
sudo mv 49-sansserif.conf 99-sansserif.conf
2008年5月27日星期二
美化你的Wine应用程序

打开:~/.wine/user.reg,比如在终端下执行gedit ~/.wine/user.reg,即用文本编辑器打开了这个文件。[Control Panel\\Colors]
"ActiveBorder"="239 235 231"
"ActiveTitle"="210 141 70"
"AppWorkSpace"="177 170 163"
"Background"="0 0 0"
"ButtonAlternateFace"="181 181 181"
"ButtonDkShadow"="115 106 96"
"ButtonFace"="239 235 231"
"ButtonHilight"="253 250 248"
"ButtonLight"="239 235 231"
"ButtonShadow"="179 175 171"
"ButtonText"="0 0 0"
"GrayText"="179 175 171"
"Hilight"="248 206 140"
"HilightText"="0 0 0"
"InactiveBorder"="239 235 231"
"InactiveTitle"="239 235 231"
"InactiveTitleText"="60 60 59"
"InfoText"="0 0 0"
"InfoWindow"="239 235 231"
"Menu"="239 235 231"
"MenuBar"="239 235 231"
"MenuHilight"="248 245 242"
"MenuText"="0 0 0"
"Scrollbar"="203 193 183"
"TitleText"="255 255 255"
"Window"="255 255 255"
"WindowFrame"="0 0 0"
"WindowText"="0 0 0"
把user.reg文件中的[Control Panel\\Colors]部分替换成以上内容,替换后保存。
Link
在Ubuntu8.04播放rmvb格式文件
1. 安装MPlayer
sudo apt-get install mplayer
2. 安装ubuntu-restricted-extras
sudo apt-get install ubuntu-restricted-extras
3. 安装w32codecs
sudo apt-get install w32codecs
搞定。
2007年8月17日星期五
在ubuntu里加上微软雅黑字体
1. 将雅黑字体复制到/usr/share/fonts/truetype里sudo cp msyhbd.ttf msyh.ttf /usr/share/fonts/truetype 将这2个文件的属性改成755sudo chmod 755 /usr/share/fonts/truetype/msyh*.ttf 2. 执行如下命令sudo fontconfig-voodoo -f -s zh_CN 找到:<family>Bitstream Vera Serif</family>下面一行添加:
sudo gedit /etc/fonts/language-selector.conf<family>Microsoft YaHei</family> 在<family>Bitstream Vera Sans</family>下面一行添加:<family>Microsoft YaHei</family> 3. sudo fc-cache -f -v
4. 打开“系统-首选项-字体”面板,选择字体为STHeiti,大小为10。然后在“字体渲染”选项中选择“最佳形状”(这个选项由你自己决定,例如LCD可以选择“次象素平滑”)。
5. 打开sudo gedit /etc/fonts/fonts.conf文件,找到以<match target="font">的部份(格式最好和它们的一样排列)加入下面一段: <match target="font"> 也可以使用sudo fc-cache -f -v命令刷新一下字体缓存,完成。重启x看效果。
<test name="family">
<string>Microsoft YaHei</string>
</test>
<edit name="hinting">
<bool>false</bool>
</edit>
</match>
2007年8月16日星期四
Avant Window Navigator
酷似mac-dock/leopard dock,资源占用少,有动画特效。
安装/源:
edgy:deb http://download.tuxfamily.org/syzygy42/ edgy avant-window-navigator
deb-src http://download.tuxfamily.org/syzygy42/ edgy avant-window-navigatorwget http://download.tuxfamily.org/syzygy42/8434D43A.gpg -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install avant-window-navigator-svn
feisty:deb http://download.tuxfamily.org/syzygy42/ feisty avant-window-navigator
deb-src http://download.tuxfamily.org/syzygy42/ feisty avant-window-navigatorwget http://download.tuxfamily.org/syzygy42/8434D43A.gpg -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install avant-window-navigator-bzr
该软件和beryl/compiz配合使用较好。
我的效果图。
Ubuntu 7.04 Beryl安装方法
在“系统”-“系统管理”使用“新立的软件管理器”来安装Beryl(以Beryl开头的全装,点击安装之后它会自动选装8个),还要加上Beryl Manager。
在“应用程序”-“系统工具”-启用“Beryl Manager”,点击鼠标右键,在“选择窗口管理器”中选中“Beryl”就可以了。
标题栏消失的解决办法:
1、修改xorg.conf文件
在 Section "Screen" 里面添加Option "AddARGBGLXVisuals" "True" 可选:
Section "Device" 里面添加Option "TripleBuffer" "true" 添加如下一项:Section "Extensions" 2、在启动添加 beryl-xgl和emerald --replace。
Option "Composite" "Enable"
EndSection
3、如果还不行删除~/.beryl/这个文件夹和~/.beryl-managerrc这个文件。
2007年8月15日星期三
ubuntu root密码的设置
在ubuntu 下,想获得root的权限是通过sudo的方法得到的。如果你想较长升级获得root的权限,就用sudo -s,这个时候让你输入密码,是你当前用户的密码。然后你就有了root的权限。如果仅仅就是安装一些软件,你仅仅需要这个做,sudo 你需要执行的命令。第一次会让你输入密码,也是你当前用户的密码。然后在15分钟内,你的root权限不会失效的。
如果你习惯老的su - 的方法,你用sudo passwd root,就可以给root设置密码,然后你就可以通过su 的方法,获得root的权限。
2007年8月13日星期一
Linux 下的 Gmail Notifier ── CheckGmail
CheckGmail是对 Gmail 账户进行实时监控的小东西。它是通过 Atom Feeds 来读取信箱中的新邮件的。它可以在不登录信箱的情况下直接标记邮件为已读、存档、或者报告垃圾邮件等。
Ubuntu用户的安装过程十分简单: sudo aptitude install checkgmail 其他发行版用户请到官方网站去下载。安装完毕后用 Alt+F2 呼叫运行栏,并输入checkgmail。
现在你能看见系统托盘里面出现一个灰色的Gmail图标。点击鼠标右键进行配置。如下图:
在 Username 和 Password 那里添用户名和密码。Ubuntu用户就不要在Language 那里找简体中文了,Ubuntu的源里面那个就不带中文。选中 24 hour clock 那里,设置时间显示方式为24小时制。
Web browser 那里不要动。 接下来的两个选项:
Command to execute on new mail和Command to execute for no mail是用来设置当有/无新邮件的时候所执行的命令。比如当有新邮件的时候运行 Mozilla Thunderbird 接收邮件,或者播放提示声音。
如果我们打算在有新邮件的时候播放 /home/ray/mail.wav 那么可以在 Command to execute on new mail 下面的编辑框添上: aplay /home/ray/mail.wav 如果要运行多个命令,请用“;”隔开。
另外要说明一下的就是右下角那个“Set tray background”,如果你的工具条都设置成了半透明的。你就会很郁闷的发现图标和SCIM一样不提供透明背景这个选项。不过CheckGmail里可以用吸管在屏幕的任意位置取色……,我猜你能领会精神了吧。
设置完成以后点OK确认。当没有新邮件的时候图标是灰色的,有新邮件的时候是红色。
下面要让这个东西在每次系统启动的时候都自动运行。Ubuntu用户请点击系统─>首选项-->会话-->启动程序-->新建,在命令那里输入 checkgmail 就可以了。其他发行版用户自己看着办。