顯示具有 ubuntu 標籤的文章。 顯示所有文章
顯示具有 ubuntu 標籤的文章。 顯示所有文章

2011年9月30日

ubuntu 8.04 xconfig 必須安裝檔

sudo aptitude install libqt3-headers libqt3-mt-dev libqt3-compat-headers libqt3-mt

#安装xconfig依赖包,


make xconfig



資料來源:
http://forum.ubuntu.org.cn/viewtopic.php?t=110461&highlight=

2009年12月12日

如何進入英文版的minicom(手動設定)

參考網址
http://www.ubuntuchina.com/viewthread.php?tid=7138


終端機輸入:
env LANG=en_US minicom

即可

若不想每次打這麼麻煩的指令,可以去修改使用者目錄底下的.bashrc

在.bashrc最後加上:
alias minicom=‘env LANG=en_US minicom

即可

2009年11月14日

Device /dev/ttyS0 is locked minicom

when using minicom,you get the title message
pls remove the lock file from /var/lock

sudo rm -f /var/lock

2009年11月11日

修正 Ubuntu 9.04 (Jaunty Jackalope) 中文字型模糊 (引用)

http://justintime545.blogspot.com/2009/05/ubuntu-904-jaunty-jackalope.html

修改
/etc/fonts/conf.d/69-language-selector-zh-tw.conf

<fontconfig>

        <match target="pattern">
                <test qual="any" name="family">
                        <string>serif</string>
                </test>
                <edit name="family" mode="prepend" binding="strong">
                        <string>AR PL UMing TW</string>
                        <string>AR PL ShanHeiSun Uni</string>
                        <string>WenQuanYi Bitmap Song</string>
                        <string>Bitstream Vera Serif</string>
                        <string>DejaVu Serif</string>
                        <string>AR PL UKai TW</string>
                        <string>AR PL ZenKai Uni</string>
                </edit>

        </match>
        <match target="pattern">
                <test qual="any" name="family">
                        <string>sans-serif</string>
                </test>
                <edit name="family" mode="prepend" binding="strong">
                        <string>Bitstream Vera Sans</string>
                        <string>DejaVu Sans</string>
                        <string>AR PL UMing TW</string>
                        <string>AR PL ShanHeiSun Uni</string>
                        <string>WenQuanYi Bitmap Song</string>
                        <string>WenQuanYi Zen Hei</string>
                        <string>AR PL UKai TW</string>
                        <string>AR PL ZenKai Uni</string>
                </edit>

        </match>
        <match target="pattern">
                <test qual="any" name="family">
                        <string>monospace</string>
                </test>
                <edit name="family" mode="prepend" binding="strong">
                        <string>Bitstream Vera Sans Mono</string>
                        <string>DejaVu Sans Mono</string>
                        <string>AR PL UMing TW</string>
                        <string>AR PL ShanHeiSun Uni</string>
                        <string>WenQuanYi Bitmap Song</string>
                        <string>WenQuanYi Zen Hei</string>
                        <string>AR PL UKai TW</string>
                        <string>AR PL ZenKai Uni</string>
                </edit>

        </match>

</fontconfig>

2009年11月4日

如何在Ubuntu上編譯C語言程式碼? (C/C++) (C) (Linux) (Ubuntu)

Ubuntu上雖然已經內建gcc,不過卻沒內建最基本的Standard C Library,要如何在Ubuntu下編譯C語言程式碼呢?

引用:
http://www.cnblogs.com/oomusou/archive/ ... 31707.html

Introduction


一個最簡單的C語言Hello World

#include <stdio.h>

int main() {
  printf(
"%s","Hello World!!");
}


在Ubuntu的console下打
gcc hello_world.c

會出現
hello_world.c:1:19: error: stdio.h: No such file or directory
hello_world.c: In function ‘main’:
hello_world.c:
4: warning: incompatible implicit declaration of built-in function ‘printf’

表示連最基本的stdio.h都找不到


sudo find / -name stdio.h

找遍整個硬碟,果然找不到stdio.h

Solution
下載g++
sudo apt-get install g++

Ubuntu就會自動安裝g++
裝完之後,stdio.h會在/usr/include/下找到

之後再
gcc hello_world.c

就可正常編譯了


有網友提議:
sudo apt-get install build-essential
所抓下來的library比較完整,有在ubuntu中下載過了,而且也可以順利編譯c語言了,就沒深入研究下去了.

快速更改同一目錄下所有的權限:chmod 777

sudo chmod 777 -R *



其實只要輸入chmod --help就可以查到許多指令了

在ubuntu安裝新酷音輸入法

如果有使用ubuntu的人都知道雖然他安裝很快,但是安裝完必須要連上線更新,
不然可是連完整的中文都沒有,而且連mp3都不能聽,
其他的東西都還好,你沒有中文連上網求救都沒辦法,
而既然要裝中文就要裝ubuntu中最好用的新酷音輸入法,方法如下:
1. apt-get install scim scim-pinyin scim-chewing scim-tables-zh scim-qtimm im-switch
2.im-switch -s scim
3.登出 再登入 就可以使用 scim 輸入法

2009年10月13日

Ubuntu和XP雙系統-ghost救援經驗

我有兩顆硬碟:
A. 80GB
B. 1TB

首先是先裝xp在A硬碟中,正常安裝
再來ubuntu裝在B硬碟中,加上grub(開機選單)在B硬碟,

有一天,在xp中毒了,造成開機不能順利進入xp,只能進入ubuntu
還好之前在未安裝雙系統之前有把xp用ghost備份起來,
所以就用ghost把xp映像檔還原到A硬碟,

完成救援(笑)。

2009年9月15日

ubuntu NFS - network file system檔案共享

參考網址:
http://wiki.debian.org.hk/w/Share_files_with_NFS

