Skip navigation.

無語録むごろく

ムゴロク

Posts tagged with "Linux"

Mplayer vorbis acm

http://blog.eshangrao.com/index.php/2006/09/28/282-ubuntumplayeravi

用不了那個codecs.conf..

看來..還是等一下..看看是什麼問題..

SSH 的問題

今天突然用不了ssh

error message 只有

Permission denied (publickey).

http://codept.blogspot.com/2006/11/permission-denied-publickey.html

這裏說只要把

If this happen, set value for ChallengeResponseAuthentication to yes.

那個key 在 /etc/ssh/sshd_config.

回家試一下

kde-base/kdelibs-2.5.6-r2 failed

小弟emerge 時 fail了 要把libart_lgpl revert to 2.3.17, 未知何故,遲些再試upgrade libart_lgpl

http://bugs.gentoo.org/show_bug.cgi?id=168649
http://lists-archives.org/kde-linux/01883-error-compiling-kdelibs-3-4-92.html

MySQL 5.0.32

這幾天因需要故emerge mysql,發現不知何故要用USE="-berkdb"才能emerge 進去,百思不得其解

VirtualBox-1.3.4-r1

自從 Portage 更新到這個版本後, VirtualBox 在我的機器上到近期才能更新成功。原因不明,我只是再 compile 一次 kernel 罷了。

然後,再 emerge 一次 virtualbox ,再把可使用者加到 vboxusers 就可以用︰

 * 
 * In order to launch VirtualBox you need to start VBoxSVC first,
 * this can be done with:
 * vboxsvc --daemonize && virtualbox
 * 
 * You must be in the vboxusers group to use VirtualBox.
 * 
 * The last user manual is available for download at:
 * http://www.virtualbox.org/download/UserManual.pdf
 * 


用以下的命令加使用者到 vboxusers 組,以下為加 root 使用者的例子︰

gpasswd -a root vboxusers


最後還發現添加了VM也還起動不了,會出現如下的錯誤︰

VirtualBox kernel driver not installed. 
VBox status code: -1908 VERR_VM_DRIVER_NOT_INSTALLED. 


只要把 vboxdrv moduels 用以下指令加到系統中就可以了︰
modprobe vboxdrv

將 Xscreensaver 移植到你的 Gnome-screensaver 上

首先下載以下兩個文件:

migrate-xscreensaver-config.sh

xscreensaver-config.xsl

把它們都移到 /usr/libexec/gnome-screensaver 之下,方便管理。

把 migrate-xscreensaver-config.sh 變為可執行

chmod +x migrate-xscreensaver-config.sh


以下是把其中一個GLMatrix 轉成 Gnome-screensaver 可用的︰

將工作目錄移到 /usr/share/applications/screensavers/
用以下的命令把原本 Xscreensaver 的設置轉成 Gnome-screensaver︰
你會發現有很多.desktop吧,它們都是 Gnome-screensaver 的設置文件呢!

/usr/libexec/gnome-screensaver/migrate-xscreensaver-config.sh /usr/libexec/gnome-screensaver/xscreensaver-config.xsl /usr/share/xscreensaver/config/glmatrix.xml


之後你會發現在 /usr/share/applications/screensavers/ 多了一個 glmatrix.desktop 文件。

把 Xscreensaver 用的 screensaver 文件移到 Gnome-screensaver 的作用目錄下:

cp /usr/lib/misc/xscreensaver/glmatrix /usr/libexec/gnome-screensaver/


這樣子就成了!開啟 gnome-screensaver-preferences 看一下吧~!

如果你是用 Gentoo 以外的版本,請參考︰
Howto: Add xscreensavers to gnome-screensaver

Bash Shell 在中文目錄下的不正常現象

在 /etc/bash/bashrc 找出有關PS1的段落改成以下那個樣子:

if [[ ${EUID} == 0 ]] ; then
    PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \[\033[01;31m\] \A \$ '
else
    PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \[\033[01;34m\] \A \$ '
fi

下載漫畫的bash shell script

無聊下的練習作品,寫得不太好,看倌有用的話就拿來用吧!

#/bin/bash

file_name=`echo $1 | awk -F/ '{print $NF}'`
file_name_main=`echo $file_name | awk -F. '{print $1}'`
file_name_format=`echo $file_name | awk -F. '{print $NF}'`
file_location=`echo $1 | awk -F$file_name '{print $1}'`

file_name_prefix=`echo $file_name_main | awk -F[[:digit:]] '{print $1}'`
file_name_suffix=` echo $file_name_main | awk -F[[:alpha:][:punct:]] '{print $NF}'`
file_name_suffix_len=`echo $file_name_suffix | awk '{print length($file_name_suffix) }'`

#file_padding=`echo $file_name_suffix | awk -F[1-9] '{print $1}'`

min=$2
max=$3

mkdir $file_name_prefix
cd $file_name_prefix

while [ $min -le $3 ]
do
        file_name_suffix_mod=`echo $min | awk '{line = sprintf( "%'$file_name_suffix_len's", '$min'); print line }' | awk '{gsub(/[[:space:]]/, '0');print}'`
        echo $file_location$file_name_prefix$file_name_suffix_mod.$file_name_format >> wget.temp
        let min+=1
done

wget -i wget.temp
rm -f wget.temp
cd ..

Proxy ARP and Prioritization

Which ports do I have to configure in a firewall or router to run aMule?

One has to distinguish between incoming and outgoing connections. Normally, all ports of a router are open for sending data (outgoing connection).

So, in this normal case, You only have to configure the ports for incoming connections:

aMule works even with no specific ports opened, but you won't get a HighID in this case. As mentioned above, to be given a HighID, port 4662 TCP (or the one set in the Preferences) must be listening (i.e. opened in your firewall and forwarded in your router).

Apart from that port, to have an optimal ED2K experience, two more port should be enabled for listening as well: UDP ports 4672 and 4665 (that is, TCP_PORT+3) (both can be changed to any other number in the Preferences).

If you are using Kad and your router is doing NAT (Network Address Translation), you should prevent your router from remapping the port of outgoing UDP port 4672 packets. This might help if you have a high ID but Kad status is 'firewalled'.

What does each port do?

Well, since most ports can be configured to be set to any other number, the defaults will be listed. The traffic direction is from client perspective (you):

* 4661 TCP (outgoing): Port, on which a server listens for connection (defined by server).
* 4662 TCP (outgoing and incoming): Client to client transfers.
* 4665 UDP (outgoing and incoming): Used for global server searches and global source queries. This is always Client TCP port + 3
* 4672 UDP (outgoing and incoming): Extended eMule protocol, Queue Rating, File Reask Ping
* 4711 TCP: WebServer listening port.
* 4712 TCP: External Connection port. Used to communicate aMule with other applications such as aMule WebServer or aMuleCMD.
December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31