LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2010, 01:28 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
/usr/bin/xterm Xt error: Can't open display: %s


/usr/bin/xterm Xt error: Can't open display: %s

I tried to connect to remote server ,which is installed Centos 5.4 x86, through Xmanager on windows 7, and got this error.

Quote:
/usr/bin/xterm Xt error: Can't open display: %s
At the remote server, I turned on firewall and after this I got the above-mentioned error message.
I do this accrding to instruction on remote server.

Quote:
Open /usr/share/config/kdm/Xaccess and remove the initial "#"
character for the following line:
#* #any host can get a login window ==>
* #any host can get a login window
Open /usr/share/config/kdm/kdmrc and set the Enable entry to true in
the [xdmcp] section as following.
[xdmcp]
Enable=true

2. Firewall (TCP/UDP Ports) Configuration
Open UDP port 177 from the PC to the remote host direction.
Open incoming TCP ports 6000~6010 from the remote host to your PC.
After adding these ports "/etc/sysconfig/iptable" as the enoder mentioned, /etc/init.d/iptables restart
# Xmanager
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 6000:6100 --syn -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 7100 --syn -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 177 -j ACCEPT

3. Reboot the remote host and start Xmanager <- I could not restart remote server.
Any comment would be appreciated.
 
Old 10-25-2010, 01:35 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
In /ssh/sshd_config

Did you do

X11Forwarding yes
 
1 members found this post helpful.
Old 10-25-2010, 01:38 AM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by prayag_pjs View Post
In /ssh/sshd_config

Did you do

X11Forwarding yes
Yes, I did.
 
Old 10-25-2010, 02:04 AM   #4
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Hi,

Ttry this link http://it.megocollector.com/?p=740
It may help you!
 
1 members found this post helpful.
Old 10-25-2010, 02:34 AM   #5
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by prayag_pjs View Post
Hi,

Ttry this link http://it.megocollector.com/?p=740
It may help you!
Thnk you foru your kind link, but already included the above-mentioned instruction.
 
Old 10-25-2010, 03:01 AM   #6
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Can you disable firewall and see if it works
 
1 members found this post helpful.
Old 10-25-2010, 03:09 AM   #7
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by prayag_pjs View Post
Can you disable firewall and see if it works
At this time I could not disable firewall for IDT's security - the administrator of IDT asked me to enable firewal.
But before enabling firewall, I could connect remote server through xmanager with no problem.
 
Old 10-25-2010, 03:10 AM   #8
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Ok fine then problem seems to be with firewall.

Enable port 22 (i.e ssh) and let us know if it works
 
Old 10-25-2010, 03:50 AM   #9
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by prayag_pjs View Post
Ok fine then problem seems to be with firewall.

Enable port 22 (i.e ssh) and let us know if it works
I already enable port 22 as follows:

Quote:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -s xxx.xxx.xx.xxx -j ACCEPT
 
Old 10-25-2010, 04:01 AM   #10
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
As you said before enabling firewall it worked fine,please recheck you firewall configuration.

Also post the oputput of iptables -L
 
Old 10-25-2010, 04:30 AM   #11
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by prayag_pjs View Post
As you said before enabling firewall it worked fine,please recheck you firewall configuration.

Also post the oputput of iptables -L
The output of iptables -L is here:

Quote:
Chain INPUT (policy DROP)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain FORWARD (policy DROP)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT all -- anywhere anywhere state RELATED,ESTAB
LISHED
ACCEPT tcp -- ipc.server.com anywhere state NEW tcp dp
t:ftp
ACCEPT tcp -- xxx.xxx.xx.xxx anywhere state NEW tcp dpt:f
tp
ACCEPT tcp -- ipc.server.com anywhere state NEW tcp dp
t:ssh
ACCEPT tcp -- xxx.xxx.xx.xxx anywhere state NEW tcp dpt:s
sh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:h
ttp
REJECT all -- anywhere anywhere reject-with icmp-ho
st-prohibited
ACCEPT tcp -- anywhere anywhere tcp dpts:x11:synchr
onet-db flags:FIN,SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:xfs flags:F
IN,SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere udp dpt:xdmcp
 
Old 10-25-2010, 04:39 AM   #12
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
By default you have drop policy for all the packets coming to the server.

Try to ssh the linux server from any other linux server
 
Old 10-25-2010, 10:46 PM   #13
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by prayag_pjs View Post
By default you have drop policy for all the packets coming to the server.

Try to ssh the linux server from any other linux server

I installed centos 5.5 x64 at windows 7 to connect remote server, and this the result.

Quote:
[root@localhost ~]# ssh -X server_user@server.com
Address xxx.xxx.xx.xx maps to idc.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
server_user@server.com's password:
Last login: Tue Oct 26 10:57:51 2010 from xxx.xxx.xx.xxx
[server_user@server_user ~]$ su -
password:
[root@server_user ~]# startkde
xsetroot: unable to open display 'localhost:10.0'
xset: unable to open display "localhost:10.0"
xset: unable to open display "localhost:10.0"
xsetroot: unable to open display 'localhost:10.0'
startkde: Starting up...
ksplash: cannot connect to X server localhost:10.0
kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
kded: cannot connect to X server localhost:10.0
DCOP aborting call from 'anonymous-626' to 'kded'
kcminit_startup: cannot connect to X server localhost:10.0
ksmserver: cannot connect to X server localhost:10.0
startkde: Shutting down...
klauncher: Exiting on signal 1
startkde: Running shutdown scripts...
startkde: Done.
[root@server_user ~]#
 
Old 07-26-2011, 05:30 PM   #14
tc0nn
LQ Newbie
 
Registered: Jul 2011
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by windstory View Post
/usr/bin/xterm Xt error: Can't open display: %s
Make sure you can ping localhost also...

You might need to check /etc/hosts
 
Old 08-12-2011, 01:33 PM   #15
zparihar
Member
 
Registered: Sep 2004
Distribution: Fedora, Debian
Posts: 60

Rep: Reputation: 15
Thanks tc0nn!

making sure that the following was in my hosts files got it working for me

127.0.0.1 localhost




Cheers,

Zubin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /usr/bin/xterm: Could not exec /bin/bash: Permission Denied suheng Linux - Newbie 2 09-24-2010 06:31 PM
/usr/openwin/bin/xmodmap: unable to open display 'myhost:0.0' naveenv1984 Solaris / OpenSolaris 1 03-22-2010 04:17 AM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 09:33 AM
xterm Xt error: Can't open display: centguy Linux - Software 2 01-14-2009 11:40 PM
xterm -display remote:0.0 Can't open display - xterm from tru64 to debian 3.1 loopy69 Linux - Software 2 04-01-2008 07:54 PM


All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration