The problem is likely that the pasteboard service is not available outside a 
graphical session.

This is not a Jenkins issue. This should also happen when logging it to your 
Mac via SSH to a user account without active graphical session.

`ps aux | grep pbs` should show you a pbs (paste board service) for all users 
that are logged in interactively, and the user Jenkins runs as does not have an 
entry.

On 01.12.2014, at 16:02, Ginga, Dick <[email protected]> wrote:

> To all, we are getting errors when using the clipboard on MAC’s through 
> jenkins. We have a simple script that demonstrates it. It copies and reads 
> from the clipboard. When we run it from the command line we get:
>  
> Yuri-Aokis-MacBook-Pro:Source Testing$ cd qa/xxxx/Source
> Yuri-Aokis-MacBook-Pro:Source Testing$ python clipboard.py 
> HURAY!
> Yuri-Aokis-MacBook-Pro:Source Testing$ 
>  
> When we run it from a Jenkins shell build step, we get:
>  
> 05:32:29 + python clipboard.py
> 05:32:29 Traceback (most recent call last):
> 05:32:29   File "clipboard.py", line 17, in <module>
> 05:32:29     print (read_from_clipboard())
> 05:32:29   File "clipboard.py", line 13, in read_from_clipboard
> 05:32:29     'pbpaste', env={'LANG': 'en_US.UTF-8'}).decode('utf-8')
> 05:32:29   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py",
>  line 575, in check_output
> 05:32:29     raise CalledProcessError(retcode, cmd, output=output)
> 05:32:29 subprocess.CalledProcessError: Command 'pbpaste' returned non-zero 
> exit status 1
>  
>  
>  
> Dick Ginga, Informatics R&D
> PerkinElmer Inc. | For the Better
> HUMAN HEALTH | ENVIRONMENTAL HEALTH
> 940 Winter Street, Waltham MA 02451
>  
> [email protected]  
> Mobile – 508-847-1434
> Office – 781-663-6947
> 
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/6C6EE445A6F6CE4E8A0FFB51B071A4E26E4C7D29%40AMERMBX02.PERKINELMER.NET.
> For more options, visit https://groups.google.com/d/optout.
> <clipboard.py>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9FE4B0C7-F8C2-45E3-8477-C784FB962D90%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to