2008年11月18日星期二

Ubuntu Linux系统下的两个网络扫描工具

Nbtscan---从Windows网络上收集NetBIOS信息

工具名称:nbtscan-1.5.1a
应用环境:Linux  
工具介绍:这是一款用于扫描Windows网络上NetBIOS名字信息的程序。该程序对给出范围内的每一个地址发送NetBIOS状态查询,并且以易读的表格列出接收到的信息,对于每个响应的主机,NBTScan列出它的IP地址、NetBIOS计算机名、登录用户名和MAC地址。

nmap---网络扫描和嗅探工具包
工具名称:nmap-3.50 
应用环境:Linux  
工具介绍:NMap是Linux下的网络扫描和嗅探工具包。可以帮助网管人员深入探测UDP或者TCP端口,直至主机所使用的操作系统;还可以将所有 探测结果记录到各种格式的日志中,为系统安全服务。NMap,也就是Network Mapper,是Linux下的网络扫描和嗅探工具包,其基本功能有三个,一是探测一组主机是否在线;其次是扫描主机端口,嗅探所提供的网络服务;还可以推断主机所用的操作系统 。Nmap可用于扫描仅有两个节点的LAN,直至500个节点以上的网络。Nmap 还允许用户定制扫描技巧。通常,一个简单的使用ICMP协议的ping操 作可以满足一般需求;也可以深入探测UDP或者TCP端口,直至主机所 使用的操作系统;还可以将所有探测结果记录到各种格式的日志中, 供进一步分析操作。但了nmap被发现存在DOS攻击, 针对这类攻击,可采取如下措施:安装系统卖方的最新补丁;用未受影响的系统做防火墙。 

示例:

适用于内外网的探测,以内网操作为示例(外网参数同)

简单端口扫描: nmap -vv -sT(sS、sF、sU、sA) 192.168.0.1 -D 127.0.0.1(-D伪造的地址)
OS检测: nmap -vv -sS -O 192.168.0.1

RPC鉴别: nmap -sS -sR 192.168.0.1 Linux上的portmap就是一个简单的RPC服务,监听端口为111(默认),测试网络扫描和嗅探工 具包,其基本功能有三个,一是探测一组主机是否在线;其次是扫描 主机端口,嗅探所提供的网络服务;还可以推断主机所用的操作系统。Nmap可用于扫描仅有两个节点的LAN,直至500个节点以上的网络。Nmap 还允许用户定制扫描技巧。通常,一个简单的使用ICMP协议的ping操 作可以满足一般需求;也可以深入探测UDP或者TCP端口,直至主机所使用的操作系统;还可以将所有探测结果记录到各种格式的日志中, 供进一步分析操作。
官方下载及文档地址:http://insecure.org/nmap/

使用

进行ping扫描,打印出对扫描做出响应的主机,不做进一步测试(如端口扫描或者操作系统探测):

nmap -sP 192.168.1.0/24

仅列出指定网络上的每台主机,不发送任何报文到目标主机:

nmap -sL 192.168.1.0/24

探测目标主机开放的端口,可以指定一个以逗号分隔的端口列表(如-PS22,23,25,80):

nmap -PS 192.168.1.234

使用UDP ping探测主机:

nmap -PU 192.168.1.0/24

使用频率最高的扫描选项:SYN扫描,又称为半开放扫描,它不打开一个完全的TCP连接,执行得很快:

nmap -sS 192.168.1.0/24

当SYN扫描不能用时,TCP Connect()扫描就是默认的TCP扫描:

nmap -sT 192.168.1.0/24

UDP扫描用-sU选项,UDP扫描发送空的(没有数据)UDP报头到每个目标端口:

nmap -sU 192.168.1.0/24

确定目标机支持哪些IP协议 (TCP,ICMP,IGMP等):

nmap -sO 192.168.1.19

探测目标主机的操作系统:

nmap -O 192.168.1.19

nmap -A 192.168.1.19

另外,nmap官方文档中的例子:

nmap -v scanme.nmap.org

这个选项扫描主机scanme.nmap.org中 所有的保留TCP端口。选项-v启用细节模式。

nmap -sS -O scanme.nmap.org/24

进行秘密SYN扫描,对象为主机Saznme所在的“C类”网段 的255台主机。同时尝试确定每台工作主机的操作系统类型。因为进行SYN扫描 和操作系统检测,这个扫描需要有根权限。

nmap -sV -p 22,53,110,143,4564 198.116.0-255.1-127

进行主机列举和TCP扫描,对象为B类188.116网段中255个8位子网。这 个测试用于确定系统是否运行了sshd、DNS、imapd或4564端口。如果这些端口 打开,将使用版本检测来确定哪种应用在运行。

nmap -v -iR 100000 -P0 -p 80

随机选择100000台主机扫描是否运行Web服务器(80端口)。由起始阶段 发送探测报文来确定主机是否工作非常浪费时间,而且只需探测主机的一个端口,因 此使用-P0禁止对主机列表。

nmap -P0 -p80 -oX logs/pb-port80scan.xml -oG logs/pb-port80scan.gnmap 216.163.128.20/20

扫描4096个IP地址,查找Web服务器(不ping),将结果以Grep和XML格式保存。

host -l company.com cut -d -f 4 nmap -v -iL -

进行DNS区域传输,以发现company.com中的主机,然后将IP地址提供给 Nmap。上述命令用于GNU/Linux -- 其它系统进行区域传输时有不同的命令。

其他选项:

-p (只扫描指定的端口)

单个端口和用连字符表示的端口范 围(如 1-1023)都可以。当既扫描TCP端口又扫描UDP端口时,可以通过在端口号前加上T: 或者U:指定协议。 协议限定符一直有效直到指定另一个。 例如,参数 -p U:53,111,137,T:21-25,80,139,8080 将扫描UDP 端口53,111,和137,同时扫描列出的TCP端口。

-F (快速 (有限的端口) 扫描)

Tcpdump:Linux下基于命令行的抓包工具

Linux操作系统维护常用工具Sysstat介绍

sysstat这个工具,可以说是linux &Unix 以及Freebsd最常用的工具。它的主要用途就是观察服务负载,比如CPU和内存的占用率、网络的使用率以及磁盘写入和读取速度等。
对于这个工具,如何使用呢??如果您想看即时 服务器的CPU,内存,网络使用率的命令,比如:mpstat iostat ,您可以简单的用下面的命令,如果更复杂一点,您可以用man来查看所有命令的用法。

比如:

[beinan@S11 beinan]$ iostat
Linux 2.4.22-2f (S11) 2004年10月30日

avg-cpu: %user %nice %system %iowait %idle
8.64 0.00 0.95 0.00 90.41
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
dev3-0 2.97 55.28 38.84 213314 149856

[beinan@S11 beinan]$ mpstat
Linux 2.4.22-2f (S11) 2004年10月30日

03时13分56秒 CPU %user %nice %sys %iowait %irq %soft %idle intr/s
03时13分56秒 all 8.56 0.00 0.94 0.00 0.00 0.00 90.50 84.32

比如观察磁盘的读写速度:

[beinan@S11 beinan]$ iostat -p
Linux 2.4.22-2f (S11) 2004年10月30日

avg-cpu: %user %nice %system %iowait %idle
33.54 0.00 4.95 0.86 60.65

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
hda 26.26 186.57 481.17 16117015 41564960
hda1 3.29 1.33 26.01 115138 2246456
hda2 19.86 26.49 149.65 2288449 12927104
hda3 40.16 158.57 305.51 13697580 26391400
hda5 0.00 0.00 0.00 8 0

在每个命令中都有好多选项,这需要我们来实践,不是吗??

如果是想让服务器自动运行,并且想每个小时都有一个数据反馈,我们可以用cron 来让执行sa1 sa2,这样就有一份日志文件存在/var/log/sa/目录中。我们到时运行sar就能知道所有过去时间每个小时运行情况:

可以写一个命令到一个文件中。。。把这个文件设置为755的执行权限,放在/etc/cron.hourly目录中。

[root@S11 root]# cd /etc/cron.hourly/ 进入目录
[root@S11 cron.hourly]# touch sa1ho 创建文件,这个文件名可以自己来命名
[root@S11 cron.hourly]# chmod 755 sa1ho
然后在这个文件中写入下面的一行

/usr/local/lib/sa/sa1&

这样每一个小时,就有日志文件写入/var/log/sa/目录中了,当然还有一个/usr/local/lib/sa/sa2的命令,也可以写一个文件到 在/etc/cron.weekly/目录中,sa2是做什么用的呢?自己先看看帮助文件,当然也可以写入/etc/cron.hourly/ ,这样就每小时一次。

Linux操作系统下Oracle主要监控工具介绍

1.top
top命令可实时地显示Linux系统的进程、CPU、内存、负载等的信息。它是我们了解系统整体状态最好的工具。
top命令的运行状态是一个实时的显示过程,我们可在这个界面监控系统运行情况。我们可通过几个按键来控制top命令,如按q可退出top命令状态,按s可输入信息的更新频率等。这些命令可按h帮助键查询。
2.Ps
ps命令可查询系统的进程状态,常用的命令参数是ps -aux,该命令可显示所有用户的进程,如果进程的命令太长,则显示的进程信息会不全。我们可用ps -auxw命令来加长显示,w参数可多加几个,最多可加三个,以显示更长的进程信息。
3.Kill
kill命令可终止进程,后接进程号即可。
4.Free
free可显示系统的内存使用情况。-b、-k、-m三个参数表示以bytes,kilobytes和megabytes为单位显示内存的使用情况。
5.Vmstat
使用vmstat 2 命令可每隔2秒显示一行系统信息,这些信息包括CPU占用效、内存使用情况和磁盘IO等。通过它我们可实时监控系统的资源使用情况,进行系统优化。
6.sar
sar工具可帮我们收集动态的系统信息,它的参数很丰富,功能强大。sar工具的特点是可通过计数器和计数间隔来定期、定量地输出系统状态信息。
7.watch
watch命令可重复执行某个命令,监控命令的执行状态。下面这个命令可让我们监控Z2.log文件的大小变化。
debian:~# watch -n 3 du /home/Jims/zope/log/Z2.log
-n 3表示每隔3秒执行一次du /home/Jims/zope/log/Z2.log。
8.Sysctl
使用sysctl -a可显示所有运行中的内核参数,用sysctl -w fs.file-max=10240 命令可修改fs.file-max内核参数的值,并使参数马上生效。但重启系统后,参数设置会失效,因为命令行只能修改运行中的内核参数。如果我们要把参数设置固定下来,可把内核参数写入/etc/sysctl.conf文件。该文件的格式如下:

# /etc/sysctl.conf - Configuration file for setting system variables
# See sysctl.conf (5) for information.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

9.Ulimit
使用ulimit -a可显示系统的资源限制情况。
10.Netstat
netstat -nal可显示所有的网络连接。
11.Pppstat
使用pppstats可得到ppp连接的状态信息。

watch -- 监测命令的运行结果

watch 是一个非常实用的命令,基本所有的 Linux 发行版都带有这个小工具,如同名字一样,watch 可以帮你监测一个命令的运行结果,省得你一遍遍的手动运行。
举例来说,Linux 系统有一个基础命令 w,可以显示当前的 uptime、负载还有登录的用户,非常方便,但是如果我想监测这些数据,看看有没有新用户登入,看看某段的时间的负载是不是太大之类的,就得手动一遍遍的运行这个命令,然后查看结果,虽然命令只有一个字母,但是还是很郁闷……
watch 就是干这个用的,直接在 watch 后面接你想运行的命令,watch 就会帮你重复运行,并把每次的结果都更新在屏幕上~
要想监测 w 命令的运行结果,只要 watch w 就可以了:
默认 watch 会以 2s 的间隔重复运行命令,你也可以用 -n 参数指定时间间隔~
还有一个实用的参数是 -d,这样 watch 会帮你高亮显示变化的区域,这样更加一目了然了~
Ctrl+c 就可以退出~
你可以拿他来监测你想要的一切命令的结果变化,比如 tail 一个 log 文件,ls 监测某个文件的大小变化,看你的想象力了~
如果你的发行版中不幸没有这个命令,可以到这里下载安装,watch 属于 procps 这个软件包。

实用技巧:如何有效率的操作Linux命令行

bash有两种输入模式vi模式和emacs模式,其中emacs是默认模式,而且操作起来也比vi模式要快捷。可以通过 set -o vi和set -o emacs来转换。

1.在命令历史中查找
强烈推荐使用 Ctrl+r, 这个键组合是反向增量查找消息历史。很好用。 比如你很久以前输入过某个命令如。 gcc -c -DKKT - Dnnn 等等,一长串, 用上下方向键来找比较困难,这时候可以Ctrl+r,然后输入gcc很快找到该命令,重复按Ctrl+r将查找更早的历史。

其实还有 Ctrl+s 是正向增量查找的,但是由于这个快捷键被终端预设成锁屏幕了,没有效果。不过可以使用命令 stty -ixon -ixoff来解除绑定.再举一个Ctrl+r和Ctrl+s的应用吧.

比如我打入了如下命令,
echo aa bb cc d ee ff gg kk qq

然后我发现我要修改一下,把d修改成dd,这时候只要Ctrl+r 输入d,就立刻定位到d所在的位置,然后Ctrl+f一下,再输入d即可

2.命令行中移动
Ctrl+f Ctrl+b 分别是前后移动一个字符的距离
Alt+f Alt+b 是前后移动一个单词的距离这个很快比如你输入了
$grep -e funtion file1 file2 file3

然后你发现funtion错了,要移动回来修改,则可以Alt+b三下就移动回来了,很快。

Ctrl+a Ctrl+e 移动到行首和行尾。这个也很好用,如果输入了一长串命令行,发现第一个单词拼错了,可以Ctrl+a到开头再进行修改。

3.删除
Alt+d 往右边删除一个单词
Alt+Backspace 往左删除一个单词
Ctrl+u 往左删除到行首
Ctrl+k 往右删除到行末

其中这些删除都放入了删除环里面,可以使用Ctrl+y找回,Alt+y在删除环里面移动也就是说命令行里面可以使用剪切和粘贴了。

上面的几条如果用熟练了效率能提高很多。

而如果还想了解更多的快捷键绑定,敲如下命令
bind -P

发现有些你需要的功能而没有快捷键绑定的话可以如下绑定,比如我绑定了两个函数
bind -m emacs '"\M-w": kill-region'
bind -m emacs '"\M-W": copy-region-as-kill'

Mirage -- 又一款轻量图片浏览器

原来介绍过 Gimmage 和 Ristretto 这两款轻量的图像浏览器,类似于 Windows 下的图片和传真查看器,简单快速,适合一般性的图片浏览。
今天再介绍一个相似的软件 Mirage,Mirage 基于 PyGtk,并且只依赖 PyGtk 和 Gtk,不依赖其他的复杂软件包和桌面环境。
同时,Mirage 也支持幻灯片放映、图片大小调整、图片切割和旋转等功能。

SecPanel — 管理 SSH 及 SCP 连接

SecPanel 是一款图形化的 SSH 及 SCP 连接管理工具。当前,SecPanel 支持 SSH.com 和 OpenSSH,不仅允许你配置、管理 SSH 及 SCP 连接,而且包括密钥处理、SSH Agent 等功能。
运行 SecPanel 需要你的 Linux 系统安装有 Tcl/Tk。最新版本 0.5.4,提供 DEB、RPM、TGZ 等格式的安装包。

3 步搞定 Linux 下的音频转换 

如果你需要在 Linux 下进行音频格式转换,那么 Audio-convert-mod 是一个值得一用的工具。Audio-convert-mod 简单易用,转换音频格式文件只需三步即可搞定。另外,使用 Audio-convert-mod 可执行批量转换。目前,Audio-convert-mod 支持 MP3、OGG、FLAC、WAV、AAC/MP4/M4A、MAC/Monkey’s Audio/APE、MPC (Musepack)、WV (wavpack) 等音频格式的编码和解码。
Audio-convert-mod 的当前版本为 3.45.2,提供有源码包和 RPM 包。安装 Audio-convert-mod 需要 gawk 和 file。此外,为了获得上述音频格式的编码/解码支持,需要安装一些常用的编码/解码器,比如:lame 用于 MP3 转换、vorbis-tools 用于 OGG 转换、flac 用于 FLAC 转换、mac 用于 APE 转换等等。
在启动 Audio-convert-mod 后,通过点击 File → Show Features 菜单可以查看 Audio-convert-mod 所支持的音频格式是否可用。如果显示为绿色则表示支持;若为红色则表示不支持,需要安装相应的编码/解码器。

Audio-convert-mod 使用过程
下面让我们来看一下 Audio-convert-mod 的基本使用步骤:
1、选择文件

如上图所示,点击 Add 按钮来选择要转换的音频文件,或者点击 Add directory 来选择一个包含多个音频文件的目录。如果列表中包含不想转换的音频文件,随时可以点击 Remove 按钮来移除它。
2、转换设置

在第二步,需要选择输出的音频格式及其比特率。另外,也可根据实际情况设置其他选项,如针对源文件、目标文件存在、元数据、输出文件夹设置相应选项。
3、开始转换

当转换设置完成后,点击 Next 即开始音频格式的转换过程。
一些缺憾
我感觉 Audio-convert-mod 还存在一些缺憾,比如在转换 APE 时无法利用 CUE 文件执行分割操作,不过,我们可以使用 shntool 这个命令行工具来完成;另外,不能将转换设置保存为预置文件 (虽然有个保存为默认值的选项,但还是不够方便和灵活),因而也就无法作多次的重复调用。

结束不响应的程序

1.我将“强制关闭”程序放在我的任务栏上,如果哪个程序出现问题可以单击“强制关闭”图标并结束该程序  2.如果上一步不奏效,调用终端,用“ps -A”,记下那个出问题程序的进程号,结束它  3.使用“killall”命令,比如“killall firefox-bin”  4.如果整个图形界面都冻结,你已经不可能调用终端,按CTRL-ALT-F1,这样可以转到另一个终端,这样你就可以使用步骤2和3来结束出问题的程序。  5.还不行的话,你可以使用CTRL-ALT-Backspace组合重启你的图形界面,但是要注意的是,这样会结束你正在运行的GUI程序。  6.调用CTRL-ALT-F1再使用CTRL+ALT+DEL这样不会立即重启你的系统,只是按照正常模式重启,所以是安全的(假定你想要重启并且CTRL-ALT-F1可用)。

LXTask -- 简易版任务管理器 

LXTask 是一款简易的任务管理器,虽然没有 Gnome-system-monitor 功能那么丰富,但是他只依赖于 Gtk+,不依赖于任何桌面环境,使用起来也简单明了

Linux系统下用一条命令批量修改图片尺寸

经常拍照片经常会需要把大量的照片尺寸缩小,以方便网上传输或者存储。

下面介绍一种简单的方法把大量照片变到指定尺寸

find ./ -name '*.jpg' -exec convert -resize 600x480 {} {} \;

注意空格和最后的分号。转换后会覆盖源文件。这里用到两个命令。

这条命令的意思是找到当前目录所有jpg文件。执行conver -resize 600x480 文件名 文件名。find会把每个

Linux 下值得使用的 5 个屏幕录像软件

Ttyutils: Linux 终端截获工具 

GScrot - Scrot 的图形化前端 

Xvidcap 1.1.7发布 

Catfish - 简洁、好用的文件搜索工具

Glow:非常漂亮的GNOME主题

picasup: picasa相册上传脚本 

jed——文本编辑器中的小李飞刀 

samhain:比较变态的入侵检测系统

xtrlock:锁住 X,但是仍然显示内容 

Speedometer -- 终端下的网络监测工具 

Cacti:网络流量监测工具 

2008年11月17日星期一

Synkron:跨平台的文件同步工具

Synkron 是一款自由开源的文件同步工具,它允许你跨平台运行,支持包括 Linux/Unix、Mac OS X、Windows 等多个系统。Synkron 既可以同步多个文件夹,也支持按计划自动同步。另外,Synkron 还包括黑名单功能,使你能够对不想同步的文件/文件夹进行过滤。

Memstat -- 查看共享库的内存占用

我们可以用 top 或者 系统管理器 这样的工具来查看各个进程的内存占用,不过内存中不光有你运行的进程,还驻留着进程需要的共享库,比如最基本的 libc.so。这些共享库在物理内存上只存在一份拷贝,而被多个进程共享。我们在 top 中查看进程信息的时候,会有 RSS 和 VSZ 两个项目,前者是进程本身的内存占用,而后者是算上共享库的总占用。
Memstat 这个小程序可以帮你查看每个共享库的内存占用,让他们现形。

Darkhttpd -- 超小型静态 http 服务器

pho:轻巧的命令行图片查看器

基于终端的常用工具

就算 Linux 没有 GUI(图形用户界面),我们在 CLI(命令行界面)中依然能够应付自如。从浏览网络到联络朋友,从获取资源到音影娱乐,从编辑文本到观看图片……在 GUI 中能做的,CLI 也同样可以办到。我想这即是 Linux 的魅力了。
网络浏览:推荐使用 Elinks,Elinks 对于框架、表格以及鼠标的支持都很不错。当然,你也可以将 LynxLinksw3m 作为备选。
邮件收发:Mutt + Fetchmail + msmtp 是很好的组合。其中,Mutt 用于邮件的管理,Fetchmail 用来收取邮件,而 msmtp 则用来发送邮件。
联络聊天:CenterICQ 支持 MSN、Jabber、IRC、Yahoo!、AIM、ICQ 等多种即时通讯协议。它同时也具有一个 UTF-8 版本。其他的工具包括 Freetalk(Gtalk 用户适用)、Naim(支持 AIM、ICQ、IRC 等)、Irssi(IRC 用户适用) 等。
新闻阅读:现在通过 RSS 及时获取信息是一种比较流行的方式。你可以使用 Raggle 来满足每天阅读新闻的需求。Raggle 使用 Ruby 所写,它支持各种版本的 RSS、能够导入/导出 OPML、可定制绑定的快捷键。遗憾的是,Raggle 目前不支持中文。Snownews 虽然功能要弱点,但是对于中文支持很好。
文件管理:Midnight Commander(简称 mc)是一个值得使用的文件管理工具。
查看图片:你可以试试 zgv,我也在使用 feh
听歌观影:如果你需要听歌,MOC 绝对值得一用。另外,你也可以试试 cplay。看电影的话,当然是 MPlayer 了。
文本编辑:既然已经有了 VIMEmacs,那么我们还奢求什么呢?
下载上传:主力下载工具使用 wget,要加速可以使用 axel。至于上传 ftp,lftp、nftp 都是不错的选择。此外,对付 BitTorrent 的话,则可以使用 rTorrent
窗口管理:Twin,我没有用过,不晓得怎样,有兴趣者可自行从其主页了解详情。我现在使用 Screen,并已经习惯了开机便进入 Screen 的生活。

2008年11月16日星期日

介绍两个批量重命名的工具

thunar 这个 xfce 下的文件管理器,它自带了一个批量重命名的工具,下面我们主要来介绍一个专业的更为强大的批量重命名工具-------Métamorphose

2008年11月14日星期五

2008年11月11日星期二

Procice GUI -- ps 和 kill 的 GUI 前端

曾经介绍过一款非常轻量的任务管理器 LXTask,如果你闲那个还不够轻的话,可以试试这个 Procice GUI。
Procice GUI 其实就是 ps 命令和 kill 命令的 GUI 前端。Procice GUI 基于 gtk-per,只有一个仅 20K 的可执行文件

2008年10月29日星期三

SeamlessRDP:rdesktop seamless 模式实现

rdesktop中有一个-A参数,可以启用SeamlessRDP模式,在该模式下rdesktop会为远端的win主机上的每个窗口创建一个对应的X11窗口。另外该模式需要远程win主机安装SeamlessRDP组件,你可以从这里下载该组件,然后将其解压到Windows系统的c:\windows目录即可。
然后您可以使用如下的命令访问win主机的某个应用:
window.google_render_ad();
[bash]
rdesktop -a 24 -uwin主机用户名 -pwin主机访问密码 -A -s 'seamlessrdpshell 要启动的程序名称' win主机IP
以上命令可以启动win主机上的任意程序,比如我经常用的Notes。如果您向一次访问多个程序,又不想一个个调用,一个建议,您可以在win的机器上安装一个mdie (这个是win的资源管理器的替代工具),然后使用rdesktop运行mdie,然后您就可以和访问win主机的我的电脑一样,启动任意你要打开的程序了。如下:[bash]
rdesktop -r disk:linux=/home/feiy -a 24 -uAdministrator -p1234-A -s 'seamlessrdpshell e:\mdie\mdie_cn.exe' 192.168.1.1
下面是效果图:
最后意淫下,想像下,你有一堆的win服务器,然后你的笔记本上通过rdesktop以SeamlessRDP的方式分别在使用不同的机器不同的巨无霸软件,比如在A机器用eclipse,在B机器数据库管理,在C机器剩下一堆的测试工具,而你的笔记本才是个Pm/512M内存的烂机器,是不是很爽啊?嘿嘿,很不运,最近我就是这么跑的,哈哈。
5 Comments at "SeamlessRDP:rdesktop seamless 模式实现"

2008年10月26日星期日

http://seo-dic.com.cn/archives/category/open-source/ubuntu?archive-dropdown

Cankiri:小巧实用的屏幕录像机

Linux下VirtualBox虚拟机的安装和设置(一)

注意本文以Ubuntu8.04下在虚拟机vbox1.64(2008.7.30)上安装windows XP为例来说明linux下VirtuaBox的安装和使用。该文也同样适用于windows下VirtualBox的安装和设置,只是在网络配置桥接这一高级应用时有些细微的差别。后续文章可能会提到 。VirtualBox1.64据我所知,源中提供的是旧版,请到官方网址下载适合你的版本:注意是Binaries (all platforms)位置下载安装包官方下载页面:http://www.virtualbox.org/wiki/Downloads到Open Source Edition (OSE) Source code可以下载源码(开源版本)
为了简单说明,我们以安装包virtualbox_1.6.4-33808_Ubuntu_hardy_i386.deb说明问题,请您在Binaries页面选择合适的版本,如下图:有问题请留言说明

安装及设置步骤:一、安装支持双击deb按提示安装或者,在终端下输入:sudo dpkg -i virtualbox_1.6.4-33808_Ubuntu_hardy_i386.deb(请注意文件名的大小写)开始安装,安装过程中软件会自动建立用户组,vboxusers专门提供给virtualbox使用。如下图:

安装virtualbox成功显示信息
注意:VirtualBox的正常使用会用到libxalan110和libxerces27这两个包。如果您不能正常启动安装请先执行:sudo apt-get install libxalan110 libxerces27二、设置安装完vbox还需要做一些设置才能正常使用否则会出许多莫名其妙的错误提示1.第一次运行virtualbox会出现您 需要root权限才能执行,大家可不要想当然把root权限就给了它啊,把你当前的用户名加到vboxuser中就好了,打开用户管理–>用户和组,如下图:点击属性把你的用户名选中。

用户和组设置界面
2.在虚拟机上安装Windows,笔者是在上面安装的精简版的深度XP,哈哈,刚好20号下载的。现在不知道还能下载到不,总公也就200M,做实验足够了。在虚拟机中安装和真实的安装没什么分别,但要注意一下的是,安装xp前请先给虚拟电脑分分配足够的内存、硬盘和显存大小 ,笔者,只给它分配了5G的空间,128M内存,8M显存,做个小实验已经足够了。如下图:点击新建建立一个虚拟电脑,向导式操作就不多作解释了,有问题欢迎留言说明。

建立虚拟电脑运行向导
3.开始安装winxp要注意建立虚拟电脑后,点击右边的 配置明细–>光驱 为设置你的光驱为虚拟光盘,选择之前下载好的镜像文件。如下图:

点击设置光盘镜像

虚拟光驱设置
当然如果你有安装盘的话可以直接设置物理光盘,用安装版装也一样。4.USB设备的使用笔者想在,虚拟的XP上使用我的一体机,以弥补我ubuntu打印驱动的不足。USB口的打印机在虚拟机进里没反应,不着急,我们要对系统作一下简单的设置,目的是让virutalbox有权限直接使用 我们的USB设备。1 . 增加用户组usbfssudo groupadd usbfs2 . 查看usbfs用户组的gidcat /etc/group grep usbfsusbfs:x:1002:3 . 把当前用户增加到usbfs组sudo gedit /etc/group把usbfs:x:1002:修改为usbfs:x:1002:{你的用户名,注意不包括引号}当然以上几步骤完全可图形界面下操作,位置是:system–>系统管理–>用户和组 下操作。4 . 为USB设备重新设置权限编辑/etc/fstab文件,添加下面两行,注意你的gid可能不是1002sudo gedit /etc/fstab在末尾加上# 1002 is the USB group IDInone /proc/bus/usb usbfs devgid=1002,devmode=664 0 05 . 重新启动后,应该就可以在客户机中使用USB设备了。使用方法:插入一个USB设备后,如U盘,右键点击虚拟机里右下脚的USB图标,选择已经识别的U盘,就可以正常使用了。6.虚拟机中的winxp与主机ubuntu数据的共享,最简单的方法是设置数据空间,由于笔者在使用 数据空间时遇到 的问题有些蹊跷,所以这一部分单独下一篇讨论。

DivFix++ 0.20

 DivFix++ 是一个十分有用的小工具,它可以修复损坏的 AVI 视频文件。比如说,当你需要预览从 ed2k 或 bt 下载的电影文件时,此工具将助你一臂之力。此外,DivFix++ 还支持 CLI 工具,换句话说,你可以通过脚本来自动对电影进行诸如修复、预览、删除等操作。

ImgWorks 是使用 ImageMagick 来完成的批量图像转换工具

FFmpeg — 屏幕录制工具

用 ISO Master 创建和编辑 ISO 文件

更方便的 ping -- Pinger

PeaZip -- 全能的压缩、解包工具

Decibel Audio Player -- 最纯粹的音乐播放器

Decibel Audio Player -- 最纯粹的音乐播放器

linux下光盘镜像的挂载

在 Linux 下肯定要和光盘镜像打交道,光盘镜像文件只有挂载后才能使用,下面我们看看如何挂载不同的光盘镜像们:
ISO:
iso 格式的光盘镜像可以说是最普遍和通用的了,处理起来非常方便,挂载命令:
( 假设镜像文件名为 download,挂载点为 /mount-point ,下同)
mount -t iso9660 -o loop,user download.iso /mount-point
MDF:
mdf 是 Win 下的虚拟光驱软件 Alcohol 120% 的专有格式,你可以用 mdf2iso 把 mdf 文件转换成 iso 格式再挂载,或者尝试用下面的命令挂载:
mount download.mdf /mount-point -o loop=/dev/loop0
不过遗憾的是,有些分轨的 mdf 文件,这样还是无能为力。
BIN (or BIN CUE ):
可以用 cdemu 挂载,也可以用 bin2iso 转换成 iso 再挂载,也可以 bchunk 转换 bin cue 到 iso 。
NRG:
nrg 格式的镜像文件是 Nero 的专有格式,你可以用 nrg2iso 转换成 iso 再挂载,或者尝试下面的命令:
mount -o loop,offset=307200 download.nrg /mount-point
CCD:
ccd 是 CloneCD 的专有格式,你可以用 ccd2iso 转换成 iso 再挂载。
window.google_render_ad();

KolourPaint -- Linux 下的“画图”

Windows 下的“画图”大家肯定非常熟悉,从 98 到 XP,基本就没怎么变过,可以说是非常“经典”的一个程序了……虽然没什么大作用,但是拿来作一些图片的简单修改,或是拿来涂鸦还是不错的~
KolourPaint 可以说就是 Linux 下的画图程序,非常容易使用,连界面也很相似~
KolourPaint 的主页: http://kolourpaint.sourceforge.net/
window.google_render_ad();

在纯终端下截图

说到在终端下截图,有人说,那还不简单,在 X 下开个虚拟终端,对窗口抓个图不就得了……
但是如果没有 X,在纯终端下面就没法这样干了……
解决的办法就是用 fbshot 这个小工具,他可以把终端的内容截取保存成 png 图片,使用非常方便,前提就是,你的终端已经配置成 framebuffer 的模式运行。
直接在 fbshot 后指定一个文件名,就可以了:
fbshot shot.png
这样当前目录下会生成一个 shot.png,就是终端的截图。fbshot 还有一个有用的参数 -s, -s 可以指定在抓图前等待几秒。如果你想 5 秒后抓图,只要:
fbshot -s 5 shot.png
不过这样一来,fbshot 就挂起了,你也无法运行别的程序,如果你想截取比如 top 这样的命令的运行界面,在这 5 秒内,你也没法运行 top,解决的办法是在 fbshot 命令后面加一个 &,让 fbshot 命令到后台去运行:
fbshot -s 5 shot.png &
这样你就可以从容的启动想要的程序,等着 fbshot 帮你拍照了~
fbshot 生成图片的时候,会显示几行信息,诸如:“Grabing 1024x768....” 这样的信息,有时候会把这些文字也抓到图里去,只要把 fbshot 的输出定向到 /dev/null 就可以了:
fbshot -s 5 shot.png > /dev/null &
此外,还有一个 fbgrab,和 fbshot 功能相同,用法也几乎一样,只不过在我的机子上,截出来的图片是花屏……

Furius ISO Mount -- 镜像挂载小工具

Furius ISO Mount 可以帮你自动挂载和卸载 ISO 和 IMG 光盘镜像文件,自动在 /media 下创建挂载点,还可以方便的检测镜像的 MD5 和 SHA1。
适合记不住命令的人,比如我……
如果你是 Ubuntu 用户,可以在网站上下载 deb 安装包,双击安装后:
右键单击 Gnome 面板,选择“添加到面板”
选择“自定义应用程序启动器”,输入下面的值:
类型: 应用程序
名称: Furius ISO Mounter
命令: gksudo furiusisomount
然后选个图标。
点击确定就 ok 了~
其他用户可以安装网站上的源码包,自行编译,建立链接的方法同上。
window.google_render_ad();

Sakura -- 轻量的小虚拟终端

Sakura 是一款轻量的虚拟终端软件,提供了标签页、自动识别链接、颜色字体设置等一般虚拟终端软件具有的功能。
并且 Sakura 只依赖于 Gtk 和 VTE 这两个库,这样即使不用安装庞大的 Gnome 桌面环境,也可以顺利使用,省了不少麻烦~

GAdmin-ProFTPD -- ProFTPD 配置前端

ProFTPD 是 Linux 下面一款不错的 ftp 服务器,功能非常丰富,但是因此配置也非常的复杂,想要配置好目录、用户、权限、乃至安全参数,得好好学习一下配置文件的写法才行。
GAdmin-ProFTPD 基于 Gtk ,为 ProFTPD 提供了一个简单直观配置前端。
用户配置和服务器参数一目了然,并且可以直接在 GAdmin-ProFTPD 中启动或关闭 ProFTPD,也可以方便的查看生成的配置文件,和安全日志。



GAdmin ProFTPD 的主页: http://mange.dynalias.org/linux.html 貌似被盾了 -_-b

pyRenamer -- 实用的文件批量改名工具

pyRenamer 基于 PyGTK,是一款非常实用的文件批量改名工具。
pyRenamer 可以像正则表达式那样匹配当前文件名,并且按照设定的模板转换,只要将鼠标悬停在模板输入框,就会又详细的提示,你也可以去看看官方的手册,还有视频指导
除此之外,pyRenamer 还提供了一些方便的替换功能,比如,把文件名中的空格替换成下划线,空格替换成点,替换文件名中的某个字段,大小写转换,去掉重音符号等。
针对数码照片,pyRenamer 还可以根据照片的 EXIF 信息来更改文件名~


感想看到的推荐~ :)
pyRenamer 的主页: http://www.infinicode.org/code/pyrenamer

HT Editor -- 可执行文件编辑器

HT Editor 是一个终端下的 16 进制编辑器,针对可执行文件,例如熟悉的 ELF、PE,提供了特殊的查看和编辑功能。
你可以查看可执行文件原始的 16 进制数据,也可以让 HT Editor 帮你解析出诸如 ELF header、各分段地址、外部符号等信息,并且可以直接对这些信息修改,让 HT Editor 帮你更新到可执行文件中去。
同样,在反汇编模式中,你也可以直接编辑指令、搜索特殊的字符串或者值。

Screenshot Applet -- 快速截屏

Screenshot Applet 基于 ImageMagick 和 PyGTK,他可以在 Gnome 边栏上显示一个剪刀图标,让你可以快速对整个屏幕或者屏幕的一部分进行截图。
截图之前,你可以右键点击图标,设置截图的文件名和保存的目录,直接点击剪刀图标,鼠标就会变成十字状,框选想要截选的区域,图片就会自动保存在设置的目录下了~
Screenshot Applet 的主页: http://polariscorp.free.fr/screenapplet.php
如果你上不去主页,可以在这里本地下载
如果你把 Screenshot Applet 添加到边栏,但是启动时却出错,可以尝试 chmod 777 /usr/local/bin/screenst-applet.py 。

linux查看硬盘空间占用

虽然硬盘容量越来越大,但是我们也会觉得空间越来越不够用,只要有一条宽带线,再大的硬盘都能轻易塞满。
有的时候磁盘告急,需要马上清理出一块空间,但是怎么知道,是哪些文件占用了我的空间呢?
ls -sSh
ls -sSh 可以将当前目录下的文件按照大小排序显示出来,最大的放在前面,当前目录下的最大文件立马现形。
参数中的 S 即是按照大小排序,s 为顺带打印出文件大小,h 把大小显示为 xx K xx M 这样的易读格式,如果你只需要排序结果,那么 ls -S 就可以了。
du -s ./* sort -rn
ls 只会列出文件,并不能计算目录大小,这时候就要靠 du 了。
du 的 -s 参数会告诉 du 只打印出每个文件或目录的总大小,而不要递归的把目录下所有文件的大小打印出来。然后再传给 sort,-n 为按照数字排序,-r 为逆序显示,这样最大的文件或者目录就列在前面了~
ncdu
ncdu 是一个基于 Ncurses 的小程序,可以显示某个文件夹下文件的空间占用统计,并且以直观的方式显示出来。

除了可以方便的浏览各个嵌套目录的空间占用之外,还可以在选中项目上,直接按 d 键删除。通过 ? 命令可以看到全部的命令列表。
你可以在 http://dev.yorhel.nl/ncdu/ 下载到 ncdu。
Baobab
Baobab 是 Gnome 附带的一个磁盘使用分析器。Baobab 可以将磁盘使用情况通过圆环图显示出来,各个目录以及他们的子目录占用空间的大小一目了然。并且,Baobab 也可以扫描远程的文件夹,甚至 ftp。

Gdmap
Gdmap 和 Baobab 概念相同,不过 Gdmap 是通过不同颜色的方格来展示各个目录的大小,不同类型的文件,比如视频、音乐、压缩包,会配以不同的颜色。 (多谢 xiws 补充 :)

你可以在 http://gdmap.sourceforge.net/ 下载到 Gdmap。

2008年10月23日星期四

Synkron:跨平台的文件同步工具

Synkron 是一款自由开源的文件同步工具,它允许你跨平台运行,支持包括 Linux/Unix、Mac OS X、Windows 等多个系统。Synkron 既可以同步多个文件夹,也支持按计划自动同步。另外,Synkron 还包括黑名单功能,使你能够对不想同步的文件/文件夹进行过滤。
Synkron 要求 Qt,最新版提供源码包和 RPM 包,可从其项目主页下载。
Synkron [via Lifehacker]
版权声明: 允许非商业性转载,但转载时必须标明作者及原文链接.本文网址: http://linuxtoy.org/archives/synkron.html
Tags:

2008年10月21日星期二

Ubuntu Tweak 0.4.0正式发布

经过了两个多月的开发,最新版本的Ubuntu Tweak 0.4.0正式发布了!
这个版本全面加强了原有的特性,并支持了最新的Ubuntu 8.10,当然也引入了新的功能。
请看:
—–
Ubuntu Tweak 0.4.0重新设计了界面,使其在一些1024X768的分辨率的显示器上也能得到很好的显示,在EEE Pc等1024X600的LCD上也能完全适用。
下面是Ubuntu Tweak 0.4.0的新界面:

下面以图文的形式来介绍一下Ubuntu Tweak 0.4.0的主要更新:
增强“第三方源”的功能
通过新增的“源的细节”的视图,你可以方便地打开并浏览跟该源有关的所以信息。Ubuntu Tweak会调用你的浏览来浏览该源所包含的一些软件包,或者该源的主页。从而可以知道这是否是自己想用的源。
同样,这个版本中Ubuntu Tweak引入了一些新的第三方源,如Dropbox,这是一个最近比较流行的网络存储应用。

增加软件包清理功能
如果你是一个比较熟悉Ubuntu的用户应该了解通过sudo apt-get autoremove你可以一次性移除所有不必要的孤立软件包。
而现在Ubuntu Tweak也提供了这项功能,而且更加自由,因为你可以有选择地将不需要的软件包清理出去。
另外还有清理缓存的功能,同样也是依照自己的选择进行处理。



增加了更改面板Logo的功能
看腻了面板上的LOGO,你可能打算把它换成自己想要的样子。但是自己弄相当麻烦,通地Ubuntu Tweak就可以一步完成。你所做的只需要准备好24X24大小的LOGO即可。
然后Ubuntu Tweak可以将其他搞定!


重新设计了用户目录设置
这个版本重新设计了“用户目录”这项功能,现在不仅可以方便地更改一些文档目录,而且可以方便地还原回去。这些操作都可以通过右键点击来完成。

脚本和模板支持目录操作
如果你是一个自动化狂人,你可能会用相当多的脚本或模板来完成你的工作,如何分门别类地管理这些东西成了主要问题。
现在Ubuntu Tweak增强了脚本和模板的功能,你可以直接通过Ubuntu Tweak来建立文件夹和其他目录操作。管理这些可以通过简单的拖曳来完成。

除上上面介绍了一些特性,Ubuntu Tweak 0.4.0还有其他一些改进,如完全支持Ubuntu 8.10 Intrepid,新增了更加自动化的升级功能。
其他的就要用户自己去体验了。
安装或下载
从Ubuntu Tweak 0.4.0开始,新增了一个为8.10 Intrepid准备的新源(旧源依旧适用)。
如果你已经升级到了ubuntu 8.10 Intrepid,你可以往你的source.list加下面这行源:deb http://ppa.launchpad.net/tualatrix/ubuntu intrepid main
deb-src http://ppa.launchpad.net/tualatrix/ubuntu intrepid main
老版本的用户可以继续使用:deb http://ppa.launchpad.net/tualatrix/ubuntu hardy main
deb-src http://ppa.launchpad.net/tualatrix/ubuntu hardy main
手动安装可以下载:
Deb包:ubuntu-tweak_0.4.0.1-1~ppa1_all.deb
源码包:ubuntu-tweak_0.4.0.1.orig.tar.gz
Woobuntu:一个漂亮的GDM ThemeBy feiy + 10月 6th, 2008 + Tags:,
原版的我是在这里看到的,不过我不喜欢其歪歪的Ubuntu Log,所以就自己修改了下,喜欢的朋友点击这里下载。下面是效果图:

关于字体

转自: http://www.cseec.com/archives/634197 《About Fonts》
很不错的一篇关于字型方面基础知识的文章。什么叫衬线?衬线和无衬线字体有什么区别?什么样式的字体浏览起来最舒适?当前常用的中西字体都是什么来历?……本文向你揭示。
西方字体
无衬线字体
衬线字体
衬线字体的衬线(红色部分)
方块字
汉字中的衬线体宋体和无衬线体黑体
日文明朝体(MS Mincho体)和ゴシック体
韩国语中的衬线体Batang体和无衬线体Dotum体
中文将Serif按照字义翻译成“衬线”或“字脚”,顾名思义就是装饰陪衬的作用,因此有衬线体也称为“有脚体”。日语中将衬线称为うろこ,字面意思为“鱼鳞”。
衬线体(即“白体”),中国大陆地区称之为宋体,使用繁体中文的港台称之为明体,日文称明朝体,韩国语称Batang体,常用于正文排版。这些名称 起源于中国历史上的宋朝和明朝,当时中国的活字印刷术已经广泛传播,而用于制造活字的木纹多为水平方向,因此造成在刻字时横画细,竖画粗;而且为了防止边 缘破损,横画在两端也被加粗,根据运笔习惯而形成三角形的装饰。这种方式一直沿用至今,现在白体类字体多数都是横细竖粗。
另外,无衬线体在中文通常称为黑体,在日文称为ゴシック体(Goshikku-tai,即“哥特体”),韩国语中称Dotum体,这类字体笔画粗细基本一致,没有衬线装饰,较为醒目,常用于标题、导语、标志等。
用途
在传统印刷中,衬线字体用于正文印刷,因为它被认为比无衬线体更易于阅读,是比较正统的。相对的,无衬线体用于短篇和标题等,能够读者注意,或者提供一种轻松的气氛。
但是在计算机领域中倾向使用无衬线字体以方便在显示器上显示。出于这个原因,大部分网页使用无衬线字体。因此,Windows Vista中的中文默认字体已经从原来的衬线字体(宋体或细明体)改变成了无衬线字体(微软雅黑或微软正黑体)。另外,为了更好解决衬线字体的显示问题, 新的反锯齿和次像素显示(如ClearType)等技术开始广泛运用。
旧体
旧体可以上溯到1465年,它的特征是:强调对角方向——一个字母最细的部分不是在顶部或底部,而是在斜对角的部分;粗细线条之间微妙的区别——笔画粗细的对比不强烈;出众的可读性。旧体是最接近手工铅字起源的字体。
旧衬线体在制作的时候有严整的斜度规定,加上弧度衬线体现细节,增强了它的阅读性。可是这个做法和研究阅读的心理学家所提倡的“平行字母宽度”认知模型是相矛盾的。
旧体可以再分为Venetian 和 Aldine 或 Garalde。旧体字体的样本有 Trajan, Jenson (Venetian), Garamond, Bembo, Goudy Old Style, 和Palatino (all Aldine or Garalde)。
过渡体
过渡体(或称 "巴洛克体") 衬线体最早出现在18世纪中叶,这类字体中包括最著名的Times New Roman (1932年) a和Baskerville体(1757年)。由于在风格上处于现代体和旧体之间,故名“过渡体”。和旧体比较,粗细线条的反差得以强调,但是没有现代体 那么夸张。
粗衬线
粗衬线 (也称 "埃及体") 中笔画粗细差距较小,而衬线相当粗大,几乎和竖画一样粗,而且通常弧度很小。这种字体外观粗大方正,各个字母通常是固定的水平宽度,字体表现和打字机一 样。这类字体通常被说成是单纯在无衬线字体加上大衬线,因为字母本身的形状和无衬线体很类似,笔画的粗细几乎没有差别。(在粗衬线体中有一个小类叫 Clarendon体,结构更类似于衬线体,但是有独具特色的弧线。)粗衬线出现在1800年左右。具体包括Clarendon体、Rockwell体和 Courier体等等。
现代
现代衬线体出现在18世纪末,强调了粗细笔画之间的强烈对比,加重了竖画,而把衬线作得细长。大部分现代衬线体的可读性不及过渡体和旧体衬线体。常 见字体包括Bodoni体, Century Schoolbook体和 Computer Modern体。 (这类字体在开放源电脑系统中通常随TeX和LaTeX出现)。
无衬线字体有以下几种:
旧体
Grotesque早期的无衬线字体设计,如Grotesque或 Royal Gothic体。
过渡体
新grotesque或称为过渡体,目前所谓的标准无衬线字体,如Helvetica(瑞士体), Arial和Univers体等等。这些都是最常见的无衬线体。笔画笔直,字体宽度比变化没有比人文主义无衬线体那么明显。由于其平白的外观,过渡无衬线 体常被称为“无名的无衬线”体。
人文主义体
(Johnston、Gill Sans、Frutiger和Optima,赫尔曼·察普夫制作) 。这些字体是无衬线字体中最具书法特色的,有更强烈的笔画粗细变化和可读性。
几何体
(Avant Garde、Century Gothic、Futura、Gotham)。顾名思义,几何无衬线体是基于几何形状的,透过鲜明的直线和圆弧的对比来表达几何图形美感的一种无衬线字 体。从大写字母的"O"的几何特征和小写字母"a"的简单构型就可以看出,几何体拥有最现代的外观和感触。
(以上材料整理自维基百科)
为什么衬线字体更有利于阅读,我认为衬线字体在字的交接处和末端添加装饰形状,明显的粗细变化,而我们的视线比较适应不同粗细的线条交织,并且衬角很好的接管了视线,传达一种结束或者改变的信号.
并且有很多人喜欢像素感很强的字体,究其原因,受制于传统的显示技术,导致字体(多数是衬线字体),像素感很强,这本是一种技术缺陷,如同像素画,依然有众多的爱好者. 像素感强的字体,在阅读上其实并不亲和,如同像素画一般,长时间阅读可能导致眼睛不适.
中文字体
中文比较常见的字体有宋体,新宋体,黑体,华文细黑,微软雅黑等.宋体发明于宋代,尽管当时人们习惯于以书法家命名字体,比如颜体柳体,宋体的发明 者应该是秦桧,这可能是后世以朝代命名这个字体的缘故吧).前文提过,之所以横细竖宽,是由于篆刻的木纹的缘故,衬角来自于人们的书写提笔习惯.在印刷技 术低下的年代,衬角更方便识别印刷油墨不明显的字体.并且宋体相对于其他书法字体,比较节省印刷材料.这也是宋体延续千年的缘故.
黑体和华文细黑都是后来根据西方的无衬线字体黑体修改的字体.微软雅黑字体事实上是人文主义字体.
楷体也十分常见,但按照分类,楷体应该属于艺术字体.
另外中文标准字体制作成本大大高于英文,所以相对英文字体要稀少的多,这只是原因之一,更大的问题是如今的中文字体制作者倾向于制作艺术字体,对于 标准字体很少见有人制作.这似乎不应该埋怨制作者,大量的人对字体完全没有审美,或者对字体的审美建立在对艺术字形态上的图形审美.
日本字体
日本字体比大陆简体字多很多,其中优秀的字体也相当多.汉字字体如今也仅有日本汉字能和英文相媲美.另外注意:日本汉字来源也是根据<六书>
很大程度上,中文字体在web上显示不如拉丁文好看的原因在于:
弧度.英文字母的弧度有很多是相似的,比如[n,m,h,u],[b,d,p,q][c,o,e][v,y,x],而这些简单的弧线构成字母,这些 字母的组合构成单词,单词的组合构成整篇文章,那么整篇文章的弧度都是有最原始的字母弧度构成.这样带来的视觉效果的统一性,符合现代人的审美.
构架.字母的构架有很强制的标准,使得本来就很构架就很简单的字母显得整齐.
排版.相对统一的线条弧度,标准的架构使排版相对容易些.
简体字.一些保守的学者认为简体字毁掉了汉字,汉字的造字根源是依靠<六书>中的”象形,指事,形声,会意,转注,假借”, 而简体字的简化标准不依据于<六书>,完全按照简化者的意愿进行以书写方便为目的的改造,简化字本身完全无法形成一套系统,我们根本无法根据 简体字进行新字的创造.而繁体字对于很多西方新词,不仅仅使用音译,而是根据意思和<六书>,制造新字.
繁体字按照六书的造字方法得来,有自身的系统,相比拉丁字母的相似,繁体字本身也来自与字的组合,这一点比之于简体字,排版会漂亮很多.
了解完基本字体后,我们必须说一说艺术字体.艺术字体一般用于标题,因为艺术字体比基本字体表达更多的情绪,比如欢快,严肃或者玩世不恭.
他们有自己的线条和力度,用线条穿达各种情绪.这样的字体充斥在我们周围的广告上.
公司的标志字体,他们隶属于VI(视觉识别)系统,根据整套的风格,制作的字体.他们大多都在不同程度上组合嫁接了字母.

用 complete 补齐命令

在 bash 中按下 Tab 键,就会自动帮你补齐命令,地球人都知道……
不过当命令出现在第二个词的时候,这招就不灵了,最常见的情况,就是运行 sudo xxx 的时候,sudo 后面的命令并不会自动补齐。
解决的办法很简单,在 ~/.bashrc 中加入:
complete -c sudo
就 ok 了~
除了 sudo 以外,还有不少程序也会遇到同样的情况,比如查询命令位置的 which 和 whereis,计算命令运行时间的 time 等等,对 gentoo 用户来说,还有查询命令软件包的 qfile,再加上前些日子介绍的那个 acoc

Nautilus Scripts Pack -- Nautilus 增强包

Nautilus Scripts Pack 可以给你的 Nautilus 右键菜单中添加一系列的增强功能,包括:
ISO 挂载/卸载
创建 ISO 文件
在 Amarok 或 Audacious 中播放文件
用 root 用户打开当前文件夹
搜索
设置为壁纸
快速编辑图片 (对比度、旋转、大小调整、格式转换 ...)
转换视频和音频文件
分割文件
发送快捷方式
PDF 文件合并
快速安装主题和字体
加密和解密文件
只需把 Nautilus Scripts Pack 压缩包中的文件解压至 ~/.gnome2/nautilus-scripts 即可~

2008年6月10日星期二

Ubuntu 8.04加源安装Google Gadgets

注,此篇是Ubuntu 8.04下加源安装Google Gadgets的方法,用户不再需要自行编译了,而且能一直保持最新。

Google Gadgets是一套跨平台的桌面工具集,for Linux版本刚刚公布不久。

—-

在ubuntu 8.04中:

编辑源文件:

sudo gedit /etc/apt/sources.list

加入下面两行:

deb http://ppa.launchpad.net/googlegadgets/ubuntu hardy main
deb-src http://ppa.launchpad.net/googlegadgets/ubuntu hardy main

保存退出。

接下来就是更新系统和安装Google Gadgets

sudo aptitude update

sudo aptitude install google-gadgets

提示如下信息:

keke@Lin:~$ sudo aptitude install google-gadgets
[sudo] password for keke:
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
读取状态信息… 完成
正在读取扩展状态文件
正在初始化软件包状态… 完成
正在编辑扩展状态信息… 完成
创建标签数据库… 完成
下列新软件包将被自动安装:
libmozjs0d libqtwebkit1d libxul-common libxul0d
下列“新”软件包将被安装。
google-gadgets libmozjs0d libqtwebkit1d libxul-common libxul0d
0 个软件包被升级,新安装5 个, 0 个将被删除, 同时 0 个将不升级。
需要获取 19.8MB 的存档。 解包后将要使用 61.9MB。
您要继续吗?[Y/n/?] y
警告:您将安装以下软件包的不可信版本!

不可信的软件可能会危害您的系统安全。
只有当您非常清楚地了解这就是您所要执行的操作时,才应该进行安装操作。

google-gadgets

您想忽略这条警告信息并继续执行吗?
要继续,请键入“Yes”;要中止,请键入“No”:

然后键入“Yes”,安装完成。

安装完后运行:

运行完后会在托盘出现图标,右击托盘就可以添加需要的Gadgets了。

第一次启动后会更新数据了,因为我使用代理的缘故,更新没有成功:

linux下的千千静听lmplayer - [ubuntu备案文档]

linux下的千千静听lmplayer - [ubuntu备案文档]

千千静听的最新版可以在线收听音乐和浏览网页了说,这一点貌似在linux下还没能赶上。但是lmplayer至少满足了基本需求。

下载最新版lmplayer0.6.0,方便地切换皮肤。(deb包可用)

luckykai开发的一款皮肤:http://blog.lmplayer.org/2008/06/06/luckykai发的一款皮肤

安装皮肤:解压缩后,将皮肤文件夹放置/usr/share/lmplayer/skins目录下

换皮肤的方式很简单,跟windows下的千千静听一样,界面上先右键,然后...

2008年6月2日星期一

A much easier way to install Ubuntu on a USB device (Stick or HD)!

I was reading How to install Ubuntu Linux from USB Stick posted on this site a while ago, and found it to be quite some work to get Ubuntu working on a USB stick. Besides, having to prepare your USB device, creating a separate partition on it which will be more or less “useless” after the installation, giving up 750MB of space?

There had to be a better way.

Together with a colleague of mine, I decided to figure out whether there could be an easier way to install Ubuntu on a USB device.

I found a way of doing it in a much simpler way… without creating the separate partition to store the LiveCD:

A couple of assumptions to take into account when going through this manual:

  • My computer (Dell D820 laptop) has 1 internal disk, devided into 3 partitions (dell utility - windows - Ubuntu 8.04)
  • Just one USB device (in my case a 250GB harddisk
  • BIOS configured to enable boot from internal HDD, CD/DVD and USB Storage device

(I didn’t take screenshots, so I will be explaining a lot about the screens… It looks like a lot of work, but trust me: it is not, and it really is easy:-)

  1. Insert the LiveCD into your computer;
  2. Connect your USB device;
  3. Boot your computer from the liveCD;
  4. Once Ubuntu is started, go to System - Administration - Partition Manager
    This will open the Partion Editor. Select your USB device and delete all partitions on it. Click Apply and exit Partition Editor;
  5. Double Click the Install Icon. This will start the Installer;
  6. The Welcome Screen is shown. Choose your language and click Forward;
  7. Select your Time Zone and click Forward;
  8. Choose your Keyboard Layout and click Forward;
  9. The partitioner will be started, and you will be given the choice where to install Ubuntu. Choose Guided - Use entire disk, selecting your USB device (this will most likely be /dev/sdb, don’t choose /dev/sdb1!);
  10. The next sceen you will give your username/password information. Provide the required info and hit Forward;
  11. If there is anything to migrate from other installations on your computer (most likely not), do whatever you want, and click Forward;
  12. The next screen is important - It is titled: “Ready to Install”. Be careful here: before clicking on Forward, make sure you click on the “Advanced” Button!
    This will open a new screen, giving you the option whether and where to install the bootloader. Select your USB device (in my case it was /dev/sdb) to install the bootloader to;
    Exit this screen and click on Forward in the “Ready to Install” screen, which will be shown;
  13. The installation will be started now. Just be patient, grab a cup of coffee and come back 15 minutes later, your installation will be more or less finished by then.

So you have finished the installation. However, when you will be restarting your system from USB, you will find out that the partition you just installed Ubuntu to cannot be mounted.
Here comes the trick:

  1. Once the installation is finished, reboot your PC (this is the safest) from your LiveCD, with your USB device connected;
  2. Once started, open up a terminal (Applications - Accessories - Terminal);
  3. In the Terminal, type: sudo -i (which will give you root privileges, so be careful from now on!);
  4. Change directories to /media/disk/boot/grub - This will take you to the “/boot/grub” directory on the USB device;
  5. open menu.lst with vi (make a backup first!)
  6. Go to line 130 (or somewhere in that area).
    You will find a line looking like:
    ## ## End Default options ##
    And underneath it you will find three entries pointing to your Ubuntu you just installed:
    title Ubuntu 8.04, kernel 2.6.24-16-generic
    root (hd1,0)
    kernel /boot/vmlinuz………
    initrd /boot/initrd…….
    quiet
    (the above 5 lines repeat 3 times with slight differences)
  7. The magic trick is to change (hd1,0) into (hd0,0) for all these three entries.
    Why? Booting from USB device makes your USB device hd0, in stead of hd1 at time of installation.
  8. Search for the line starting with “# groot=(hd1,0)” and change (hd1,0) to (hd0,0) - Don’t delete the # at te beginning of this line!
  9. Once you did this, you can optionally remove the remaining of the file
    (everything underneath ### END DEBIAN AUTOMATIC KERNELS LIST);
  10. Save the file, make sure it is owned by root:ubuntu (chgrp ubuntu menu.* will do)
  11. Edit device.map (in the same directory) and change the mapping of hd0 to /dev/sdb.
  12. Reboot your machine, from USB, choose the Ubuntu installation from the Boot Loader and you are one happy person.

I guess that is it. If I missed something, please comment.

Regards,

If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!

Linux 技巧:让进程在后台可靠运行的几种方法

2008 年 5 月 29 日

想让进程在断开连接后依然保持运行?如果该进程已经开始运行了该如何补救? 如果有大量这类需求如何简化操作?

我 们经常会碰到这样的问题,用 telnet/ssh 登录了远程的 Linux 服务器,运行了一些耗时较长的任务, 结果却由于网络的不稳定导致任务中途失败。如何让命令提交后不受本地关闭终端窗口/网络断开连接的干扰呢?下面举了一些例子, 您可以针对不同的场景选择不同的方式来处理这个问题。

nohup/setsid/&

场景:

如果只是临时有一个命令需要长时间运行,什么方法能最简便的保证它在后台稳定运行呢?

hangup 名称的来由
在 Unix 的早期版本中,每个终端都会通过 modem 和系统通讯。当用户 logout 时,modem 就会挂断(hang up)电话。 同理,当 modem 断开连接时,就会给终端发送 hangup 信号来通知其关闭所有子进程。

解决方法:

我们知道,当用户注销(logout)或者网络断开时,终端会收到 HUP(hangup)信号从而关闭其所有子进程。因此,我们的解决办法就有两种途径:要么让进程忽略 HUP 信号,要么让进程运行在新的会话里从而成为不属于此终端的子进程。

1. nohup

nohup 无疑是我们首先想到的办法。顾名思义,nohup 的用途就是让提交的命令忽略 hangup 信号。让我们先来看一下 nohup 的帮助信息:

NOHUP(1)                        User Commands                        NOHUP(1)

NAME
nohup - run a command immune to hangups, with output to a non-tty

SYNOPSIS
nohup COMMAND [ARG]...
nohup OPTION

DESCRIPTION
Run COMMAND, ignoring hangup signals.

--help display this help and exit

--version
output version information and exit

可见,nohup 的使用是十分方便的,只需在要处理的命令前加上 nohup 即可,标准输出和标准错误缺省会被重定向到 nohup.out 文件中。一般我们可在结尾加上"&"来将命令同时放入后台运行,也可用">filename 2>&1"来更改缺省的重定向文件名。


nohup 示例
               
[root@pvcent107 ~]# nohup ping www.ibm.com &
[1] 3059
nohup: appending output to `nohup.out'
[root@pvcent107 ~]# ps -ef |grep 3059
root 3059 984 0 21:06 pts/3 00:00:00 ping www.ibm.com
root 3067 984 0 21:06 pts/3 00:00:00 grep 3059
[root@pvcent107 ~]#

2。setsid

nohup 无疑能通过忽略 HUP 信号来使我们的进程避免中途被中断,但如果我们换个角度思考,如果我们的进程不属于接受 HUP 信号的终端的子进程,那么自然也就不会受到 HUP 信号的影响了。setsid 就能帮助我们做到这一点。让我们先来看一下 setsid 的帮助信息:

SETSID(8)                 Linux Programmer’s Manual                 SETSID(8)

NAME
setsid - run a program in a new session

SYNOPSIS
setsid program [ arg ... ]

DESCRIPTION
setsid runs a program in a new session.

可见 setsid 的使用也是非常方便的,也只需在要处理的命令前加上 setsid 即可。


setsid 示例
               
[root@pvcent107 ~]# setsid ping www.ibm.com
[root@pvcent107 ~]# ps -ef |grep www.ibm.com
root 31094 1 0 07:28 ? 00:00:00 ping www.ibm.com
root 31102 29217 0 07:29 pts/4 00:00:00 grep www.ibm.com
[root@pvcent107 ~]#

值得注意的是,上例中我们的进程 ID(PID)为31094,而它的父 ID(PPID)为1(即为 init 进程 ID),并不是当前终端的进程 ID。请将此例与nohup 例中的父 ID 做比较。

3。&

这里还有一个关于 subshell 的小技巧。我们知道,将一个或多个命名包含在“()”中就能让这些命令在子 shell 中运行中,从而扩展出很多有趣的功能,我们现在要讨论的就是其中之一。

当我们将"&"也放入“()”内之后,我们就会发现所提交的作业并不在作业列表中,也就是说,是无法通过jobs来查看的。让我们来看看为什么这样就能躲过 HUP 信号的影响吧。


subshell 示例
               
[root@pvcent107 ~]# (ping www.ibm.com &)
[root@pvcent107 ~]# ps -ef |grep www.ibm.com
root 16270 1 0 14:13 pts/4 00:00:00 ping www.ibm.com
root 16278 15362 0 14:13 pts/4 00:00:00 grep www.ibm.com
[root@pvcent107 ~]#

从上例中可以看出,新提交的进程的父 ID(PPID)为1(init 进程的 PID),并不是当前终端的进程 ID。因此并不属于当前终端的子进程,从而也就不会受到当前终端的 HUP 信号的影响了。





回页首


disown

场景:

我们已经知道,如果事先在命令前加上 nohup 或者 setsid 就可以避免 HUP 信号的影响。但是如果我们未加任何处理就已经提交了命令,该如何补救才能让它避免 HUP 信号的影响呢?

解决方法:

这时想加 nohup 或者 setsid 已经为时已晚,只能通过作业调度和 disown 来解决这个问题了。让我们来看一下 disown 的帮助信息:

disown [-ar] [-h] [jobspec ...]
Without options, each jobspec is removed from the table of
active jobs. If the -h option is given, each jobspec is not
removed from the table, but is marked so that SIGHUP is not
sent to the job if the shell receives a SIGHUP. If no jobspec
is present, and neither the -a nor the -r option is supplied,
the current job is used. If no jobspec is supplied, the -a
option means to remove or mark all jobs; the -r option without
a jobspec argument restricts operation to running jobs. The
return value is 0 unless a jobspec does not specify a valid
job.

可以看出,我们可以用如下方式来达成我们的目的。

灵活运用 CTRL-z
在 我们的日常工作中,我们可以用 CTRL-z 来将当前进程挂起到后台暂停运行,执行一些别的操作,然后再用 fg 来将挂起的进程重新放回前台(也可用 bg 来将挂起的进程放在后台)继续运行。这样我们就可以在一个终端内灵活切换运行多个任务,这一点在调试代码时尤为有用。因为将代码编辑器挂起到后台再重新放 回时,光标定位仍然停留在上次挂起时的位置,避免了重新定位的麻烦。
  • disown -h jobspec 来使某个作业忽略HUP信号。
  • disown -ah 来使所有的作业都忽略HUP信号。
  • disown -rh 来使正在运行的作业忽略HUP信号。

需要注意的是,当使用过 disown 之后,会将把目标作业从作业列表中移除,我们将不能再使用jobs来查看它,但是依然能够用ps -ef查找到它。

但是还有一个问题,这种方法的操作对象是作业,如果我们在运行命令时在结尾加了"&"来使它成为一个作业并在后台运行,那么就万事大吉了,我们可以通过jobs命令来得到所有作业的列表。但是如果并没有把当前命令作为作业来运行,如何才能得到它的作业号呢?答案就是用 CTRL-z(按住Ctrl键的同时按住z键)了!

CTRL-z 的用途就是将当前进程挂起(Suspend),然后我们就可以用jobs命令来查询它的作业号,再用bg jobspec 来将它放入后台并继续运行。需要注意的是,如果挂起会影响当前进程的运行结果,请慎用此方法。


disown 示例1(如果提交命令时已经用“&”将命令放入后台运行,则可以直接使用“disown”)
               
[root@pvcent107 build]# cp -r testLargeFile largeFile &
[1] 4825
[root@pvcent107 build]# jobs
[1]+ Running cp -i -r testLargeFile largeFile &
[root@pvcent107 build]# disown -h %1
[root@pvcent107 build]# ps -ef |grep largeFile
root 4825 968 1 09:46 pts/4 00:00:00 cp -i -r testLargeFile largeFile
root 4853 968 0 09:46 pts/4 00:00:00 grep largeFile
[root@pvcent107 build]# logout


disown 示例2(如果提交命令时未使用“&”将命令放入后台运行,可使用 CTRL-z 和“bg”将其放入后台,再使用“disown”)
               
[root@pvcent107 build]# cp -r testLargeFile largeFile2

[1]+ Stopped cp -i -r testLargeFile largeFile2
[root@pvcent107 build]# bg %1
[1]+ cp -i -r testLargeFile largeFile2 &
[root@pvcent107 build]# jobs
[1]+ Running cp -i -r testLargeFile largeFile2 &
[root@pvcent107 build]# disown -h %1
[root@pvcent107 build]# ps -ef |grep largeFile2
root 5790 5577 1 10:04 pts/3 00:00:00 cp -i -r testLargeFile largeFile2
root 5824 5577 0 10:05 pts/3 00:00:00 grep largeFile2
[root@pvcent107 build]#





回页首


screen

场景:

我们已经知道了如何让进程免受 HUP 信号的影响,但是如果有大量这种命令需要在稳定的后台里运行,如何避免对每条命令都做这样的操作呢?

解决方法:

此 时最方便的方法就是 screen 了。简单的说,screen 提供了 ANSI/VT100 的终端模拟器,使它能够在一个真实终端下运行多个全屏的伪终端。screen 的参数很多,具有很强大的功能,我们在此仅介绍其常用功能以及简要分析一下为什么使用 screen 能够避免 HUP 信号的影响。我们先看一下 screen 的帮助信息:

SCREEN(1)                                                           SCREEN(1)

NAME
screen - screen manager with VT100/ANSI terminal emulation

SYNOPSIS
screen [ -options ] [ cmd [ args ] ]
screen -r [[pid.]tty[.host]]
screen -r sessionowner/[[pid.]tty[.host]]

DESCRIPTION
Screen is a full-screen window manager that multiplexes a physical
terminal between several processes (typically interactive shells).
Each virtual terminal provides the functions of a DEC VT100 terminal
and, in addition, several control functions from the ISO 6429 (ECMA
48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and
support for multiple character sets). There is a scrollback history
buffer for each virtual terminal and a copy-and-paste mechanism that
allows moving text regions between windows.

使用 screen 很方便,有以下几个常用选项:

  • screen -dmS session name 来建立一个处于断开模式下的会话(并指定其会话名)。
  • screen -list 来列出所有会话。
  • screen -r session name 来重新连接指定会话。
  • 用快捷键CTRL-a d 来暂时断开当前会话。

screen 示例
               
[root@pvcent107 ~]# screen -dmS Urumchi
[root@pvcent107 ~]# screen -list
There is a screen on:
12842.Urumchi (Detached)
1 Socket in /tmp/screens/S-root.

[root@pvcent107 ~]# screen -r Urumchi

当我们用“-r”连接到 screen 会话后,我们就可以在这个伪终端里面为所欲为,再也不用担心 HUP 信号会对我们的进程造成影响,也不用给每个命令前都加上“nohup”或者“setsid”了。这是为什么呢?让我来看一下下面两个例子吧。


1. 未使用 screen 时新进程的进程树
               
[root@pvcent107 ~]# ping www.google.com &
[1] 9499
[root@pvcent107 ~]# pstree -H 9499
init─┬─Xvnc
├─acpid
├─atd
├─2*[sendmail]
├─sshd─┬─sshd───bash───pstree
└─sshd───bash───ping

我们可以看出,未使用 screen 时我们所处的 bash 是 sshd 的子进程,当 ssh 断开连接时,HUP 信号自然会影响到它下面的所有子进程(包括我们新建立的 ping 进程)。


2. 使用了 screen 后新进程的进程树
               
[root@pvcent107 ~]# screen -r Urumchi
[root@pvcent107 ~]# ping www.ibm.com &
[1] 9488
[root@pvcent107 ~]# pstree -H 9488
init─┬─Xvnc
├─acpid
├─atd
├─screen───bash───ping
├─2*[sendmail]

而使用了 screen 后就不同了,此时 bash 是 screen 的子进程,而 screen 是 init(PID为1)的子进程。那么当 ssh 断开连接时,HUP 信号自然不会影响到 screen 下面的子进程了。

2008年5月28日星期三

10个最佳的Linux音频播放器

1- Rhythmbox:

Rhythmbox是一个伟大的linux版本的音乐播放器. 它可以容易的帮你组织音乐内容,并且是免费的. 它的灵感来自于苹果的iTunes,它使用GStreamer多媒体库开发,在GNOME桌面环境中执行结果和效果者让人感到惊艳.



Rythmbox功能特点:

* 易于使用的音乐浏览器
* 搜索和排序
* 通过使用GStreamer而支持全部音频文件格式
* 互联网电台的支持,包括last.fm流媒体
* 支持播放列表
* 显示播放可视化效果
* 轻松在ipod,USB大容量存储音乐播放器,MTP中传输数据
* 显示专辑封面和从互联网下载歌词
* 播放,提取或烧录音频CD
* 自动下载音频播客
* 从Magnatune和Jamendo音乐商店浏览,下载相册

Rythmbox官方网站
下载Rythmbox

2- GMPC (Gnome音乐播放器客户端):GMPC 是一个很好的前端音乐播放器守护程序. 它快速并且易于使用,同时它还优于mpd的所有功能(mpd?).

功能特点:

* 元数据支持,它可以显示艺术家的形象,专辑封面,歌词等.
* 支持插件.
* 快速, gmpc作了大量优化工作,可以很完美的运行在速度很慢的机器和连接速度慢的网络中.
* 支持配置文件,轻松使用多个mpd.

下载 屏幕截图 官方网站

3- XMMS (X多媒体系统):

XMMS (X多媒体系统) 是一个伟大的多媒体播放器,几乎可以运行于所有的系统,但在linux下却有一些特殊的地方. XMMS可以播放的多媒体文件有MP3, MOD, WAV 和其它的一些输入插件. 它是一个运行在许多类UNIX系统上的有点类似Winamp但又小于它的免费音频播放器.

下载 官方网站


4- Amarok:

Amarok 是linux和unix上另一个伟大的音乐播放器. Amarok的界面非常直观. 它是免费的自由软件. 现在, Amarok是linux上最受欢迎的音频播放器.

下载 官方网站

5- Quod Libet

Quod Libet是一个使用GTK+界面库开发的播放器, 它的主要功能特点是音乐库管理. 不同于其它的以分类, 流派,艺术家和专辑方式管理, 代之是你可以搜索然后显示它. Quod Libet 在大型音乐库管理这一点上要远胜于其它linux上的播放器.

下载 官方网站

6- Audacious:Audacious 是linux或其它基于linux系统上的免费播放器. 支持它自己的大部分是自己的一些功能插件,包括所有的解码器. 大多数系统上,默认是安装一个很有用的一个插件集, 让你有能力播放mp3,ogg,和FLAC等格式文件.

功能特点 下载 官方网站

7- Exaile:

Exaile 是一个免费的自由软件,它可以运行于所以类unix操作系统中,它是目标是要小于KDE下的Amarok,所以它使用的是GTK+不是QT.

功能特点包括:

* 自动提取专辑封面
* 处理大型的音乐库
* 提取歌词
* 通过Wikipedia返回艺术家和专辑的信息
* 双向支持last.fm (both scrobbling of played songs and retrieving related songs from the last.fm server)
* 可选的ipod运行(需要python-gpod)
* 可选的MTP(需要libmtp和pymtp)
* 可选的 iTunes DAAP 音乐分享支持
* 构建于shoutcast文件浏览器
* 多选项卡式的播放列表
* 从音乐库中列出黑名单

下载 官方网站

8- Banshee:‭

Banshee一个在GNU/Linux上使用Helix和GStreamer多媒体平台库来执行播放,编码,和解码Ogg,MP3和其它的格式的自由免费的音乐播放器. 你可以播放和导入CD, 轻松的与你的ipod同步分享或播放它.‭ Banshee同样也可将播放列表报告发布到last.fm的播放列表中.‭ 还有其它的一些很酷功能如:它可以提取CD,支持播客, 漂亮整洁的播放列表, 音乐推荐, 烧录音频,MP3,CD等等!

下载 官方网站

9- BMP (Beep Media Player)

BMP 也就是蜂鸣媒体播放器. BMP 一个基于xmms的免费音乐播放器(上述). 它看来很像Winamp,也支持它的外观主题,包括xmms的. BMP 支持所以xmms能支持的格式, 主要差别在于两个播放器之间使用的插件.

下载 官方网站

10- Sonata:

Sonata另一优雅的基于GTK + MPD前端音乐播放器 (MPD:音乐播放器守护进程). 它是自由的软件具有以下功能特征:

*可收缩展开的显示界面
* 自动同步远程与本地专辑的封面
* 用户可自定义显示栏
* 自动提取歌词
* 播放列表和流媒体支持
* 支持编辑歌曲标签
* 弹出通知
* 媒体库和播放列表搜索
* Audioscrobbler (last.fm) 支持
* 多MPD配置
* 键盘友好
* 支持多媒体键
* 命令行控制

2008年5月13日星期二

Howto Install Truecrypt with GUI tool in Ubuntu Gutsy

TrueCrypt is a software system for establishing and maintaining an on-the-fly-encrypted volume (data storage device). On-the-fly encryption means that data are automatically encrypted or decrypted right before they are loaded or saved, without any user intervention. No data stored on an encrypted volume can be read (decrypted) without using the correct password/keyfile(s) or correct encryption keys. Entire file system is encrypted (e.g.., file names, folder names, contents of every file, free space, meta data, etc).

Files can be copied to and from a mounted TrueCrypt volume just like they are copied to/from any normal disk (for example, by simple drag-and-drop operations). Files are automatically being decrypted on-the-fly (in memory/RAM) while they are being read or copied from an encrypted TrueCrypt volume. Similarly, files that are being written or copied to the TrueCrypt volume are automatically being encrypted on-the-fly (right before they are written to the disk) in RAM. Note that this does not mean that the whole file that is to be encrypted/decrypted must be stored in RAM before it can be encrypted/decrypted. There are no extra memory (RAM) requirements for TrueCrypt.

Preparing your System

sudo aptitude install sun-java6-jre python-pexpect build-essential

Now you need to download the truecrypt .deb package from here for your ubuntu version.

Now you should be having truecrypt-4.3a-ubuntu-7.10-x86.tar.gz file extract this using the following command

sudo tar xzvf truecrypt-4.3a-ubuntu-7.10-x86.tar.gz

Now you have truecrypt-4.3a folder

Go into the folder and install .deb package

sudo dpkg -i truecrypt_4.3a-0_i386.deb

Now you should be able to see the following error

Selecting previously deselected package truecrypt.
(Reading database … 133570 files and directories currently installed.)
Unpacking truecrypt (from truecrypt_4.3a-0_i386.deb) …
dpkg: dependency problems prevent configuration of truecrypt:
truecrypt depends on dmsetup; however:
Package dmsetup is not installed.
dpkg: error processing truecrypt (–install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
truecrypt

To fix the above error run the following command

sudo apt-get -f install

This will complete the TrueCrypt installation.

tcgui - TrueCrypt GUI

These functions are integrated already:

Mount/Unmount TrueCrypt volumes
Create volumes easily with the wizard
Change volume password easily
Backup / Restore volume headers
Manage your favourites
Mount several volumes with one click

The tcgui looks similar to the windows GUI for truecrypt

You need to download tcgui from here

now you have tcgui.0.4.tar.gz file extract using the following command

sudo tar xzvf tcgui.0.4.tar.gz

Now you have tcgui-0.4 go in to this folder run the following command

cd tcgui-0.4

sudo bash install.sh $USER

Note:- simply copy & paste the above command

Using tcgui

If you want to open goto Applications—>Accessories—>TrueCrypt GUI

Click on “Yes” if you agree with the warranty agreement.

Once it opens you should be able to see similar to the following screen

Uninstall tcgui

If you want to Uninstall the TrueCrypt GUI open a terminal and enter the following command

sudo bash /usr/share/tcgui/uninstall.sh

Note: The group “truecrypt” will not be deleted and the changes in the sudo configuration will not be restored.

Howto Install TOR,Privoxy and Tor GUI Programs (Vidalia,Tork and Torbutton)in Ubuntu

Tor is a software project that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location.

Tor works with many of your existing applications, including web browsers, instant messaging clients, remote login, and other applications based on the TCP protocol.

Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying
web page data, managing HTTP cookies, controlling access, and removing ads, banners, pop-ups and other
obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual
needs and tastes. Privoxy has application for both stand-alone systems and multi-user networks.

Install Tor and privoxy in Ubuntu

sudo aptitude install tor privoxy

This will complete the installation.

GUI Tools Available for Tor

Currently we have the following TOR GUI Applications

Vidalia

Vidalia is a cross-platform controller GUI for the Tor software, built using the Qt framework. Using Vidalia, you can start and stop the Tor software, view its status at a glance, and monitor bandwidth usage. Vidalia also makes it easy to contribute to the Tor network by helping you set up and manage your own relay.

Torbutton

Torbutton is a 1-click way for Firefox users to enable or disable the browser’s use of Tor. It adds a panel to the statusbar that says “Tor Enabled” (in green) or “Tor Disabled” (in red). The user may click on the panel to toggle the status. If the user (or some other extension) changes the proxy settings, the change is automatically reflected in the statusbar.

Some users may prefer a toolbar button instead of a statusbar panel. Such a button is included, and one adds it to the toolbar by right-clicking on the desired toolbar, selecting “Customize…”, and then dragging the Torbutton icon onto the toolbar. There is an option in the preferences to hide the statusbar panel (Tools->Extensions, select Torbutton, and click on Preferences).

Newer Firefoxes have the ability to send DNS resolves through the socks proxy, and Torbutton will make use of this feature if it is available in your version of Firefox.

TorK

TorK is a powerful anonymity manager for the KDE Desktop on Linux and Unix systems. It first helps you
to install, configure and use Tor. It then reduces the task of anonymizing most applications to a single-click, including Firefox, Opera, Konqueror, Pidgin, Kopete, SSH, and IRC. For advanced users TorK

provides detailed network information, and more, in an accessible manner.
If you wish to run TorK locally, please install the tor and privoxy packages.

Features include:

* Browse anonymously on Konqueror/Firefox/Opera.
* Send anonymous email via the MixMinion network.
* Use Internet Messaging and IRC anonymously.
* Create and manage hidden services.

Install Vidalia in Ubuntu Gutsy and Hardy

You need to edit the /etc/apt/sources.list file using the following command or Go to System->Preferences->Software Sources and enter these repositories into 3rd Party Repositories and click
on reload.

sudo gedit /etc/apt/sources.list

add the following lines

For Hardy Users

deb http://ppa.launchpad.net/adnarim/ubuntu hardy main
deb-src http://ppa.launchpad.net/adnarim/ubuntu hardy main

For Gutsy Users

deb http://ppa.launchpad.net/adnarim/ubuntu gutsy main
deb-src http://ppa.launchpad.net/adnarim/ubuntu gutsy main

Save and exit the file

Now you need to update the source list using the following command

sudo aptitude update

Install Vidalia using the following command

sudo aptitude install vidalia

this will complete the installation.

Now you need to open Vidalia Go to Applications—>Internet—>Vidalia

After opening you should be able see similar to the following screen.If you want to change the settings click on settings in the following screen

If you want to see Network Map click on View the Network on the above Screen

Tor Bandwidth usage

If Tor is working you can see similar to the following icon marked in Red in your notification area

If you want to configure firefox for browsing check this

Install TorK in Ubuntu

If you want to install TorK use the following command

sudo aptitude install tork

Install Torbutton in Ubuntu

Download Torbutton from here and install for your firefox

2008年5月11日星期日

Unison:文件同步工具

用过Windows的朋友一定知道“公文包”,它是用来帮助实现文件同步的组件。那么Linux下有没有相关工具呢?

当然有。它就是Unison,而且它的应用范围比“公文包”还广。

—-

Unison是一款跨平台的文件同步工具,不仅支持本地对本地同步,也支持通过SSH、RSH和Socket等网络协议进行同步。更棒的是,Unison支持双向同步操作,你既可以从A同步到B,也可以从B同步到A,这些都不需要额外的设定。

Unison与一般的Linux软件一样,都是有一个核心的命令行组成。那些命令可能会令上手比较困难。不过幸运的是,Unison有基于GTK+的图形版本,如果你是Ubuntu的用户,就直接输入以下命令安装:

sudo apt-get install unison-gtk

安装完后,应该会在“应用程序”->“互联网”中出现。如果没有的话,就在终端下输入unison-gtk或按(Alt+F2)输入unison启动它。

首次启动时,会让你选择根目录和目标目录。因为Unison运行时至少有一个Profile,所以你必须指定。Unison的多案例支持可以让你通过统一的界面来管理多个同步。

图形界面一目了然,有Right to Left和Left to Right,即双向同步,还有Merge、Diff等文件合并或比较的操作。

相信有点经验的朋友都能很熟练的使用这款软件。

mplayer不能在线下载歌词问题

lmplayer不能在线下载歌词问题 - [好记性不如烂笔头]

修改/home/jason/.lmplayer/lmplayer.cfg 文件,正确设置歌词下载后的存放目录

[library]
path=/home/jason/音乐;

[playlist]
background_color=185141759
text_color=980031999
current_text_color=434314751

[lyric]
background_color=185141759
text_color=709563391
current_text_color=434314751
path=/home/jason/音乐/lyric

[other]
last_path=/home/jason/音乐/无印良品×2(1997)

[ui]
ui_No=0

2008年5月8日星期四

Dict.CN 海词 for Linux客户端 - [ubuntu备案文档]

deb包下载:dict.cn_20080427-1.4_i386.deb

支持发音,但是有时候会崩溃,在的ubuntu8.04上不是很稳定。

或者用add to search bar 将http://dict.cn/添加到firefox搜索框,这样查单词也很方便。

Linux音乐播放器支持lrc歌词同步显示 - [ubuntu备案文档]

项目主页:http://www.lmplayer.org/

deb包下载:http://surfnet.dl.sourceforge.net/sourceforge/linuxmediaplay/lmplayer_0.5.0-1_i386.deb

2008年5月7日星期三

看不懂哦

2008年5月6日星期二

Diffuse: 文件比较及合并工具

有时,我们需要对一个文件的不同版本进行比较,以了解其差异。这时候专门的文件比较工具就派上用场了。今天我们介绍的 Diffuse 就是这样一个用来对文本文件进行比较和合并的专业工具。

Diffuse
Diffuse 截图

Diffuse 的特色

当前,Diffuse 具有如下特色:

  • 可视化比较,非常直观。
  • 支持两相比较和三相比较。这就是说,使用 Diffuse 你可以同时比较两个或三个文本文件。
  • 支持常见的版本控制工具,包括 CVS、subversion、git、mercurial 等。你可以通过 Diffuse 直接从版本控制系统获取源代码,以便对其进行比较和合并。
  • 支持像 C++、Python、Java、XML 等语言的语法高亮显示。
  • 能够直接在 Diffuse 中编辑文件。
  • 支持 UTF-8 编码。
  • 可以使用快捷键轻松导航。

Diffuse 最新版本为 0.2.11,需要 Python 和 PyGTK。你可以从这里下载它。

其他替代软件

在 Linux 下,已经有一些文件比较工具,比如我们曾经提到的命令行的 ColorDiff、图形化的 MeldBeeDiff、适合 KDE 环境的 KDiff3Kompare 等等。你可以根据自己的需要来进行选择。

P.S. 因为明天我将远行,所以最近恐无法及时更新,望各位读者见谅。

2008年5月4日星期日

Bash 的 insert-completions 功能

要说 Bash 中的语法功能,大家最熟悉的估计就是 “*” 了,可以自动替换成当前目录下的所有文件。

比如一个目录下有很多文本文件,你想把他们合并,那么只要:

$ cat * > all.txt

就可以了。

不过,有的时候,想要去掉其中的一个文件怎么办呢?这就要用到 Bash 的 insert-completions 功能呢。

所谓 insert-completions,就是把 “*” 的自动替换结果,插入到命令中来,你只要按下:

Alt + *

所有的文件名就会出现在命令行中了:

$ cat a.txt b.txt c.txt e.txt f.txt g.txt

然后按需要删除或者添加即可~

觉得修改文件名麻烦? 那就要好好学习一下 Bash 中快速编辑命令的快捷键,你也可以参考一下这篇文章

2008年4月28日星期一

解決文件名mp3標簽和文本文件內容的亂碼問題解決文件名mp3標簽和文本文件內容的亂碼問題

從windows轉移到ubuntu的用戶,常常會發現自己在windows在創建/下載/保存的文件經常性出現亂碼問題(kubuntu出現問題 的可能性更高一些)。而使用預設播放器打開以往的音樂文件(mp3等)時,出現亂碼的機會更是接近100%。出現這個問題是因為文件或是文件標簽編碼並不 是系統預設的UTF8,而windows系統預設使用的是GBK。只要將文件編碼做一下轉換就解決亂碼的問題。

這些問題的解決方案在ubuntu使用技巧中已被收錄。

  • 需要用到的工具
 sudo apt-get install convmv iconv python-mutagen

要轉換文件編碼請先進入要轉換文件的目錄

  • 轉換文件名由GBK為UTF8
 convmv -r -f cp936 -t utf8 --notest --nosmart *
  • 轉換文件內容由GBK到UTF8
 iconv -f gbk -t utf8 $i > newfile
  • 轉換 mp3 標簽編碼
 find . -iname “*.mp3” -execdir mid3iconv -e GBK {} \;

註意:保證自己對需轉換文件有寫許可權

Audio-convert-mod: 3 步搞定 Linux 下的音频转换

如果你需要在 Linux 下进行音频格式转换,那么 Audio-convert-mod 是一个值得一用的工具。Audio-convert-mod 简单易用,转换音频格式文件只需三步即可搞定。另外,使用 Audio-convert-mod 可执行批量转换。目前,Audio-convert-mod 支持 MP3、OGG、FLAC、WAV、AAC/MP4/M4A、MAC/Monkey’s Audio/APE、MPC (Musepack)、WV (wavpack) 等音频格式的编码和解码。

Audio-convert-mod 的当前版本为 3.45.2,提供有源码包和 RPM 包。安装 Audio-convert-mod 需要 gawk 和 file。此外,为了获得上述音频格式的编码/解码支持,需要安装一些常用的编码/解码器,比如:lame 用于 MP3 转换、vorbis-tools 用于 OGG 转换、flac 用于 FLAC 转换、mac 用于 APE 转换等等。

在启动 Audio-convert-mod 后,通过点击 File → Show Features 菜单可以查看 Audio-convert-mod 所支持的音频格式是否可用。如果显示为绿色则表示支持;若为红色则表示不支持,需要安装相应的编码/解码器。

audio-convert-mod-features

Audio-convert-mod 使用过程

下面让我们来看一下 Audio-convert-mod 的基本使用步骤:

1、选择文件

audio-convert-mod

如上图所示,点击 Add 按钮来选择要转换的音频文件,或者点击 Add directory 来选择一个包含多个音频文件的目录。如果列表中包含不想转换的音频文件,随时可以点击 Remove 按钮来移除它。

2、转换设置

audio-convert-mod

在第二步,需要选择输出的音频格式及其比特率。另外,也可根据实际情况设置其他选项,如针对源文件、目标文件存在、元数据、输出文件夹设置相应选项。

3、开始转换

audio-convert-mod

当转换设置完成后,点击 Next 即开始音频格式的转换过程。

一些缺憾

我感觉 Audio-convert-mod 还存在一些缺憾,比如在转换 APE 时无法利用 CUE 文件执行分割操作,不过,我们可以使用 shntool 这个命令行工具来完成;另外,不能将转换设置保存为预置文件 (虽然有个保存为默认值的选项,但还是不够方便和灵活),因而也就无法作多次的重复调用。

2008年4月25日星期五

老婆,我冲动之下说出了那两个字,一说出来我就后悔了,我从来就没有想过和你分手,我不敢想象没有你,我的生活还有什么意义。
我会努力,很努力,让我们有个家,我们自己白头偕老的家。
生日快乐
写于四月26日1:47!

2008年4月23日星期三

List of Security Tools Available in Ubuntu

The Ubuntu repositories contain several useful tools for maintaining a secure network and network administration.This security tools include network scanning,attack detection,Virus Detection etc.

1) Wireshark - network traffic analyzer

Wireshark is a network traffic analyzer, or “sniffer”, for Unix and Unix-like operating systems. A sniffer is a tool used to capture packets off the wire. Wireshark decodes numerous protocols (too many to list).This package provides wireshark (the GTK+ version)

Install Wireshark in Ubuntu

sudo aptitude install wireshark

2) Nessus - Remote network security auditor

The Nessus® vulnerability scanner, is the world-leader in active scanners, featuring high speed discovery, configuration auditing, asset profiling, sensitive data discovery and vulnerability analysis of your security posture. Nessus scanners can be distributed throughout an entire enterprise, inside DMZs, and across physically separate networks.

Install nessus in ubuntu

sudo aptitude install nessus

3) Nmap - The Network Mapper

Nmap (”Network Mapper”) is a free and open source (license) utility for network exploration or security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. It was designed to rapidly scan large networks, but works fine against single hosts. Nmap runs on all major computer operating systems, and both console and graphical versions are available.

Install nmap ubuntu

sudo aptitude install nmap

If you want nmap frontend install the following package

sudo aptitude install zenmap

4) Etherape - graphical network monitor modeled after etherman

EtherApe is a graphical network monitor for Unix modeled after etherman. Featuring link layer, ip and TCP modes, it displays network activity graphically. Hosts and links change in size with traffic. Color coded protocols display.It supports Ethernet, FDDI, Token Ring, ISDN, PPP and SLIP devices. It can filter traffic to be shown, and can read traffic from a file as well as live from the network.

Install Etherape in ubuntu

sudo aptitude install etherape

5) Kismet - Wireless 802.11b monitoring tool

Kismet is an 802.11 layer2 wireless network detector, sniffer, and intrusion detection system. Kismet will work with any wireless card which supports raw monitoring (rfmon) mode, and can sniff 802.11b, 802.11a, and 802.11g traffic.

Kismet identifies networks by passively collecting packets and detecting standard named networks, detecting (and given time, decloaking) hidden networks, and infering the presence of nonbeaconing networks via data traffic.

Install Kismet in ubuntu

sudo aptitude install kismet

6) Chkrootkit - Checks for signs of rootkits on the local system

chkrootkit identifies whether the target computer is infected with a rootkit. Some of the rootkits that chkrootkit identifies are:

1. lrk3, lrk4, lrk5, lrk6 (and some variants);
2. Solaris rootkit;
3. FreeBSD rootkit;
4. t0rn (including latest variant);
5. Ambient’s Rootkit for Linux (ARK);
6. Ramen Worm;
7. rh[67]-shaper;
8. RSHA;
9. Romanian rootkit;
10. RK17;
11. Lion Worm;
12. Adore Worm.

Please note that this is not a definitive test, it does not ensure that the target has not been cracked. In addition to running chkrootkit, one should perform more specific tests.

Install chkrootkit in ubuntu

sudo aptitude install chkrootkit

7) Rkhunter - rootkit, backdoor, sniffer and exploit scanner

Rootkit Hunter scans systems for known and unknown rootkits, backdoors, sniffers and exploits.

It checks for:

- MD5 hash changes;
- files commonly created by rootkits;
- executables with anomalous file permissions;
- suspicious strings in kernel modules;
- hidden files in system directories;

and can optionally scan within files. Using rkhunter alone does not guarantee that a system is not compromised. Running additional tests, such as chkrootkit, is recommended.

Install rkhunter in ubuntu

sudo aptitude install rkhunter

8) tiger - Report system security vulnerabilities

TIGER, or the ‘tiger’ scripts, is a set of Bourne shell scripts, C programs and data files which are used to perform a security audit of UNIX systems. TIGER has one primary goal: report ways ‘root’ can be compromised.Debian’s TIGER incorporates new checks primarily oriented towards Debian distribution including: md5sums checks of installed files, location of files not belonging to packages, check of security advisories and analysis of local listening processes.

Install tiger in ubuntu

sudo aptitude install tiger

9) GnuPG - GNU privacy guard

GnuPG is GNU’s tool for secure communication and data storage. It can be used to encrypt data and to create digital signatures. It includes an advanced key management facility and is compliant with the proposed OpenPGP Internet standard as described in RFC2440.GnuPG does not use any patented algorithms so it cannot be compatible with PGP2 because it uses IDEA (which is patented worldwide).

Install gnupg in Ubuntu

sudo aptitude install gnupg

If you want gnupg GUI tool use this

Seahorse - A Gnome front end for GnuPG

Seahorse is a GNOME application for managing encryption keys. It also integrates with nautilus, gedit and other places for encryption operations.

Install seahorse in ubuntu

sudo aptitude install seahorse

10) Nemesis - TCP/IP Packet Injection Suite

Nemesis is a command-line network packet crafting and injection utility for UNIX-like and Windows systems. Nemesis, is well suited for testing Network Intrusion Detection Systems, firewalls, IP stacks and a variety of other tasks. As a command-line driven utility, Nemesis is perfect for automation and scripting.

Nemesis can natively craft and inject ARP, DNS, ETHERNET, ICMP, IGMP, IP, OSPF, RIP, TCP and UDP packets. Using the IP and the Ethernet injection modes, almost any custom packet can be crafted and injected.

Install nemesis in ubuntu

sudo aptitude install nemesis

11) Tcpdump - A powerful tool for network monitoring and data acquisition

This program allows you to dump the traffic on a network. tcpdump is able to examine IPv4, ICMPv4, IPv6, ICMPv6, UDP, TCP, SNMP, AFS BGP, RIP, PIM, DVMRP, IGMP, SMB, OSPF, NFS and many other packet types.
It can be used to print out the headers of packets on a network interface, filter packets that match a certain expression. You can use this tool to track down network problems, to detect “ping attacks” or to monitor network activities.

Install tcpdump in ubuntu

sudo aptitude install tcpdump

12) OpenSSH - secure shell server

This is the portable version of OpenSSH, a free implementation of the Secure Shell protocol as specified by the IETF secsh working group.Ssh (Secure Shell) is a program for logging into a remote machine and for executing commands on a remote machine. It provides secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel. It is intended as a replacement for rlogin, rsh and rcp, and can be used to provide applications with a secure communication channel.This package provides the sshd server.
In some countries it may be illegal to use any encryption at all without a special permit.

Install Openssh server in ubuntu

sudo aptitude install openssh-server

13) Denyhosts - an utility to help sys admins thwart ssh hackers

DenyHosts is a program that automatically blocks ssh brute-force attacks by adding entries to /etc/hosts.deny. It will also inform Linux administrators about offending hosts, attacked users and suspicious logins.Syncronization with a central server is possible too.
Differently from other software that do same work, denyhosts doesn’t need support for packet filtering or any other kind of firewall in your kernel

Install Denyhosts server in ubuntu

sudo aptitude install denyhosts

14) Snort - Flexible Network Intrusion Detection System

Snort is a libpcap-based packet sniffer/logger which can be used as a lightweight network intrusion detection system. It features rules based logging and can perform content searching/matching in addition to being used to detect a variety of other attacks and probes, such as buffer overflows, stealth port scans, CGI attacks, SMB probes, and much more. Snort has a real-time alerting capability, with alerts being sent to syslog, a separate “alert” file, or even to a Windows computer via Samba.
This package provides the plain-vanilla snort distribution and does not provide database (available in snort-pgsql and snort-mysql) support.

Install snort in ubuntu

sudo aptitude install snort

15) Firestarter - gtk program for managing and observing your firewall

Firestarter is a complete firewall tool for Linux machines. It features an easy to use firewall wizard to quickly create a firewall. Using the program you can then open and close ports with a few clicks, or stealth your machine giving access only to a select few. The real-time hit monitor shows attackers probing your machine.

Install firestarter in ubuntu

sudo aptitude install firestarter

16) clamav - anti-virus utility for Unix - command-line interface

Clam AntiVirus is an anti-virus toolkit for Unix. The main purpose of this software is the integration with mail servers (attachment scanning). The package provides a flexible and scalable multi-threaded daemon in the clamav-daemon package, a command-line scanner in the clamav package, and a tool for automatic updating via the Internet in the clamav-freshclam package. The programs are based on libclamav3, which can be used by other software.

This package contains the command line interface. Features:

- built-in support for various archive formats, including Zip, RAR, Tar,
Gzip, Bzip2, OLE2, Cabinet, CHM, BinHex, SIS and others;
- built-in support for almost all mail file formats;
- built-in support for ELF executables and Portable Executable files
compressed with UPX, FSG, Petite, NsPack, wwpack32, MEW, Upack and
obfuscated with SUE, Y0da Cryptor and others;
- built-in support for popular document formats including Microsoft
Office and Mac Office files, HTML, RTF and PDF.

For scanning to work, a virus database is needed. There are two options for getting it:

- clamav-freshclam: updates the database from Internet. This is
recommended with Internet access.
- clamav-data: for users without Internet access. The package is
not updated once installed. The clamav-getfiles package allows
creating custom packages from an Internet-connected computer.

Install Clamav in ubuntu

sudo aptitude install clamav

17) Ettercap - Multipurpose sniffer/interceptor/logger for switched LAN

Ettercap supports active and passive dissection of many protocols (even ciphered ones) and includes many feature for network and host analysis.Data injection in an established connection and filtering (substitute or drop a packet) on the fly is also possible, keeping the connection synchronized.

Many sniffing modes were implemented to give you a powerful and complete sniffing suite. It’s possible to sniff in four modes: IP Based, MAC Based, ARP Based (full-duplex) and PublicARP Based (half-duplex).
It has the ability to check whether you are in a switched LAN or not, and to use OS fingerprints (active or passive) to let you know the geometry of the LAN.

Install ettercap in ubuntu

sudo aptitude install ettercap

If you want to install ettercap GUI install following package

sudo aptitude install ettercap-gtk

18) Netcat - TCP/IP swiss army knife

A simple Unix utility which reads and writes data across network connections using TCP or UDP protocol. It is designed to be a reliable “back-end” tool that can be used directly or easily driven by other programs and scripts. At the same time it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities.

Install netcat in ubuntu

sudo aptitude install netcat

19) MTR - mtr combines the functionality of the ‘traceroute’ and ‘ping’ programs in a single network diagnostic tool.

As mtr starts, it investigates the network connection between the host mtr runs on and a user-specified destination host. After it determines the address of each network hop between the machines, it sends a sequence ICMP ECHO requests to each one to determine the quality of the link to each machine. As it does this, it prints running statistics about each machine.

Install mtr in ubuntu

Download .deb package from here

dpkg -i mtr_0.39-1.deb

20) Hping3 - Active Network Smashing Tool

hping3 is a network tool able to send custom ICMP/UDP/TCP packets and to display target replies like ping does with ICMP replies. It handles fragmentation and arbitrary packet body and size, and can be used to transfer files under supported protocols. Using hping3, you can test firewall rules, perform (spoofed) port scanning, test network performance using different protocols, do path MTU discovery, perform traceroute-like actions under different protocols, fingerprint remote operating systems, audit TCP/IP stacks, etc. hping3 is scriptable using the TCL language.

Install hping3 in ubuntu

sudo aptitude install hping3

21) ngrep - grep for network traffic

ngrep strives to provide most of GNU grep’s common features, applying them to the network layer. ngrep is a pcap-aware tool that will allow you to specify extended regular expressions to match against data payloads of packets. It currently recognizes TCP, UDP and ICMP across Ethernet, PPP, SLIP and null interfaces, and understands bpf filter logic in the same fashion as more common packet sniffing tools, such as tcpdump and snoop.

Install ngrep in ubuntu

sudo aptitude install ngrep

22) john - active password cracking tool

john, mostly known as John the Ripper, is a tool designed to help systems administrators to find weak (easy to guess or crack through brute force) passwords, and even automatically mail users warning them about it, if it is desired.
It can also be used with different cyphertext formats, including Unix’s DES and MD5, Kerberos AFS passwords, Windows’ LM hashes, BSDI’s extended DES, and OpenBSD’s Blowfish.

Install john in ubuntu

sudo aptitude install john

23) tcptrace - Tool for analyzing tcpdump output

Tcptrace is a tool for analyzing and reporting on tcpdump (or other libpcap) dump files. It can summarize the data or generate graph data for use with the gnuplot tool from the gnuplot package. Graph data can be created for throughput, RTT, time sequences, segment size, and cwin.

Install tcptrace in ubuntu

sudo aptitude install tcptrace

24) netdude - NETwork DUmp data Displayer and Editor for tcpdump trace files

It is a GUI-based tool that allows you to make detailed changes to packets in tcpdump trace files, in particular, it can currently do the following:

* Set the value of any field in IP, TCP and UDP packet headers.
* Copy, move and delete packets in the trace file.
* Fragment and reassemble IP packets.
* Netdude constantly communicates with a tcpdump process to update
the familiar tcpdump output that corresponds to the trace. This
also means that any changes made to your local version of tcpdump
are reflected in Netdude.
* Plugin architecture: people can easily add plugins for specific
tasks. The code comes with a plugin for checksum correction in IP,
TCP and UDP, and a dummy plugin.
* Through the plugin mechanism, Netdude provides a good facility for
writing tcpdump trace file filters.

Install netdude in ubuntu

sudo aptitude install netdude

25) tcpreplay - Tool to replay saved tcpdump files at arbitrary speeds

Tcpreplay is aimed at testing the performance of a NIDS by replaying real background network traffic in which to hide attacks. Tcpreplay allows you to control the speed at which the traffic is replayed, and can replay arbitrary tcpdump traces. Unlike programmatically-generated artificial traffic which doesn’t exercise the application/protocol inspection that a NIDS performs, and doesn’t reproduce the real-world anomalies that appear on production networks (asymmetric routes, traffic bursts/lulls, fragmentation, retransmissions, etc.), tcpreplay allows for exact replication of real traffic seen on real networks.

Install tcpreplay in ubuntu

sudo aptitude install tcpreplay

26) Dsniff - Various tools to sniff network traffic for cleartext insecurities

This package contains several tools to listen to and create network traffic:

* arpspoof - Send out unrequested (and possibly forged) arp replies.
* dnsspoof - forge replies to arbitrary DNS address / pointer queries
on the Local Area Network.
* dsniff - password sniffer for several protocols.
* filesnarf - saves selected files sniffed from NFS traffic.
* macof - flood the local network with random MAC addresses.
* mailsnarf - sniffs mail on the LAN and stores it in mbox format.
* msgsnarf - record selected messages from different Instant Messengers.
* sshmitm - SSH monkey-in-the-middle. proxies and sniffs SSH traffic.
* sshow - SSH traffic analyser.
* tcpkill - kills specified in-progress TCP connections.
* tcpnice - slow down specified TCP connections via “active”
traffic shaping.
* urlsnarf - output selected URLs sniffed from HTTP traffic in CLF.
* webmitm - HTTP / HTTPS monkey-in-the-middle. transparently proxies.
* webspy - sends URLs sniffed from a client to your local browser
(requires libx11-6 installed).

Install dsniff ubuntu

sudo aptitude install dsniff

27) scapy - Packet generator/sniffer and network scanner/discovery

Scapy is a powerful interactive packet manipulation tool, packet generator, network scanner, network discovery, packet sniffer, etc. It can for the moment replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, ….
In scapy you define a set of packets, then it sends them, receives answers, matches requests with answers and returns a list of packet couples (request, answer) and a list of unmatched packets. This has the big advantage over tools like nmap or hping that an answer is not reduced to (open/closed/filtered), but is the whole packet.

Install scapy in ubuntu

sudo aptitude install scapy

28) Ntop - display network usage in top-like format

ntop is a Network Top program. It displays a summary of network usage by machines on your network in a format reminiscent of the unix top utility.It can also be run in web mode, which allows the display to be browsed with a web browser.

Install ntop in ubuntu

sudo aptitude install ntop

29) NBTscan - A program for scanning networks for NetBIOS name information

NBTscan is a program for scanning IP networks for NetBIOS name information. It sends NetBIOS status query to each address in supplied range and lists received information in human readable form. For each responded host it lists IP address, NetBIOS computer name, logged-in user name and MAC address (such as Ethernet).

Install nbtscan in ubuntu

sudo aptitude install nbtscan

30) tripwire - file and directory integrity checker

Tripwire is a tool that aids system administrators and users in monitoring a designated set of files for any changes. Used with system files on a regular (e.g., daily) basis, Tripwire can notify system administrators of corrupted or tampered files, so damage control measures can be taken in a timely manner.

Install tripwire ubuntu

sudo aptitude install tripwire

Tags: , , , , , , , ,

Related Articles:

If you want to be notified the next time we write something please subscribe to our RSS feed.Thanks for Visiting!