Raju, Narendra
2004-Jun-25 18:30 UTC
X user application fails come up but xclock and xterm come up
Hi , I open secure Session with X11 forwarding. when run any standard X applicattion like xterm xclock it come up without any error. I start my user X application it fails. On User application side it fails when "xtOpenDisplay" system call with localhost:10.0. On SSH server debug message are :> debug1: X11 connection requested. > debug2: fd 20 setting TCP_NODELAY > debug2: fd 20 is O_NONBLOCK > debug2: fd 20 is O_NONBLOCK > debug1: channel 3: new [X11 connection from 127.0.0.1 port 47773] > debug1: channel 3: open confirm rwindow 3000 rmax 35840 > debug1: server_input_channel_req: channel 3 request exit-status reply 0 > debug1: session_by_channel: unknown channel 3 > debug1: dump: used 1 session 0 2001c300 channel 0 pid 80374 > debug1: dump: used 0 session 0 2001c398 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c430 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c4c8 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c560 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c5f8 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c690 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c728 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c7c0 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c858 channel 0 pid 0 > session_input_channel_req: no session 3 req exit-status > debug1: channel 3: rcvd close > debug1: channel 3: output open -> drain > debug1: channel 3: close_read > debug1: channel 3: input open -> closed > debug3: channel 3: will not send data after close > debug1: channel 3: obuf empty > debug1: channel 3: close_write > debug1: channel 3: output drain -> closed > debug1: channel 3: send close > debug1: channel 3: is dead > debug1: channel 3: garbage collecting > debug1: channel_free: channel 3: X11 connection from 127.0.0.1 port 47773, > nchan > nels 5 > debug3: channel_free: status: The following connections are open:\015 > #0 server-session (t4 r0 i0/0 o0/0 fd 16/15)\015 > #2 X11 connection from 127.0.0.1 port 47764 (t4 r1 i0/0 o0/0 fd > 18/18)\015 > #3 X11 connection from 127.0.0.1 port 47773 (t4 r7 i3/0 o3/0 fd > 20/20)\015 > #4 X11 connection from 127.0.0.1 port 47766 (t4 r3 i0/0 o0/0 fd 21/21) > > > > > xClock debug on SSH server > > debug2: channel 4: rcvd adjust 3000 > debug2: channel 2: rcvd adjust 3000 > debug1: X11 connection requested. > debug2: fd 20 setting TCP_NODELAY > debug2: fd 20 is O_NONBLOCK > debug2: fd 20 is O_NONBLOCK > debug1: channel 3: new [X11 connection from 127.0.0.1 port 47828] > debug1: channel 3: open confirm rwindow 3000 rmax 35840 > debug2: channel 2: rcvd adjust 3000 >Thank you for your help [Raju, Narendra]
Damien Miller
2004-Jun-25 18:43 UTC
X user application fails come up but xclock and xterm come up
Raju, Narendra wrote:> Hi , > > I open secure Session with X11 forwarding. when run any standard X > applicattion like xterm xclock > it come up without any error. I start my user X application it fails. On > User application side it fails when > "xtOpenDisplay" system call with localhost:10.0.Have you read: http://www.openssh.com/faq.html#3.13 ? -d
Ben Lindstrom
2004-Jun-25 19:01 UTC
X user application fails come up but xclock and xterm come up
On Fri, 25 Jun 2004, Raju, Narendra wrote:> > Hi , > > I open secure Session with X11 forwarding. when run any standard X > applicattion like xterm xclock > it come up without any error. I start my user X application it fails. On > User application side it fails when > "xtOpenDisplay" system call with localhost:10.0. >One of two things may be coming into play: 1. In your sshd_config: X11UseLocalhost Specifies whether sshd should bind the X11 forwarding server to the loopback address or to the wildcard address. Which is defualted to 'yes' 2. In your ssh_config: ForwardX11Trusted If this option is set to ``yes'' then remote X11 clients will have full access to the original X11 display. Which is defaulted to 'no'. I suspect the former.. but the latter may soon follow. - Ben
Raju, Narendra
2004-Jun-28 19:21 UTC
X user application fails come up but xclock and xterm come up
Thank you for your response. I did set X11UseLocalhost to yes. It work only if login as "spsy" user who is owner of user X application(the mode of application is " -rwsrwsr-x". If login as other user(who are have permission to exe) I ma not able run X application. Is SSH lose efffective user ID(EUID) of login user? I am using Hummingbird SSH client. Thanks Naren -----Original Message----- From: Ben Lindstrom [mailto:mouring at etoh.eviladmin.org] Sent: Friday, June 25, 2004 2:02 PM To: Raju, Narendra Cc: 'openssh-unix-dev at mindrot.org' Subject: RE: X user application fails come up but xclock and xterm come up On Fri, 25 Jun 2004, Raju, Narendra wrote:> > Hi , > > I open secure Session with X11 forwarding. when run any standard X > applicattion like xterm xclock > it come up without any error. I start my user X application it fails. On > User application side it fails when > "xtOpenDisplay" system call with localhost:10.0. >One of two things may be coming into play: 1. In your sshd_config: X11UseLocalhost Specifies whether sshd should bind the X11 forwarding server to the loopback address or to the wildcard address. Which is defualted to 'yes' 2. In your ssh_config: ForwardX11Trusted If this option is set to ``yes'' then remote X11 clients will have full access to the original X11 display. Which is defaulted to 'no'. I suspect the former.. but the latter may soon follow. - Ben> > > Hi , > > I open secure Session with X11 forwarding. when run any standard X > applicattion like xterm xclock > it come up without any error. I start my user X application it fails. On > User application side it fails when > "xtOpenDisplay" system call with localhost:10.0. > > On SSH server debug message are : > > debug1: X11 connection requested. > debug2: fd 20 setting TCP_NODELAY > debug2: fd 20 is O_NONBLOCK > debug2: fd 20 is O_NONBLOCK > debug1: channel 3: new [X11 connection from 127.0.0.1 port 47773] > debug1: channel 3: open confirm rwindow 3000 rmax 35840 > debug1: server_input_channel_req: channel 3 request exit-status > reply 0 > debug1: session_by_channel: unknown channel 3 > debug1: dump: used 1 session 0 2001c300 channel 0 pid 80374 > debug1: dump: used 0 session 0 2001c398 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c430 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c4c8 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c560 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c5f8 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c690 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c728 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c7c0 channel 0 pid 0 > debug1: dump: used 0 session 0 2001c858 channel 0 pid 0 > session_input_channel_req: no session 3 req exit-status > debug1: channel 3: rcvd close > debug1: channel 3: output open -> drain > debug1: channel 3: close_read > debug1: channel 3: input open -> closed > debug3: channel 3: will not send data after close > debug1: channel 3: obuf empty > debug1: channel 3: close_write > debug1: channel 3: output drain -> closed > debug1: channel 3: send close > debug1: channel 3: is dead > debug1: channel 3: garbage collecting > debug1: channel_free: channel 3: X11 connection from 127.0.0.1 port > 47773, nchan > nels 5 > debug3: channel_free: status: The following connections are > open:\015 > #0 server-session (t4 r0 i0/0 o0/0 fd 16/15)\015 > #2 X11 connection from 127.0.0.1 port 47764 (t4 r1 i0/0 o0/0 fd > 18/18)\015 > #3 X11 connection from 127.0.0.1 port 47773 (t4 r7 i3/0 o3/0 fd > 20/20)\015 > #4 X11 connection from 127.0.0.1 port 47766 (t4 r3 i0/0 o0/0 fd > 21/21) > > > > > xClock debug on SSH server > > debug2: channel 4: rcvd adjust 3000 > debug2: channel 2: rcvd adjust 3000 > debug1: X11 connection requested. > debug2: fd 20 setting TCP_NODELAY > debug2: fd 20 is O_NONBLOCK > debug2: fd 20 is O_NONBLOCK > debug1: channel 3: new [X11 connection from 127.0.0.1 port 47828] > debug1: channel 3: open confirm rwindow 3000 rmax 35840 > debug2: channel 2: rcvd adjust 3000 > > Thank you for your help > [Raju, Narendra]
Raju, Narendra
2004-Jun-29 18:54 UTC
X user application fails come up but xclock and xterm come up
Darren , I used ssh client with debug mode to run user X application I get following error messages "X11 connection uses different authentication protocol" "X11 Connection rejected because of wrong authentication" Thanks Naren -----Original Message----- From: Darren Tucker [mailto:dtucker at zip.com.au] Sent: Monday, June 28, 2004 5:45 PM To: Raju, Narendra Cc: 'openssh-unix-dev at mindrot.org' Subject: Re: X user application fails come up but xclock and xterm come up Raju, Narendra wrote:> Thank you for your response. I did set X11UseLocalhost to yes. It work > only > if login as "spsy" user who is owner of user X application(the mode of > application is " > -rwsrwsr-x". If login as other user(who are have permission to exe) I manot> able run X application. > > Is SSH lose efffective user ID(EUID) of login user? > I am using Hummingbird SSH client.Your application is setuid (and setgid), so what's probably happening is the X11 "Magic cookie" that sshd puts into .Xauthority (with the "xauth" command) does not match what your application sends (since the uid that the application is running under has no .Xauthority or one that doesn't match). Try telling your application (or rather, its X libraries) where to find the .Xauthority file by running something like: XAUTHORITY=/home/yourdir/.Xauthority /path/to/yourapp -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.