rc.local 不啟動 imwheel 程序

rc.local 不啟動 imwheel 程序

我是 Linux 新手,剛開始使用 ubuntu 14.04。我試圖透過編輯 rc.local 檔案在啟動時運行 imwheel 進程。也許我做錯了什麼,我需要輸入程式的路徑,除了名稱之外,就像在終端機中一樣?

當我嘗試透過運行進行檢查時:

sudo service rc.local start

我收到以下訊息:訊息:

imwheel started (pid=4906)
Could not open display, check shell DISPLAY variable, and export or setenv it!

rc.local 文件:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

imwheel

exit 0

答案1

imwheel 是一個在 X 下運行的 GUI 應用程式。

登入後您將看到一個 X DISPLAY。

Startup Applications您可以透過在 Ubuntu 啟動按鈕搜尋欄位中輸入「啟動應用程式」來取得您的配置。

只需單擊Add,然後輸入三個字段:

  • 條目的名稱(您選擇的任何名稱)
  • 命令(在本例中)imwheel
  • 評論(可選 - 提醒您它的作用)

點擊Add以儲存新的啟動應用程序,然後關閉視窗。

相關內容