显示标签为“Linux”的博文。显示所有博文
显示标签为“Linux”的博文。显示所有博文

20100422

Change from opensvn.csie.org to code.google.com

1. Create a new project in google code.
2. Reset the Subversion repository to revision 0.
Find the "Reset Subversion Repository" link at the bottom of the "Source" tab.
3. Sync between two svn host. Init first, then sync.
$ svnsync init https://xiaomao101.googlecode.com/svn/ https://opensvn.csie.org/xiaomao101/ --username ant101tna
Authentication realm: Google Code Subversion Repository
Password for 'ant101tna':
Copied properties for revision 0.
$ svnsync sync https://xiaomao101.googlecode.com/svn/ --username ant101tna
Transmitting file data .
Committed revision 1.
Copied properties for revision 1.
Committed revision 2.
Copied properties for revision 2.
Transmitting file data ...


Ref:
(1) Importing Subversion Repositories to Google Code
http://therightstuff.de/CommentView,guid,b984a8e7-e94d-4eed-a705-5dc479f959e8.aspx
(2) 將 Subversion Repository 搬進 Google Code 裡面
http://fourdollars.blogspot.com/2009/08/subversion-repository-google-code.html

How to dump svn from Free SVN Host

1. Download rsvndump
$ wget [from sourceforge.net]
2. Install rsvndump
$ ./configure
(If getting error, install the missing package, some times like libsvn-dev or libapr1-dev, just some dev package)
$ make
$ make install

3. Dump the web to local dump file.
$ rsvndump https://opensvn.csie.org/xiaomao101/ > csie_xiaomao101.dumpfile
4. Create a new repository and load the dump file to it.
$ svnadmin create new_repo_dir
$ svnadmin load new_repo_dir <>

20100421

Install Eclipse with Android Development Tools (ADT) plugin in Ubuntu

1. Install Eclipse main program
$ sudo apt-get install eclipse


2. Setup plugin source of Eclipse
Note: Ubuntu default Eclipse installation with no source in [Menu->Help->Install New Software]
(1) Add Eclipse source:
Name: Eclipse - galileo
Location: http://download.eclipse.org/releases/galileo

(2) Add Android source:
Name: Android Development Tools (ADT)
Location: https://dl-ssl.google.com/android/eclipse/


3. Install ADT
...

Ref:
(1) 3. Install the ADT Plugin for Eclipse
http://developer.android.com/sdk/index.html
(2) requires 'org.eclipse.gef 0.0.0' but it could not be found
https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/482244

20100420

No man page for libc function 'fprintf'

# sudo apt-get install manpages-dev

ref:https://lists.ubuntu.com/archives/ubuntu-users/2009-May/182747.html

20100405

How to change UUID of vdi file (VirtualBox)

$ VBoxManage internalcommands setvdiuuid ubuntu.vdi
VirtualBox Command Line Management Interface Version 3.0.8_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

UUID changed to: 3c390a56-56b4-4d55-9771-2f7f625f1797

20100328

Relocatable RPM .spec question

> But I have a %post containing "%{_bindir}/foo" that isn't getting
> relocated properly.
> Its still looking for /usr/bin/foo instead of /home/ellson/usr/bin/foo.
>
> I tried "%{prefix}/bin/foo" but it still resolves to /usr/bin/foo

All %{...} macros are evaluated at RPM build time, so this won't work.

> Is there a variable set by the --prefix option that I can use in %post ?

Yes, environment variables. Using $RPM_INSTALL_PREFIX0 for the (first)
prefix should work.

20100307

Change Ubuntu Window Manager from Metacity to Enlightment (E)

All the information about this transition are here:
http://packages.enlightenment.org/

Problem may be met:
1. Network manager
In Gnome, default network manager's package is "nm-applet". But under E, it is not be started by default.
So you can start it in terminal by hand, or you can change to a E network manager called "emodual-exalt" (short for "exalt").
Just "apt-get install" it.

Enjoy E.

Ref:
http://packages.enlightenment.org/
http://e17-stuff.org/content/show.php/Exalt?content=62069
http://forum.enlightenment.org/comments.php?DiscussionID=44

20100305

[PHP] Failed in setlocale()

===========
setlocale(LC_ALL, "zh_CN");
===========
But failed and return FALSE.

Try to list the locales contained in the locale archive file.
===============
# localedef --list-archive
===============

If "zh_CN" is not in the list, try to add it.
===============
# localedef -f GBK -i zh_CN zh_CN
===============

Ref:
http://bbs.php.cn/php/ref.gettext.html#43165
http://docs.php.net/manual/en/function.setlocale.php
# man localedef

20100304

Set DNS server in Ubuntu

DNS server IP is set in "/etc/resolv.conf", but if DHCP is used, the DNS server IP recieved from DHCP server will cover the config in "/etc/resolv.conf".

