Jun
26-08

Emacs的一些命令

Posted in ubuntu

;;C意味着Ctrl键   M意味着Meta键或Alt键 SPC表示空格键 RET表示回车键Enter DEL表示退格键BackSpace `就是TAB键上方,数字键1旁的键
;;TAB表示TAB键,tab表示输入,即大写字母组合表示的是按键,而小写字符串是输入的字符串(输入以RET结束)
‘C-x C-f 文件名’ —打开文件
‘C-x C-s’ —保存文件
‘C-x C-c’ —退出Emacs
‘C-z’  —从Emacs切换到别的应用程序
‘C-x 1′ —仅保留当前窗格
‘C-x 2′ —水平拆分当前窗格。
‘C-x o’ —将光标移到下方窗格,圆圈是字母不是数字。表示other
‘C-x k’ —关闭某个buffer,即缓存。
‘ESC ` f c’ —依次按这四个键可以关闭当前buffer
‘ESC x calendar’ —调用日历表
‘M-x calendar’ —调用日历表
‘M-x revert-buffer’ —重新载入buffer
‘M-x shell’ —调用外壳命令
‘M-x cd’ —转换目录
‘C-x d’ —编辑目录
‘M-x info’ —帮助信息
‘M-x TAB TAB’ —获取可执行的命令
‘M-x gdb’ —
‘M-SPC’ —把游标(即光标)附近的空格缩成一个。
‘M-;’ —产生右缩进的注释
‘M-x c-mode’ —启动C模式
‘M-x c-set-style’ —指定C模式的缩进格式,格式有:Linux、Python、BSD、Java、Stroustrup、GNU、cc-mode等,而按Tab键可以格式缩进当前行
‘M-x c-toggle-auto-stat’ —开启自动模式
‘C-c C-a’ —开启/关闭自动模式
‘C-c C-e’ —调用宏扩展
‘M-! etags [...]




May
29-08

Sound on Zepto Znote 3215W almost there

Posted in ubuntu

Sound on Zepto Znote 3215W almost there
Thursday, January 31st, 2008
Today a Linux 2.6.24 kernel appeared in Debian unstable, so I immediately gave it a try, to see if it did anything to the sound issues on my Zepto Znote 3214W laptop.
First thing, the 2.6.24 kernel has ALSA 1.0.15 which is needed. The Realtek ALC268 doesn’t [...]




May
29-08

How to install driver for Realtek ALC268 (HDA) for Acer Aspire 4710 laptop

Posted in ubuntu

How to install driver for Realtek ALC268 (HDA) for Acer Aspire 4710 laptop

Hi
I have an Acer Aspire 4710 laptop; headphones were not working on Ubuntu 7.04 feisty. I installed the driver for Realtek ALC268 HDA and now head phones work fine.
Make sure that your system is updated [...]




May
29-08

Realtek ALC268集成声卡驱动问题在ubuntu下的解决方案

Posted in ubuntu

Realtek ALC268集成声卡驱动问题在ubuntu下的解决方案
Since a lot people are trying and struggling to get their Realtek ALC268 codec sound card work properly in Ubuntu 7.10 Gutsy, I think my experience will be helpful. My computer is an Acer Aspire 5315 laptop, it comes with an ALC268 codec HDA sound card. Lately I’ve been messed around with this sound [...]




May
29-08

网上找到的配置apache的办法

Posted in ubuntu

1、安装 Apache2+PHP5+MySQL
sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd mysql-server php5-mysql phpmyadmin
在下载来自动安装配置的时候 会出现一个框子让你输入密码哦!!记住是密码
2、启用 mod_rewrite 模块
sudo a2enmod rewrite
3、配置 网站的目录了
sudo gedit /etc/apache2/sites-available/default
——————默认情况下你会看到
NameVirtualHost *
<VirtualHost *>
    ServerAdmin webmaster@localhost
   
    DocumentRoot /var/www/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
——————我们把它改到别处去~~也就是自定义位置
NameVirtualHost *
<VirtualHost *>
    ServerAdmin webmaster@localhost
   
    DocumentRoot /home/felix/www/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /home/felix/www/>
——————看到了把?这个就是放在了home下你的用户名的www文件夹里面
4、重启服务器
sudo /etc/init.d/apache2 restart
5 、检查是否成功
到你的目录下新建一个index.php文件
在里面输入<?=phpinfo()?>
然后打开浏览器输入localhost看看是否phpinfo的信息出来了
如果出来了表示你成功拉 恭喜你哈~
对啦不要忘记了phpmyadmin哦
在浏览器里面输入localhost/phpmyadmin哦
就能控制mysql啦~~~
 本文来自: www.jackfeng.cn http://www.jackfeng.cn/show-589-1.html




May
14-08

原来是GCC来编译C文件啊

Posted in ubuntu

今天写了个HELLOWORLD  有加<stdio.h>  有错误
后来去掉  还是有错误:
helloworld.c: 在函数‘main’中:
helloworld.c:3: 警告: 内建函数 ‘printf’ 不兼容的隐式声明
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld 返回 1




May
14-08

今天学习了pico。

Posted in ubuntu

进入终端:pico就进入到pico编辑文本的界面了。
键入一些内容:Hello world! This is my first file in ubuntu.It is great fun.Oh , I like ubuntu!
Ctrl+O保存:键入名称first.txt  然后enter就保存了
Ctrl+X离开。
然后ls一下可以看到first.txt在你的文档里面。
more first.txt可以看到文件里面的内容。
pico first.txt可以进入pico继续编辑文件。




May
07-08

Linux锐捷2.56认证客户端XMU-Ruijie–用python写的

Posted in ubuntu

Linux锐捷2.56认证客户端XMU-Ruijie–用python写的
By
acevery
on August 20, 2007 9:16 AM | Permalink | Comments (26)
用了一周多的时间,完成了
首先说一下XMU-Ruijie的意思。XMU是Xiaman University即厦门大学,偶的母校。因为这个客户端是为解决厦门大学众多Linux用户上校园网难的问题写的。Ruijie是锐捷的拼音。
接下来说说过程把。开始几天把锐捷2.56的算法学着用pyhon的类重写,中间发现在线包的算法错了。花了一个晚上研究以前抓的包,终于修正了算法。接下来的几天又陆续学了固定时间发包的实现,daemon方式,配置文件读取,昨晚继续奋战,终于把程序最后调试好了。
这个客户端最大的优点是什么?我的初衷是用python写,从而避免xsupplicant的编译问题。同时,因为这个客户端仅仅是用来进行锐捷认 证的,所以不包含其他功能的代码,体积比xsupplicant小了很多。与此同时,配置也简化到用户名,密码,网络界面,日志文件,pid文件(后两者 一般不需要修改)。同时锐捷的协议部分是用类写的,也就是说如果别人要改成其它MD5协议只要重写一个协议的类,嵌进去即可。
相比xrgsu,不会出现多网卡检测的错误,因为XMU-Ruijie是不检测多网卡的认证速度相当快,我在宿舍中不到1秒就认证好了,DHCP大概2秒。
功能上,只做一件事,完成认证。因为DHCP客户端功能我写的肯定没有dhcpcd和dhclient好了Gentoo用户直接下载ebuild安装。同时我写了一个bash的start-stop脚本(DHCP的)和bash的安装脚本,非gentoo的用户也方便很多了。这两个bash脚本都在压缩包里了。
Gentoo用户
安装
Gentoo的用户先下载好portage文件,并放到自己的portage-overlay中:

代码: 下载并解压portage文件,如portage-overlay为/usr/local/portage [...]




May
07-08

Ubuntu8.04系列八——测试

Posted in ubuntu

文章欢迎转载,转载请注明出处:嘉骏苑http://luckiss.blogcn.com
原文出处:http://luckiss.blogcn.com/diary,15268145.shtml
以下网址是用于测试你的系统跟浏览器的安全性网站,
http://www.pcflank.com/test.htm
我以下测试均在不开任何防火墙和防病毒的ubuntu8.04默认设置下进行:
1。首先是普通的木马和浏览器的测试,以下是测试后结果图片:
<!– –>
以下是详细分析:
Check for vulnerabilities of your computer system to remote attacks
We have scanned your system for open ports and for ports visible to others on the Internet. As a rule an open port means your computer is vulnerable to attacks by crackers. They gain access to your computer and its files through these [...]




May
07-08

ubuntu8.04系列七--软件开发篇

Posted in ubuntu

ubuntu8.04系列七--软件开发篇
文章欢迎转载,转载请注明出处:嘉骏苑http://luckiss.blogcn.com
原文出处:http://luckiss.blogcn.com/diary,15268145.shtml
Linux是开发者的乐园
1。安装JAVA环境支持
sudo apt-get install sun-java6-jre
如果空间富裕,建议安装一个JDK:
sudo apt-get install sun-java6-jdk
提示:安装过程中需要你回答是否同意使用协议(终端中红蓝色的提示界面),此时按tab键至OK,再按回车即可正常安装。
设置当前默认的java解释器:
sudo update-alternatives –config java
执行后会出现类似如下的画面:
There are 2 alternatives which provide `java’.
Selection Alternative
———————————————–
1 /usr/bin/gij-wrapper-4.1
*+ 2 /usr/lib/jvm/java-6-sun/jre/bin/java
Press enter to keep the default[*], or type selection number:
输入 有包含 “sun” 的行的前面的数字。如上面显示,则输入2,然后回车确定。
配置JAVA环境变量:
sudo gedit /etc/environment
在其中添加如下两行:
CLASSPATH=.:/usr/lib/jvm/java-6-sun/lib
JAVA_HOME=/usr/lib/jvm/java-6-sun
sudo gedit /etc/jvm
将文件中的
/usr/lib/jvm/java-6-sun
这一行填入到配置块的顶部
安装浏览器的JAVA Plugin(可选):
sudo apt-get install sun-java6-plugin
java中文支持(或乱码的解决):java程序是跨平台的,但需要解决中文支持问题。
方法很简单,就是在java安装目录下放进去一个中文字体即可。
cd /usr/lib/jvm/java-6-sun/jre/lib/fonts
sudo mkdir fallback
cd fallback
sudo ln -s ~/.fonts/fireflysung.ttf(我选了最新的文泉驿夸父字体,/usr/share/fonts/wenquanyi/wqy-zenhei/wqy-zenhei.ttf)
sudo mkfontdir
sudo mkfontscale
2。搭建ubuntu下的C++编程环境:
编译器:sudo apt-get install build-essential gcc make autoconf [...]