• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Linux Ubuntu, cannot run (Xt error: Can't open display)

Hi folks,

I have compiled a game to Ubuntu on a Bananapi board. Being very new to Linux, I am having problems actually running the game.

My game has two files: execute.sh and runner. When I try to run them from the desktop, I don't get an error message. I am running them from the root account.

When I type in sh execute.sh in terminal, I get the following error:
Code:
xterm: Xt error: Can't open display: %s
xterm: DISPLAY is not set
When I type in sh runner in terminal, I get the following error:
Code:
runner: 1: runner: Syntax error: "(" unexpected.
On the Bananapi board, I have installed Ubuntu 18.04.02 LTS bionic, which I got from Armbian.com. I have installed xubuntu (or XFCE?) as a desktop.

I've tried making a really simple game with just a single object and a simple sprite in one room. When I try to run that (it only has one file), I gives out the syntax error above.

Thanks in advance,
Peter
 

chamaeleon

Member
Hi folks,

I have compiled a game to Ubuntu on a Bananapi board. Being very new to Linux, I am having problems actually running the game.

My game has two files: execute.sh and runner. When I try to run them from the desktop, I don't get an error message. I am running them from the root account.

When I type in sh execute.sh in terminal, I get the following error:
Code:
xterm: Xt error: Can't open display: %s
xterm: DISPLAY is not set
When I type in sh runner in terminal, I get the following error:
Code:
runner: 1: runner: Syntax error: "(" unexpected.
On the Bananapi board, I have installed Ubuntu 18.04.02 LTS bionic, which I got from Armbian.com. I have installed xubuntu (or XFCE?) as a desktop.

I've tried making a really simple game with just a single object and a simple sprite in one room. When I try to run that (it only has one file), I gives out the syntax error above.

Thanks in advance,
Peter
You could try
Code:
export DISPLAY=:0
before executing execute.sh and see what happens.
 
You could try
Code:
export DISPLAY=:0
before executing execute.sh and see what happens.
It removed the error message.

I also managed to try and run the game from a non-root user, which removed a warning message.

Now Ubuntu just does nothing when I'm running the game. Same thing when testing. GM say everything went fine, but my Bananapi board does nothing.
.
Here's what GM says when the compiling is finished (both when building and running):

Code:
"cmd"  /c subst Z: "C:\Users\POEM\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE"
elapsed time 00:00:00.0460788s for command "cmd" /c subst Z: "C:\Users\POEM\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE" started at 08/02/2019 21:05:56
"cmd"  /c subst Y: "C:\Users\POEM\AppData\Local\GameMakerStudio2\GMS2TEMP"
elapsed time 00:00:00.0466793s for command "cmd" /c subst Y: "C:\Users\POEM\AppData\Local\GameMakerStudio2\GMS2TEMP" started at 08/02/2019 21:05:56
"cmd"  /c subst X: "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.2.3.341"
elapsed time 00:00:00.0562474s for command "cmd" /c subst X: "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.2.3.341" started at 08/02/2019 21:05:56
Saving project to: C:\Users\POEM\Documents\GameMakerStudio2\SuperDuperSpaceInvaders\SuperDuperSpaceInvaders.yyp
"C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.3.341/bin/Igor.exe"  -j=8 -options="C:\Users\POEM\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Linux Run
Loaded Macros from C:\Users\POEM\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\SuperDuper_306D80D7_6A79BC52\macros.json
Options: X:/bin\platform_setting_defaults.json
Options: C:\Users\POEM\AppData\Roaming/GameMakerStudio2\poem_887450251\local_settings.json
Failed to load Options from C:\Users\POEM\AppData\Roaming/GameMakerStudio2\poem_887450251\local_settings.json
Options: C:\Users\POEM\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\SuperDuper_306D80D7_6A79BC52\targetoptions.json
X://bin/GMAssetCompiler.exe  /c /zpex /mv=1 /iv=0 /rv=0 /bv=0 /j=8  /gn="SuperDuperSpaceInvaders" /td="Y:/" /cd="Z:/SuperDuper_306D80D7_6A79BC52" /zpuf="C:\Users\POEM\AppData\Roaming/GameMakerStudio2\poem_887450251" /m=linux /studio /tgt=128 /nodnd /cfg="default" /o="Y:/SuperDuperSpaceInvaders_57BDC7D2_VM" /sh=True /optionsini="Y:/SuperDuperSpaceInvaders_57BDC7D2_VM\options.ini"  /cvm /baseproject="X:/BaseProject\BaseProject.yyp" "C:\Users\POEM\Documents\GameMakerStudio2\SuperDuperSpaceInvaders\SuperDuperSpaceInvaders.yyp" /preprocess="Z:/SuperDuper_306D80D7_6A79BC52"
MACHINE TYPE = LINUX
Reading project file....C:\Users\POEM\Documents\GameMakerStudio2\SuperDuperSpaceInvaders
Reading project file....X:\BaseProject
Reading config delta 'C:\Users\POEM\Documents\GameMakerStudio2\SuperDuperSpaceInvaders\options\main\inherited\options_main.inherited.yy'
finished.
X://bin/GMAssetCompiler.exe DONE (0)
Release build
Options: Z:/SuperDuper_306D80D7_6A79BC52\MainOptions.json
Options: C:\Users\POEM\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\SuperDuper_306D80D7_6A79BC52\steam_options.yy
mkdir -p ~/.ssh
cat ~/.ssh/authorized_keys
pwd
mkdir -p ~/.ssh
Options: Z:/SuperDuper_306D80D7_6A79BC52\PlatformOptions.json
PlatformOptions
[Compile] Run asset compiler
X://bin/GMAssetCompiler.exe  /c /zpex /mv=1 /iv=0 /rv=0 /bv=0 /j=8  /gn="SuperDuperSpaceInvaders" /td="Y:/" /cd="Z:/SuperDuper_306D80D7_6A79BC52" /zpuf="C:\Users\POEM\AppData\Roaming/GameMakerStudio2\poem_887450251" /m=linux /studio /tgt=128 /nodnd /cfg="default" /o="Y:/SuperDuperSpaceInvaders_57BDC7D2_VM" /sh=True /optionsini="Y:/SuperDuperSpaceInvaders_57BDC7D2_VM\options.ini"  /cvm /baseproject="X:/BaseProject\BaseProject.yyp" "C:\Users\POEM\Documents\GameMakerStudio2\SuperDuperSpaceInvaders\SuperDuperSpaceInvaders.yyp" /optionsini="Y:/SuperDuperSpaceInvaders_57BDC7D2_VM\options.ini"  /bt=run /rt=vm
MACHINE TYPE = LINUX
Reading project file....C:\Users\POEM\Documents\GameMakerStudio2\SuperDuperSpaceInvaders
Reading project file....X:\BaseProject
Reading config delta 'C:\Users\POEM\Documents\GameMakerStudio2\SuperDuperSpaceInvaders\options\main\inherited\options_main.inherited.yy'
finished.
Compile Constants...finished.
Remove DnD...finished.
Compile Scripts...finished.
Compile Objects...finished.
Compile Timelines...finished.
Compile Triggers...finished.
Compile Rooms...finished.
Compile Extensions...finished.
Global scripts...finished.
finished.
collapsing enums.
Final Compile...finished.
Saving IFF file... Y:/SuperDuperSpaceInvaders_57BDC7D2_VM\SuperDuperSpaceInvaders.zip
Writing Chunk... GEN8
option_game_speed=30
Writing Chunk... OPTN
Writing Chunk... LANG
Writing Chunk... EXTN
Writing Chunk... SOND
Writing Chunk... AGRP
Writing Chunk... SPRT
Writing Chunk... BGND
Writing Chunk... PATH
Writing Chunk... SCPT
Writing Chunk... GLOB
Writing Chunk... SHDR
Writing Chunk... FONT
Writing Chunk... TMLN
Writing Chunk... OBJT
Writing Chunk... ROOM
Writing Chunk... DAFL
Writing Chunk... EMBI
Writing Chunk... TPAGE
Texture Group - Default
Writing Chunk... TGIN
Writing Chunk... CODE
Writing Chunk... VARI
Writing Chunk... FUNC
Writing Chunk... STRG
Writing Chunk... TXTR
0 Compressing texture... writing texture texture_0.png... 
1 Compressing texture... writing texture texture_1.png... 
2 Compressing texture... writing texture texture_2.png... 
3 Compressing texture... writing texture texture_3.png... 
4 Compressing texture... writing texture texture_4.png... 
5 Compressing texture... writing texture texture_5.png... 
6 Compressing texture... writing texture texture_6.png... 
7 Compressing texture... writing texture texture_7.png... 
8 Compressing texture... writing texture texture_8.png... 
9 Compressing texture... writing texture texture_9.png... 
10 Compressing texture... writing texture texture_10.png... 
11 Compressing texture... writing texture texture_11.png... 
12 Compressing texture... writing texture texture_12.png... 
13 Compressing texture... writing texture texture_13.png... 
14 Compressing texture... writing texture texture_14.png... 
15 Compressing texture... writing texture texture_15.png... 
16 Compressing texture... writing texture texture_16.png... 
17 Compressing texture... writing texture texture_17.png... 
18 Compressing texture... writing texture texture_18.png... 
19 Compressing texture... writing texture texture_19.png... 
20 Compressing texture... writing texture texture_20.png... 
21 Compressing texture... writing texture texture_21.png... 
22 Compressing texture... writing texture texture_22.png... 
23 Compressing texture... writing texture texture_23.png... 
24 Compressing texture... writing texture texture_24.png... 
25 Compressing texture... writing texture texture_25.png... 
26 Compressing texture... writing texture texture_26.png... 
27 Compressing texture... writing texture texture_27.png... 
28 Compressing texture... writing texture texture_28.png... 
29 Compressing texture... writing texture texture_29.png... 
30 Compressing texture... writing texture texture_30.png... 
31 Compressing texture... writing texture texture_31.png... 
32 Compressing texture... writing texture texture_32.png... 
33 Compressing texture... writing texture texture_33.png... 
34 Compressing texture... writing texture texture_34.png... 
35 Compressing texture... writing texture texture_35.png... 
36 Compressing texture... writing texture texture_36.png... 
37 Compressing texture... writing texture texture_37.png... 
38 Compressing texture... writing texture texture_38.png... 
39 Compressing texture... writing texture texture_39.png... 
40 Compressing texture... writing texture texture_40.png... 
41 Compressing texture... writing texture texture_41.png... 
42 Compressing texture... writing texture texture_42.png... 
43 Compressing texture... writing texture texture_43.png... 
44 Compressing texture... writing texture texture_44.png... 
45 Compressing texture... writing texture texture_45.png... 
46 Compressing texture... writing texture texture_46.png... 
47 Compressing texture... writing texture texture_47.png... 
48 Compressing texture... writing texture texture_48.png... 
49 Compressing texture... writing texture texture_49.png... 
50 Compressing texture... writing texture texture_50.png... 
51 Compressing texture... writing texture texture_51.png... 
52 Compressing texture... writing texture texture_52.png... 
53 Compressing texture... writing texture texture_53.png... 
54 Compressing texture... writing texture texture_54.png... 
55 Compressing texture... writing texture texture_55.png... 
56 Compressing texture... writing texture texture_56.png... 
57 Compressing texture... writing texture texture_57.png... 
58 Compressing texture... writing texture texture_58.png... 
59 Compressing texture... writing texture texture_59.png... 
60 Compressing texture... writing texture texture_60.png... 
61 Compressing texture... writing texture texture_61.png... 
62 Compressing texture... writing texture texture_62.png... 
Writing Chunk... AUDO
Writing Chunk... SCPT
Writing Chunk... DBGI
Writing Chunk... INST
Writing Chunk... LOCL
Writing Chunk... STRG
Writing Chunk... SCPT
Writing Chunk... DBGI
Writing Chunk... INST
Writing Chunk... LOCL
Writing Chunk... STRG
Stats : GMA : Elapsed=19899,2378
Stats : GMA : sp=34,au=12,bk=0,pt=0,sc=0,sh=0,fo=9,tl=0,ob=51,ro=3,da=0,ex=0,ma=26,fm=0xB00048E00034
X://bin/GMAssetCompiler.exe DONE (0)
InstallRunnerOnLinux
mkdir -p /home/poem/GameMakerStudio2
pscp X:/linux\runner.zip /home/poem/GameMakerStudio2/runner.zip
pscp X:/linux\execute.sh /home/poem/GameMakerStudio2/execute.sh
cd /home/poem/GameMakerStudio2; chmod +x execute.sh
cd /home/poem/GameMakerStudio2; unzip -o runner.zip
Transferring Assets...
pscp Y:\SuperDuperSpaceInvaders_57BDC7D2_VM\GameAssetsLinux.zip /home/poem/GameMakerStudio2
Igor complete.
pkill runner
cd /home/poem/GameMakerStudio2; rm -rf assets; unzip -o GameAssetsLinux.zip
cd /home/poem/GameMakerStudio2; export `ps e -u poem | grep -Po " DISPLAY=[\.0-9A-Za-z:]* " | sort -u`; export LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH; ./execute.sh ./runner
Igor complete.
elapsed time 00:02:01.0215570s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.3.341/bin/Igor.exe" -j=8 -options="C:\Users\POEM\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Linux Run started at 08/02/2019 21:05:56
"cmd"  /c subst Z: /d
elapsed time 00:00:00.0411692s for command "cmd" /c subst Z: /d started at 08/02/2019 21:07:57
"cmd"  /c subst Y: /d
elapsed time 00:00:00.0511477s for command "cmd" /c subst Y: /d started at 08/02/2019 21:07:57
"cmd"  /c subst X: /d
elapsed time 00:00:00.0505429s for command "cmd" /c subst X: /d started at 08/02/2019 21:07:57
SUCCESS: Run Program Complete
 
Could it be that my Bananapi M1 board is simply too slow, or that the SD card running Ubuntu and trying to run the game is too slow?

Its specs are:
  • Allwinner A20 Dual-core 1.0GHz CPU(option:allwinner A40i)
  • 1 GB DDR3 memory.
 
Top