e4rat是个相当好用的小玩意,用了它系统与应用程序的启动速度能增加不少(名字的寓意也就是"Ext4 Reduced Access Time"),似乎是利用缓存预载的方式实现的(有点像Win下的BootVis,不是吗?哈).
虽然我这儿本来系统启动速度就基本不到10s(除了udev以外几乎所有服务都是直接刷过去),但还是随手试了试,方法如下:
1.先装上e4rat包(pacman -S e4rat...这是废话吧,当然yaourt一类的也行),如果你用的init不是/sbin/init而是systemd一类的玩意,别忘了到/etc/e4rat.conf里面改-就是改init那一行.
2.重启动,在grub菜单移到linux的启动项上,然后按e编辑(别担心不会保存,因为这一步顺利的话只需做一次),在linux开头的一行后追加"init=/sbin/e4rat-collect"后按Ctrl-X启动.
3.启动后随便做什么,因为分区信息采集过程要持续120s,时间差不多的时候(比较晚也不要紧,只要超过120s即可)执行ls /var/lib/e4rat/startup.log,看看是否有这文件,等待许久仍然没有的话重复2,3步.
4.先记住了,要进入这一步,你的root必须启用(可以试试su看看能不能进入root,不能就得调整了).确认之后,保存好你的资料,关掉所有程序(没其他意思,主要是怕你的资料丢失),然后终端内(当然最好是退出桌面环境并Ctrl+Alt+1切入控制台,原因同前)执行sudo init 1,这时进入启动级别1-这时是只有root的单用户模式,输入root密码进入后执行e4rat-realloc /var/lib/e4rat/startup.log,等待执行完毕.
5.执行完毕后就是改grub了.很多人说在/boot/grub/grub.cfg直接加入init=/sbin/e4rat-preload,但显而易见的,这样你内核升级的时候grub.cfg重新生成时这部分内容是会被盖掉的,所以较好的(也是我自己用的)做法恰是修改/etc/default/grub,在GRUB_CMDLINE_LINUX_DEFAULT一行后面参数加上" init=/sbin/e4rat-preload"再grub-mkconfig -o /boot/grub/grub.cfg即可.
6.还用说吗?重启体验下飞快的感觉吧; )
2011年12月10日星期六
2011年11月2日星期三
DeaDBeeF的rar插件vfs-rar安装
项目git主页
首先在这里下载unrar源代码,
然后是git,终端里输入
git clone git://github.com/shaohao/vfs_rar
而后进入vfs_rar目录里,把unrar源码压缩包里的unrar整个文件夹解压进去,
接着执行make而后make install即可
(注意:这儿绝不能用到root权限!因为插件是安装在当前用户目录下,仅当前用户可用的,
但若你想全局使用就把~/.local/lib/deadbeef/vfs_rar.so复制到/usr/lib/deadbeef/吧)
安装的具体操作以及删除方法等杂项可以直接看makefile,都是对vfs_rar.so进行操作,
举例说删除就是把~/.local/lib/deadbeef/里对应的插件文件删除即可.
(不过还是得说,deadbeef自带的vfs-zip配合libzip反倒有问题...诡异
首先在这里下载unrar源代码,
然后是git,终端里输入
git clone git://github.com/shaohao/vfs_rar
而后进入vfs_rar目录里,把unrar源码压缩包里的unrar整个文件夹解压进去,
接着执行make而后make install即可
(注意:这儿绝不能用到root权限!因为插件是安装在当前用户目录下,仅当前用户可用的,
但若你想全局使用就把~/.local/lib/deadbeef/vfs_rar.so复制到/usr/lib/deadbeef/吧)
安装的具体操作以及删除方法等杂项可以直接看makefile,都是对vfs_rar.so进行操作,
举例说删除就是把~/.local/lib/deadbeef/里对应的插件文件删除即可.
(不过还是得说,deadbeef自带的vfs-zip配合libzip反倒有问题...诡异
2011年10月21日星期五
华为Android手机adb链接法.
华为Android手机其实还可以,不过就是因为默认会被识别为usb-cdrom搞得没法直接用adb devices探测到.
解决方法其实也简单,
安装两个包:android-udev(aur中,对应相关udev规则,其他品牌手机也通用)
与
usb_modeswitch(使电脑正确识别...)
接下来sudo adb devices就能正常识别了.
from here
解决方法其实也简单,
安装两个包:android-udev(aur中,对应相关udev规则,其他品牌手机也通用)
与
usb_modeswitch(使电脑正确识别...)
接下来sudo adb devices就能正常识别了.
from here
2011年9月25日星期日
e17删除"新应用程序"的方法.
其实也很简单,
e17设置一个"新应用程序"(也即快捷方式)就是通过在~/.local/share/applications里建立新图标,
应用程序列表则是~/.local/share/applications(用户)与/usr/share/applications(全局)两边的集合,
所以只要跑到文件夹下找到并删除就可以了.
from here
顺便也抱怨一句,e17应用程序列表会根据locale的不同而改变...原因不明,有点头痛.
e17设置一个"新应用程序"(也即快捷方式)就是通过在~/.local/share/applications里建立新图标,
应用程序列表则是~/.local/share/applications(用户)与/usr/share/applications(全局)两边的集合,
所以只要跑到文件夹下找到并删除就可以了.
from here
顺便也抱怨一句,e17应用程序列表会根据locale的不同而改变...原因不明,有点头痛.
2011年9月8日星期四
LibreOffice Impress字体显示问题解决方法
Tools → Options... → LibreOffice → View → Graphics output (取消钩选Use hardware acceleration)
工具->选项->LibreOffice->视图->不选"使用硬件加速"
即可.
From Here
工具->选项->LibreOffice->视图->不选"使用硬件加速"
即可.
From Here
2011年6月9日星期四
一些有趣的引言
应该说还是挺有趣的.有的甚至可以拿来做Linux的广告词了吧XD
Source Here
1.
Unix is extremely user friendly. It also happens to be extremely selective when picking its friends2.
No fences, No Gates!3.
For the brave, there is a door named Linux to success. For the rest there are windows.4.
Software is like Sex, It's better when it is FREE
5.
To mess up a Linux box, you need to work at it; to mess up your Windows box, you just have to work on it.6.
Windows is a bonfire, Linux is the sun. Linux only looks smaller if you lack perspective
7.
Teamwork is essential ― it allows you to blame someone else.8.
Programming is like sex… make one mistake, and support it the rest of your life
9.
Microsoft and Apple make the easy things very easy and the hard things impossible. BSDs and Linux make the easy things challenging and the hard things difficult but possible
10.
Linux is for people who want to know why it works.Mac is for people who don't want to know why it works.
DOS is for people who want to know why it does not work.
Windows is for people who don't want to know why it does not work.
11.
A Windows user spends 1/3 of his life sleeping, 1/3 working, 1/3 waiting12.
Linux means productivity and fun. NT means 'Not Today'. 13.
Love is Hate. War is Peace. Windows is stable.14.
"Unix is simple, but it takes a genius to understand the simplicity." � Dennis Ritchie15.
Unix is the answer, but only if you phrase the question very carefully.16.
"…Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly)."17.
"The box said that I needed to have Windows 98 or better… so I installed Linux"18.
Operating systems are like underwear. nobody really wants to look at them.19.
I'm not one of those who think Bill Gates is the devil. I simply suspect that if Microsoft ever met up with the devil, it wouldn't need an interpreter.20.
No, I will not fix your computer again. USE LINUX21.
Geek by birth, Linux by choice
22.
Open Windows and see the world!! Open Linux and create your own world!!
2011年6月8日星期三
2011年6月5日星期日
2011年5月24日星期二
Arch x86-64解决winetricks问题.
安装官版wine要先开启multilab源,可自寻/etc/pacman.conf进行配置.
然后执行:WINEARCH=win32 winecfg
就能生成win32系统,默认创建于.wine
(如果已经存在的话,这之前可以移走或删除,
或者你想用env WINEPREFIX=***来解决也行...
后面这方法可以实现64-32wine配置共存,不过一般也不必模拟64位win)
这样就可以直接用winetricks解决软件依赖问题了,
比如安装dotnet20就正常了...没必要再去安装AUR的bin32-wine-suse.
from here
2011年5月21日星期六
2011年5月20日星期五
wine字体问题
其实也很简单,随便复制一个ttc/ttf文件到~/.wine/drive_c/windows/Fonts即可.
还有个
还有个
终端打开regedit,修改以下键值:
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
再打开winecfg字体就过来了
使字体平滑.
2011年5月19日星期四
2011年5月17日星期二
2011年5月16日星期一
gnome-mplayer字幕编码检测
1.安装enca
PS:本人自用的mplayer的pkgbuild已将enca设为依赖
2.gnome mplayer首选项�>"语言选项卡"中文件编码务必留空,其他两个根据需要设置,如Chinese,chi,zh
3.在"字幕选项卡" 中勾选启用ASS和内嵌字体(其实是内嵌字体优先),字幕文件编码务必留空,其他根据需要设置
4.在"Mplayer选项卡"的"mplayer的额外选项"中填入 -subcp enca:zh:CP936
通过以上设置使用gnome mplayer播放影片时能自动检测字幕文件的编码
from here
PS:本人自用的mplayer的pkgbuild已将enca设为依赖
2.gnome mplayer首选项�>"语言选项卡"中文件编码务必留空,其他两个根据需要设置,如Chinese,chi,zh
3.在"字幕选项卡" 中勾选启用ASS和内嵌字体(其实是内嵌字体优先),字幕文件编码务必留空,其他根据需要设置
4.在"Mplayer选项卡"的"mplayer的额外选项"中填入 -subcp enca:zh:CP936
通过以上设置使用gnome mplayer播放影片时能自动检测字幕文件的编码
from here
禁止Pacman升级不想升级的包
- Q: 我怎么才能禁止Pacman升级那些我需要保持低版本的包呢?
- A: 修改/etc/pacman.conf中的'IgnorePkg' 变量值。
在/etc/pacman.conf中,有一行是'IgnorePkg = 第一个包 第二个包 ……',他的作用就是在执行全系统升级的时候,跳过某些包。
from here
2011年5月14日星期六
alsa防声卡独占
~/.asoundrc或/etc/asound.conf写成
当然,最万能的方法莫过于直接装pulseaudio.pcm.card0 { type hw card 0 } ctl.card0 { type hw card 0 }
订阅:
博文 (Atom)