eclipse设置自动换行

哥虽然写代码不多,但是是个eclipse控,于是发现 Eclipse 使用系统内置的“ Text Editor ”做为文本编辑器,这个文本编辑器有一个问题,就是文本无法换行。特别是注释特别长时,你就知道麻烦了。

终于发现出了一个扩展插件 WordWrap ,这个插件非常小,但是安装这个插件以后就可以轻松实现文本编辑器的自动换行功能了。 谢谢这个作者哦!

安装方法:
使用Eclipse 的自动升级功能,菜单栏选【 Help 】→【 install new Software】
点解Add按钮,在“ Name ”中填入“ wordwrap ”,“ URL ”中填入“ http://ahtik.com/eclipse-update”

然后按照提示进行安装完成就可以了
装完后在代码编辑界面点右键,会出现“Word Warp ”属性,将这个属性选上就可以实现自动换行了!

参考
http://blog.csdn.net/wanghuan203/article/details/6995386

用Thunderbird邮件客户端发送邮件时,进行到“将邮件拷贝到sent mail folder时”就卡住

Q:
用Thunderbird邮件客户端发送邮件时,进行到“将邮件拷贝到sent mail folder时”就卡住,但实际上已经发出去了

A:
每次发送邮件后总显示正在复制消息到sent文件夹,解决办法
1.点左侧树状图中的帐号—再点“账户设置”
2.选择“副本和文件夹”
3.勾选“保留副本到:”。再点对应下方的“其他:”
4.在下拉框中选择自己的帐号即可看见“sent messages”
send

How to install virtualbox on kali

#os Linux evankali 4.7.0-kali1-amd64 #1 SMP Debian 4.7.8-1kali1 (2016-10-24) x86_64 GNU/Linux

echo 'deb http://download.virtualbox.org/virtualbox/debian stretch contrib
' >> /etc/apt/sources.list

# combine downloading and registering:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
#or
wget -c https://www.virtualbox.org/download/oracle_vbox_2016.asc
sudo apt-key add oracle_vbox_2016.asc
apt-get update
apt-get install virtualbox-5.1

https://www.virtualbox.org/wiki/Linux_Downloads

Xfce Terminal install from source

Xfce Terminal install from source

Install

If you want to install Terminal from source, you can either go through the steps of compiling and installing Terminal yourself, or use our popular installer. In either case, the following software is required on your computer in order to successfully compile and install Terminal:

D-BUS (0.23 or above)
VTE Terminal Widget (0.11.11 or above)
Xfce libraries (4.2.0)
Gtk+ Library (2.4.0 or above)
exo Library (0.3.0 or above), included with the installer
Also make sure that you install the header files for the packages listed above. If you are using a package system like RPM, these are usually found in the -devel variants of the packages.

Installing from source

It is highly recommended to install terminal into the same prefix as Xfce. Assuming you installed Xfce to /usr/local, you would perform the following steps to compile and install Terminal:

# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
# tar xzf Terminal-X.Y.Z.tar.gz
# cd Terminal-X.Y.Z
# ./configure –prefix=/usr/local
# make
# make install

If everything went ok, you can now start Terminal with the following command:

$ Terminal

http://www.os-cillation.de/en/open-source-projects/xfce-terminal/

How to install quodlibet on kali (debian)

Quod Libet

Gnome下的一款很简洁的音频播放器。插件比较齐全,而且有修改标签的插件,方便处理标签中文乱码的情况。另外,Quod Libet不像一些播放器那样,需要把所有的音乐都导入一个音乐库中,而是在软件的左侧有一个文件夹树,用户可以选择播放文件夹中的音乐,可以满足一些用户的需要。

kali
sudo apt-get install quodlibet

http://quodlibet.readthedocs.io/en/latest/downloads.html

tcpdump密码嗅探_tag

tcpdump密码嗅探

在ftp server 监听 网卡eth0 上的 21 端口
tcpdump -i eth0 -nn -X 'port 21'

在client login

然后回来就可以看到了

此处省略

0x0020: 5018 3908 846a 0000 3232 3020 2876 7346 P.9..j..220.(vsF
0x0030: 5450 6420 322e 322e 3229 0d0a TPd.2.2.2)..
11:58:48.817338 IP 192.168.1.45.50807 > 192.168.1.190.21: Flags [P.], seq 1:12, ack 21, win 64220, length 11

此处省略
11:58:48.817338 IP 192.168.1.45.50807 > 192.168.1.190.21: Flags [P.], seq 1:12, ack 21, win 64220, length 11
0x0000: 4500 0033 4bbd 4000 8006 2acc c0a8 012d E..3K.@…*….-
0x0010: c0a8 01be c677 0015 3f3d 8a16 8498 c78c …..w..?=……
0x0020: 5018 fadc ac0e 0000 5553 4552 2072 6f6f P…….USER.roo
0x0030: 740d 0a t..
11:58:48.817345 IP 192.168.1.190.21 > 192.168.1.45.50807: Flags [.], ack 12, win 14600, length 0
0x0000: 4500 0028 cefd 4000 4006 e796 c0a8 01be E..(..@.@…….
0x0010: c0a8 012d 0015 c677 8498 c78c 3f3d 8a21 …-…w….?=.!
0x0020: 5010 3908 1680 0000 P.9…..
11:58:48.817443 IP 192.168.1.190.21 > 192.168.1.45.50807: Flags [P.], seq 21:55, ack 12, win 14600, length 34
0x0000: 4500 004a cefe 4000 4006 e773 c0a8 01be E..J..@.@..s….
0x0010: c0a8 012d 0015 c677 8498 c78c 3f3d 8a21 …-…w….?=.!
0x0020: 5018 3908 8478 0000 3333 3120 506c 6561 P.9..x..331.Plea
0x0030: 7365 2073 7065 6369 6679 2074 6865 2070 se.specify.the.p
0x0040: 6173 7377 6f72 642e 0d0a assword…
11:58:48.817564 IP 192.168.1.45.50807 > 192.168.1.190.21: Flags [P.], seq 12:25, ack 55, win 64186, length 13
0x0000: 4500 0035 4bbe 4000 8006 2ac9 c0a8 012d E..5K.@…*….-
0x0010: c0a8 01be c677 0015 3f3d 8a21 8498 c7ae …..w..?=.!….
0x0020: 5018 faba ea5a 0000 5041 5353 2031 3233 P….Z..PASS.123
0x0030: 3435 360d 0a 456..

此处省略

可见 ftp软件为 vsftp ftp 用户是root 密码为123456

kali初始化

添加软件源:
因为系统默认只有kali官方的源,其他的常用软件源没有,所以我们要手动添加。
PS:kali linux 1.0是基于debian 7 wheezy的,所以我们只要添加wheezy的源即可。另外因为本人比较喜欢一些新的软件。所以也添加了sid源,所以软件都比较新呢 当然你也可以对应换成 163 mirrors 的,可能速度更加不错呢


#现在的源 用国内的比较快
#deb http://http.kali.org/kali kali-rolling main non-free contrib
#现在的国内官方mirrors
deb http://mirrors.neusoft.edu.cn/kali kali-rolling main non-free contrib

deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib


echo 'evan ALL=(ALL) NOPASSWD:NOPASSWD:ALL' >/etc/sudoers.d/evan

#安装 mate-desktop 同样是添加 debian wheezy源,然后添加key 和开始安装 好像失效了见本文最后面吧

apt-get install mate-archive-keyring -y
apt-get update
apt-get install mate-desktop-environment -y
apt-get install mate-desktop-environment-extra -y

apt-get install fcitx fcitx-table-wbpy libreoffice libreoffice-help-zh-cn rednotebook filezilla evince pidgin pcmanfm gedit sshpass exaile -y
iptux qq gimp thunderbird

https://jianguoyun.com/static/exe/installer/ubuntu/nautilus_nutstore_amd64.deb

#这样就可以远程图形连接 这样不用两台桌面老是切来切去的
sudo apt-get install xrdp -y
sudo service xrdp start
sudo apt-get install vnc4server tightvncserver

第一部分 输入法
vi /etc/apt/sources.list #添加源 ,确保有源 因为现在安装后只有一个 Security updates,但是在本本上安装的是源是完整的 好怪哦
apt-get update -y
sudo apt-get install fcitx fcitx-table-wbpy ttf-wqy-microhei ttf-wqy-zenhei
sudo apt-get install alarm-clock-applet

http://www.linuxidc.com/Linux/2013-07/86778.htm

xmonad
apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev xmobar xcompmgr nitrogen stalonetray moreutils synapse ssh-askpass-gnome

kali linux安装chrome

首先从google 的网站上下载deb文件
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
#下载后安装
dpkg -i google-chrome-stable_current_amd64.deb

apt-get install bzip2 gzip gcc g++ cpp make libxml2-dev openssl

#安装编译工具

sudo apt-get install build-essential autoconf automake cvs subversion
sudo apt-get install unrar p7zip-full cabextract

#desktop上使用的 icedove(thunderbird) gcalctool计算器 gnochm 好像源里面没有 network-manager-gnome(这个不太好用)

apt-get install keepass2 openbox openfetion exaile wget bzip2 unzip zip xfce4-terminal cairo-dock synaptic gmchess shutter unrar-free stardict pidgin supertux filezilla icedove icedove-l10n-zh-cn iceweasel iceweasel-l10n-zh-cn mysql-client gcalctool kdesvn rapidsvn wireshark pinta transmission homebank network-manager-gnome -y

## chmsee http://code.google.com/p/chmsee/ 下载 源码 or 二进制包 apt-get -f install 然后 dkpg 不太行

## pdf http://www.fuxinsoftware.com.cn/pdf/desklinux/downloads.html

#下面这个有些是服务器比较用到的

apt-get install openbox vim exaile wget bzip2 unzip zip nmap tree lynx fileutils ncftp lftp gnochm shutter unrar-free stardict pidgin supertux filezilla icedove vlc fcitx fcitx-table-wbpy

********************

How to install virtualbox on kali
#这种一般没有依赖问题呢
#os Linux evankali 4.7.0-kali1-amd64 #1 SMP Debian 4.7.8-1kali1 (2016-10-24) x86_64 GNU/Linux

echo 'deb http://download.virtualbox.org/virtualbox/debian stretch contrib
' >> /etc/apt/sources.list

# combine downloading and registering:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
#or
wget -c https://www.virtualbox.org/download/oracle_vbox_2016.asc
sudo apt-key add oracle_vbox_2016.asc

apt-get update
apt-get install virtualbox-5.1

https://www.virtualbox.org/wiki/Linux_Downloads

virtualbox
apt-get install virtualbox

先到官方下载 二进制包 建议这个方法
apt-get -f install
aptitude search linux-headers

debian 升级后virtualbox 启动不了


系统内核升级至最新,然后安装内核头文件:apt-get install linux-headers-$(uname -r)

##问题
ninstalling old VirtualBox DKMS kernel modules …done.
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 3.14-kali1-amd64 cannot be found at
/lib/modules/3.14-kali1-amd64/build or /lib/modules/3.14-kali1-amd64/source.
…failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules …failed!
(Look at /var/log/vbox-install.log to find out what went wrong)

cat /var/log/vbox-install.log
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again。 停止。

解决 过程
网上都说是 Install Kernel Headers Package 这个思路是没错的,不过网上留传的很多命令在kali 上不能能

evan@evankali:~/software$ aptitude search linux-headers
p linux-headers-3.18.0-kali1-all – All header files for Linux 3.18 (meta-package)
p linux-headers-3.18.0-kali1-all-amd64 – All header files for Linux 3.18 (meta-package)
i linux-headers-3.18.0-kali1-amd64 – Header files for Linux 3.18.0-kali1-amd64
i A linux-headers-3.18.0-kali1-common – Common header files for Linux 3.18.0-kali1
p linux-headers-3.18.0-kali3-all – All header files for Linux 3.18 (meta-package)
p linux-headers-3.18.0-kali3-all-amd64 – All header files for Linux 3.18 (meta-package)
i linux-headers-3.18.0-kali3-amd64 – Header files for Linux 3.18.0-kali3-amd64
i linux-headers-3.18.0-kali3-common – Common header files for Linux 3.18.0-kali3
i linux-headers-amd64 – Header files for Linux amd64 configuration (meta-package)

sudo apt-get install inux-headers-3.18.0-kali1-amd64

#这个好像有时要多执行几次
apt-get install virtualbox-dkms dkms -y
apt-get -f install

会连带安装如下Kernel Headers 而 apt-get install -y linux-headers-$(uname -r) 这个匹配出来的不对呢
linux-headers-3.18.0-kali3-amd64 #有点迷惑的是我在 install dkms 时好像有安装后来成功而用的 linux-headers-3.18.0-kali3-amd64 为什么昨天不行,原来是kali1 不是kali3的
linux-headers-3.18.0-kali3-common linux-headers-amd64
linux-kbuild-3.18 virtualbox virtualbox-dkms virtualbox-qt

http://superuser.com/questions/499059/unable-to-install-virtualbox-specify-kern-dir-directory-installing-vir

apt-get install virtualbox-dkms -y
apt-get install dkms -y
/etc/init.d/vboxdrv setup

Kernel Headers Installation
https://forums.kali.org/showthread.php?21494-Kernel-Headers-Installation

Kernel Headers 原来是下面这些呀 apt-get install -y linux-headers-$(uname -r) 这个匹配出来的不对呢
linux-headers-3.18.0-kali3-amd64
linux-headers-3.18.0-kali3-common linux-headers-amd64
linux-kbuild-3.18 virtualbox virtualbox-dkms virtualbox-qt

root@evankali:~# apt-get install -y linux-headers-$(uname -r)
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
E: 未发现软件包 linux-headers-3.14-kali1-amd64
E: 无法按照正则表达式 linux-headers-3.14-kali1-amd64 找到任何软件包

http://www.cnblogs.com/sheldonxu/archive/2012/04/15/2450396.html

Debian / Ubuntu Linux Install Kernel Headers Package
http://www.cyberciti.biz/faq/howto-install-kernel-headers-package/

××××××××××
about firefox

sudo su -;
cd /usr/bin
ls -l ./iceweasel # 得知真正的文件为../lib/iceweasel/iceweasel
cd ../lib/iceweasel/
mv iceweasel bakiceweasel
ln -s /home/evan/program/firefox/firefox iceweasel
××××××××××

让普通用户有关机权限
van@debian:~$ vi /home/evan/.bashrc
## 这些是命令别名
alias ifconfig=’/sbin/ifconfig’
alias halt='sudo poweroff'
alias reboot=’sudo /sbin/reboot’
vi /etc/sudoers
### by evan 让evan 这个用户 sudo 不用密码
evan ALL = NOPASSWD: ALL
以后 run halt 就可以关机喽
or
sudo vi /etc/sudoers
把/etc/sudoers裡面最後一行
%admin ALL=(ALL)
改為
%admin ALL=(ALL) NOPASSWD: NOPASSWD: ALL

Ubuntu上安装Kali-Linux的工具 ,导入Kali-Linux源
http://www.sqlmap.cc/%E5%AD%A6%E4%B9%A0/107.html


ln -fs /home/evan/program/thunderbird/thunderbird /usr/bin/thunderbird

#thunderbird desktop icon
evan@evankali:/usr/share/applications$ cat thunderbird.desktop
[Desktop Entry]
Encoding=UTF-8
Name=thunderbird
GenericName=thunderbird
Comment=IDE
Exec=/home/evan/program/thunderbird/thunderbird
Icon=/home/evan/program/thunderbird/icons/thunderbird.png
Terminal=false
X-MultipleArgs=false
StartupWMClass=Firefox
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;

自己添加个rednotebook.desktop 这样就可以用启动器启动rednotebook 了

[Desktop Entry]
Encoding=UTF-8
Name=rednotebook
GenericName=rednotebook
Comment=IDE
Exec=/home/evan/software/rednotebook-1.14/run
Icon=/home/evan/software/rednotebook-1.14/rednotebook.png
Terminal=false
X-MultipleArgs=false
StartupWMClass=Firefox
Type=Application
Categories=Utility;TextEditor;GTK;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;

How-to Install Thunderbird on Kali Linux Easy Guide

一些参考
kali linux下的中文输入法安装及iceweasel汉化
http://blog.csdn.net/eels_/article/details/37806983

http://blog.sina.com.cn/s/blog_40983e5e0101dhz0.html

http://www.backtrack.org.cn/thread-12770-1-1.html
http://blog.csdn.net/ysynhtt/article/details/39926469

How to install/remove mate Desktop/Window Manager in Kali Linux 1.x

echo “deb http://http.debian.net/debian wheezy-backports main” >> /etc/apt/sources.list && apt-get update
apt-get install kali-defaults kali-root-login desktop-base mate-core

官网文档
http://wiki.mate-desktop.org/download

How to install/remove different Desktop/Window Manager in Kali Linux 1.x
https://forums.kali.org/showthread.php?17716-How-to-install-remove-different-Desktop-Window-Manager-in-Kali-Linux-1-x

设置xrdp
echo “gnome-session –session=gnome-classic” > ~/.xsession
该命令的作用是由于安装了 gnome桌面,ubuntu12.04中同时存在unity、GNOME多个桌面管理器,需要启动的时候指定一个,不然
即使远程登录验证成功以后,也只是背景。
xrdp的配置文档在/etc/xrdp目录下的xrdp.ini和sesman.in,一般选择默认。

debian初始化 -testing

debian初始化 -testing

http://blog.csdn.net/shuzui1985/article/details/7592569

http://cn.docs.kali.org/category/general-use-cn
http://www.cnblogs.com/jamesarch/archive/2013/03/30/2991075.html

Kali-linux安装之后的简单设置

f.lux – 全天候保护眼睛健康软件!自动调整屏幕色温减少蓝光防疲劳

f.lux – 全天候保护眼睛健康软件!自动调整屏幕色温减少蓝光防疲劳,长时间玩电脑必备!

此软件有各种版本,我这里只介绍linux版本, 在我的kali试过成功的,只是在xmonad 要手工启动而已 ! 小胖介绍的这个软件不错

# Install dependencies
sudo apt-get install git python-appindicator python-xdg python-pexpect python-gconf python-gtk2 python-glade2 libxxf86vm1

# Download xflux-gui
cd ~
git clone "https://github.com/xflux-gui/xflux-gui.git"
cd xflux-gui
python download-xflux.py

# EITHER install globally
sudo python setup.py install
# OR, install in your home directory
python setup.py install --user

# Run flux
fluxgui

# To uninstall:
sudo rm -rf /usr/local/lib/python2.7/dist-packages/{fluxgui/,f.lux_indicator*}
sudo rm /usr/local/share/icons/hicolor/scalable/apps/fluxgui.*
sudo rm /usr/local/share/applications/fluxgui.desktop
sudo rm /usr/local/bin/{xflux,fluxgui}
rm -rf ~/.gconf/apps/fluxgui/

github 安装教程

http://www.iplaysoft.com/flux.html

Linux中tty、pty和pts概念及区别_tag

先说是tty
tty:理解为终端就好了,比如,显示器,键盘等,一般通过串行总线来发送和显示信息,有波特率这个,一般38400.波特率不对,就会显示乱码啦,当然这个不需要我们设置,系统为你设置好了。对于嵌入式设备,连接电脑,就需要设置,一般15200.

终端是一种字符型设备
tty设备包括

1,虚拟控制台,比如echo “hello” > /dev/tty 就在控制台显示。
/dev/tty0代表当前虚拟控制台,而/dev/tty1等代表第一个虚拟控制台,例如当使用ALT+F2进行切换时,系统的虚拟控制台为/dev/tty2 ,当前的控制台则指向/dev/tty2。

2,串口终端设备/dev/ttyS*,

3,伪终端设备/dev/pty*,比如在Windows使用telnet 或ssh等方式登录Linux主机

再说说pts

pts(pseudo-terminal slave),懂英文的就知道了,虚拟终端。比如远程到主机啥的,是pty的实现方法

http://www.ahlinux.com/start/desk/17772.html