
我嘗試以其他用戶身份打開 netbeans,但不起作用。我正在使用 KDE 運行 Kubuntu 12.04 LTS。
我嘗試了以下操作:開啟終端,鍵入su - myotheruser
,鍵入 myotheruser 密碼。然後嘗試開啟netbeans:/opt/netbeans/7.3/bin/netbeans
(netbeans安裝在/opt/netbeans/7.3)。
我得到以下資訊:
Erro: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
我嘗試了一些命令,例如export DISPLAY=":0.0"
、xhost +
和xhost +local:all
其他相關命令這裡和這裡。沒有一個起作用。
對我來說很重要的是我的其他用戶不在 sudoers 文件中。
如果我結束會話我的當前用戶並使用以下命令登入我的其他用戶 我可以輕鬆打開netbeans。
我需要開啟 netbeans,myotheruser
因為我想處理屬於該使用者且僅屬於該使用者的專案。如果我更改權限,看起來當我對專案進行版本控制時,使用者將失去排他性。
那麼,我該如何解決這個問題呢?如何在另一個使用者顯示器中以不同使用者身分開啟 netbeans?
答案1
您始終可以嘗試以下操作:
ssh -Y otheruser@localhost "/opt/netbeans/7.3/bin/netbeans"
:)
答案2
我用gksu
:
gksu -u myotheruser /opt/netbeans/7.3/bin/netbeans
也許也可以試試看kdesu
。