run GUI tool on windows slave

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

run GUI tool on windows slave

Lynn.Lin

Hi all,

      My Jenkins master is windows and slave is also windows. I want to run a gui tool on windows slave. However If I configure Jenkins installation as windows service, it looks like fails to lunch GUI tools on windows slave, if I run Jenkins like this: java –jar Jenkins.jar,it looks good.

Any ideas on this? If I want to configure Jenkins as a windows services ,is there any solution to lunch GUI tools on windows?

 

 

Thanks

Lynn

Reply | Threaded
Open this post in threaded view
|

Re: run GUI tool on windows slave

Mark Waite
I believe the simplest and most reliable way to run a Windows slave which needs to run GUI programs is to not run it as a service.

If that is unacceptable and you must have it as a service, you could try allowing the service to interact with the desktop.  The Wikipedia article on "Windows service" suggests that you can do that from the "Logon" tab in the "Services Properties" dialog.

Mark Waite


From: "[hidden email]" <[hidden email]>
To: [hidden email]
Sent: Tue, April 26, 2011 6:51:47 PM
Subject: run GUI tool on windows slave

Hi all,

      My Jenkins master is windows and slave is also windows. I want to run a gui tool on windows slave. However If I configure Jenkins installation as windows service, it looks like fails to lunch GUI tools on windows slave, if I run Jenkins like this: java –jar Jenkins.jar,it looks good.

Any ideas on this? If I want to configure Jenkins as a windows services ,is there any solution to lunch GUI tools on windows?

 

 

Thanks

Lynn

Reply | Threaded
Open this post in threaded view
|

RE: run GUI tool on windows slave

Lynn.Lin

Thanks Mark

 

I will try run windows slave not as a services.

Second when I run windows salve as a service and I enable “allow services to interact desktop”,it still doesn’t work to lunch a gui tool

For example: I add the following command into build step:

cmd /c mspaint

 

it fails to lunch paint program

 

Lynn

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Waite
Sent: Wednesday, April 27, 2011 9:14 AM
To: [hidden email]
Subject: Re: run GUI tool on windows slave

 

I believe the simplest and most reliable way to run a Windows slave which needs to run GUI programs is to not run it as a service.

 

If that is unacceptable and you must have it as a service, you could try allowing the service to interact with the desktop.  The Wikipedia article on "Windows service" suggests that you can do that from the "Logon" tab in the "Services Properties" dialog.

 

Mark Waite

 


From: "[hidden email]" <[hidden email]>
To: [hidden email]
Sent: Tue, April 26, 2011 6:51:47 PM
Subject: run GUI tool on windows slave

Hi all,

      My Jenkins master is windows and slave is also windows. I want to run a gui tool on windows slave. However If I configure Jenkins installation as windows service, it looks like fails to lunch GUI tools on windows slave, if I run Jenkins like this: java –jar Jenkins.jar,it looks good.

Any ideas on this? If I want to configure Jenkins as a windows services ,is there any solution to lunch GUI tools on windows?

 

 

Thanks

Lynn

Reply | Threaded
Open this post in threaded view
|

RE: run GUI tool on windows slave

Arve Knudsen
In reply to this post by Lynn.Lin
I think services are just not allowed to launch a GUI in newer versions of Windows, for security reasons, that's what I recall anyway. Therefore you'll have to run the slave in a logged-in user's session (e.g., in a terminal).

Arve

Sent from my Windows Phone

From: [hidden email]
Sent: 27. april 2011 03:34
To: [hidden email]
Subject: RE: run GUI tool on windows slave

Thanks Mark

 

I will try run windows slave not as a services.

Second when I run windows salve as a service and I enable “allow services to interact desktop”,it still doesn’t work to lunch a gui tool

For example: I add the following command into build step:

cmd /c mspaint

 

it fails to lunch paint program

 

Lynn

From: [hidden email] [mailto:[hidden email]] On Behalf Of Mark Waite
Sent: Wednesday, April 27, 2011 9:14 AM
To: [hidden email]
Subject: Re: run GUI tool on windows slave

 

I believe the simplest and most reliable way to run a Windows slave which needs to run GUI programs is to not run it as a service.

 

