Linux錯誤:xhost unable to open display
在ixpub上看到很多朋友遇到關於xhost命令的問題,例如報錯:xhostunabletoopendisplay
很多沒有得到很好哦解決,其實這個命令的使用很簡單,只要熟悉了命令的使用,就不會有這麼多問題了,下面先說說這個命令的使用,然後結合問題,說說遇到這類問題的解決辦法.
xhost命令
用途
控制什麼人可以訪問當前主機上的增強 X-Windows。
語法
xhost[ + | - ] [ Name ]
描述
xhost命令新增或刪除 X 接受連線的機器列表上的主機名。
該命令必須從有圖形顯示連線的機器上執行。可以透過使用 -Host 引數,從訪問列表中除去一個名稱。不要從訪問列表中除去當前的名稱。如果已經這樣做了,請在作出任何更改之前登出系統。
輸入無變數的xhost命令將顯示訪問 X 伺服器的當前主機名,並顯示一條訊息表明訪問是否已啟用。
為了安全起見,只能從控制主機執行影響訪問控制的選項。對於工作站來說,這臺機器也就是伺服器。對於 X 終端來說,這臺機器是登入主機。
要在預設情況下啟用遠端名稱,可以在 /etc/X?.hosts 檔案中定義名稱,其中 ? 為啟用訪問的號。
例如,顯示器 jeanne:0 可以由使用 jeanne 的預設主機名的系統上的 /etc/X0.hosts 檔案中定義的系統訪問。在顯示名稱和檔名中,0 表明已定義的遠端系統允許透過增強 X-Windows 訪問的顯示器號。
標誌
+Name 定義要新增到 X 伺服器訪問列表的主機名(可以選用加號標記)。
- Name 定義要從 X 伺服器訪問列表中除去的主機名。已有的連線沒有被中斷,但將拒絕新的連線請求。注意:可以除去當前的機器;然而,不允許進行進一步的連線(包括試圖將其新增回來)。再一次啟用本地連線的唯一方法就是將伺服器復位(因此也會中斷所有連線)。
+ 指定訪問不受限制。訪問控制被關閉。
- 開啟訪問控制。
完整的 Name 有以下 family:name 語法:
inet
因特網主機
local
只包含一個名稱,空字串
注: 該系列是區分大小寫的。名稱的格式隨系列而不同.
只要瞭解了命令的使用,上面的問題就迎刃而解了,一般在安裝的時候會出現這個問題,因為oracle的安裝需要圖形介面的支援!
遇到這類問題的一般解決辦法是:
先在root下xhost+
如何是在遠端客戶端啟動桌面服務,需要設定客戶機的DISPLAY值(exportDISPLAY=IP(客戶端的IP地址,你要設成別的地址,那你就看不到圖形):0.0
如果是在本機執行的話,直接到oracle圖形使用者下執行exportDISPLAY
如果上述設定後,還是不能啟動圖形的話,就要檢查系統圖形介面支援的問題了,例如是否安裝了圖形程式,是否有許可權執行圖形程式.或者系統時候遮蔽了圖形功能等等.
最後執行./runInstaller就行了。
標 題: Re: 請問命令xhost的作用和內部機制是幹啥的
發信站: BBS 水木清華站 (Fri Sep 3 18:14:05 1999)
xhost 是用來控制X server訪問許可權的。
通常當你從hostA登陸到hostB上執行hostB上的應用程式時,
做為應用程式來說,hostA是client,但是作為圖形來說,
是在hostA上顯示的,需要使用hostA的Xserver,所以hostA是
.因此在登陸到hostB前,需要在hostA上執行xhost +
來使其它使用者能夠訪問hostA的Xserver.
xhost + 是使所有使用者都能訪問Xserver.
xhost + ip使ip上的使用者能夠訪問Xserver.
xhost + nis:user@domain使domain上的nis使用者user能夠訪問
xhost + inet:user@domain使domain上的inet使用者能夠訪問。
還有一些option,還是仔細看一下manual吧。
[root@ds1 ~]# xhost +192.168.130.196
192.168.130.196 being added to access control list
[root@ds1 ~]# su - oracle
[oracle@ds1 ~]$ xhost +192.168.130.196
192.168.130.196 being added to access control list
後來登出切換到oracle的使用者登入,則可以執行runInstall了
[oracle@ds1 ~]$ xhost +192.168.130.196
192.168.130.196 being added to access control list
[oracle@ds1 ~]$ cd clusterware/
[oracle@ds1 clusterware]$ ls
cluvfy doc install response rpm runInstaller stage upgrade welcome.html
[oracle@ds1 clusterware]$ ll
總計 72
drwxr-xr-x 2 oracle oinstall 4096 2005-07-03 cluvfy
drwxr-xr-x 6 oracle oinstall 4096 2005-07-03 doc
drwxr-xr-x 4 oracle oinstall 4096 2005-07-03 install
drwxr-xr-x 2 oracle oinstall 4096 2005-07-03 response
drwxr-xr-x 2 oracle oinstall 4096 2005-07-03 rpm
-rwxr-xr-x 1 oracle oinstall 1328 2005-07-03 runInstaller
drwxr-xr-x 9 oracle oinstall 4096 2005-07-03 stage
drwxr-xr-x 2 oracle oinstall 4096 2005-07-03 upgrade
-rw-r--r-- 1 oracle oinstall 3445 2005-07-03 welcome.html
[oracle@ds1 clusterware]$ ssh ds1 date;ssh ds2 date
Enter passphrase for key '/home/oracle/.ssh/id_rsa':
年 06月 21日 星期六 08:22:41 CST
Enter passphrase for key '/home/oracle/.ssh/id_rsa':
2008年 06月 21日 星期六 08:22:45 CST
[oracle@ds1 clusterware]$ ./runInstaller &
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29987527/viewspace-2043050/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 完美解決xhost +報錯: unable to open display
- 【linux報錯】-bash: xhost: command not foundLinux
- swagger啟動錯誤Unable to infer base url.Swagger
- virt-manager cannot open display問題
- c# Api 錯誤 Unable to resolve service for type while attempting to activate C#APIWhile
- yii2 Unable to verify your data submission錯誤解決
- 解決jpa查詢時,Unable to locate Attribute with the the given name錯誤
- Ubuntu 安裝包時提示錯誤E: Unable to locate package mysql-server錯誤 解決辦法UbuntuPackageMySqlServer
- Latex編譯錯誤:Unable to load picture or PDF file 問題解決編譯
- 31.提示錯誤fopen_means Too many open files
- Unable to open debugger port (127.0.0.1:29697): java.net.SocketException "socketException"127.0.0.1JavaException
- 安裝ROS出現 Unable to Correct Problems ‘You have Held Broken Packages’ 錯誤ROSPackage
- docker中使用systemctl命令時報Too many open files錯誤Docker
- Linux 時間錯誤的修正Linux
- Linux下錯誤解決方案Linux
- docker image rm發生錯誤 Error response from daemon: conflict: unable to remove repository referenceDockerErrorREM
- yarn install 遇到的錯誤訊息 - Error EPERM operation not permitted, open .yarnrcYarnErrorMIT
- vs code jshint報錯或者Open browser failed!! Please check if you have installed the browser correctly!錯誤.JSAI
- file_get_content s()獲取https出現這個錯誤Unable to find the wrapperHTTPAPP
- Linux 無許可權建立資料夾( 報錯:Unable to create ... directory.)Linux
- (20200915Solved)Vscode出現Unable to open ‘hashtable_class_helper.pxi‘VSCode
- linux解決“XXX is not in the sudoers file”錯誤Linux
- linux安裝thefuck報gcc錯誤LinuxGC
- windows ssh遠端登入阿里雲遇到permissions are too open的錯誤Windows阿里
- pip install scrapy報錯:error: UnableError
- 關於使用 git 命令列時遇到的錯誤訊息 unable to get local issuer certificateGit命令列
- 執行alter database open resetlogs提示ORA-00392和ORA-00312錯誤Database
- linux下gdb如何處理coredump錯誤Linux
- 【Open-Falcon】Linux下安裝Open-FalconLinux
- 【ERROR】su user報'This account is currently not available'錯誤 for linuxErrorAILinux
- Linux檢查硬體錯誤工具—mcelog命令Linux
- 如何掃描和修復 Linux 磁碟錯誤Linux
- 關於 SAP ABAP SYSTEM_SHM_OPEN_CHANGE_LOCK 執行時錯誤的問題
- 【常見錯誤】--Nltk使用錯誤
- iis7.5錯誤 配置錯誤
- Linux yum提示Loaded plugins錯誤的解決方法LinuxPlugin
- Linux 安裝 MySQL 8 的錯誤整理(待續)LinuxMySql
- Linux 學習錯誤點整理之網路配置Linux
- PHP & Linux: libsodium.so.23 錯誤解決方法PHPLinux