Unable to open port 6000 for X11 forwarding on remote machine

Asked by Kapil

After trying for 2 days, I've been able to pin point on the issue behind not being able to perform X11 based remote desktop on my Ubuntu server 14.04.

The reason being simply port 6000 is not willing to be open in the system which is required for X11 forwarding. No matter whatever I tried based on internet suggestions have all failed with message "

connect localhost port 6000: Connection refused
xterm: Xt error: Can't open display: localhost:10.0"

If anyone can assist me with resolution for this issue, it would be really helpful. I've checked multiple times and I cannot find lightdm or gdm installed on my server. However, I've installed gnome-session from apt-get

I'm pretty much new to Ubuntu / Linux and not so well versed about the system.

Your assistance is much appreciated.

Regards,

Kapil

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Kapil
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the need for the connection? There may be a sleeker solution to your needs.

Revision history for this message
Kapil (kapil-bankeraika) said :
#2

We intend to use it to leverage the server alongwith GUI based internal trainings & application development. The preference is for X-Window based solution as they are light on server as well as remote machine as well.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Can you telnet to the socket ok?

Revision history for this message
Kapil (kapil-bankeraika) said :
#4

The NMAP result for port 6000 for localhost results into following:

Port Status Service
6000 CLOSED X11

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Do you use up? Did you configure iptables?

Revision history for this message
Kapil (kapil-bankeraika) said :
#6

I tried iptables but still the nmap shows the same result.\

Can you please elaborate more on the "up" command and how to use the same?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Ufw sorry. Auto correct.

Revision history for this message
Kapil (kapil-bankeraika) said :
#8

I'll check over internet about the ufw command and update shortly

Revision history for this message
Kapil (kapil-bankeraika) said :
#9

The ufw status command returns inactive

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

If you run:

ssh -X user@server

As normal then run some GUI application like:

gedit &

Does it show ok?

Revision history for this message
Kapil (kapil-bankeraika) said :
#11

I've been performing the following on my Cygwin terminal:

export DISPLAY=localhost:0.0

ssh -Y user@server

Then I've tried xterm &

The result has been:

connect localhost port 6000: Connection refused
xterm: Xt error: Can't open display: localhost:10.0

Revision history for this message
Kapil (kapil-bankeraika) said :
#12

Please note that I have not installed X Server on my ubuntu. I've installed Xterm and xauth packages.

I've been basically following the following link for configuration until now:

https://help.ubuntu.com/community/ServerGUI

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#13

Do you mean you didnt install X Server on the system you are connecting to? Is that correct?

Revision history for this message
Kapil (kapil-bankeraika) said :
#14

Yes, X server has not been installed on the server to whom we are connecting from the remote node.

Revision history for this message
Kapil (kapil-bankeraika) said :
#15

Since Cygwin installs X Server on local machine, we've not specifically installed on the server

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#16

The guide you gave a link to seems fine. If you install your GUI applications then you will be able to run them using the method I gave.

Revision history for this message
Kapil (kapil-bankeraika) said :
#17

GUI application? Can you please guide me with few examples.

I'd also installed gnome-session on the server. Now, I tried installing xserver-common packages but still the nmap result was same.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#18

Whatever you want to run on the server.... the reson you are connecting to the server in the first place.....

Revision history for this message
Kapil (kapil-bankeraika) said :
#19

We would be installing few applications on the server which requires GUI else they cannot be completely installed and configured properly.

Revision history for this message
Kapil (kapil-bankeraika) said :
#20

My problem is solved. I required to install gnome-session on the server and X server was not started on the local machine.

Thanks for your assistance. Appreciate your patience.