Linux Archive

  • 昨晚看了俩小时电影,关了播放器之后发现GPU温度飙到80多摄氏度。手摸在键盘上都能感觉到烧烧的,风扇出风口的铜片很烫手。为了小黑的健康,我决定折腾一下。 我的小黑是Thinkpad T61p,在装Ubuntu的时候相信是默认安装好thinkpad_acpi的,但是默认情况下,风扇的转速都是在“自动档”上的。要换成手动档你必须要在/etc/modprobe.d/下添加一个文件thinkpad_acpi.conf(老版本的可能是叫options)。在文件中要放: options thinkpad_acpi fan_control=1 接着重载模块: sudo modprobe -r thinkpad_acpi && sudo modprobe thinkpad_acpi 这样一来就可以直接通过修改/proc/acpi/ibm/fan来改变转速了: echo level auto | sudo tee /proc/acpi/ibm/fan cat /proc/acpi/ibm/fan可以查看如何命令风扇: commands: level <level> [...]

    用thinkpad_acpi控制风扇速度

    昨晚看了俩小时电影,关了播放器之后发现GPU温度飙到80多摄氏度。手摸在键盘上都能感觉到烧烧的,风扇出风口的铜片很烫手。为了小黑的健康,我决定折腾一下。 我的小黑是Thinkpad T61p,在装Ubuntu的时候相信是默认安装好thinkpad_acpi的,但是默认情况下,风扇的转速都是在“自动档”上的。要换成手动档你必须要在/etc/modprobe.d/下添加一个文件thinkpad_acpi.conf(老版本的可能是叫options)。在文件中要放: options thinkpad_acpi fan_control=1 接着重载模块: sudo modprobe -r thinkpad_acpi && sudo modprobe thinkpad_acpi 这样一来就可以直接通过修改/proc/acpi/ibm/fan来改变转速了: echo level auto | sudo tee /proc/acpi/ibm/fan cat /proc/acpi/ibm/fan可以查看如何命令风扇: commands: level <level> [...]

    Continue Reading...

  • 好几年前,我刚进大学那会儿结识了一个越南朋友,Jack。他向我推荐了gigapedia。一个可以免费下电子书的网站。英文技术类的书居多。当中换过几次域名,目前叫library.nu。类似海盗湾,只不过下载媒介不是依赖于P2P,而是HTTP,文件都是来自第三方的文件存储网站。通过这个渠道下载书籍的合法性我还不清楚,但是用这种渠道传播肯定是损害到作者和出版商的利益的,所以不鼓励contribute。背景交代完毕。 下载下来的书基本上都用了比较不好看的文件名,比如“ebooksclub.org__Twitter_API__Up_and_Running__Learn_How_to_Build_Applications_with_the_Twitter_API.pdf”,所以决定写个脚本来批量改换文件名。脚本如下: 1234567891011#!/usr/bin/env python import os for filename in os.listdir("."):     if filename.startswith("ebooks"):         newFilename = filename[16:]         newFilename = [...]

    批量重命名电子书

    好几年前,我刚进大学那会儿结识了一个越南朋友,Jack。他向我推荐了gigapedia。一个可以免费下电子书的网站。英文技术类的书居多。当中换过几次域名,目前叫library.nu。类似海盗湾,只不过下载媒介不是依赖于P2P,而是HTTP,文件都是来自第三方的文件存储网站。通过这个渠道下载书籍的合法性我还不清楚,但是用这种渠道传播肯定是损害到作者和出版商的利益的,所以不鼓励contribute。背景交代完毕。 下载下来的书基本上都用了比较不好看的文件名,比如“ebooksclub.org__Twitter_API__Up_and_Running__Learn_How_to_Build_Applications_with_the_Twitter_API.pdf”,所以决定写个脚本来批量改换文件名。脚本如下: 1234567891011#!/usr/bin/env python import os for filename in os.listdir("."):     if filename.startswith("ebooks"):         newFilename = filename[16:]         newFilename = [...]

    Continue Reading...

  • 昨天做了两处地方的调整:Empathy的字体大小和vim的光标形状。 Empa­thy的字体大小 修改/usr/share/adium/message-styles/ubuntu.AdiumMessageStyle/Contents/Resources/main.css文件里的.message里的字号。如果有需要,可以把字体也换了。 Gnome Terminal下VIM的光标形状 默认下,不管是插入状态还是非插入状态,都是小方块,但是我更希望能看到插入时光标变成小竖线。这需要修改vimrc。没有这个文件就创建一个,一般在$HOME下建一个.vimrc就成了。里面添加5行代码: if has("autocmd")     au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"     au InsertLeave * silent [...]

    Ubuntu下两个小细节的调整

    昨天做了两处地方的调整:Empathy的字体大小和vim的光标形状。 Empa­thy的字体大小 修改/usr/share/adium/message-styles/ubuntu.AdiumMessageStyle/Contents/Resources/main.css文件里的.message里的字号。如果有需要,可以把字体也换了。 Gnome Terminal下VIM的光标形状 默认下,不管是插入状态还是非插入状态,都是小方块,但是我更希望能看到插入时光标变成小竖线。这需要修改vimrc。没有这个文件就创建一个,一般在$HOME下建一个.vimrc就成了。里面添加5行代码: if has("autocmd")     au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"     au InsertLeave * silent [...]

    Continue Reading...

  • 前几天才欢天喜地地弄好了新博客,还得到了咪咪、@windyye 和小公主的肯定,正开心着呢,麻烦事情又来了。4号左右的时候忽然发现博客后台各种异常

    简单排查远程服务器出错原因

    前几天才欢天喜地地弄好了新博客,还得到了咪咪、@windyye 和小公主的肯定,正开心着呢,麻烦事情又来了。4号左右的时候忽然发现博客后台各种异常

    Continue Reading...

  • 这两天看到两段文字很有喜感,都是关于Linux的。一则是来自linux.com的一篇08年的老帖子,楼主道: Posted Jun 21, 2008 at 11:36:35 AM      Sub­ject: LINUX FOR HACKERS Hello! I am a hacker. [...]

    关于Linux两件有喜感的事

    这两天看到两段文字很有喜感,都是关于Linux的。一则是来自linux.com的一篇08年的老帖子,楼主道: Posted Jun 21, 2008 at 11:36:35 AM Sub­ject: LINUX FOR HACKERS Hello! I am a hacker. [...]

    Continue Reading...

  • Conky 是一个轻量级(意思是别指望有多好看)且具备高度可定制性(意思是并非傻瓜化)的系统监视工具。使用 Conky,你可以将其嵌入桌面,以便实时查看重要的系统信息,包括 CPU、内存、硬盘的使用情况等等。以下我将在Ubuntu环境下做一次简单的配置和美化。 先上图给大家看一下效果吧。Conky的安装很简单: sudo apt-get install conky

    Conky的设置与美化

    Conky 是一个轻量级(意思是别指望有多好看)且具备高度可定制性(意思是并非傻瓜化)的系统监视工具。使用 Conky,你可以将其嵌入桌面,以便实时查看重要的系统信息,包括 CPU、内存、硬盘的使用情况等等。以下我将在Ubuntu环境下做一次简单的配置和美化。 先上图给大家看一下效果吧。Conky的安装很简单: sudo apt-get install conky

    Continue Reading...

  • 网上这样的文章应该是很多了,这里纯粹做个笔记。 用到的工具是zhcon。先来安装: sudo apt-get install zhcon 使用的话: zhcon --utf8 如果tty显示不对的话试试: zhcon --utf8 --drv=vga 安装完成后基本的读写中文就没问题了。更多的信息情到官方主页查看吧:http://zhcon.sourceforge.net/index_cn.html 如果遇到分辨率问题请参考日志:How to get the  high resolution back for tty after activation of nVidia [...]

    给Ubuntu tty加中文

    网上这样的文章应该是很多了,这里纯粹做个笔记。 用到的工具是zhcon。先来安装: sudo apt-get install zhcon 使用的话: zhcon --utf8 如果tty显示不对的话试试: zhcon --utf8 --drv=vga 安装完成后基本的读写中文就没问题了。更多的信息情到官方主页查看吧:http://zhcon.sourceforge.net/index_cn.html 如果遇到分辨率问题请参考日志:How to get the high resolution back for tty after activation of nVidia [...]

    Continue Reading...

  • Ubuntu 10.10 has a nice dis­play (high res­o­lu­tion) of com­mand line (tty) by default. Well at least it is out­put [...]

    How to get the high resolution back for tty after activation of nVidia driver in Ubuntu

    Ubuntu 10.10 has a nice dis­play (high res­o­lu­tion) of com­mand line (tty) by default. Well at least it is out­put [...]

    Continue Reading...

  • The Ubuntu 9.10 is released yes­ter­day. I down­loaded and installed it imme­di­ately after my fin­ish­ing work.As Ubuntu team said “it is [...]

    First Glance of Ubuntu 9.10

    The Ubuntu 9.10 is released yes­ter­day. I down­loaded and installed it imme­di­ately after my fin­ish­ing work.As Ubuntu team said “it is [...]

    Continue Reading...

  • Peo­ple installed Ubuntu may found that the sound vol­ume is lower than the vol­ume it should be. My solu­tion is [...]

    Adjust Ubuntu Sound Volume

    Peo­ple installed Ubuntu may found that the sound vol­ume is lower than the vol­ume it should be. My solu­tion is [...]

    Continue Reading...

Page 1 of 212