公告版位
新版Blog peichengnote

目前分類:Gentoo (107)

瀏覽方式: 標題列表 簡短摘要

ffmpeg audio/video manipulation
http://howto-pages.org/ffmpeg/

Linux 下的 AVCHD 影片轉檔 (使用 ffmpeg) « Jamyy's Weblog
http://cha.homeip.net/blog/2010/11/2851.html


ffmpeg -i 1.mpg -threads 4 -aspect 4:3 -target ntsc-dvd -ac 2 dvd2.mpg
轉成ntsc-dvd的格式


peicheng 發表在 痞客邦 留言(0) 人氣()

when i update kernel 2.6.38 from 2.6.35 today morning .
I found /proc/acpi/temperature move to /sys/

but my Lxde temperature monitor show NA .
I get the lxpanel code from git.

35 //#define THERMAL_DIRECTORY "/proc/acpi/thermal_zone/" /* must be slash-terminated */

36 #define THERMAL_DIRECTORY "/sys/class/thermal/thermal_zone0/" /* must be slash-terminated */

static gint
get_temperature(thermal *th){
        FILE *state;
        char buf[ 256 ], sstmp [ 100 ];
        char* pstr;
        //if(th->sensor == NULL) return -1;
        //sprintf(sstmp,"%s%s",th->sensor,THERMAL_TEMPF);
        //if (!(state = fopen( sstmp, "r"))) {
        if (!(state = fopen( "/sys/class/thermal/thermal_zone0/temp", "r"))) {
                //printf("cannot open %s\n",sstmp);
                return 20; 
                //return -1;
        }   
        //while( fgets(buf, 256, state) &&
        //        ! ( pstr = strstr(buf, "temperature:") ) );
        while( fgets(buf, 256, state) );
        pstr=buf;
        if( pstr )
        {   
                /*  
                   pstr += 12;
                   while( *pstr && *pstr == ' ' )
                   ++pstr;
                   */
                //pstr[strlen(pstr)-3] = '\0';
                pstr[2] = '\0';
                fclose(state);
                return atoi(pstr);

                //return atoi("15");
        }   

        fclose(state);
        return -1; 
}

 


花了一個早上再搞自規版的lxde temperature monitor

peicheng 發表在 痞客邦 留言(0) 人氣()

[*] enabled deprecated sysfs features by default
udev-151 remove remaining support for CONFIG_SYSFS_DEPRECATED

udev « 大千世界
http://webcache.googleusercontent.com/search?q=cache:s5aOwvTJO_YJ:www.vevepay.com/blog/%3Ftag%3Dudev+CONFIG_SYSFS_DEPRECATED&cd=12&hl=zh-TW&ct=clnk&gl=tw&lr=lang_zh-CN%7Clang_zh-TW&source=www.google.com.tw

Gentoo Linux Documentation -- Gentoo udev Guide
http://www.gentoo.org/doc/en/udev-guide.xml

Code Listing 2.2: Required kernel options

peicheng 發表在 痞客邦 留言(0) 人氣()

windows 下執行常常是點兩下就可以了。

linux 下執行 java jar

java -jar xd.jar


peicheng 發表在 痞客邦 留言(0) 人氣()

The Canterbury Distribution

We are pleased to announce the birth of the Canterbury distribution. Canterbury is a merge of the efforts of the community distributions formerly known as Debian, Gentoo, Grml, openSUSE and Arch Linux.

The target is to produce a really unified effort and be able to stand up in a combined effort against proprietary operating systems, to show off that the Free Software community is actually able to work together for a common goal instead of creating more diversity.


Features

The Canterbury distribution will combine the best of the linux world to another game changer for the good of the users:

peicheng 發表在 痞客邦 留言(0) 人氣()

在找gentoo 的ruby gem
找了ruby找了gem 後來發現在

emerge dev-ruby/camping



peicheng 發表在 痞客邦 留言(0) 人氣()

在windows下有flashget的批次下載功能,
那在Linux下呢。

舉個例子
http://pc.com/xxx001zzz.jpg
http://pc.com/xxx049zzz.jpg

wget http://pc.com/xxx{001..049}zzz.jpg
wget http://pc.com/xxx0{01..49}zzz.jpg


peicheng 發表在 痞客邦 留言(0) 人氣()

Linux下chrome吃系統的proxy設定
ssh 連線後
ssh -D 12348 peicheng@yourserver
peicheng@PCsNB ~/ $ export SOCKS_SERVER=localhost:12348
peicheng@PCsNB ~/ $ google-chrome

這樣就成功了。



peicheng 發表在 痞客邦 留言(0) 人氣()

[Gentoo]auto mount pcmanfm
安裝完gvfs,
在pcmanfm下會出現permission denied
 
 PCsNB peicheng # vim /etc/PolicyKit/PolicyKit.conf 加入

 

        

peicheng 發表在 痞客邦 留言(0) 人氣()

上次卸除了halevt
再次想要emerge 時發現他被mask,
加到keywords之後又有個提示。

Calculating dependencies... done!

!!! All ebuilds that could satisfy "sys-apps/halevt" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-apps/halevt-0.1.6.2-r1 (masked by: package.mask)
/usr/portage/profiles/package.mask:

peicheng 發表在 痞客邦 留言(0) 人氣()

今天早上一收信看到,

Debian / Ubuntu Linux 空間釋放 - 清除沒用的檔案 | Tsung's Blog
http://plog.longwin.com.tw/my_note-unix/2011/02/11/linux-free-hd-clean-2011
試著查了一下Gentoo的作法,

How-To: Cleaning up Gentoo to get more free disk space | Linux | Fritz Thomas
http://fritzthomas.com/overall/491-how-to-cleaning-up-gentoo-to-get-more-free-disk-space/


peicheng 發表在 痞客邦 留言(0) 人氣()

查到  lafilefixer --justfixit 一個 Gentoo系統updata的順序紀錄。
 
 1. sync

代碼:
# eix-sync

2. 升級

代碼:

peicheng 發表在 痞客邦 留言(0) 人氣()

[Gentoo]error libtool: link: `/usr/lib/libdbus-1.la' is not a valid libtool archive
 
emerge vlc 的時候一直發生錯誤
查了一下
  

emerge -1 lafilefixer && lafilefixer --justfixit


[I] dev-util/lafilefixer
     Available versions:  (~)0.0.1 0.5

peicheng 發表在 痞客邦 留言(0) 人氣()

[Gentoo] emerge VLC recommended flags


VideoLAN - VLC media player for Gentoo Linux
http://www.videolan.org/vlc/download-gentoo.html

media-video/vlc dvd ffmpeg mpeg mad
wxwindows aac dts a52 ogg flac theora oggvorbis matroska freetype
bidi xv svga gnutls stream vlm httpd cdda vcd cdio live

my USE flag

peicheng 發表在 痞客邦 留言(0) 人氣()


Gentoo Linux Documentation -- Troubleshooting Apache
http://www.gentoo.org/proj/en/apache/doc/troubleshooting.xml


peicheng 發表在 痞客邦 留言(0) 人氣()

if in Linux 
cat /proc/cpuinfo
 

cat /proc/cpuinfo 
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model : 15
model name    : Intel(R) Core(TM)2 Duo CPU     T7250  @ 2.00GHz

peicheng 發表在 痞客邦 留言(0) 人氣()

mplayer: error while loading shared libraries: libx264.so.98: cannot open shared object file: No such file or director

 PCsNB lib # cd /usr/lib
PCsNB lib # ls -al libx264.*
-rw-r--r-- 1 root root 594462 12月 17 15:51 libx264.a
lrwxrwxrwx 1 root root     14 12月 17 15:51 libx264.so -> libx264.so.107
-rwxr-xr-x 1 root root 505472 12月 17 15:51 libx264.so.107

PCsNB lib # ln -s libx264.so libx264.so.98


peicheng 發表在 痞客邦 留言(0) 人氣()

假設我的資料有

gradshow.asp?gid=101003
gradshow.asp?gid=101004
gradshow.asp?gid=101006
gradshow.asp?gid=102006
gradshow.asp?gid=102013
gradshow.asp?gid=103004
gradshow.asp?gid=103017
gradshow.asp?gid=103020

peicheng 發表在 痞客邦 留言(0) 人氣()

在下載了
http://reg.aca.ntu.edu.tw/college/search/typelist.asp?newtype=%B8%EA%B0T(%A7t%B9q%BE%F7)
發現原始碼內有很多^M的符號。
if source file is typelist.php

cat typelist.php | sed 's/^M/\n/g'

但是要注意的是這裡的藍色^M 是 ctrl+v ctrl+M
也可以再vim內,

peicheng 發表在 痞客邦 留言(0) 人氣()

當你要連到你的使用者的 public_html時發現
 You don't have permission to access  on this server. apache

cd  /home
chmod 755 你的userid

這樣就解決了。
  

 開放Apache個人網頁功能 You don’t have permission to access « ca95 分散實驗室
http://ca95.wordpress.com/2008/06/27/%E9%96%8B%E6%94%BEapache%E5%80%8B%E4%BA%BA%E7%B6%B2%E9%A0%81%E5%8A%9F%E8%83%BD-you-dont-have-permission-to-access/

peicheng 發表在 痞客邦 留言(0) 人氣()