Windows GUI programs (e.g. notepad) start but are invisible after ssh login

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Windows GUI programs (e.g. notepad) start but are invisible after ssh login

Koszalek Opalek
This is what I do:

1) Start sshd
       cygrunsrv -S sshd

2) Login over ssh
       ssh ko@localhost

3) Start a Windows application (notepad, calc, whatever).

The application starts (it is listed in the Process
Explorer), however its windows are invisible.

How do I change this behavior and display the application?
I (obviously) do not want to export the window to another
$DISPLAY in the X11 fashion. I just want the app to be
visible on the machine where sshd is running.

Any help greatly appreciated,
Koszalek


----------------------------------------------------------------------
Mariola juz gra ... a Ty co robisz ?
Sprawdz >>> http://linkint.pl/f277a


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Windows GUI programs (e.g. notepad) start but are invisible after ssh login

Larry Hall (Cygwin)
On 6/30/2010 4:53 PM, Koszalek Opalek wrote:

> This is what I do:
>
> 1) Start sshd
>         cygrunsrv -S sshd
>
> 2) Login over ssh
>         ssh ko@localhost
>
> 3) Start a Windows application (notepad, calc, whatever).
>
> The application starts (it is listed in the Process
> Explorer), however its windows are invisible.
>
> How do I change this behavior and display the application?
> I (obviously) do not want to export the window to another
> $DISPLAY in the X11 fashion. I just want the app to be
> visible on the machine where sshd is running.

The short answer?  You can't or at least you shouldn't.  The
longer answer is MS doesn't want to allow this functionality
and has disabled the ability to access a desktop from a
service as of Vista.  If you're running XP, you may find that
you can get this to work by using the '-i' flag on 'cygrunsrv'
when you install the 'sshd' service.  Or you can call up the
adminstrator tools, find the sshd service, and enable desktop
interaction there.  This should work, though there have been
some reports of difficulty on this list even for XP.  It's not
clear why but given the fact that MS is removing support for this
anyway, the best way to get a reliable way to do this is to lobby
MS for some support. ;-)

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Windows GUI programs (e.g. notepad) start but are invisible after ssh login

Thorsten Kampe
* Larry Hall (Cygwin) (Wed, 30 Jun 2010 17:09:49 -0400)

> On 6/30/2010 4:53 PM, Koszalek Opalek wrote:
> > This is what I do:
> >
> > 1) Start sshd
> >         cygrunsrv -S sshd
> >
> > 2) Login over ssh
> >         ssh ko@localhost
> >
> > 3) Start a Windows application (notepad, calc, whatever).
> >
> > The application starts (it is listed in the Process
> > Explorer), however its windows are invisible.
> >
> > How do I change this behavior and display the application?
> > I (obviously) do not want to export the window to another
> > $DISPLAY in the X11 fashion. I just want the app to be
> > visible on the machine where sshd is running.
>
> The short answer?  You can't or at least you shouldn't.  The
> longer answer is MS doesn't want to allow this functionality
> and has disabled the ability to access a desktop from a
> service as of Vista.

Sorry, that's nonsense. The option is there in Vista, Windows 2008,
Windows 7 and Windows 2008 R2.

> It's not clear why but given the fact that MS is removing support for
> this anyway, the best way to get a reliable way to do this is to lobby
> MS for some support. ;-)

Microsoft has not removed support for it (but may in future releases).
The only thing that has changed is the way the desktop interactive
application is displayed. This is all pretty well documented here:

"Users may choose to:
* Respond to the dialog box immediately by clicking a button to switch
to Session 0, interact with the task dialog box, and then return to
their session.
* Be reminded again in 5 minutes. They continue to be reminded until the
dialog box closes."

This is all pretty well documented here:
http://www.microsoft.com/whdc/system/sysinternals/session0changes.mspx


Thorsten


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Windows GUI programs (e.g. notepad) start but are invisible after ssh login

Larry Hall (Cygwin)
On 7/1/2010 4:15 AM, Thorsten Kampe wrote:
> * Larry Hall (Cygwin) (Wed, 30 Jun 2010 17:09:49 -0400)

<snip>

>> The short answer?  You can't or at least you shouldn't.  The
>> longer answer is MS doesn't want to allow this functionality
>> and has disabled the ability to access a desktop from a
>> service as of Vista.
>
> Sorry, that's nonsense. The option is there in Vista, Windows 2008,
> Windows 7 and Windows 2008 R2.