首先分為server和client端,
server為分享目錄的一方,
而client為欲掛載server分享出來的目錄一方

設定如下:

server:
----------------------------------
sudo apt-get install nfs-kernel-server
sudo apt-get install portmap
sudo vi /etc/exports

接著就是告訴 NFS 伺服器您打算分享那些檔案和不同電腦有什麼權限等,

您需要把這些資料寫在 /etc/exports 中。

本例是要分享目錄 /var/nfs192.168.13.0 - 192.168.13.255 網路上所有電腦使用,

所以請在 /etc/exports 加入以下一行:

/var/nfs       192.168.13.0/24(ro)

完成後就要啟動 NFS 伺服器, Ubuntu 使用者請打:

sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

sudo /etc/init.d/nfs-kernel-server restart


client:
----------------------------------------------------
sudo apt-get install nfs-common
sudo apt-get install portmap
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart

可用以下指令確認是否順利連線
sudo showmount -e 伺服器地址

現在您可以用「mount -t nfs 伺服器地址:欲分享目錄 掛載點(client端欲被掛上的空目錄)」連接有關目錄

mount -t nfs 192.168.13.15:/var/nfs /mnt




2009年9月12日

Cloenzilla 在ubuntu的image備份

主要參考網站:

1.準備一個4G隨身碟
2.安裝好ubuntu9.04環境
3.下載光碟版(iso檔案)並使用光碟開機(隨身碟要在開機前插上,否則似乎讀取不到)
4.選擇ubuntu所在的硬碟,把image先備份到隨神碟上(再生龍軟體)
5.會發現隨身碟中多了image檔名的目錄夾
6.再度插上隨身碟與開機光碟,即可備份

ubuntu無痛備份,謝謝作者群

蕭志榥 (steven _at_ nchc org tw)
黃國連 (klhaung _at_ gmail com)
王順泰 (c00wht00 _at_ nchc org tw)
孫振凱 (ceasar _at_ nchc org tw)
王耀聰 (jazzwang _at_ nchc org tw)
蔡育欽 (thomas _at_ nchc org tw)

ubuntu如何取得windows xp的分享資料夾

ubuntu端:client
-------------------------
1.桌面工具列點選"位置"
2.選擇"連接伺服器"
3.服務類型選擇"Windows分享"

伺服器:XP的IP位置,例:192.168.0.20
分享:空白
資料夾:xp分享資料夾的共用名稱,例如:本機磁碟 (C)
使用者名稱:xp上的分享者名稱
網域名稱:在xp上"我的電腦按滑鼠右鍵-->"系統內容-->電腦名稱-->工作群組的名稱


Windows XP端:server
-------------------------
1.在想分享的目錄夾上按滑鼠右鍵-->選擇"共用與安全性"
2."共用"標籤-->"網路共用和安全性"項目中-->勾選在網路上共用
3.設定共用名稱
4.確定



2009年9月8日

ubuntu - 下載管理員

ubuntu發現下載檔案的視窗找不到怎辦?

1.開啟火狐firefox網頁瀏覽器
2.點選上方"工具"選單
3.點選"下載管理員"

就可以順利開啟下載管理員視窗囉!

2009年8月25日

初學! ubuntu網路設定(DNS, /etc/network/interfaces)

姑且不說如何設定,就結論來說,
網路的基本知識一定要有,才能快速的學到想學的東西
例如:ip,gateway,dns等等


在ubuntu9.04下,雖然可以用圖形介面設定有線網路和無線網路,但Linux的精隨是指令啊!
(打指令才能耍帥)

視窗介面是啥?滾到一邊去吧哼哼~~~

/etc/network/interfaces的內容如下

auto lo #自動啟動lo虛擬網卡 (linux內鍵loopback設定,還不知道是啥目的)
iface lo inet loopback #lo網卡的設定

auto eth0 #自動啟動eth0虛擬網卡

iface eth0 inet static #設定eth0為固定ip(router底下的固定)
address 192.168.0.5 #設定ip
netmask 255.255.255.0 #子遮罩,很簡單
gateway 192.168.0.1 #這裡的gateway是我新買的無線AP的ip(有router功能),前面還有一台hinet的小烏龜


sudo ifdown eth0 # 關閉 eth0 這個裝置
sudo ifup eth0 # 啟用 eth0
並從 interfaces 讀取設定檔!!!!!!
-----------------------------------------------------------


解決ping不到www.google.com.tw的方法(DNS失效)

/etc/resolv.conf
加入以下內容

nameserver 168.95.1.1 #hinet的主機名稱





ubuntu尋找安裝套件指令apt-cache

終端機下apt-cache指令可尋找安裝檔


apt-cache search rar > ~/xxx.txt


exp:
可找到
p7zip-rar - non-free rar module for p7zip

apt-get install p7xip-rar

等待安裝後,即可解壓縮rar檔

2009年8月24日

修復ubuntu9.04開機時會在starting nfs common utilities fail卡很久

轉自作者:dimis2410

I had the same problem when i tried to set up a static IP... and this worked for me :



sudo gedit /etc/network/interfaces


and make the file look like this:

修改即可
auto lo
iface lo inet loopback

iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

auto eth0



"192.168.1.100 " my static ip
"255.255.255.0" my subnet mask
"192.168.1.1" my routers/gateway ip
"eth0" my current ethernet interface

Change the addresses to yours...
and then restart networking...

sudo /etc/init.d/networking restart


Now i'm sure that it will not hang on "Starting NFS common utils..."

:)

2009年8月22日

NO-CARRIER 網卡無法啟動

 工作時,由於想要啟動linux OS的網卡, 發現某張新設定的網卡一直無法啟動,就算下指令UP了,但是也沒有順利啟動 所以爬文後,想要確認該網卡的status, 發現某行為: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu...