-1

我尝试远程连接到我的 Amazon EC2 服务器(我按照本教程安装了 vncserver http://www.brianlinkletter.com/how-to-run-gui-applications-xfce-on-an-amazon-aws-云服务器实例/)。

我已经按照所有说明和命令“xeyes”在我的笔记本电脑 Ubuntu 上运行良好,但是当我启动命令时:

xvncviewer localhost:1

连接被拒绝:

 main:        unable to connect to host: Connection refused (111)

我已经在 VNC 上定义了密码以获取信息。

问题在哪里?请帮我 !!

4

3 回答 3

0

现在一切都好!我不知道为什么,但几次后窗口出现了!

感谢阅读

于 2018-07-27T12:12:34.197 回答
0

sorry i didnt launch the VNC SERVER .... but now the connection is ok but nothing appear on my screen :

    Fri Jul 27 09:57:29 2018
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on local interface(s), port 5901
 vncext:      created VNC server for screen 0
/usr/bin/startxfce4: X server already running on display :1
gpg-agent[862]: WARNING: "--write-env-file" is an obsolete option - it has no effect
gpg-agent: a gpg-agent is already running - not starting a new one

(xfce4-session:849): xfce4-session-WARNING **: gpg-agent returned no PID in the variables

(xfce4-session:849): xfce4-session-WARNING **: xfsm_manager_load_session: Something wrong with /home/jamal/.cache/sessions/xfce4-session-kali:1, Does it exist? Permissions issue?

(xfsettingsd:878): xfsettingsd-WARNING **: Failed to get the _NET_NUMBER_OF_DESKTOPS property.

(xfwm4:866): xfwm4-WARNING **: Error opening /dev/dri/card0: Permission denied

** (light-locker:875): ERROR **: Environment variable XDG_SESSION_PATH not set. Is LightDM running?

Fri Jul 27 09:59:01 2018
 Connections: accepted: [::1]::41716
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VncAuth(2)

Fri Jul 27 09:59:05 2018
 VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888
 VNCSConnST:  Client pixel format depth 6 (8bpp) rgb222
 VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian rgb888

above the vnc log.

my user has all admin privilege in sudoers files ( ALL:ALL:ALL ).

于 2018-07-27T10:05:01.867 回答
0

首先使用命令行登录终端,如下所示:

ssh -L 5902:localhost:5902 -i yourkey.pem ubuntu@ec2-XX-XXX-XX-XX.us-west-2.compute.amazonaws.com

使连接的命令行保持打开状态。然后在您的 VNC 查看器上,尝试使用以下命令访问:

localhost:5902

作为 VNC 服务器地址。它会询问您的密码,然后加载 GUI。

于 2018-11-25T14:37:59.537 回答