If that is unacceptable and you must have it as a service, you could try allowing the service to interact with the desktop.  The Wikipedia article on "Windows service" suggests that you can do that from the "Logon" tab in the "Services Properties" dialog.

 

Mark Waite

 


From: "[hidden email]" <[hidden email]>
To: [hidden email]
Sent: Tue, April 26, 2011 6:51:47 PM
Subject: run GUI tool on windows slave

Hi all,

      My Jenkins master is windows and slave is also windows. I want to run a gui tool on windows slave. However If I configure Jenkins installation as windows service, it looks like fails to lunch GUI tools on windows slave, if I run Jenkins like this: java –jar Jenkins.jar,it looks good.

Any ideas on this? If I want to configure Jenkins as a windows services ,is there any solution to lunch GUI tools on windows?

 

 

Thanks

Lynn

Reply | Threaded
Open this post in threaded view
|

Re: run GUI tool on windows slave

Jminne-3
In reply to this post by Lynn.Lin
If you are using windows GUI tool like Autoit, you may have to leave a
VNC session open for it to work.

-John

On Apr 26, 7:51 pm, <[hidden email]> wrote:
> Hi all,
>       My Jenkins master is windows and slave is also windows. I want to run a gui tool on windows slave. However If I configure Jenkins installation as windows service, it looks like fails to lunch GUI tools on windows slave, if I run Jenkins like this: java -jar Jenkins.jar,it looks good.
> Any ideas on this? If I want to configure Jenkins as a windows services ,is there any solution to lunch GUI tools on windows?
>
> Thanks
> Lynn
Reply | Threaded
Open this post in threaded view
|

Re: run GUI tool on windows slave

Rob Petti-2
In reply to this post by Lynn.Lin
We've run into this as well, and the only solution I've found is to run the slave agent via jnlp and leave the logon session active. In some rare cases, we found that certain GUI applications would not run when the slave agent was in a disconnected session, in which case we had to run it from the main console (on the physical monitor attached to the machine).
Reply | Threaded
Open this post in threaded view
|

Re: run GUI tool on windows slave

Tom Huybrechts
You do need a logon session, and need to make sure it doesn't lock after a while.
A remote desktop connection also works, but you cannot close it (and shouldn't even minimize it).
I've also had success with running in a VMWare session. That way you could log into the guest OS console via the VMWare client and then close the client. This might work for other virtualization solutions too.

On the Jenkins side, I always launch the slave manually on the slave (via commandline or jnlp).
A service won't work in any recent Windows version. 
Although there must be some way around this, since a tool like psexec is able to remote launch programs in an interactive session.

Tom

On Wed, Apr 27, 2011 at 10:14 PM, Rob Petti <[hidden email]> wrote:
We've run into this as well, and the only solution I've found is to run the slave agent via jnlp and leave the logon session active. In some rare cases, we found that certain GUI applications would not run when the slave agent was in a disconnected session, in which case we had to run it from the main console (on the physical monitor attached to the machine).

Reply | Threaded
Open this post in threaded view
|

Re: run GUI tool on windows slave

Lynn Lin-2


在 2011-4-28 上午4:39,"Tom Huybrechts" <[hidden email]>写道:
>
> You do need a logon session, and need to make sure it doesn't lock after a while.
> A remote desktop connection also works, but you cannot close it (and shouldn't even minimize it).
> I've also had success with running in a VMWare session. That way you could log into the guest OS console via the VMWare client and then close the client. This might work for other virtualization solutions too.
>
> On the Jenkins side, I always launch the slave manually on the slave (via commandline or jnlp).
> A service won't work in any recent Windows version. 

yes,if i don't run slave as service,it does lunch GUI tool successfully
> Although there must be some way around this, since a tool like psexec is able to remote launch programs in an interactive session.
>
> Tom
>
> On Wed, Apr 27, 2011 at 10:14 PM, Rob Petti <[hidden email]> wrote:
>>
>> We've run into this as well, and the only solution I've found is to run the slave agent via jnlp and leave the logon session active. In some rare cases, we found that certain GUI applications would not run when the slave agent was in a disconnected session, in which case we had to run it from the main console (on the physical monitor attached to the machine).
>
>