Re: How to remotly launch application with SSH and Cygwin/X server

2010-02-26 Thread __Ricardo__

I have similar problem with Cygwin 1.7.1's SSHD. I'm unable to start any
Windows GUI program via SSH. Strange is the problem doesn't occur in
SSHD shipped with cygwin 1.5.25-7, which I had installed yesterday. In
version 1.5
enough thing to do was enable service option: Allow interact with desktop,
then GUI applications were able to be correctly run via ssh. In version 1.7
switch on this option in Cygwin SSHD service option doesn't help.
Application cannot
draw himself, and generates tons of denial access errors.

I tried also grant acces in Local Policies to user,
Generate security audits
Replace process level token
Create process token

didn't help too :( 
I have Win XP SP2, under this system I had installed Cygwin 1.5 and launch
GUI apps via ssh
worked. Now I have Win XP SP2 too, but current Cygwin version is 1.7.1 - It
doesn't work.

I tried to find answer to this problem, and I saw this problem is not a new
one (people
complains since A.D. ~2006), but nobody could definitly answer how to make
it work, or 
at least say that is impossible to do at all.

If someone has some info, please help. Thanks.
Ricardo.


silver95 wrote:
 
 Hi,
 
 I've got a problem with Cygwin/X server (via Cygwin 1.7.1)
 Assuming we have a PC on Linux called X and a PC on Windows called Y.
 I want to send a SSH command from X to Y which launchs firefox on Y.
 (ie Windows)
 
 Firstly, if I go to Y (Windows) and launch a Cygwin shell and then
 enter the 'firefox' command (firefox is in the PATH environment
 variable of course), the Firefox is launched correctly and I can
 navigate to whatever I want.
 If I send a SSH command from X (Linux) to Y (Windows) with the firefox
 command : ssh usern...@y_ip_address firefox, I've got a firefox.exe
 process in the task manager of Y but Firefox is in the background (ie
 there is no Firefox window).
 
 I have set the DISPLAY environment variable to :0.0.
 Do you know why it is launched in background ?
 Is there a mean of displaying Firefox launched from the Linux box on
 Windows ?
 
 Thanks
 Silver
 
 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Problem reports:   http://cygwin.com/problems.html
 Documentation: http://x.cygwin.com/docs/
 FAQ:   http://x.cygwin.com/docs/faq/
 
 
 

-- 
View this message in context: 
http://old.nabble.com/How-to-remotly-launch-application-with-SSH-and-Cygwin-X-server-tp27523977p27720120.html
Sent from the cygwin-xfree mailing list archive at Nabble.com.


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



RE: How to remotly launch application with SSH and Cygwin/X server

2010-02-26 Thread __Ricardo__



X23G8c wrote:
 
 From: cygwin-xfree-ow...@cygwin.com [mailto:cygwin-xfree-
 ow...@cygwin.com] On Behalf Of __Ricardo__
 Sent: Friday, February 26, 2010 8:09 AM
  
 didn't help too :(
 I have Win XP SP2, under this system I had installed Cygwin 1.5 and
 launch
 GUI apps via ssh
 worked. Now I have Win XP SP2 too, but current Cygwin version is 1.7.1
 - It
 doesn't work.
 
   You are trying to launch the Windows screen apps as the user that owns
 the screen, correct?
 
 
   Thanks,
 
 Mike
 
 

  Yes. I'll try to explain better: I'm log on to windows as e.g. User1, that
is administrator user. When I start cygwin shell I can simply run:
   $notepad

I see Notepad application correct launched, but If I do it this way:

  $ssh us...@localhost
us...@localhost's password:
Last login: Fri Feb 26 18:00:01 2010 from localhost

us...@athlon ~
$ notepad

I have notepad launched (I see it on process ) but it cannot draw correctly
himself on the screen. The same behaviour was in Cygwin 1.5, but then
sufficient thing to do was simply select SSHD service option: Allow service
to interact with desktop, which was solve the problem.

With Cygwins' 1.7 SSHD, selection this option does not take any effect, I
have still this unexpected to me behaviour.

From application point of view it is somekind still permission problem
(exactly the same as was in cygwin 1.5 before switch on Allow service to
interact with desktop option), for example:

int main(int argc, char* argv[])
{
  int retVal = 0;
  retVal = SetCursorPos(0, 0);

  if (retVal == 0)
  {
 std::cout  SetCursorPos error [
GetLastError()  ].
std::endl;

 //
 // GetLastError() returns 5 - ACCESS VIOLATION
 // when it is run via ssh in Cygwin 1.7.1.
 //
  }

  return 0;
}

Additional info:
SSHD process user name is SYSTEM
process launched via ssh user name is User1, but it still has no access to
the desktop.

-- 
View this message in context: 
http://old.nabble.com/How-to-remotly-launch-application-with-SSH-and-Cygwin-X-server-tp27523977p27722202.html
Sent from the cygwin-xfree mailing list archive at Nabble.com.


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