This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: logout from gnome-session over ssh


On Friday, July 01, 2005 4:30 AM, Ariel Millennium Thornton wrote:
>
>On Thu, 30 Jun 2005 14:35:33 -0400 Jerome Asselin wrote:
>
>> >From a cygwin bash shell, I run these commands:
>> 
>> Xwin &
>> export DISPLAY=:0
>> ssh -Y remoteserver -l user gnome-session
>> 
>> This works fine until I try to logout from gnome-session. Logging out
>> doesn't kill nautilus nor ssh (nor firefox). I have to manually kill
>> the ssh command to terminate the gnome-session.
>> 
>> How can I make it so that I can cleanly logout from gnome-session?
>> 
> 
> This seems like a bug with ssh.  I get the same thing ssh'ing from
Linux
> to Linux and from Windows to Linux.  The problem is that the ssh
session
> won't end until every process started by it ends.  If you're using ssh
> as the client command for starting the X server, one workaround is to
> log out normally, wait until only the persistent processes are
running,
> then hit Ctrl+Alt+Backspace to kill the server.
> 
> If someone knows the real solution, I'd like to know it too.  What I
> present is only a workaround, not a solution.
> 
> -ArielMT

IIRC, my old Mandrake installation used to have, somewhere in its
labyrinthine set of login scripts, a "shopt huponexit on" with a
comment to the effect that it "fixed" the ssh logout problem.

You could try putting something like the following in your
~/.bash_profile (assuming bash is your login shell in /etc/passwd)

  if [ -n "$SSH_CONNECTION" ];then
    shopt huponexit on
  fi

I'm not sure how much you can rely on the SSH_CONNECTION variable
being set, YMMV.

Phil

-- 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]