-1

I try to connect remotely to my Amazon EC2 server ( on which i have installed vncserver following this tutorial http://www.brianlinkletter.com/how-to-run-gui-applications-xfce-on-an-amazon-aws-cloud-server-instance/ ).

i have followed all instruction and the command "xeyes" working well on my laptop Ubuntu but when i launch the command :

xvncviewer localhost:1

the connection is refused :

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

i have defined a password on VNC for information.

Where is the issues ? please help me !!

3 Answers3

3

Log into the terminal using command line first like this:

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

Leave the connected command line open. Then on your VNC Viewer, try to access by using:

localhost:5902

As the VNC Server Address. It will ask for your password and then load the GUI.

Wachaga Mwaura
  • 3,310
  • 3
  • 28
  • 31
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 ).

0

all is ok now ! i dont know why but the windows appear after few times !

Thankx for reading