前提条件:
ubuntu 在vbox XP下使用adb shell
问题说明:
C:\Documents and Settings\Administrator>adb devices
List of devices attached
MSM8225I370 device
C:\Documents and Settings\Administrator>adb shell
error: protocol fault (status 72 6f 6f 74?!)
原因在于:
virtualbox XP 设置时,USB设备 启用USB2.0 EHCI控制器.如果启用了该选项就会导致adb shell
无法启动,偶尔会导致 QTSP中无法烧写model侧img
在网上年到prey(就是传说中的黑客找回已丢电脑那个工具)感觉还不错,就是要注册,使用次数还有限制,所以打算自己折腾一下!
lost 脚本放在/usr/bin 下,请自己加执行权限:
chmod +x /usr/bin/lost
使用方法:
lost -h
脚本源码lost:
#!/bin/bash
####################################################################
# Lost create by leaveboy@gmail.com
# Discription: when your pc lost,it can help you to find it!
# License: GPLv3
###################################################################)
version=1.0
scp_user='leaveboy' #user
scp_server='216.194.70.6' #an online server which pc could connect
scp_path="/home/${scp_user}/" #lost file path
email='leaveboy@gmail.com' # address msg_file and image send to
msg_file='/tmp/lostinfo'
show_version(){
echo "Prey ${version}"
}
show_usage(){
echo "Prey ${version} "
echo -e "\nUsage: `basename $0` [options]"
echo -e "Options:"
echo -e " -v | --version\tShow Current Version."
echo -e " -h | --help\t\tShow this message.\n"
echo -e "NOTICE"
echo -e " This script runs under linux system and For Run this script you should have follow software:\
w3m scrot mutt ssh.\n"
echo -e "ADD/DELETE CRONTAB"
echo -e " Run the follow command to add lost to crontab:"
echo -e " \$(sudo crontab -l | grep -v lost; echo \"*/20 * * * * /usr/bin/lost > /var/log/lost.log\") | sudo crontab -"
echo -e " Run the follow command to delete lost from crontab:"
echo -e " \$(sudo crontab -l | grep -v lost) | sudo crontab -\n"
echo -e "ACTIVE/UNACTIVE"
echo -e " Touch a file named \"lost\"under the scp_path of the scp_server to actived."
echo -e " remove the file \"lost\" under the scp_path of the scp_server to unactived.\n"
}
irssi and bitlbee
装上irssi 和 bitlbee 之后最头疼的是各种提示:
bitlbee所有的上下线提示关闭,所有IRC频道提示关闭
/ignore &bitlbee MODES
/ignore * MODES
经常在linux下工作,所有日常事务也是在linux处理,邮件处理自然也不例外,我这里环境是arch+mutt。带英文附件名的邮件使用mutt发送没有一点问题,中文附件名的邮件就悲剧了,附件在foxmail中不被识别,在outlook和DreamMail里是被篡改的名字类似“xxxxxx.MSWORD",当然你强制用word打开还是没有问题的,但是始终是不爽!所以今天折腾了半天这个问题!
google了n多帖子,都基本是说设置
set rfc2047_parameters=yes
但是经过测试,这个只能使本地接收到的附件显示为中文附件名!要使自己发送的中文附件名在win下的客户端显示正常,这个不得行!
又google了n多帖子,就出现了最终的解决方法:
set create_rfc2047_parameters=yes
该设置需要在mutt源码中打patch,named patch-1.5.10.tt.createrfc2047params.1 点击下载
再到mutt主页上下在最近的mutt包 named mutt-1.5.21.tar.gz猛击下载
解压mutt-1.5.21.tar.gz和patch,解压出的patch放到mutt-1.5.21目录下,在该目录执行
patch -Np1 -i patch-1.5.10.tt.create_rfc2047_params.1
接着再执行
./configure &make &sudo make install
接个就用吧!mutt发送中文附件邮件,在foxmail中显示就ok了!
PS:这里要说一点,在ubuntu下,发送中文附件是没问题,但是用mutt中中文是乱码!这个可能与系统设置有关系,暂时没有处理!
awesome rc.lua
这个脚本加入了词霸的屏幕取词,绑定PrtSc键抓图,还有天气显示!解决了前两天一直琢磨的字体天气问题!
上张现在桌面图:
awesome 的配置文件 rc.lua
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
require("vicious")
-- Notification library
require("naughty")
-- Load Debian menu entries
require("debian.menu")
-- --- Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "x-terminal-emulator"
editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " -e " .. editor