LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 12-13-2004, 08:54 AM   #1
java8964
LQ Newbie
 
Registered: Jul 2002
Posts: 20

Rep: Reputation: 0
Can't connec to X server on suse 9.2


Hi,

I just installed Suse 9.2 on my new AMD 64 box. Everything works fine expect the following problem.

Let say this box name is hostA. I have useA and useB on this box. After I login as userA, I can see the DISPLAY is set to :0.0. I can run any Xwindow application without any problem.

If I run the following command:

xhost +

I can see the message "Access control is disable. All hosts are allowed ". Then I run:

su - userB
OR
sux - userB

I will login as userB (Default shell is bash). Then I set the DISPLAY as

export DISPLAY=hostA:0.0

After this, I can't run any Xwindow application under userB. Everytime I will get this error message:
"Can't connect to X server on Display hostA:0.0"

But if I set DISPLAY=:0.0, then I can run Xapplication.

I have the following question:

1) This makes me can't run any Xwindow application from hostB to hostA. What I means is that if I login as userA on hostA, then ssh to userB on hostB, I can't run any X application on hostB and want the DISPLAY on hostA

2) I never have this problem on Suse 8.x. I disable the fiirewall on Suse 9.2. I think "xhost+" should be enough. Am I wrong?

3) I have another box installed Redhat Enterprise AS 3. I login as userA, then su to userB. No matter which user I login, I don't need to set "xhost +" and "export DISPLAY=". The X application just works. How to configure that on suse 9.2?

Thanks for your kind help!

Last edited by java8964; 12-13-2004 at 09:07 AM.
 
Old 12-13-2004, 09:03 AM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
I am not very familiar with those type of things, but there is this option (disabled per default), that the X server should listen to XDMCP requests. Maybe you need to enable this option in /etc/X11/xdm-config

Code:
!
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
!
DisplayManager.requestPort:	0
 
Old 12-13-2004, 09:12 AM   #3
java8964
LQ Newbie
 
Registered: Jul 2002
Posts: 20

Original Poster
Rep: Reputation: 0
Here is my xdm-config file under /etc/X11/xdm

Anything wrong? It looks the same as mine Suse 8.1, which I don't have this problem. Any more thoughts?

!
! xdm-config: Configuration of the xdm
!
DisplayManager.errorLogFile: /var/log/xdm.errors
DisplayManager.pidFile: /var/run/xdm.pid
DisplayManager.authDir: /var/lib/xdm
DisplayManager.keyFile: /etc/X11/xdm/xdm-keys
DisplayManager.servers: /etc/X11/xdm/Xservers
DisplayManager.accessFile: /etc/X11/xdm/Xaccess
DisplayManager.willing: su nobody -c /etc/X11/xdm/Xwilling
!
! ATTENTION: `authName' should be in general MIT-MAGIC-COOKIE-1
! For XDM-AUTHENTICATION-1 which is default for xterminals see
! manual page of xdm and the manual coming with the xterminal.
!
DisplayManager.*.authName: MIT-MAGIC-COOKIE-1
DisplayManager.*.authComplain: false
!
! All displays should use authorization, but we cannot be sure
! X terminals will be configured that way, so by default
! use authorization only for local displays :0, :1, etc.
!
DisplayManager._0.authorize: true
DisplayManager._1.authorize: true
!
! The scripts handling the setup, the startup, the session its self,
! and the reset of an X session.
!
DisplayManager.*.setup: /etc/X11/xdm/Xsetup
DisplayManager.*.chooser: /etc/X11/xdm/RunChooser
DisplayManager.*.startup: /etc/X11/xdm/Xstartup
DisplayManager.*.session: /etc/X11/xdm/Xsession
DisplayManager.*.reset: /etc/X11/xdm/Xreset
!
DisplayManager._0.terminateServer: true
!
DisplayManager*resources: /etc/X11/xdm/Xresources
DisplayManager.*.terminateServer: false
!
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
!
DisplayManager.requestPort: 0
 
Old 12-15-2004, 10:28 AM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
As per your now closed thread, this is moved to SuSE.
 
Old 12-18-2004, 05:00 PM   #5
java8964
LQ Newbie
 
Registered: Jul 2002
Posts: 20

Original Poster
Rep: Reputation: 0
If I scan my suse 8.2 and redhat linux using nmap, I can see the TCP port 6000 is active for X11. But it is not ture for my Suse 9.2. Is that the reason any x application can't connect to the X server on my Suse 9.2 even I dsiable access control by 'xhost +'?

Where is the port X11 is running on Suse 9.2 now?

Thanks
 
Old 12-18-2004, 05:26 PM   #6
java8964
LQ Newbie
 
Registered: Jul 2002
Posts: 20

Original Poster
Rep: Reputation: 0
Finally, I got the answer!

I have to vi the file /etc/X11/xdm/Xservers

The default setting of suse 9.2 is having 'nolisten tcp' into xserver. That's why the remote machine can't connect to xserver no matter the access control you try to set up, because the Xserver is not active on tcp connection.

Why nobody complain this before? I search google.com, suse mailing list and LQF, no luck for all.

You guys don't have another machine and you don't want to run the program remotely on your X window? I know this is maybe a security reason, but it is so inconvenient. It looks like I am the only one complain this.

Any way, find the answer finally and the feeling is great!

Last edited by java8964; 12-18-2004 at 05:27 PM.
 
Old 01-05-2005, 05:15 PM   #7
Athaphian
LQ Newbie
 
Registered: Sep 2003
Location: Zoetermeer, Holland
Distribution: Gentoo
Posts: 9

Rep: Reputation: 0
Quote:
Originally posted by java8964
Why nobody complain this before? I search google.com, suse mailing list and LQF, no luck for all.

You guys don't have another machine and you don't want to run the program remotely on your X window? I know this is maybe a security reason, but it is so inconvenient. It looks like I am the only one complain this.
I actually had the exact same problem...

For all users with this problem using Gentoo linux

The -nolisten tcp option is set in /usr/X11R6/bin/startx

You should remove that line in the startx file to get it working.
 
Old 04-11-2005, 01:10 AM   #8
dickohead
Member
 
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101

Rep: Reputation: 15
Hey,

I am having the same problem, yet i have changed so many different values, exported variables, tries many different methods of ssh and still... nothing! All i get is the error:
Code:
cannot connect to xserver
here is what i am trying to do:

I have suse 9.2 on my desktop (192.168.1.103), and suse 8.2 on my web server (192.168.1.111).
I ssh (-X -Y you name it!) to the web server as root, or as user type the following:
Code:
export DISPLAY=192.168.1.103
or
Code:
export DISPLAY=192.168.1.103:0.0
with the first one, there is no delay between pressing enter and the error message, but with the second one, there is a 5-10 second delay... so am i correct in assuming the latter is the one to use.

I also have been typing:
Code:
xhost +192.168.1.111
as user and root, the command fails as root (due to me being logged in as user), but works fine as user.

No matter what files i change, and how many different files i remove "-nolisten tcp" from, it refuses to connect.

I am quite convinced that my desktop (192.168.1.103) is blocking the tcp request for the xserver, so that programs sitting on my webserver will not load up onto my desktop.. for example - i wish to administer suse 8.2 through yast2, while being in suse 9.2... make sense?

I did have xhost working fine between the following:
mandrake 10.0 - mandrake 10.0
mandrake 10.1 - mandrake 10.0
mandrake 10.1 - mandrake 10.1
mandrake 10.1 - suse 8.2
but not any good with
suse 9.2 - suse 8.2

Any help resolving this matter would be fantastic!!!
 
Old 04-13-2005, 08:05 AM   #9
dickohead
Member
 
Registered: Feb 2003
Location: Melbourne, VIC, Australia
Distribution: Ubuntu 6.06
Posts: 101

Rep: Reputation: 15
Solution!

All i needed to do was have the xserver running on my server.... sounds logical enough! I'll be buggered why i didn't think of that earlier!!!

So now i have ssh and xhost connections working, along with the transportation of x-programs from my server to my desktop!

Thanks guys!!!
 
  


Reply



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
how to configure a dial in server with suse linux 9.0 server kouyatemaury Linux - Networking 3 03-30-2005 08:31 AM
SuSE 9.1 Pro or SUSE LINUX Enterprise Server 9? Mega Man X Linux - Distributions 11 09-24-2004 10:51 AM
Mounting windows server onto SuSE backup server murungu Linux - General 1 09-20-2004 03:01 PM
How to create a Mail server on Suse Linux Standard Server 8 DavidPartay Linux - Networking 1 06-29-2004 06:49 PM
SuSE 9, Samba server and Win2k server domain koskoboy Linux - Networking 3 12-11-2003 06:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 12:01 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
Open Source Consulting | Domain Registration