Caution: Dont define DNS server IP in "/etc/network/interfaces" like this:
===============
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search 192.168.1.1
===============
This will make you cant connect to the website using domain name, but only using IP address will connect to the website.

Ref:
http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/
https://help.ubuntu.com/8.04/serverguide/C/network-configuration.html

20100303

Limit download speed in apt-get

# sudo vim /etc/apt/apt.conf.d/76download
Add lines below:
================

Acquire
{
Queue-mode "access";
http
{
Dl-Limit "25";
};
};
================

These codes will limit speed to 25KB/s, when you are in command mode or using Synaptic Package Managemer (GUI).

Ref: http://www.associatedcontent.com/article/2717695/ubuntu_limiting_download_speed_in_synaptic.html

20100301

create a file that root cant write it.

[1] If you change the permission of a file, not allow everyone to write.
But you will find that root can also write it, see below:
===============================================================================
# echo 1 > test
# chmod 444 test
# ls -l
-r--r--r-- 1 root root 2 2010-03-01 15:49 test
# echo 2 > test
# cat 2
2


[2] But you can use "chattr" to change the attrib of a file, not allow root to.
===============================================================================
# echo 1>1
# chattr +i 1
# echo 2>1
-bash: 1: Permission denied
# ls -l
total 4
-rw-r--r-- 1 root root 1 2010-03-01 16:12 1
# lsattr
----i------------- ./1


[3] We also find some directories of system are also set by "chattr".
===============================================================================
# lsattr /usr/
------------------ /usr/X11R6
--------------I--- /usr/bin
------------------ /usr/share
------------------ /usr/games
--------------I--- /usr/lib
------------------ /usr/src
------------------ /usr/sbin
------------------ /usr/include
------------------ /usr/local

[4] Reference:
===============================================================================
# man chattr
http://en.wikipedia.org/wiki/Chattr

20100126

SVN client under linux

One choice is "RabbitVCS".
you can install it with apt under Ubuntu Linux system.
But the default SVN browser is firefox. That is too big to startup.
So, we can change it to a more light one, like "Links2".
You can change it in "Settings", change "firefox" to "xlinks2".

=====================================================================
Update:20100422
From version 0.13 RabbitVCS came with a nice SVN browser like the one under win.

20100105

Find some owner's files under linux

shell> cd /some/directory
shell> find -user xiaomao101 -print

ref:
http://www.wallpaperama.com/forums/how-to-locate-or-find-files-by-owner-in-linux-shell-command-finding-files-by-owner-t1208.html

20090313

Linux Kernel生日

Linux Kernel已经15岁啦!!

20090221

google操作系统

无论以前怎么评论google不会发布G-OS,不过这次,google是肯定要在OS上和M$一挣高低了。

听说google要在今年内将自家的Android发展到netbook上,如果真的成为了显示,那么Android离Desktop还远吗。与其说google要给上网本装上Android,还不如说google打算在桌面OS上和M$展开正面的交锋。也许到了那个时候google就会有了一个新的名称"G$",只是也许吧,不过毕竟Android是开源的。

20081231

硬盘安装Fedora10注意事项

使用ultraiso或winimage等软件将vmlinuz和initrd.img两个文件以及isolinux和images两个目录解压到E盘根目录。
注意,在Fedora 10中需要将images目录解压出来,以前的版本不需要,因为在后续的硬盘安装过程中需要用到images目录里的install.img文件。

如何修改Fedora 10 开机动画

[root@localhost plymouth]# ll
总计 64
lrwxrwxrwx 1 root root 8 01-28 01:21 default.so -> label.so
-rwxr-xr-x 1 root root 9292 2008-11-18 details.so
-rwxr-xr-x 1 root root 7068 2008-11-18 label.so
-rwxr-xr-x 1 root root 29768 2008-11-18 solar.so
-rwxr-xr-x 1 root root 10344 2008-11-18 text.so
[root@localhost plymouth]# plymouth-set-default-plugin label
[root@localhost plymouth]# /usr/libexec/plymouth/plymouth-update-initrd

20081220

wine输入中文的时候显示乱码的解决

今天把wine升级到了1.1.9,终于在网页中(使用scim)输入中文时候不显示乱码了阿。
以前是在IE地址栏输入的时候能够显示,而在输入框中中文全是乱码。

[xiaomao101@CAT101LAPTOP ~]$ locale
LANG=en_US.utf8
LC_CTYPE=zh_CN.UTF-8
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

20081108

Ubuntu 8.10 wubi 安装试用

安装:
1. iso和wubi同时放到D盘根目录
2. 双击wubi开始安装。

试用:
1. 壁纸成老山羊了
2. 登录界面样式变了
3. 找不出来了

截图:

20081102

Ubuntu 8.10于10月30日晚顺利发布了

Ubuntu 8.10于10月30日晚顺利发布了,估计这个时候下载的人会很多吧,我用1M的电信下载bt的时候,都是100~200k的速度。
先上网查查有什么新特性没有吧。