2008年4月22日星期二

Howto Connect to Windows VPN server (PPTP) with Ubuntu 7.10 (Gutsy Gibbon)

Posted by admin on April 22nd, 2008 EMail This Post

This tutorial will explain how to Connect to Windows VPN server (PPTP) with Ubuntu Gutsy.Ubuntu makes it simple to connect to a Microsoft Windows VPN server at your workplace with NetworkManager and the pptp plugin.

Install PPTP Using the following command

sudo aptitude install network-manager-pptp

killall nm-applet

sudo /etc/init.d/dbus restart

nm-applet --sm-disable &

The above command do the following

install network-manager-pptp

restart NetworkManager daemon

restart nm-applet and begin configuring

If you are using kubuntu you need to install the following extra package

sudo aptitude install gnome-network-manager

Configure VPN

After restarting NetworkManager and nm-applet, a single click on the nm-applet should reveal a new option, VPN Connections.

Follow the menu, and select Configure VPN then Add a new connection.

Click Forward to begin the configuration. Go ahead and name your connection, then enter the IP address or DNS hostname of the VPN gateway under the Connection tab.

Next, move to the Authentication tab and activate Refuse CHAP.

At this point, the basic configuration is complete. I like to add one more step, however, to ensure that not all of my traffic is routed over the VPN. This can be detrimental for performance. If you’d rather limit your VPN traffic to a specific subnet, go ahead and execute the following:

Under the Routing tab, disable Peer DNS through tunnel (if desired) and enable the option to only use VPN connection for these addresses and enter your network subnet. If the machines on your network use addresses like 192.168.100.X, use something like the following

That’s it You’re done. To connect to the VPN, click the NetworkManager applet, and follow the menus to your newly configured connection. Enter your username, password, and domain, and you should be connected to your VPN server.

2008年4月20日星期日

推荐一个firefox插件,dictCN(不是dict.cn)

不需划词,鼠标悬停即可翻译。
要翻译网页超连接上的单词时方便了许多

地址:https://addons.mozilla.org/zh-CN/firefox/addon/2082



2.png
描述:

文件大小: 51.55 KB
看过的: 文件被下载或查看 73 次

2.png

HTTP请求提交器 1.0

用途:
1 侦测当前浏览器行为
2 验证网站的正确性
3 多次提交请求,用于人工投票、注册、刷屏
运行说明:
运行本程序,设置浏览器的代理为127.0.0.1 8080,在浏览器中提交一次
然后会在程序发现地址,勾选,多次提交即可。





可执行文件: http://www.optool.cn/sites/default/files/AutoPost.jar
源码: http://www.optool.cn/sites/default/files/AutoPost.zip

用imagemagick 批量压缩照片的脚本

用DC拍出来的很多照片尺寸都很大,有时候我们需要缩小一下,最近google了一圈,发现了一些有用的命令,写了一个小脚本,用来参考

我使用的工具是强大的imagemagick
如果你没有安装的话可以通过新利得安装,
#sudo apt-get install imagemagick
需要用到的命令就是convert
我写的脚本用到了两个参数,resize和font


resize是用来缩小图片的,
用法就是
-resize 图片大小
例如
-resize 50%x50%
这个参数就是把原图的长和宽都缩小50%

我用的是缩小图片尺寸来压缩图片的大小,当然你也可以通过改变图片质量来达到压缩的目的。

顾名思义,改变图片质量的参数就是-quality
-quality 70
这个参数就是说明要把图片的质量压缩到70%(基本上看不出和原图的区别)

添加字体水印
参数就是
-font 字体名称 -fill 字体颜色 -pointsize 字体大小 -draw "text 字体开始坐标 "文字内容""
具体的大家可以查询一下man,解释的非常详细,
最后看看我写出来的简单脚本。

# imagezoom.sh
for img in `ls *.JPG`; do convert -resize 50%x50% convert -font helvetica -fill white -pointsize 36 -draw 'text 10,50 "Pictures By PDAsk.net "' $img Resized-$img; done

这个脚本实现的功能是把目录下面的所有JPG后缀的图片全部按照50%的比例缩小,并且在左上角用helvetica字体印上水印。处理过的图片命名为”Resized-原文件名”

打开gedit 或者leafpad,把脚本内容输入进去,保存为imagezoom.sh,我保存在了桌面上
然后
#chmod +x ~/Desktop/imagezoom.sh

为了方便调用,我就把这个脚本copy到了/bin目录,这样以来我以后在任何一个图片文件夹里面都可以使用这个命令了。

#sudo cp ~/Desktop/imagezoom.sh /bin

untu下类似visio的软件 dia

untu下类似visio的软件 dia

昨天写那个无线的日志的时候,很想画个网络拓扑图,就想起了win下的visio,虽然没怎么用过,但还是给我留下了比较深刻的印象,觉得那种模式还是不错的.
就想,ubuntu下有没有类似的替代品呢?于是搜索了一下,没费什么劲就发现了 dia.
于是 apt-get install dia,装上了,试用了一下,基本的需求都能满足了,而且易用性也不错,还可以导出成 bmp/jpg/png/svg 等很多种格式,还是很强大的.效果图见昨天的日志,再发个界面的截图上来:
dia

2008年4月17日星期四

BOINC:为科学而计算

BOINC使得您可以把计算机的闲置时间捐献给如 SETI@home、Einstein@home、Climateprediction.net、Rosetta@home、World Commnunity Grid 等等许多科研项目。

在将 BOINC 安装到您的计算机上之后,您可以加入任意多个您喜欢的项目。

SecPanel — 管理 SSH 及 SCP 连接

SecPanel — 管理 SSH 及 SCP 连接

SecPanel 是一款图形化的 SSH 及 SCP 连接管理工具。当前,SecPanel 支持 SSH.com 和 OpenSSH,不仅允许你配置、管理 SSH 及 SCP 连接,而且包括密钥处理、SSH Agent 等功能。

SecPanel