
我正在運行 ubuntu 13.04 的 koding 終端機中工作,並且嘗試運行需要 x 螢幕的應用程式(甚至在終端機模式下運行)。
我無法連接 x11 轉發,我想知道是否有解決方法可以讓我運行此應用程式 (lmms)。
$ lmms -v
lmms: cannot connect to X server
$ uname -a
Linux vm-2.masd.koding.kd.io 3.9.0-0-generic #4userns5 SMP Mon May 13 06:15:34 PDT 2013 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring
先致謝!
答案1
Xvfb 正是我正在尋找的:http://en.wikipedia.org/wiki/Xvfb
取自維基百科:
Xvfb 或 X 虛擬幀緩衝區是實現 X11 顯示伺服器協定的顯示伺服器...從客戶端的角度來看,它的行為與任何其他 X 顯示伺服器完全相同,服務請求並根據需要發送事件和錯誤。但是,沒有顯示任何輸出。該虛擬伺服器不需要運行它的電腦甚至有螢幕或任何輸入設備。
這組命令解決了我的問題:
Xvfb :1 &
export DISPLAY=:1
然後我的命令有效:
$ lmms -v
Linux MultiMedia Studio 0.4.14-rc1
Copyright (c) 2004-2008 LMMS developers.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
Try "lmms --help" for more information.
答案2
嘗試開啟顯示器以允許 X 應用程式lmms
。您可以透過使用命令來完成此操作xhost
。
例子
$ xhost +