Yes, the option is there.  It just doesn't work like it used to for
XP because of the session changes.  So what was simple to enable before
is now infinitely less so.

>> It's not clear why but given the fact that MS is removing support for
>> this anyway, the best way to get a reliable way to do this is to lobby
>> MS for some support. ;-)
>
> Microsoft has not removed support for it (but may in future releases).
> The only thing that has changed is the way the desktop interactive
> application is displayed. This is all pretty well documented here:
>
> "Users may choose to:
> * Respond to the dialog box immediately by clicking a button to switch
> to Session 0, interact with the task dialog box, and then return to
> their session.
> * Be reminded again in 5 minutes. They continue to be reminded until the
> dialog box closes."
>
> This is all pretty well documented here:
> http://www.microsoft.com/whdc/system/sysinternals/session0changes.mspx
>

Thanks for the pointer to this document.  It has a nice description.

The quoted lines above relate to GUI that a service creates and uses.
In the case where a user wants to run a Windows app from ssh, it's the
Windows app and not the service that's creating the GUI.  While it's
theoretically possible that all Windows apps could adopt the client/
server model the white paper suggests, it's not practical or likely,
even if it would provide a solution.  That's not to say that there
is not a way to make this work post-XP in some more limited way without
modifying Windows GUI apps that users want to run from ssh.  I'm just
pointing out that it doesn't work by default and enabling the desktop
interaction switch also doesn't resolve the issue.  So I think it is
fair to say this is a topic of research at least.  Corinna may have
already been down this path and if so may be able to speak more
specifically about any possible options here.  But I'll still stick
with my original short answer until someone shows me a clever existing
facility that restores the original functionality.

To the original OP, I suggest if you're logged on using fast user
switching with <Vista, you might retry launching notepad from your
ssh session when you're also logged in directly to the machine in
question (don't use fast user switching).

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Re: Windows GUI programs (e.g. notepad) start but are invisible after ssh login

Koszalek Opalek
In reply to this post by Koszalek Opalek
User "Thorsten Kampe"  wrote:
> From: "Thorsten Kampe"
> Subject: Re: Re: Windows GUI programs (e.g. notepad) start but are invisible after ssh login
> To: [hidden email]
>
(...)
>
> Same on Windows XP SP3...

Is it possible to run sshd as a regular process rather
than a service?

I'm OK not seeing the GUI most of the time (I'm launching
my application after logging over ssh, the application does
some processing and then quits). However, if something goes
wrong I would be happy to stop sshd service, launch sshd
as a regular process, rerun the application and _see_ what
goes wrong.

K.


----------------------------------------------------------------------
Doladuj telefon przez Internet.
Sprawdz >>> http://linkint.pl/f2778


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Re: Windows GUI programs (e.g. notepad) start but are invisible after ssh login

Thorsten Kampe
* Koszalek Opalek (02 Jul 2010 08:50:47 +0200)
> User "Thorsten Kampe"  wrote:
> > Same on Windows XP SP3...
>
> Is it possible to run sshd as a regular process rather
> than a service?

Sure.

Thorsten


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: Windows GUI programs (e.g. notepad) start but are invisible after ssh login

Larry Hall (Cygwin)
In reply to this post by Koszalek Opalek
On 7/2/2010 2:50 AM, Koszalek Opalek wrote:

> User "Thorsten Kampe"  wrote:
>> Same on Windows XP SP3...
>
> Is it possible to run sshd as a regular process rather
> than a service?
>
> I'm OK not seeing the GUI most of the time (I'm launching
> my application after logging over ssh, the application does
> some processing and then quits). However, if something goes
> wrong I would be happy to stop sshd service, launch sshd
> as a regular process, rerun the application and _see_ what
> goes wrong.

You can run it as yourself in a terminal if you prefer.
You cannot switch back and forth between running it as a
service and running it in a terminal unless you run it as
yourself in both circumstances.  'sshd' will not be able
to switch user context unless you add privileges for your
account, which adds to security concerns.  FWIW, I have
not tried doing this so there may be other bumps along
the way.  And this is not a method of operation supported
by this list.  But if you're game, give it a shot.

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple