Reputation: 2292
I tried setting up Jenkins in two ways :
In both cases, the Chrome UI is not getting opened. When I try to run scripts in Chrome - headless mode its working.
I executed the command :
su Jenkins
google-chrome
I got an error -
No protocol specified
(google-chrome:13404): Gtk-WARNING **: 10:26:05.136: cannot open display: :0
Any idea Why this is happening. Please help
Upvotes: 0
Views: 256
Reputation: 5076
Well, it's happening because the jenkins user is not allowed to communicate with the GUI.
I don't think it's a nice solution to allow another user access the frontend but if you're willing to proceed the solution is to execute the following with your main user:
xhost +SI:localuser:Jenkins
relevant src:
Upvotes: 1