Archive

Posts Tagged ‘Ubuntu’

linux下分割压缩rar

May 24th, 2010 1 comment

1.安装rar和unrar和序

$ sudo aptitude install rar unrar

2.示例,分割压缩temp文件,每个包为1MB

$ rar a -v1024k temp.rar temp
Categories: System Tags: ,

禁用ubuntu 10.04登录窗口中的用户列表

May 24th, 2010 No comments

如果处于安全考虑,想禁用登录窗口的用户例表,做以下几步操作

1.打开终端输入

$ cd /usr/share
$ sudo cp applications/gconf-editor.desktop gdm/autostart/LoginWindow

2.注销到登录界面,会看到gconf-editor已运行

3.找到/apps/gdm/simple-greeter,把disable_user_list这一项的值改为true

4.关闭gconf-editor重启系统,再看到gdm登录窗口的时候就没有用户列表了.

Categories: System Tags: ,

把ubuntu的消息通知显示位置改回右上角

April 15th, 2010 No comments

1.安装apt-src软件包

$ sudo aptitude install apt-src

2.安装notify-osd的源码

$ mkdir notify
$ cd notify
$ sudo apt-src install notify-osd

Read more…

Categories: System Tags: ,

ThinkPad T410s&Ubuntu 10.04控制风扇转速

April 4th, 2010 No comments

T410s本子上的传感器还不能被lm-sensors当前的版本所识别,所以fancontrol进程就没效果,只能手动控制了

1.给thinkpad_acpi模块加参数

$ sudo nano /etc/modprobe.d/thinkpad_acpi.conf

在文件中输入

options thinkpad_acpi fan_control=1

Read more…

Categories: System Tags: ,

解决T410s装ubuntu 10.04的声音问题

April 4th, 2010 1 comment

也许是因为硬件太新,装上ubuntu 10.04后,声卡没有识别,这里有个临时的解决方法

1.查看一下声卡的pci id号

$ lspci -vvxxx
............................................................
 
00:1b.0 Audio device: Intel Corporation Device 3b57 (rev 06)
        Subsystem: Lenovo Device 215e
        Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <tabort - <MAbort- >SERR- <perr - INTx-
        Interrupt: pin B routed to IRQ 11
        Region 0: Memory at f2520000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
00: 86 80 57 3b 02 01 10 00 06 00 03 04 10 00 00 00
10: 04 00 52 f2 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 5e 21
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 02 00 00
 
............................................................
</perr></tabort>

Read more…

Categories: System Tags: ,

为ubuntu 10.04安装Realtek 8172和8192se无线驱动

April 4th, 2010 No comments

刚为新到手的ThinkPad T410s装上了ubuntu 10.04 beta1,兴奋之余发现无线列表中列出的无线网络没有公司的,公司的无线类型为802.11/g,而列表中列出的都是802.11/n类型的,感觉是驱动的问题,于是先看一下芯片类型

$ lspci -vvxxx
........................................
 
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8172 (rev 10)
	Subsystem: Realtek Semiconductor Co., Ltd. Device e020
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <tabort - <MAbort- >SERR- <perr - INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 17
	Region 0: I/O ports at 2000 [size=256]
	Region 1: Memory at f2400000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: rtl819xSE
	Kernel modules: r8192se_pci
00: ec 10 72 81 07 01 10 00 10 00 80 02 10 00 00 00
10: 01 20 00 00 00 00 40 f2 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 ec 10 20 e0
30: 00 00 00 00 40 00 00 00 00 00 00 00 0b 01 00 00
 
........................................
</perr></tabort>

Read more…

Categories: System Tags: ,

10个最酷的Linux单行命令

March 22nd, 2010 No comments

1. sudo !!
以 root 帐户执行上一条命令。

2. python -m SimpleHTTPServer
利用 Python 搭建一个简单的 Web 服务器,可通过 http://$HOSTNAME:8000 访问。

3. :w !sudo tee %
在 Vim 中无需权限保存编辑的文件。

4. cd -
更改到上一次访问的目录。
Read more…

Categories: Misc Tags: ,

如何在安装Windows以后恢复Grub2引导

March 6th, 2010 2 comments

如果你使用双系统(Ubuntu/Windows),在你重装Windows以后,Grub菜单会消失,因为Windows覆盖了硬盘的操作系统启动系统MBR.
这里将讨论如何在安装XP/Vista/Windows 7以后如何恢复Grub2。

方法1:使用Ubuntu 9.10 LiveCD
首先,请从Ubuntu网站下载Ubuntu.在这里,我们假设Ubuntu的安装分区是/dev/sdc3,/boot分区是/dev/sdc2。
现在,使用LiveCD启动计算机,打开“应用程序”-》“附件”-》“终端”,输入下面的命令,以root身份登录,并执行下面的操作:

sudo -i
mount /dev/sdc3 /mnt
mount /dev/sdc2 /mnt/boot
grub-install –root-directory=/mnt/ /dev/sdc

Read more…

Categories: System Tags: ,

ubuntu lucid alpha2 启用plymouth(NVIDIA)

February 24th, 2010 No comments

1. Edit /etc/default/grub

add the line

GRUB_GFXMODE=1024x768x24
also add vga=792 like so
GRUB_LINUX_DEFAULTS=”quiet splash vga=792″
Read more…

Categories: System Tags: ,

Ubuntu 9.10 下宋体英文字体发虚的问题

February 4th, 2010 No comments

打开/etc/fonts/conf.avail/80-delicious.conf,在<fontconfig>和</fontconfig>之间加入

<match target="font">
        <test qual="any" name="family">
                <string>simsun</string>
                <string>宋体</string>
        </test>
        <test compare="more_eq" name="pixelsize"><double>12</double></test>
        <test compare="less_eq" name="pixelsize"><double>24</double></test>
        <edit name="antialias" mode="assign"><bool>false</bool></edit>
        <edit name="autohint" mode="assign"><bool>false</bool></edit>
        <edit name="hinting" mode="assign"><bool>true</bool></edit>
</match>
Categories: System Tags: ,