Posted 11 months, 1 week ago at 11:32 am. 0 comments
以下全文来自 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: 43% [?]
Tags:
gnome,
install,
linux,
ls,
ubuntu
Posted 11 months, 1 week ago at 11:32 am. 0 comments
ls -l | wc -l
解读为:ls 按行显示,返回行数
或者
ls | wc -w
解读为:ls 结果中,分隔符的数量
但是比实际文件数多一个。原理在于 wc 的使用。利用wc指令我们可以计算文件的Byte数、字数、或是列数。比如
wc a.txt
缺省情况下,wc 将统计文件 a.txt 中的行、字和字节数
参数为:
-c 统计字节数。
-l 统计行数。
-m 统计字符数。这个标志不能与 -c 标志一起使用。
-w 统计被定义为由空白、跳格或换行字符分隔的字符数。
Popularity: 13% [?]
Tags:
ls
Posted 11 months, 1 week ago at 11:32 am. 0 comments
反向连接不需要网关映射,因此不需要惊动网管大人,这样我就可以从家里(ADSL)连接控制单位局域网中的我的机器…
嘿嘿…坏处就是,两头都要有人…
感谢 pal(小时)蹲在我家里帮忙测试。
ssh 反向连接
如果没有安装 ssh的话,安装之
sudo apt-get install ssh
被控端,执行
ssh -f -N -R 10000:localhost:22 guoshuang@xxx.xxx.xxx.xxx
控制端执行
ssh guoshuang@localhost -p 10000
参考此文
vnc 反向连接
其实只要网关(防火墙)没有关掉 5500 就可以。注意:是5500能出去即可,不是进来,所以一般都是开放的。
sudo apt-get install x11vnc
控制端执行下面命令,等待邀请
vncviewer -listen
被控端,主动发起邀请
x11vnc -connect xxx.xxx.xxx.xxx:5500
参考此文
windows 和 mac 下的软件可参考下文
Free and easy remote access (through firewalls and NAT routers) with VNC reverse connections
内网远程控制全攻略
注意:vncviewer -fullscreen 模式全屏连接 vnc,用 f8 或者 ctrl+esc esc 退出。即便如此,也会经常出现不能退出或者控制失灵的情况,这篇 patch: fix WM bindings for vncviewer -fullscreen 应该有些帮助
或者使用 xvnc4viewer(sudo apt-get install xvnc4viewer)而不是tightvnc viewer。
f8 和窗口控制都没问题。
Popularity: 41% [?]
Tags:
blog,
hp,
install,
linux,
ls,
screen,
ubuntu,
unix,
vi
Posted 11 months, 1 week ago at 11:32 am. 0 comments
firefox 2.x 强制在 tab 而不是 新窗口打开
about:config,设置 browser.link.open_newwindow 为 3 即可。
only now tab show close buton
browser.tabs.closeButtons -> 0
always show tabs
browser.tabs.autoHide false
其他资料
firefox 2.x 的 single window mode
about:config里面将
browser. block. target_new_window布尔值设置为true
browser. link. open_external整数值设置为3
browser. link. open_newwindow整数值设置为3
browser. link. open_newwindow. restriction整数值设置为0
wall 在终端中发信息给其它用户。ctrl+d 结束
tty 发,tty 和 x win 皆可收
x win shell 发,tty 收不到。
点击这里打开新窗口浏览此网页
Popularity: 21% [?]
Tags:
ls,
shell,
tty,
ubuntu
Posted 11 months, 1 week ago at 11:32 am. 0 comments
错误信息 Error opening/initializing the selected video_out(-vo) device!
如果是在终端中敲命令的话
mplayer -vo x11 *.asf
如果用skin的话(必须保证有skin)
修改~.mplayer/gui.conf
找到相关选项,将其该为
vo_driver = “x11″
运行gmplayer
错误信息 Requested audio codec family [mp3] (afm=mp3lib) not available. enable it at compilation
# 開啟 Mplayer
# 在 Mplayer 上按右鍵 選 Preferences
# 切換到Codecs & Demuxer
# 找到 Audio codec family 選擇”FFmpeg/libavcodec audio decoders
# 按OK 重启 gmplayer
修復 Try adding “echo 1024 > /proc/sys/dev/rtc/max-user-freq” to your system startup scripts. 的方法有下列三種:
* echo 1024 > /proc/sys/dev/rtc/max-user-freq
* sysctl dev/rtc/max-user-freq=1024
* /etc/sysctl.conf 加入 dev/rtc/max-user-freq=1024
加了這個後, 若聲音會不同步, 建議就拿掉, 不然就在 mplayer 的 script 加入 -autosync 30 的參數
附上我的 ~/.mplayer/gui.conf 文件内容
enable_audio_equ = “no”
vo_driver = “x11″
vo_panscan = “0.000000″
vo_doublebuffering = “yes”
vo_direct_render = “no”
vo_dxr3_device = “/dev/em8300-0″
v_framedrop = “0″
v_flip = “0″
v_ni = “no”
v_idx = “-1″
a_afm = “ffmpeg”
vf_pp = “no”
vf_autoq = “0″
vf_lavc = “no”
ao_driver = “alsa”
ao_volnorm = “no”
softvol = “no”
ao_surround = “no”
ao_extra_stereo = “no”
ao_extra_stereo_coefficient = “1.000000″
dvd_device = “/dev/dvd”
cdrom_device = “/dev/cdrom”
osd_level = “1″
sub_auto_load = “yes”
sub_unicode = “no”
sub_pos = “100″
sub_overlap = “no”
sub_cp = “cp936″
font_factor = “0.750000″
font_name = “/media/hda1/WINDOWS/Fonts/simsun.ttc”
font_text_scale = “5.000000″
font_osd_scale = “6.000000″
font_blur = “2.000000″
font_outline = “2.000000″
Popularity: 24% [?]
Tags:
decode,
font,
ls,
mplayer,
vi
Posted 11 months, 1 week ago at 11:32 am. 0 comments
原文来自 Bash Shell Keyboard Shortcuts For Linux Users,大部分快捷方式我以前一无所知…
# Ctrl + A - Go to the beginning of the line you are currently typing on
# Ctrl + E - Go to the end of the line you are currently typing on
切到命令行开始|结尾
# Ctrl + L - Clears the Screen, similar to the clear command
清屏,类似于 clear 命令
# Ctrl + U - Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
清除光标以前
# Ctrl + H - Same as backspace
退格键 backspace
# Ctrl + R - Let’s you search through previously used commands
从命令历史中找
# Ctrl + C - Kill whatever you are running
终止命令
# Ctrl + D - Exit the current shell
退出 shell
# Ctrl + Z - Puts whatever you are running into a suspended background process. fg restores it.
??
# Ctrl + W - Delete the word before the cursor
清除光标之前
# Ctrl + K - Clear the line after the cursor
清除光标之后
# Ctrl + T - Swap the last two characters before the cursor
# Esc + T - Swap the last two words before the cursor
切换光标前最后两个字母(单词)
# Alt + F - Move cursor forward one word on the current line
# Alt + B - Move cursor backward one word on the current line
??在 ubuntu x windows终端中会切换到菜单!tty 可能可以
# Tab - Auto-complete files and folder names
自动补全
# Ctrl + Y - to paste it (as in delete and copy) all text in front of the cursor
粘贴(刚才 ctrl+w 或者 ctrl+k 的内容)
# Esc + . (or Esc + Underscore) - Insert Last Argument
??
# Ctrl + b - Move back a character
# Ctrl + f - Move forward a character
向前|后移动一个字母
# Ctrl + r - Search the history backwards
??
# Ctrl + xx - Move between EOL and current cursor position
光标在当前位置和 EOL 之间切换(EOL end of line?但我实验,是在开头和当前位置之间切换,怎么理解?谁知道?)
# Ctrl + x @ - Show possible hostname completions
# Alt +
# Alt + > - Move to the last line in the history
# Alt + ? - Show current completion list
# Alt + * - Insert all possible completions
# Alt + / - Attempt to complete filename
# Alt + . - Yank last argument to previous command
# Alt + c - Capitalize the word
# Alt + d - Delete word
# Alt + l - Make word lowercase
# Alt + n - Search the history forwards non-incremental
# Alt + p - Search the history backwards non-incremental
# Alt + r - Recall command
# Alt + t - Move words around
# Alt + u - Make word uppercase
# Alt + back-space - Delete backward from cursor
# Here “2T” means Press TAB twice
# $ 2T - All available commands(common)
# $ (string) 2T - All available commands starting with (string)
# $ /2T - Entire directory structure including Hidden one
# $ 2T - Only Sub Dirs inside including Hidden one
# $ *2T - Only Sub Dirs inside without Hidden one
# $ ~2T - All Present Users on system from “/etc/passwd”
# $ $2T - All Sys variables
# $ @2T - Entries from “/etc/hosts”
# $ =2T - Output like ls or dir
Popularity: 31% [?]
Tags:
blog,
linux,
ls,
screen,
shell,
tty,
ubuntu,
vi
Posted 11 months, 1 week ago at 11:32 am. 0 comments
原文来自 http://xlntsolution.blogspot.com/2007/03/feisty-performance-fly-like-butterfly.html
blogspt 似乎再次封掉了,:( 我是通过这个代理看到的
部分内容如下:
sudo gedit /etc/hosts
你会看到类似
127.0.0.1 localhost
127.0.1.1 guoshuang-laptop
这样的内容,在 localost 后面加上你的主机名,如guoshuang-laptop
127.0.0.1 localhost guoshuang-laptop
127.0.1.1 guoshuang-laptop
1. Disable IPv6
At least I dont need IPv6 yet so this is what I do to disable it.
sudo kate /etc/modprobe.d/aliases
And change the line:
alias net-pf-10 ipv6
to:
alias net-pf-10 off #ipv6
This will disable IPv6 on all network interfaces. You need to reboot.
2. Run boot processes in parallel
This will make upstart to run the boot processes in parallel and speed up the boot process.
sudo kate /etc/init.d/rc
Find and change the line:
CONCURRENCY=none
to:
CONCURRENCY=shell
3. Aliasing hostname to localhost
Right or wrong, you decide. But I picked this up in the Ubuntu forums the other day and it does improve the startup of some apps.
sudo kate /etc/hosts
and add you hostname to the first line after localhost like this:
127.0.0.1 localhost yourhost
127.0.1.1 yourhost
4. Disable pango
I know that this is already taken care of in firefox but it still makes a good performance boost to thunderbird and some other apps.
sudo kate /etc/environment
and add:
MOZ_DISABLE_PANGO=”1″
5. Preload
It does what you think. It preloads most common used libs and files = faster startup times on your applications.
sudo apt-get install preload
What about prelink?
Prelink is no longer necessary in feisty. Feisty uses a new linking mechanism called DT_GNU_HASH which speeds up the linking process without the need for continuously running prelink.
6. Swappiness
The default value for vm.swappiness is 60 in Ubuntu Feisty whic is a good default value but if you want to tweak the performance a little bit more you can change this value to a lower value to reduce the load of the swap. If you run the follwing command:
sysctl -q vm.swappiness
You will se that the value is set to 60. And by running:
sudo sysctl vm.swappiness=10
You will change the value from 60 to 10 which will make your system write to swap a lot less and I would recommend this to everyone that has 512 mb of memory or more. If you find that you have very little use of swap set the value to 0. This will not disable the swap but it will make your system write to the swap as little as possible and keep as much as possible in memory. This makes a huge improvment when switching between applications since they are now likley to be in physical ram instead of on the swap partition.
To set your value permanent you need to change the sysctl.conf file:
sudo kate /etc/sysctl.conf
Add the line
vm.swappiness=10
To the end of the file. This way it will be set upon boot.
I’ve found that the value of 5 works very good for my use and I have 1 GB of memory.
7. Profile grub
There is a option to grub called profile which will profile your startup. What it does is that it kind of indexing all the files read during boot/startup and later on it will find and read those files quicker.
Hit the escape button when booting to get to the grub menu.
Select your default boot kernel and hit the e button.
Go down to the second line and hit the e button again.
Add profile to the end of the line and press enter.
Hit the b button to boot with your new option.
The first time it will take a little bit longer to boot because it has to build the index (or whatever they want to call it) but every boot after this will be a lot smoother.
You need to do this every time you update your kernel or have made other huge changes to your system that might affect the files needed during boot.
The following could cause your system to be unstable or even unable to boot so please use them care…
8. sysv-rc-conf
Install sysv-rc-conf and disable the services you don’t need at startup.
As an example. On my computer I don’t have bluetooth so I don’t need to start it at boot time.
So simply disable what ever you don’t have or use.
sudo apt-get install sysv-rc-conf
and then run:
sudo sysv-rc-conf
9. Kernel hacking
Even thought the new kernel in feisty is very good and already tuned a bit there still are some things you can do to the kernel the will make your system snappier and boot up even faster.
Use this thread from the ubuntu forums as a guide on how to compile your own kernel.
master kernel thread
What I do is that I make sure to add my file systems I use to the kernel instead of loading them as modules. Take out whatever I don’t have or use and then compile my new and hopefully improved kernel 
10. Filesystem setup
The choice and use of the file system is a big issue when dealing with performance. Depending on your usage of your system you might need to configure your filesystem different.
For my usage I like to use the following setup (which I think is a good desktop setup)
Mountpoint
filesystem
Size
/boot
ext2
100 MB
/root
LVM, VG=system, xfs
6 GB
/swap
LVM, VG=system, swap
The size of RAM in your computer. Making it smaller and you will not be able to hibernate.
/home
LVM, VG=system, xfs
1 GB, or the rest of the space in that VG
/data
LVM, VG=data, xfs
The rest of the free space
Using the following options in fstab for all my xfs partitions:
noatime,nodiratime,logbufs=8
Using LVM can really speed up the disk performance. And you get a lot of other good stuff with it as well. Read more about LVM here.
I choose to have /root and /home on one VolumeGroup and /data on another simply because I can then split them up on diffrent physical disks and have them spanning over multiple physical disks witch really speeds up the reads and writes.
At the moment this is pretty much it but I will update this as soon as I discover more performance tunings…
Tuning applications
Not so much to add here but this what I like to do.
1. Firefox
Use swiftfox instead. It’s optimized for your CPU.
Install the fasterfox add-on
If it’s not already set, disable IPv6. In the url enter about:config and find the ipv6 entry and disable it.
Install adblock plus add-on
to disable ad’s it helps a lot 
2. openoffice
If you don’t need that extras that java JRE provides then simply disable it openoffice. That’s what I do.
Once Feisty is released I will have a script done that all you brave people can run that will do most of this in one go 
I will also write down the kernel options that I use to compile my kernel for those who are interested.
But until then, use this and enjoy a much faster and smoother running Feisty.
Popularity: 44% [?]
Tags:
blog,
cat,
feisty,
install,
laptop,
ls,
right,
shell,
tty,
tweak,
ubuntu,
vi
Posted 11 months, 1 week ago at 11:32 am. 0 comments
sudo apt-get install checkgmail
即可。这个比下面的 gmail-notify 功能更多一些,可以直接查看最近的一些邮件,发信等等。
二、gmail-notify
sudo apt-get install gmail-notify
更适合等信。
三、直接用 livebookmark 订阅自己的邮箱,只要有firefox就可以了,win 下也可如此。我以前主要用这种方式。
https://mail.google.com/mail/feed/atom
BTW:建立 checkmail 菜单操作如下
sudo gedit /usr/share/applications/checkgmail.desktop
内容如下:
[Desktop Entry]
Encoding=UTF-8
Name=CheckGmail
Exec=checkgmail
Terminal=false
Type=Application
StartupNotify=true
Icon=
Categories=Application;Network;
然后刷新 gnome 菜单
sudo killall gnome-panel
checkgmail 的图标图片在 gmail 图标 可以找到。
相关日志:
gmail IMAP 协议设置
checkgmail 资料
How do I play a sound when new mail arrives?
Enter a command in the “Command to execute on new mail” section in the preferences. For example, to play a WAV sound, you could use
aplay /path/to/mysound.wav
What else can the “Command to execute on new mail” do?
Well, it can do whatever you want. I use it to turn on my laptop’s dedicated mail LED light:
echo 1 > /proc/acpi/asus/mled
but anyone with the Blinkd software package installed could get their numlock or scroll-lock lights to blink with
blink –numlock –rate %m
What’s that ‘%m’ thing doing there? Well, that’s a new feature of version 1.10.1, and represents the number of new messages. Which means that in the example above your numlock LED will blink with the number of new messages. It’s gimmicky, I know (and there’s no way I could live with it personally) … but you’ve gotta admit, it’s kinda cool!
If you’re going to turn an LED on, though, you’ll also want to turn it off - and that’s why there’s also a “Command to execute for no mail” option. In the example above, you’ll want something like
blink –numlock –rate 0
And of course, you can combine options together by using semicolons, for example:
aplay /path/to/mysound.wav; blink –numlock –rate %m
The whole idea is to be as extensible here as possible, and recognise that not everyone wants a sound to play when new mail arrives, but they might want something else to happen instead …
Popularity: 36% [?]
Tags:
blog,
cat,
ebook,
gnome,
install,
laptop,
ls,
screen,
ubuntu
Posted 11 months, 1 week ago at 11:32 am. 0 comments
打开 ~/.gimp-2.2/toolrc 文件(gimp 2.3 目录为 ~/.gimp-2.2/toolrc),把下面移动工具(move)部分的内容放到最前面即可
(GimpToolInfo “gimp-move-tool”
(stock-id “gimp-tool-move”)
(visible yes))
visible yes 表示显示此工具
参考 調整 gimp tools button
Popularity: 17% [?]
Tags:
hp,
ls,
vi
Posted 11 months, 1 week ago at 11:32 am. 0 comments
vlc -I http
默认 /usr/share/vlc/http 和 8080
http://127.0.0.1:8080/ 控制
http://www.videolan.org/doc/play-howto/en/ch04.html
http://www.videolan.org/doc/play-howto/en/apb.html
The HTTP interface
VLC ships with a little HTTP server integrated. It is used both to stream using HTTP, and for the HTTP remote control interface.
To start VLC with the HTTP interface, use:
% vlc -I http [--http-src /directory/ --http-host host:port]
If you want to have both the “normal” interface and the HTTP interface, use vlc –extraintf http.
The HTTP interface will start listening at host:port (:8080 if omitted), and will reproduce the structure of /directory at http://host:port/ ( vlc_source_path/share/http if omitted ).
Use a browser to go to http://your_host_machine:port. You should be taken to the main page
VLC is shipped with a set of files that should be enough for generic needs. It is also possible to customize pages. See Appendix B, Building pages for the HTTP interface.
Available pages are :
/index.html gives access to the playlist, allows you to add or delete items and to control playback.
/info.html gives you statistics and data about the usage of the server.
/admin/. This folder gives more power and is therefore protected by a login/password. The default couple is admin/admin. The passwords and users can be changed in the .access file in the VLC_directory/share/http/admin folder. (Each folder can be protected, see Appendix B, Building pages for the HTTP interface for more details).
/vlm/. This folder allows you to control the VideoLAN manager (VLM). The VLM allows you to stream several input streams with only one VLC instance. For more information about VLM, please look at the Streaming Howto.
Popularity: 9% [?]
Tags:
ls,
vi
ad 468x60