vi 编辑文件错误处理
Posted 6 months, 1 week ago at 8:08 pm. 0 comments
vim 编辑文件的时候曾经死掉,以后每次打开 a.txt 都会报告,要么已经被打开了,要么曾经崩溃过。
删除 .a.txt.swp 后,正常。
rm .a.txt.swp
Popularity: 28% [?]
Tags: vi你查看的存档文件来自 February, 2008.
vim 编辑文件的时候曾经死掉,以后每次打开 a.txt 都会报告,要么已经被打开了,要么曾经崩溃过。
删除 .a.txt.swp 后,正常。
rm .a.txt.swp
Popularity: 28% [?]
Tags: vi在拖动一个文件进入 gedit 的时候如果跳出 nautilus 的 ftp 要求确认覆盖文件窗口时,nautilus 假死。必须
ps -aux|grep nautilus
并
kill xxx
有时间找一下资料
Popularity: 28% [?]
Tags: bug, nautilus从 blog.guoshuang.com 正式剥离,截至今天的日志为止,日期都是同一天,前后顺序也不对。请自行站内搜索。
需要解决的bug如下:
more
Popularity: 20% [?]
Tags: blog以下全文来自 http://www.herofit.cn/2007/03/20_168
ipmsg(译名:飞鸽传书)是局域网内的文件传输工具。它是免费的,开源的,在GPL协议下发布。它有windows,linux,Mac,java等不同平台或语言的版本。
下面我来说一下它的GTK2版在ubuntu dapper下的安装过程。
安装依赖的包
sudo apt-get install libxml-parser-perl libgnomeui-dev libpanel-applet2-dev
下载
wget http://www.ipmsg.org/archive/g2ipmsg-0.9.1.tar.gz
更改语言(不改则为日语)
将g2ipmsg-0.9.1/src/codeset.c中的CP932 改为CP936
配置
./configure –prefix=/usr –sysconfdir=/etc –enable-systray
编译
make
安装
sudo make install
使用
将G2IPMSG Applet小程序添加到你的面板上。
效果如图:
g2ipmsg.png
参考资料:
http://www.ipmsg.org
让gaim发声
Filed under: linux, 软件 — ahlongxp @ 22:00
以前以为gaim发声是它本身的事,今天仔细看了一下发现,gaim还可以利用系统中的程序进行发声。
sudo apt-get install alsaplayer
alsaplayer是alsa驱动的命令行的播放录音工具,可用于多个用途。现代linux一般都用alsa,所以它是最好的选择了。
装完后就有了播音工具aplay,录音工具arecord。让gaim发声用aplay就可以了。
主界面中按Ctrl+P, 选Sounds。
将Method选成command,Sound command填成/usr/bin/aplay %s。其它的可随意设置。
注意,此时的Test是无效的,要看效果请重启gaim。
gaim不再哑巴了吧!
Popularity: 34% [?]
Tags: gnome, install, linux, ls, ubuntuVI编辑器有3种模式这3种模式中,插入模式是最基础的模式。
用好了插入模式,才可谈及想命令和底层模式使用发展。
当然更高级模式是在掌握了更多的vi知识上才能提高效率的。
而光标类型的命令是插入和命令模式通用的,只是命令模式下以前消除字符的快捷键只是起到移动光标位置的作用 。
下来就对以知的光标命令作测试和总结。
移动光标类命令:
i,insert和esc键是在2个模式下互换的命令,大小写无所谓。
以下为命令和插入模式下,各键以中心点为单位移动1个字符朝那边偏移。
(^代表ctrl),数字代表关num lock的小键盘,文字代方向键盘。如图:
k 8 上
h l 4 6 左 右
j 2 下
home 和 end键使光标移动当行最左边和最右边。
Delete:光标不动,删除后面字符1个
以下为命令模式下各键光标位置变化:
Space
w或W:光标总是向后移1个单词,跨越1个空格,tab
b或B:如光标未在本单词字首,移动到字首,如果光标就在本单词的第一个字上,往回移动到前面单词的字首。
e或E:如光标未在本单词字尾,移动到字尾,如果光标就在本单词的最后一个字上,往回移动到前面单词的字尾。
):光标向移动到下一个句子的第一个单词的的第一个字母上。
(:光标向移动到上一个句子的第一个单词的的第一个字母上。
}:光标向移动到下段落开头
{:光标向移动到下段落开头
[bi]n应该为正整数[/bi]
nG:光标移动至n行首
n-:光标下移n-1行至行首
n+:光标下移n+1行至行首
n$:光标下移n-1行至行尾
0:光标移至当前行首
$:光标移至当前行尾
Ctrl+G——光标所在位置的行数占据总高的百分比。
Enter:光标下移一行
Space:光标后移动1字符
Backspace:光标前移动1字符
以下为插入模式下各键光标位置变化:
Enter:光标带整行下移一行
Space:光标后移动1字符同时,光标后所有段落排队方式都后移动一个字符。
Backspace:光标前移动1字符同时删除前面的字符,光标后所有段落前移一个字符。
屏幕翻滚类命令
[bi]插入和命令模式下同用命令。[/bi]
pageup:上翻1页
pagedown:下翻1页
[bi]命令模式下命令[/bi]
Ctrl+u:向文件首翻半屏
Ctrl+d:向文件尾翻半屏
Ctrl+f:向文件尾翻一屏
Ctrl+b;向文件首翻一屏
[bi]插如模式下命令[/bi]
Ctrl+u:相当于Backspace键
编辑命令
i、a、r——在光标的前、后以及所在处插入字符命令(i=insert、a=append、r=replace)。
cw、dw——改变(置换)/删除光标所在处的单词的命令 (c=change、d=delete)。
x、d$、dd——删除一个字符、删除光标所在处到行尾的所有字符以及删除整行的命令。
插入文本类命令
i :在光标前
I :在当前行首
a:光标后
A:在当前行尾
o:在当前行之下新开一行
O:在当前行之上新开一行
r:替换当前字符
R:替换当前字符及其后的字符,直至按ESC键
s:从当前光标位置处开始,以输入的文本替代指定数目的字符
S:删除指定数目的行,并以所输入文本代替之
ncw或nCW:修改指定数目的字
nCC:修改指定数目的行
unbuntu VIM 版本 7.0.35 测试
Popularity: 16% [?]
Tags: vi每次系统启动的时候文件系统检查程序总会花费很长时间来检查Win下面的分区,
编辑 sudo gedit /etc/fstab 找到fat32分区那一行,将最后一个数字改成0
Popularity: 47% [?]
Tags: ubuntu我用的是 feisty herd4 的光盘。
ubuntu broadcom无线网卡配置
无线网卡是Broadcom的,在ubuntu下安装相当简单
sudo apt-get install bcm43xx-fwcutter
接下来在“联网”里把无线网卡激活便是了
guoshuang2007-06-14+ if u can not download that .so file from xxxx.googlepage.com.u can read things below
On ubuntu, you can sudo aptitude install bcm43xx-fwcutter, download this file: http://drinus.net/airport/wl_apsta.o and sudo bcm43xx-fwcutter -w /lib/firmware wl_apsta.o (you might need to replace /lib/firmware with /lib/firmware/`uname -r`)
I expect ti would be the smae for gentoo but emerge bcm43xx-fwcutter rahter than sudo aptitudei sntall bcm43xx-fwcutter or soemthing… I’ve never used gentoo…
or u can visit this post 在 ubuntu 源内找 .deb 文件
ubuntu nvidia 6150 显卡驱动
在 nvidia 官方linux drivers站点找到你需要的最新驱动。如果不是64位 ubuntu 安装 Linux IA32 即可。64 位 AMD 选择 Linux AMD64/EM64T。我使用的是这个 NVIDIA-Linux-x86-1.0-9755-pkg1.run
注意: 官方的 us.download.nvidia.com… 速度慢,把前面改成 cn.download.nvidia.com… 即可。
安装步骤:
1. ctrl+alt+f1 切换到 tty 1
2. /etc/init.d/gdm stop
关掉 x window
3. sudo apt-get install linux-headers-$(uname -r) build-essential
安装 libc 等编译环境
4. sudo sh NVIDIAxxxxxxxx.run
根据提示信息执行编译即可。
5. /etc/init.d/gdm start
重新进入 x window
声卡驱动
3239 的声卡在 windows 下显示为 Conexant hight definition audio,在 ubuntu 下会识别为 HDA NVidia(Alsa mixer)(还可以选择 Conexant CX20549 Venice OSS Mixer,但我没有选)。刚开始没有声音,几天之后(估计是哪个 update 的缘故,很可能是内核 2.16.20 的原因)就有了。
把网络加密了还不满意?让我们暗度陈仓,把非授权使用者拒之门外吧。IP806LM提供LAN和Internet访问控制功能,并可以分别控制。首先要让笔记本连接上无线AP,然后在“无线”页面的“访问控制”中选择“只允许选取的无线客户端”,再点“选择客户端”。选中允许访问的计算机名就可以了。 LAN和Internet访问控制的设置大同小异,截图为LAN控制方式。没被允许的连接,即使它能连接上无线AP,也无法连接LAN和 Internet,只好望洋兴叹了。
conexant high definition audio
http://ubuntuforums.org/showthread.php?p=2251034
http://forum.openrays.org/read.php?tid=4105
http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=168685&highlight=high+definition+audio
http://bbs.chinaunix.net/archiver/?tid-901216.html
lspci
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)
Popularity: 100% [?]
Tags: hp, install, laptop, ubuntu江苏省常州市电信,推荐电信用户使用:
deb http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ feisty main restricted universe multiverse
欧洲,此为官方源,推荐使用
deb http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse
或者 lupa 的
deb http://cn.archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse
相关日志
Popularity: 15% [?]
Tags: feisty打开添加/删除,选择 所有可安装应用程序,在 其他 类别中找到 Ubuntu restricted extras,勾选安装即可。
包括 mp3,java,flash 等软件包。

WMV, RealMedia 以及其它一些编码格式,安装 w32codes 包
wget -c http://www.debian-multimedia.org/pool/main/w/w32codecs/w32codecs_20061022-0.0_i386.deb
sudo dpkg -i w32codecs_20061022-0.0_i386.deb
加密 DVD 安装这个
http://www.videolan.org/libdvdcss/
安装这些解码器
sudo apt-get install libxine-extracodecs totem-xine mplayer ffmpeg lame faad sox mjpegtools libxine-main1
Click Applications → Add/Remove. Select Other and then select the Ubuntu restricted extras package. Click OK.
#
To play most DVDs you’ll need the libdvdcss2 package from [WWW] here. This is a third party package, and not supported by Ubuntu. See Installing Software to install the file.
#
Users of x86 systems may also install some additional Windows codecs that are only available in third-party repositories.
#
#
AMD64 architecture
*
The Windows Codecs package cannot be used directly by the AMD64 distribution. Some people solve this problem by installing the i386 Ubuntu distribution inside a chroot (for example, Linux Vserver or [WWW] dchroot), and this works very well.
If after following this procedure, DVD playback still fails, your DVD drive may not have its region code set. Drives that have been activated with a DVD player on Windows shouldn’t require this, but new drives or new computers that have never had anything but Linux installed most likely will. Install the regionset package and run it to the set the region code under Ubunt
You need codecs (decoders) and software to read the contents of DVDs to be able to see multimedia files of different formats, as well as DVDs. These software are provided free for use in Ubuntu - however due to restrictions on distributing these modules in countries like the USA, they are not always easy to find. This post will tell you how to find them to install them on your Ubuntu computer.
Update: you can add the PLF repository to your sources.list to get the required multimedia codecs and binaries through apt-get (Synaptic).
The line to add to your /etc/apt/sources.list file would be:
deb http://packages.freecontrib.org/ubuntu/plf/ breezy free non-free
After you have done this, do
$sudo apt-get update
Now you can install the following using the PLF repository:
* w32codecs: A package of codecs needed to play multiple formats, notably DivX. (disponible. Maintainer: MirSPCM)
* RealPlayer: Stream player (disponible. Maintainer: keyes)
* libdvdcss2: The library needed to play back encrypted DVDs.(Disponible. Maintainer: MirSPCM)
* Xdtv: http://xawdecode.fr.st - Tv viewer and recorder, the dependancies, and plugins like plug-m (Maintainer: Stéph)
* Free-Go and FreePlayer: logiciels pour freenautes exclusivement (and Linux compatible FreePlayer mods: Homeplayer, FreeMode)
* autopano-sift: http://freshmeat.net/redir/autopano-sift/47274/url_homepage/autopano-sift - Panorama Image compositor (Disponible dans Marillat, Maintainer: Stéph))
* hugin: http://hugin.sourceforge.net/ - you can assemble a mosiac of photographs into a complete immersive panorama, stitch any series of overlapping pictures and much more.
* Divx4Linux: http://www.divx.com/divx/linux/ - Read and create DivX (Période de test. Maintainer: Stéph)
* Varsha: http://varsha.sourceforge.net/ - make DVD slideshows, videos, and interactive menus.
* dir2ogg: http://badcomputer.org/unix/dir2ogg/ - Converts mp3, m4a, and wav files into ogg-vorbis format
* dvdstyler: http://dvdstyler.sourceforge.net/ - DVD Authoring System
* kmplayer: http://kmplayer.kde.org/ - a working player for KDE
* kplayer: http://kplayer.sourceforge.net/ - a working player for KDE
* K9Copy: http://k9copy.free.fr/ - a small utility which allows the copying of DVDs on Linux.
* XDVDShrink: http://dvdshrink.sourceforge.net/ - allows you to create fair-use archival copies of DVD content on single-layer writable DVDs.
* Sharpmusique: http://www.nanocrew.net/software/sharpmusique/ - iTunes music store frontend, already packaged by the author, for Ubuntu Breezy here: http://www.nanocrew.net/sw/sharpmusique/sharpmusique_1.0-1_i386.deb
For the future, if the repositories above are not available, let me remind myself that I can find libdvdcss2 and w32codecs specially built for Ubuntu at the following locations:
libdvdcss2 : ftp://cipherfunk.org/pub/packages/ubuntu/pool/main/libd/libdvdcss/
w32codecs : ftp://cipherfunk.org/pub/packages/ubuntu/pool/main/w/w32codecs/
These two are required for playing dvds and for playing various kinds of media files, such as .avi .wmv etc in Ubuntu, and these packages are hard to find for Ubuntu. The Debian .debs usually work just fine, but it is good to have the Ubuntu .debs for these.
Disclaimer: In certain countries it may be illegal to use these libraries, since they may circumvent copyright laws, and the infamous DRM laws. Also, by linking to these software, I do not seek to encourage their use. Use at your own discretion. For the record, the site I linked to is not mine, and I have no clue who administers it.
Sad world this, where one has to risk violating the law to watch movies on DVDs that one has bought with one’s own money!
Popularity: 15% [?]
Tags: multimedia原文来自 Ten tips for new Ubuntu users,大致内容如下:
1. 由于版权原因,ubuntu不支持大部分多媒体文件格式,清参考 https://wiki.ubuntu.com/RestrictedFormats安装需要的软件包。
2. 改变首选应用程序。在菜单 系统 - 首选项 - 首选应用程序中可以修改默认的关联程序。更多修改可使用命令行
sudo update-alternatives –config editor
修改 editor - 默认的文本编辑器。
3. 除了 apt-get install xxx 外,sudo dpkg -i xxxx.deb 来安装 .deb 文件。
4. sudo 获得root权限,运行程序。gksudo 以root 权限运行图形化界面的软件。
sudo -s
或者
sudo su
以root身份登录
如果非常需要 root ,root 登录后 passwd 修改 root 密码。推荐使用 pwgen 来生成安全的密码。
注:sudo passwd root 设定 root 的密码。禁用 root 帐号,则执行命令:sudo passwd -l root
5. 添加用户到 sudo 权限组。
sudo usermod -G admin XXXXXXX
如果XXXXXXX已经是其它组的成员,使用 append 参数
sudo usermod -a -G admin XXXXXXX
也可以在 系统管理 - 用户和组中设置。
6. 安装其它桌面环境
apt-get install kubuntu-desktop (or edubuntu-desktop, xubuntu-desktop)
分别是 KDE,edubuntu,xfce(guoshuang+以前的 KDE 和 gnome 有冲突,不知道现在怎样)
7. 重新配置 xorg。
dpkg-reconfigure xserver-xorg
guoshuang+其实用 envy 脚本或者 nvidia 官方 linux 驱动即可。偶尔 vi /etc/X11/xorg.conf
8. 自动登录。在 系统 - 系统管理 - 登录窗口中可设置自动登录。
9. 编译软件。至少需要 sudo apt-get install build-essential
./configure
make
make install
10. 内核。
Popularity: 11% [?]
Tags: tips