Archive for Linux

IE for Linux

笑来老师说因为可恶网上银行死活不支持Linux, 所以没法把计算机换成纯粹的 Ubuntu, 其实如果是招商银行, 我就有办法. (其他可能也类似) 我一直就知道这个方法, 只是忘记写出来了. 实在有点对不起广大Linux用户.

其实只要我们知道问题的核心在于 IE, 不在windows, 这个问题就好办了. 一年前我看到Mac上也有IE的时候我就想, Linux上有没有啊, 嘿, 在同学的提醒下, 发现果然有一帮爱好者居然把微软的IE都搞到Linux下了 (当然是在wine中跑的), 而且还能装插件, 运行ActiveX. 我的这个同学还尝试假装用这个IE去逗微软的自动升级系统玩, 结果微软的自动升级系统 (Windows Update) 没法识别系统, 极其无辜的报错, 让我们看得真爽 :)

言归正传, 访问这个网站, 照着做就行了: http://www.tatanka.com.br/ies4linux/page/Main_Page

有些看到英语就头疼的哥们我大概说一下:

1. 你需要 cabextractWine. 这两个库, 都可以apt-get (debian家族)或者 yum/rpm得到.

2. 在控制台中打下面的代码:

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz

tar zxvf ies4linux-latest.tar.gz

cd ies4linux-*
./ies4linux

这个程序就运行起来了, 会提示你装IE的什么版本, 然后它自己会跑到微软的网站上把IE下载下来, 自己装好. 你可以在安装好的目录中发现一个快捷方式之类的东西, 软件的提示留意看就行了, 没什么特别难的技术要点. (注意: 命令第三行是个 * 你不要打*, 看创建了什么目录你就进那个目录就行了. 推荐大家装 ie-6中文版, 因为我实验了, 这个上来就可以上招行.)

我刚刚用我的招行帐号尝试了一下, 可以.

笑来老师, 放弃 windows 吧, 用windows 最后的一个理由不存在了 :)

Update 一下: 一般我文章写好了都要看看有没有人和我写类似的, 如果有, 我会参考人家的一点想法,我发现很多人都这么写了, 有一些写的比我好; 但是我很失望的发现, 一些莫名奇妙的人又在强调 windows安全性高了, 我只说一个事实: 美国所有的银行都支持Linux和 Firefox. 国内的任何银行估计都没法和美国的花旗 (Citigroup) 这些比吧, 我一直用花旗和美国银行的网上银行,不是用苹果+Firefox 就是用Linux + Firefox,从来没有问题.

某些同志别把自己的无知当教训人的”规矩”, 好像全世界银行就是这个样子的. 自己不知不要紧, 别误人.

Comments (11)

酷Linux 专栏: Linux 和音乐潮流-1

题外话: 作为一个坚定的*nix系统使用者,我常常向我周围的人推荐使用Linux/UNIX, 而他们通常都以不熟,不好用拒绝我,即使我答应帮他们装Linux系统。他们总认为Linux难用,可是事实不是这样的,给发展中国家使用的一百美元笔记本(OLPC)上就是 Linux, 世界上最眩的操作系统 MacOSX 底下也是UNIX/BSD. 有时候 Linux/UNIX 缺少的就是一些日常应用的杀手级程序。实际上杀手应用甚至决定了系统选择: Apache 让很多人再也不用 Windows 架设服务器,iPod 让美国很多人转而投身苹果。同样,我觉得我们支持Linux的人或许可以换一个角度,举出一些 Linux 能做的强大的酷的事情,让更多的人了解这个系统,从而爱上这个系统。其实从我的角度看,系统不酷,而是工作效率高,不过为了吸引一些用户,我不得不从酷的角度去说服别人。因此我准备开一个专栏,专讲在Linux下面可以做在Windows下做不到的酷事情,希望有人因此喜欢上 Linux. 这个专栏的文章都不长,技术都不复杂,以吸引人为主。如果你想感受Linux, 网上现有的怎么装的教程很多,也可以用LiveCD, 不过那不是我这个专栏所能讲清楚的。我的主要目的是吸引对 Linux 没感觉的人到 Linux 平台 :)

好吧,先说我抓音乐的小例子。我来到美国之后,感觉要融入美国文化,首要的就是融入潮流文化. 于是,我开始到网上找哪些音乐电影流行,我就拿下来看。这个当然要被很多人鄙视说俗了,现在流行的是小众小资的东西了。不过既然俗,咱也得俗的有技术含量是吧。一开始,我每天看Google Music Trend, 看到新的歌我就下载,然后用文本文件存我下了哪些歌。因此,第一步,我只需要一个浏览器。然后我就发现人工管理的缺陷的,因此我就想自动从Google Music Trend 中把我的歌生成一个列表。在这一步,我使用了我需要一个Linux 命令叫 wget, 简单的说,

wget some_url

就可以把一个网页或者资源下载到自己机器上。
好,我们先试验这个命令:

wget http://www.google.com/trends/music -O music.list

-O 表示另存为后面的文件,简单吧。

然后,我们再学一个命令叫cat. cat 不是小猫,是把文件的内容输出到屏幕. cat 后面可以接多个文件,具体可以用 cat –help 看帮助。这个地方,我们用 cat filename 输出文件。

cat music.list

怎么样,cat 输出了一个HTML的文件吧。这个HTML文件就是你的浏览器看到的. 然后你要说了,我怎么把这个html文件变成一个格式整齐的列表呢。不着急,下回我告诉你,这次先打一段天书一样的代码(这是一整行内容,注意第一行结束后有一个空格):

cat music.list |tr "\n" " "|egrep -o "song\">[^<]*" |tr ">" "\t"|cut -f 2|sort|uniq >mylist.new

好了,你就发现mylist.new 中全是格式正确的歌曲名了。这段天书怎么理解您无须担心,你可以发现原来在windows下需要copy 20次得到的文本文件一行命令就得到了。那么,学这段天书要多久呢?只要你常来看我的专栏,看三次,每次十分钟,肯定能理解。如果一生做一次,从头学这个天书效率当然不如手工,不过要是天天赶潮流,您就需要考虑用这个命令了。

好了,最后贴出一个喜欢听王小峰推荐歌曲的人要用的一个下载脚本,每次三表同学新歌上线,你轻轻一敲回车,歌曲全到你硬盘,多让人羡慕啊(当然,这个别太传,本来就是偷偷通过他的xml 发现歌曲链接的,传过了三表要发火了)。这个脚本是python 写的,但是因为windows下没有wget, 所以是Linux 专用的 :) 快用这个让美女/闺蜜/帅哥羡慕你吧


#!/usr/bin/python
# Download all the music recommended by wangxiaofeng.net
# Author: Eric You XU
# GPLv2
import os
import commands
os.popen("wget www.wangxiaofeng.net/mp3player.xml -O mp3player.xml")
str="""cat mp3player.xml|egrep -o path=[^3]+mp3|tr "\\"" "\\n"|grep http >wangxiaofeng.list"""
print str
os.popen(str)
f=open("wangxiaofeng.list")
for g in f.read().split('\n'):
print g
a="wget \""+g+"\""
os.popen(a)

注意: 最后三行是有缩进的。可以把这个存成 a.py, 然后 chmod +x a.py. 然后执行 ./a.py 具体的原理我下次讲。如果有问题,请留言。预祝你抓取所有王小峰歌曲成功。

课后作业:

1. 练习用wget 抓一下 baidu 的500个金曲, 链接是: http://list.mp3.baidu.com/topso/mp3topsong.html
2. 通过cat 命令研究一下baidu 的 html 和 Google 的 html. 看看哪家的让你觉得舒服. 下节课我们继续讲怎么处理这两个HTML.

下节课预告:1. 那段天书的原理是什么 2. 我怎么抓baidu 的流行榜单

过几天等有时间我还会给大家介绍优盘上的Linux, 光盘上的Linux 和最酷的Linux XGL桌面 还有给基督徒用的Linux 和给学前儿童用的Linux. 其实Linux远比一般人想像的简单而且酷。

本专栏欢迎投稿,暂无稿费。

Comments (13)

客座Blog正式开始

Blog开张一个月以来,得到好多人的支持。有很多好朋友留下了非常好的评论,有些评论展开的话也是非常好的文章。从今天开始,不定期邀请朋友在我的Blog上发表文章或者我主动转载发表在他们Blog的优秀文章。同时我也会加入自己对这位朋友的介绍和对他文章的一些评论,这样大家也可以互相认识。

今天第一篇,转载的是我的朋友Forrest Sheng Bao 的 Blog 中专门为中国大陆用户所写怎样使用Tor穿越GFW. 原文针对Linux用户,关于Windows的配置可以参见这里

作者介绍:Forrest Sheng Bao 是Texas Tech University 研究生, 也是一个Linux的狂热爱好者。我们通过百合认识并在其后熟悉。在此之前, Sheng Bao 在南京军区总医院(南京大学医学院临床学院)从事研究助手工作,他的研究领域包括生物信息学,计算机科学,信号处理和图像科学。你可以通过forrest.bao AT gmail.com 联系他,也可以访问他的个人主页.

———This Original Post —————————————————————————

How to install/configure Tor and Privoxy on Linux

This document is licensed under GNU Free Document License. Permission is granted to obtain, modify, translate and re-distribute it under any circumstance and in any form. The purpose of this document is to help people who are suffering under injustice network censorship policies of some extreme f**king governments.

Question 1: What is Tor?
Tor is a connection-based low-latency anonymous communication system which
addresses many flaws in the original onion routing design. In brief, Onion Routing is a connection-oriented anonymizing communication service.

The latest information can be found at http://tor.eff.org/, or on the mailing lists, archived at http://archives.seul.org/or/talk/ or http://archives.seul.org/or/announce/.

Question 2: What is Privoxy?
Privoxy is a web proxy with advanced filtering capabilities for protecting privacy, filtering web page content, managing cookies, controlling access, and removing ads, banners, pop-ups and other obnoxious Internet junk. Privoxy has a very flexible configuration and can be customized to suit individual needs and tastes.

Question 3: Can Tor and Privoxy help those people in Communism countries?
Yes.

Question 4: How to install Tor and Privoxy?
Linux Users:
* I can here only provide the solution to install them on Debian or Debian-based Linux distributions, such as Ubuntu, Xandros, MEPIS. I will use Ubuntu as the example.
* For Fedora/Red Hat Linux users, maybe you can find the RPM package on their supporting websites or using YUM to install.
* For SuSE Linux users, please use YaST2 to install them.
* Other Linux distribution users, please search on the Internet or consulting BBS, Mail list, etc.

FreeBSD Users:
Tor and Privoxy can work on FreeBSD, you can use port to install or you can download the source to compile by yourself.

Mac OS X Users:
I know Tor and Privoxy can work on Mac OS X. But I haven’t tried.

Windows Users:
Please ask your locate help.

To install Tor and Privoxy on Ubuntu Linux, just run following command
sudo apt-get install tor privoxy

Question 5: What to do after the installation?
1. Install the Firefox TorButton plug-in.
Go to this URL:
https://addons.mozilla.org/firefox/2275/
Click the “Install Now” button to install it. A windows for installation will popup. After the installation, restart Firefox. You will see a button at the right bottom of Firefox.

2. Configure the Privoxy.
Open Privoxy’s “config” file (look in /etc/privoxy/ or /usr/local/etc/) and add the line
forward-socks4a / localhost:9050 .
to the top of the config file. Don’t forget to add the dot at the end.

Privoxy keeps a log file of everything passed through it. In order to stop this you will need to comment out three lines by inserting a # before the line. The three lines are:
logfile logfile
and the line
jarfile jarfile
and (on some systems) the line
debug 1 # show each GET/POST/CONNECT request

You’ll need to restart Privoxy(if you are a newbie of Linux, just reboot the computer) for the changes to take effect.

—————Post—Ends————————————————————————————————

Comments

Next entries »