No X11 DISPLAY variable was set, but this program performed an operation which requires it. (Using Gitlab)
I am want to run SikuliX via Gitlab.
Command: - sudo java -jar /home/tntesting
Error: No X11 DISPLAY variable was set, but this program performed an operation which requires it.
I have connected to my ubuntu machine using the remote desktop connection.
When I run the "Command" manually from the remote desktop connection monitor, the sikulix works.
Log -
sikuli@
[DEBUG] IDE: starting
[DEBUG] IDE: no extensions.txt nor valid content
[DEBUG] IDE: adding extension: /root/.
[DEBUG] IDE: Running: /home/tntesting
[DEBUG] IDE: AppData: /root/.Sikulix
[DEBUG] IDE: Classpath: /home/tntesting
[DEBUG] IDE: no extensions.txt nor valid content
[39 debug] RunTimeINIT: temp folder ok: /tmp/Sikulix_
Options: *** options dump
Options: testing =
Options: OptionsFile = /root/.
Options: *** options dump end
***** show environment for 1.1.4-SNAPSHOT-
user.home: /root
user.dir (work dir): /home/tntesting
user.name: root
java.io.tmpdir: /tmp
running 64Bit(amd64) on l (4.15.0-91-generic) from a jar
java 8 version 1.8 vm 25.242-b08 class 52.0 arch 64
app data folder: /root/.Sikulix
executing jar: /home/tntesting
*** classpath dump sikulix
0: file:/home/
1: file:/root/
*** classpath dump end
***** show environment end
[168 debug] init user preferences
[201 debug] IDE: running with Locale: en_US
[DEBUG] IDE: --- Sikuli parameters ---
[DEBUG] IDE: 1: -v
[205 debug] RunTimeIDE: libsExport: folder exists: /root/.
[205 debug] RunTimeIDE: loadLib: libJXGrabKey.so (success)
[206 debug] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[211 debug] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
[212 debug] IDE: Init ScriptingSupport
[217 debug] IDESupport: enter
[1169 debug] Runner: added: Text [txt] text/text
[1170 debug] Runner: added: Robot [robot] text/robot
[1447 debug] Runner: added: JavaScript [js] text/javascript
[1448 debug] Runner: added: Sikulix [sikuli, skl, jar] directory/sikulix
[1455 debug] Runner: added: Jython [py, $py.class] text/jython
[1456 debug] IDESupport: added: Jython
[1457 debug] IDESupport: added: JavaScript
[1457 debug] IDESupport: added: Text
[1457 debug] IDESupport: exit: defaultrunner: Jython (py)
[1458 debug] IDE: Reading Preferences
[1463 debug] Screen: initScreens: starting
[1463 debug] Screen: Accessing: GraphicsEnviron
[1463 debug] Screen: Accessing: GraphicsEnviron
[1463 debug] Screen: ScreenDevice 0 has (0,0) --- will be primary Screen(0)
[1463 debug] Screen: Monitor 0: (0, 0) 1920 x 1080
[1464 debug] Screen: initScreens: ending
[1464 debug] IDE: Adding components to window
[1477 debug] IDE: [I18N] menuRecent
[1496 debug] IDE: [I18N] menuToolAndroid
[1499 debug] IDE: creating tabbed editor
[1585 debug] IDE: creating message area
[1666 debug] EditorConsolePane: starting redirection to message area
IDE terminated: returned: 0
But when I run the same "Command" via gitlab (using .gitlab-ci.yml). It gives the above mentioned error.
variable: SIKULIX_
Here is the log :
$ sudo java -jar $SIKULIX_
[DEBUG] IDE: starting
[DEBUG] IDE: no extensions.txt nor valid content
[DEBUG] IDE: adding extension: /root/.
[DEBUG] IDE: Running: /home/tntesting
[DEBUG] IDE: AppData: /root/.Sikulix
[DEBUG] IDE: Classpath: /home/tntesting
[DEBUG] IDE: no extensions.txt nor valid content
[38 debug] RunTimeINIT: temp folder ok: /tmp/Sikulix_
Options: *** options dump
Options: testing =
Options: OptionsFile = /root/.
Options: *** options dump end
***** show environment for 1.1.4-SNAPSHOT-
user.home: /root
user.dir (work dir): /home/tntesting
user.name: root
java.io.tmpdir: /tmp
running 64Bit(amd64) on l (4.15.0-91-generic) from a jar
java 8 version 1.8 vm 25.242-b08 class 52.0 arch 64
app data folder: /root/.Sikulix
executing jar: /home/tntesting
*** classpath dump sikulix
0: file:/home/
1: file:/root/
*** classpath dump end
***** show environment end
Exception in thread "main" java.awt.
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.
at java.awt.
at java.awt.
at javax.swing.
at org.sikuli.
at org.sikuli.
at org.sikuli.
[54 debug] RunTimeIDE: ***** final cleanup at System.exit() *****
[65 debug] FileManager: deleteFileOrFolder:
/tmp/Sikulix_
IDE terminated: returned: 1
Does anyone have any idea why this is happening?
Please let me know in case you need further information.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Shresth Suman
- Solved:
- Last query:
- Last reply: