无线网卡 iwl3945 jaunty jackalope 无线驱动 不能上网

六月 15, 2009 by tingan

ubuntu 9.04(代号Jaunty Jackalope)正式发布了,速度和易用性都大有提高,然而兼容性却有所下降。在我这里(ibm thinkpad t60),至少有三大问题没有解决。一是无线网卡上网问题,二是ati显卡驱动问题,三是新的通知机制问题。
ati显卡到正式发布了受限驱动还是没有跟上,glxgears只有可怜的200FPS,不过我不用compiz 3D特效,这台机也主要用来开发,倒是关系不大。
新的通知机制没有效果,我怀疑是新的通知机制不够成熟,似乎还比较多问题。不过这个也没有太大影响,就是一个效果而已。
我的无线网卡是Intel PRO/Wireless 3945ABG。(可以用sudo lshw -C network查看)。无线网卡在7.04-8.10都很正常。而到了9.04就比较恼火,每次重启后,无线网卡的灯都不亮,然后nm-applet也没有找到任何的无线网络。dmesg看了一下,似乎是所谓的killswitch的问题。在网上搜索了一下,碰到类似问题的人不少,但是没有看到真正的解决办法,只有临时的解决办法:
首先关闭、开启一次无线网络(似乎只是开机才需要。如果是重启,似乎不用这一步。),然后sudo rmmod iwl3945;
sudo modprobe iwl3945;sudo service hal restart;(这里的iwl3945要用上面的方法找出来),等一下,无线网卡就生效了。(有时还要禁用、启用无线网卡)
不行的话多试几次。但是也有可能死机。希望接下来的几个月,ubuntu 9.04可以修复这个bug。
2009年5月5日更新:
    这个问题ms是network-manager的问题,我在本机改用wicd就好了。等在家里的电脑再试试看看。

這篇文章是我新伙伴-天黑黑(T61)在Ubuntu無線環境下寫的,所以聰明的大家可以猜到上次反應的問題已經解決了! 解決經過如下:

  1. 在synaptic裡安裝ndiswrapper,(系統->管理->synaptic-> Ctrl-F搜尋ndiswrapper->安裝)
  2. 在/etc/modprobe.d/blacklist 裡加入一行blacklist ath_pci
  3. 執行Windows Wireless Driver (系統->管理->Windows Wireless Driver)
  4. 指定無線網卡的驅動INF檔,成功後離開程式
  5. install到modprobe (執行指令ndiswrapper -m 以及 modprobe ndiswrapper)
  6. 試試可行否? 如果不行重開機後移除Windows Wireless Driver驅動重裝一次
  7. 在/etc/modules裡加ndiswrapper這樣每次開機都可以自動載入

解决Ubuntu 9.04无线网络的不稳定问题

六月 10, 2009 by tingan

还是一位论坛上的朋友告诉我可能是MTU的设置问题。如果MTU设置太大,就容易出现丢包的情况。要知道,我使用8.10版本的时候也是在同一个网络,同一台机器上,环境是完全相同的,出现MTU的设置问题实在是意料之外啊!

那么,在Ubuntu环境下如何查看和设置MTU呢?其实只要使用ifconfig这个命令就可以解决。

要查看MTU的值,输入:ifconfig,然后回车。在输出里面你可以看到每个网卡的MTU。

要设置MTU的值,输入:sudo ifconfig wlan0 mtu 1000。我的这个命令是把无线网络的MTU设置为1000了,你可以根据自己的实际情况选择适合自己的值。

现在我的无线网络还是使用XP的无线驱动,很稳定。希望你也成功!

ubuntu中退出Compiz

五月 23, 2009 by tingan

metacity –replace  or  ‘kwin –replace &;’

Shifting the order of the titlebar buttons
The installation script will move the “traffic lights”, the minimize, maximize
and close buttons, on the left hand side of the titlebar in Metacity
(instructions for using the Emerald/Compiz Fusion theme appear in Section
3). If you want to make the change manually, press Alt+F2 and type in gconf-editor.
Press Enter or click Run and a new window should appear. In the sidebar, go to / →
apps → metacity → general. Back on the right hand side, double click on
button_layout. Delete the value that’s there and type in
menu:minimize,maximize,close. Then Click OK and close the application
Configuration Editor. The buttons will now be on the left side of titlebar. To restore
the buttons to the original layout, just replace the string with
close,minimize,maximize:menu.

PHP 开发工具

五月 18, 2009 by tingan

编程工具

phpdesigner, Komodo IDE, PhpEdit, Netbeans, Eclipse PDT, ZendStudio,Emacs、KVIM、Arachnophilia、Bluefish、NEdit、Gedit、Kate、Quanta Plus

调试工具

zend debugger, xdebugger

Profiling 工具

Kcachegrind

ubuntu中安装PHP,Apache,MySQL

五月 18, 2009 by tingan

1、安装Apache服务
sudo apt-get install apache2

然后按照提示即完成apahce的安装了。这里 可以打开http://127.0.0.1,即可看于是It works

首先我直接用apt-get安装了apache2,php5,pear以及mysql5, 为了方便后续的安装,还加上了make和libmysqlclient

sudo apt-get install apache2-mpm-prefork
sudo apt-get install php5 ,php-xml-parser php-fpdf php-image-graph

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-xmlrpc

sudo apt-get install php-soap

sudo apt-get install php5-dev
sudo apt-get install php5-pear
sudo apt-get install mysql-server-5.0
sudo apt-get install make
sudo apt-get install libmysqlclient15-dev
pdo在ubuntu的apt里头似乎还找不到安装源,所以通过pecl来安装这个扩展,非常简单 —- 如果海底光纤能连通的话:

pecl install pdo

增加一行:

extension=pdo.so

到文件:

/etc/php/apache2/php.ini
/etc/php/cli/php.ini

接下来安装pdo_mysql碰到一些问题, 直接跑pecl install pecl_mysql会出现一些错误,搜索了一下发现是pecl本身的问题,下面是个比较简单的解决办法:

wgethttp://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
tar xzvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2

注释掉configure里头判断是否已经安装pdo扩展的代码片段,继续跑:

phpize
./configure
make
make install

然后再次添加下面一行到前面提到的两个php.ini

extension=pdo_mysql.so

重启apache之后, php5 + pdo_mysql就在ubuntu上安装好了, documentroot是/var/www

后记
更简单的解决办法是运行:

PHP_PDO_SHARED=1 pecl install pdo_mysql

2、安装php5
sudo apt-get install php5 php5-gd php-pear

#apt-get install curl php5-url php5-mcrypt
sudo apt-get install libapache2-mod-php5

sudo /etc/init.d/apache2 restart

OK之后,我们来查看一下是否生效了。
gksudo gedit /var/www/testphp.php

入探针
保存运行
http://127.0.0.1/testphp.php

3、安装mysql
sudo apt-get install mysql-server

安装完成按提示设置root密

4、让apache、php支持mysql
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysqlsudo /etc/init.d/apache2 restart

至此apache2+php 5.2.4.2+mysql5.0.51的环境就完成了。

1.Ubuntu 8.04下安装LAMP
系统->系统管理->新立得软件包管理器, 打开新立得,编辑 –> 使用任务分组标记软件包 –> 勾选 LAMP Server。

安装过程中会提示设置mysql的root用户的密码。

配置文件在/etc/apache2目录

在/etc/apache2/httpd.conf加入一行:ServerName 127.0.0.1

2.Ubuntu 8.04下安装phpmyadmin
sudo apt-get install phpmyadmin

安装后在/etc/apache2/conf.d目录自动创建虚拟目录配置文件phpmyadmin.conf

安装后直接输入http://localhost/phpmyadmin登录,创建一个wpmu数据库

3.启动mod_rewrite模块
sudo a2enmod rewrite

4.Ubuntu 8.04下安装WPMU
(1)从官方主页下载WPMU,解压到~/blog目录(/home//blog)

(2)修改目录属性:chmod 755 /home//blog /home//blog/wp-content

(3)配置WPMU虚拟目录。修改/etc/apache2/httpd.conf或者在/etc/apache2/conf.d创建wpmu.conf文件,加入如下内容:

Alias /blog /home//blog
/blog>
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride FileInfo Options
(4)修改/etc/hosts文件(因为wpmu必须采用域名格式)

修改127.0.0.1 localhost
127.0.0.1 www.my.com my.com localhost

(5)在firefox输入:http://my.com/blog。安装WPMU

OK。
(UMELINK原创)

Ubuntu php 环境简单配置备忘(二/成功)

一、安装apache2+php5+mysql
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
二、设置mysql密码
mysqladmin -u root password 新密码

三、安装phpmyadmin
sudo apt-get install phpmyadmin
测试:http://localhost/phpmyadmin/

Installation in ubuntu 8.04 phpmyadmin

1)apt-get install phpmyadmin

2)sudo gedit /etc/apache2/apache2.conf

3)Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf

4)Now restart Apache:
sudo /etc/init.d/apache2 restart

四、其它操作:
编辑测试页:()
sudo gedit /var/www/testphp.php

启动Apache
$ sudo /usr/sbin/apache2ctl start
停止Apache
$ sudo /usr/sbin/apache2ctl stop
重启Apache
$ sudo /etc/init.d/apache2 restart

如果只是用于本地开发,加强安全性,设置如下:
$ gksudo “gedit /etc/apache2/ports.conf”
$ password:
更改ports.conf
Listen 127.0.0.1:80
保存文件之后,并重启apache。这时,只有通过127.0.0.1才能访问Apache。

安装包

/etc/apt/sources.list file.

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
# apt-get update

install MySQL4

# apt-get install mysql-server-4.1 mysql-client-4.1 libmysqlclient14-dev

install MySQL5

# apt-get install mysql-server-5.0 mysql-client-5.0 libmysqlclient15-dev

Set a root MySQL password like this:

# mysqladmin -u root password yourrootsqlpassword

Debian provides a fastcgi enabled version of PHP.

# apt-get install php4-cgi
# apt-get install php5-cgi

Other php5 package

php5-curl php5-gd php5-imap php5-mhash, php5-xdebug
php5-pear php5-dev php5-ming php5-common
php5-cli php5-pspell php5-odbc php5-mcrypt
php5-tidy php5-ldap php5-gmp php5-snmp
php5-sybase php5-mysql php5-mysqli php5-pgsql
# apt-get install php5-cgi libgdmg1 php5-curl php5-gd

php.ini

Add cgi.fix_pathinfo = 1

ubuntu 中flash中文乱码的解决

五月 17, 2009 by tingan

ubuntu/linux flash中文乱码 的解决
打开配置文件:
cd /etc/fonts/conf.d/
sudo gedit 49-sansserif.conf

修改edit节点,将<string>sans-serif</string>
改为 <string>sans</string>

<match target=”pattern”>
<test qual=”all” name=”family” compare=”not_eq”>
<string>sans-serif</string>
</test>
<test qual=”all” name=”family” compare=”not_eq”>
<string>serif</string>
</test>
<test qual=”all” name=”family” compare=”not_eq”>
<string>monospace</string>
</test>
<edit name=”family” mode=”append_last”>
<string>sans-serif</string> 这里改为<— <string>sans</string>
</edit>
</match>
ubuntu装好之后, 为浏览器firefox安装flash插件, 后来发现中文会变成方框。

如何解决?

输入:
cd /etc/fonts/conf.d/

为了安全,备份一下:

sudo cp 49-sansserif.conf 49-sansserif.conf_backup

输入如下指令:

sudo gedit ./49-sansserif.conf

此时文件显示内容。

将其中的第1、2、4个后面的sans-serif或者serif用你自己系统中支持中文的字体的名字代替,注意字体名字的大小写

比如:我的系统中安装了微软雅黑,我则用微软雅黑代替上述所说的字段,结果如下:

<match target=”pattern”>
<test qual=”all” name=”family” compare=”not_eq”>
<string>微软雅黑</string>
</test>
<test qual=”all” name=”family” compare=”not_eq”>
<string>微软雅黑</string>
</test>
<test qual=”all” name=”family” compare=”not_eq”>
<string>monospace</string>
</test>
<edit name=”family” mode=”append_last”>
<string>微软雅黑</string>
</edit>
</match>

Php Xdebug extension

五月 15, 2009 by tingan

The Xdebug extension helps you debugging your script by providing a lot of valuable debug information. The debug information that Xdebug can provide includes the following:

  • stack traces and function traces in error messages with:
    • full parameter display for user defined functions
    • function name, file name and line indications
    • support for member functions
  • memory allocation
  • protection for infinite recursions

Xdebug also provides:

PECL Installation

As of Xdebug 0.9.0 you can install Xdebug through PEAR/PECL. This only works with with PEAR version 0.9.1-dev or higher and some UNIX.

Installing with PEAR/PECL is as easy as:

# pecl install xdebug

but you still need to add the correct line to your php.ini: (don’t forget to change the path and filename to the correct one — but make sure you use the full path)

zend_extension="/usr/local/php/modules/xdebug.so"Xdebug is incompatible with the Zend Optimizer and Zend Studio   Debugger extensions. If these extensions are enabled in   php.ini, they will not be imported into the copy created   by Komodo for debugging. When configuring Remote PHP Debugging, these extensions   should be manually commented out in php.ini.

Komodo 安装

五月 11, 2009 by tingan

今年jolt获奖的软件,专攻动态语言,想要一个python IDE,于是开始感兴趣起来。

http://www.activestate.com/Products/Komodo/?tn=1下载试用版

在它的网页上注册得到一个20天的License文件。

将试用版解压缩到一个目录
tar zxvf komodo-professional-3.5.2-227956-linux-libcpp5-ix86.tar.gz

进入目录执行

sudo install.sh

缺省安装是/opt/Komodo

安装完成后执行
/opt/Komodo-3.5/bin/komodo -v

会提示段错误,无法运行。网上好多人都说有BUG.分析一下,还是SCIM捣乱。

sudo vi /opt/Komodo-3.5/bin/komodo

第二行加上:GTK_IM_MODULE=xim

存盘退出。

将邮件得到的License权限改为755
chmod chmod 755 EvalLicense-KomodoProfessional-Linux

执行一下。会在 ~/.ActiveState/下生成一个ActiveState.lic文件。

将~/.komodo 改成你当前用户:
sudo chown <user>:<group> -R .komodo

好了,现在进入 应用程序-》编程
发现有一个ActiveState Comodo 3.5
执行,就可以了。

这是个试用版的License.如果购买了正版的Lic文件。直接拷贝到~/.ActiveState/下即可。

功能很强大,尤其python GUI Builder.太舒服了。可惜太贵了。。。

备份KOMODO 的配置文件

KOMODO IDE是我使用的比较多的一款IDE开发工具,不过基本上除了用它编写PERL外,还没做过其它代码的编写。
通常的,当我们费力把一个开发工具的配置做到自己满意的时候,如果不能把这些配置文件导出或者备份,也就意味着如果你的机器重装或者想在两台机器上使用同样的配置话,你就不得不在花时间来处理这些重复的事。
IDE上我是没有找到导出配置的选项的,所以我只能寻找配置文件覆盖的方法来做。
KOMODO 的个人配置文件其实是放在C:\Documents and Settings\你安装KOMODO时所用的账户\Application Data\ActiveState下的。不过你在该目录下可能看到多个KOMODO的版本号目录,这些我们都不用管,你只需要找到你目前使用KOMODO 的版本,进入后会找到一个名为schemes的目录,如果你自己定义过配置文件的话,目录下会有相对应的文件,例如.kkf的文件是你的热键配置, 而.ksf则是你的风格配置。有了这些,下步你该知道怎么做了吧!
Good engoy !
将ActiveState.lic, bean.nfo. file_id.diz 拷贝到~/.ActiveState目录下面,重新启动Komodo IDE 5.

ubuntu 安装mac docker

五月 10, 2009 by tingan
ubuntu已经蛮漂亮了。可还是喜欢上个dook换mac背影冲冲场面。
推荐大家几个常用的dock工具栏。
基本上如果要求3D特效的,在最小化时效果都还是很不错的。
所以看坛友们的个人爱号来自己决定罗。

1、Cairo Dock
地址:https://help.ubuntu.com/community/CairoDock
一个酷的工具栏,但是需要3D特效支持。(compositing effects)

2、Avant Window Navigator
地址:http://www.newlinuxuser.com/the-perfect-os-x-dock-for-linux/
最常用,功能强又漂亮还支持自定义的dock工具之一

3、Engage Dock
地址:http://pimpyourlinux.com/linux-feature-review/enlightenment-engage-dock/
个人认为很普通的一个dock工具

4、Kiba Dock
地址:http://www.kiba-dock.org/index.php?option=com_frontpage&Itemid=1
又小又好看而且还免费,最早是Akamaru的组件。可能是最流行的dock工具了。

5、Ksmoothdock
地址:http://theslack.files.wordpress.com/2007/06/kooldock.png?w=462&h=150
有平滑的大小变化,很低的要求。就是感觉不太像mac的dock

6、SimDock
地址:http://sourceforge.net/projects/simdock/
初学者的最爱,不要求3D特效。对机器要求低,而且提供deb包

[ 此帖被幸运星在2008-09-19 13:07重新编辑 ]

以上内容完全是复制粘贴,本人并不明白其意思,
故本人不对以上内容负法律责任,请不要跨省追捕。
要详查请自己联系原作者,谢谢!

ubuntu evolution 于 Google calendar 同步

五月 10, 2009 by tingan

http://www.scheduleworld.com/sw2/index.html

SyncEvolution 0.8.1 Released

0.8.1 fixes issues which affected some (three?) users, details below. If 0.8 works for you, there’s no reason to upgrade. New binaries would also have been needed for Evolution 2.24, which was released two weeks ago and will be in major distributions soon. 0.8.1 supports all Evolution releases from 2.6.3 to 2.24 in the same binary. 2.6.1 in Ubuntu 6.06 LTS might also work now – in contrast to the other Evolution releases this has not been tested, though.

Available Packages

The following packages are available:

  • for Evolution (x86 and AMD64), both as .tar.gz and .deb
  • for Mac OS X (a fat binary for PPC and x86)
  • for Maemo (ITOS 2008, should work on Chinook and Diablo)
  • source code

The Evolution packages were renamed from syncevolution-evolution-2.6/8/12 to just syncevolution-evolution. When upgrading via apt, then you’ll notice that your old syncevolution-evolution-2.xx is “on hold”. Simply tell apt to install the new package and let it remove the old one:

# aptitude install syncevolution-evolution
Reading package lists... Done
...
Building tag database... Done
The following packages are BROKEN:
  syncevolution-evolution
The following packages have been kept back:
  syncevolution-evolution-2.12
0 packages upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0B/380kB of archives. After unpacking 1102kB will be used.
The following packages have unmet dependencies:
  syncevolution-evolution: Conflicts: syncevolution which is a virtual package.
                           Conflicts: syncevolution-evolution-2.12 (< 1:0.8.1-2) but 1:0.8-2 is installed and it is kept back.
Resolving dependencies...
The following actions will resolve these dependencies:

Remove the following packages:
syncevolution-evolution-2.12

Score is 121

Accept this solution? [Y/n/q/?] Y
...

New installations can simply use “aptitude install syncevolution“.

For more installation instructions see the www.estamos.de installation page.

Changes

  • Evolution calendar: regression in 0.8: one-way sync of virtual birthday calendar (#2095433).“refresh-from-client” works again for the birthday calendar. Other modes are not supported. In contrast to previous releases SyncEvolution now does some sanity checks that the sync mode is right.
  • Mac OS X: removing old logdirs failed (#2087389). Fixed.
  • SyncML client library: “Expect: 100-continue” header resulted in 417 error with certain proxies (#2101015).Now this header is always disabled; it doesn’t make much sense with SyncML anyway.
  • The development of the Funambol C++ client library is now tracked in a git repository on github.com. Modifications and tags for SyncEvolution are checked in there. The configure script checks out the right sources from there automatically; can be controlled via --with-funambol-src parameter.
  • Evolution desktop: the version of the used Evolution libraries is included in the “--version” output and log files.
  • Cleaned up README. Kudos to Martin Wetterstedt for pointing out mistakes in the README and the web site.