發表文章

目前顯示的是 2012的文章

bin,/sbin,/usr/bin/,/usr/sbin的劃分標準是什麼?

/  : this is root directory /bin : commands in this dir are all system installed user commands /sbin:   commands in this dir are all system installed super user commands /usr/bin: user commands for applications /usr/sbin: super user commands for applications /usr/X11R6/bin : X application user commands /usr/X11R6/sbin: X application super user commands

Qt 啟動畫面(Splash Screen)

Qt 啟動畫面(Splash Screen) #include <QtGui/QApplication> #include <QMainWindow> #include <QPixmap> #include <QBitmap> #include <QSplashScreen> int main(int argc, char *argv[]) {     QApplication a(argc, argv);     //啟動畫面     QSplashScreen *splash = new QSplashScreen;     //顯示圖片     QPixmap px(":/res/logo.png");     splash->setPixmap(px);     //遮罩圖     splash->setMask(px.mask());     splash->show();     QMainWindow w;     w.show();     //如果w顯示出來的話,才關閉啟動畫面     splash->finish(&w);     delete splash;     return a.exec(); }

QT MultiScreen 輸出

./setup -qws -display "Multi: LinuxFB:/dev/fb1 LinuxFB:/dev/fb0" & 這樣就可以, 會以第一個 FB 的 resolution 為主,  似乎不支援不同解析度

mdev 會 miss 掉 device node ?? BUG ??

在 Marvell 88F6282 上 kernel version 2.6.31.8, busybox 1.20.2, parted 1.9 上 使用 parted 切割 HDD, 有時後會發生 device node 少建, ????? parted -s /dev/sda mklabel gpt parted /dev/sda -s mkpart primary ext4 20kB 210419917kB parted /dev/sda -s mkpart primary ext4 210419918kB 243148363kB parted /dev/sda -s mkpart primary linux-swap 243148364kB 244196939kB parted /dev/sda -s mkpart primary ext4 244196940kB 244198604kB 如上所示,  就是會少某些 /dev/sdaX 同上的方式在別的平台, 似乎不會 @@@@ 看來 kernel 的 hotplug 在 parted 切 partition 時會 remove 全部再新增全部的 node,  而送出來的 command, 並不會合下面的順序                              Variable Meaning ACTION Is the device being added or removed? DEVPATH Path in the sysfs tree to the device FIRMWARE Name of the firmware the device would like loaded MAJOR For devices with device nodes, the major number MINOR For devices with device nodes, the minor number SUBSYSTEM The subsystem the device is part of 有時順序會錯亂, 也許是這個問題???沒有繼續追下去 .... 將 echo /sbin/mdev > /proc

Linux Remove a symbolic link

可以用 rm & unlink 但要注意 在移除一個 symbolic link 時,要留意後面不能加個 "/" !這樣,若 symbolic link 是連到一個目錄時,等同於在對那個目錄做 rm 的動作,才會顯示 "is a directory" 訊息。這時可不能一氣之下用 rm -rf !可會將 link 到的目錄給移除掉的!要額外小心。 Reference: http://www.cyberciti.biz/faq/linux-remove-delete-symbolic-softlink-command/

螢幕解析度簡介與詳細數值列表

圖片
4:3 家族 4:3 是最常見螢幕比例,從電視時代流傳下來的古老 (?) 標準。在近代寬螢幕興起前,絕大部份的螢幕解析度都是照著這個比例的。不過最近逛逛電腦商場,好像要買 個 4:3 比例的螢幕非常困難了啊 ! VGA (640x480) 「 VGA 」 其實本來不是個解析度的規格,而是 IBM 電腦的一種顯示標準。在規範裡有 320x200 / 256 色、 320x200 / 16 色、 640x350 / 16 色、 640x480 / 16 色等多種模式,甚至還有 80x25 和 40x25 等文字模式。只是最後因為官方支援的最高解析度是 640x480 ,所以 VGA 就成為了 640x480 的代名詞。 VGA 的重要地位在於它是所有顯卡都接受的基準解析度, Windows 在載入顯卡驅動程式之前( BIOS 之後)有個藍棒子跑跑跑的畫面,那個畫面就是在 VGA 解析度下的。 SVGA (800x600) SVGA 的情況和 VGA 有點像,也是以一種「規格」的身份起家的,只是最後好像變成無論規格如何,所有比 VGA 強的顯示器都自稱自已是 Super VGA ,或 SVGA 。在解析度上, SVGA 專指 800x600 的解析度 -- 即使當年標榜自已是 SVGA 的螢幕其實常常可到達 1024x768 ,或更高。     XGA (1024x768) 到了 SVGA 的年代, IBM 已經失去了市場的獨佔性, PC 界也正式進入了百家爭鳴的時代。 IBM 雖然定義出了 XGA 的規格,但實際上它只是當年多種 Super VGA 規格中的一種。 XGA 最後成為 1024x768 這個解析度的代名詞。 SXGA+ (1400x1050) 咦?跳過了 SXGA ?等會兒再回來 XD 。 SXGA+ 是大約 2003 年~ 2007 年間偶爾會在筆電上看到的解析度。不過近年來隨著寬螢幕筆電大行其道,這個解析度很難看到了。小薑的兩台筆電都是這個解析度的,算是工作需求吧 orz 。     UXGA (1600x1200) UXGA 又稱為 UGA ,解析度剛好