Eee PC 開機服務設定方法

January 21, 2008 – 10:08 pm

以前聽說有方法可以讓 Eee PC 在開機時執行正常的服務(service),例如 dbus, bluetooth.
最近看到有人提及 /etc/fastservices, 今天試試看,真的可以啊,原來 fastinit 首先會呼叫 /usr/sbin/services.sh, 這個 /usr/sbin/services.sh 可強了,它就是唯一一個會執行的“開機服務”,在裡面會:
1. 設定網路參數
2. 載入 modules, 例如 USB
3. 執行 acpid (就是熱鍵的服務)
4. 打開音效卡
最後一項也是今天的重點,代碼如下:
if [ -f /etc/fastservices ]; then
for i in `cat /etc/fastservices`; do
/usr/sbin/invoke-rc.d $i start
done
fi
意思就是找到 /etc/fastservices 這個檔案的話,就把裡面一行一行寫的開機服務打開,例如我們想用的藍芽,就要 dbus, bluetooth 兩行。

參考資料:
http://wiki.eeeuser.com/howto:starting_services

Send post as PDF to PDF Creator | PDF Converter | PDF Software | Create PDF
  1. 12 Responses to “Eee PC 開機服務設定方法”

  2. 簡單的說 就是開機的時候
    會載入/etc/fastservices

    我們要做的是把底下三行

    sudo /etc/init.d/dbus start
    sudo /etc/init.d/bluetooth start
    kbluetooth &

    寫進這個檔案 對嗎?

    By fine_plate on Jan 24, 2008

  3. 不是,那個 /etc/fastservices 是用來執行”服務程式” 的,所以內容應該是:

    dbus
    bluetooth

    有這2行,它就會在開機時執行了, kbluetooth 是應用程式,還是要自己打開。

    By lazyfai on Jan 24, 2008

  4. how can i start the bluetooth?? may i ask?

    By Isabella on Jan 26, 2008

  5. Re: Isabella

    You can start KDE bluetooth support by using the “kbluetooth” command in the terminal.

    By lazyfai on Jan 26, 2008

  6. Hi Fai,

    i am not quite get it since i go inot the small balck screen n type kbluetooth it came out ‘bash command not valid’ um… how can i ? and do i need to plug-in a bluetooth finger to connect with my mobile or i can just ‘wake -up’ the command inside my eeepc??
    many thanks

    Isabella

    By Isabella on Jan 27, 2008

  7. Re: Isabella
    From your output I think you haven’t really install “kdebluetooth” programs, so you need to:
    1. Add XEPC.org line in /etc/apt/sources.list as instructed in another post
    2. Afterward, run “sudo apt-get update” to update the database
    3. Then run “sudo apt-get install kdebluetooth” to really install the programs.

    By lazyfai on Jan 27, 2008

  8. Hi Fai,

    after i typed the command: if [ -f /etc…… it come out a feed back to me : invoke-rc.d: unknown initscript, /etc/init.d/cat not found. what does this means?

    Isabella

    By Isabella on Jan 29, 2008

  9. Re: Isabella
    那段不是要輸入的,那是我發現 /etc/fastservices 這個檔案的作用。
    你看 screen shots 就OK了。

    By lazyfai on Jan 29, 2008

  10. Fai,

    when my cursor move to the icon on right hand bottom, the box pop-up n said “no bluetooth adapter”, is that means i still need to plug a usb finger? is it i still missing something n which i cannot link with my mobile still??

    Isabella

    By Isabella on Jan 29, 2008

  11. Hi Fai,
    may i ask one more thing about this topic i can evolve the bluetooth since i bought a bluetooth adapter, but i cannot arouse the command with the icon on right hand bottom with the fast services command, can you show me the way to make it appear? on the bottom bar when i switched on the eeepc?

    By Isabella on Jan 30, 2008

  12. Hi Isabella,

    Sorry the bluetooth program inside the bar is not “system service” so you need to use command to start it (the easy way), it can be made to start automatically but it is very complicated for you, and as we know, Eee PC has little resources, so I prefer start it when we need.
    So using a terminal to start “kbluetooth” is the easiest way at the moment.

    By lazyfai on Jan 30, 2008

  13. Hi Fai,
    got it n thanks
    Isabella

    By Isabella on Jan 31, 2008

Post a Comment