Since I have a workaround this is more to bring awareness to the matter in case it’s something that can be solved. Manjaro’s terminal settings appear to have a configuration that interferes with running some shell scripts accordingly, in particular some Linux native games downloaded from Gog. When launching their start.sh script the following crash occurs before the game can launch:
AL lib: (EE) GetLoadedHrtf: Invalid header in /usr/share/openal/hrtf/Default HRTF.mhr: "MinPHR03"
AL lib: (EE) GetLoadedHrtf: Failed to load /usr/share/openal/hrtf/Default HRTF.mhr
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542
at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.TermInfoDriver..ctor (System.String term) [0x00055] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.ConsoleDriver..cctor () [0x0004d] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
--- End of inner exception stack trace ---
at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.Console..cctor () [0x0008e] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
--- End of inner exception stack trace ---
at Dust.Program.Main (System.String[] args) [0x00089] in <5d7a814c409845baa5aaae407dcba4f7>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542
at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.TermInfoDriver..ctor (System.String term) [0x00055] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.ConsoleDriver..cctor () [0x0004d] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
--- End of inner exception stack trace ---
at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
at System.Console..cctor () [0x0008e] in <4bafc978642b4fd6b6c08368db3d2bdc>:0
--- End of inner exception stack trace ---
at Dust.Program.Main (System.String[] args) [0x00089] in <5d7a814c409845baa5aaae407dcba4f7>:0
AL lib: (EE) alc_cleanup: 1 device not closed
Thankfully there are two workarounds to this problem: You can either click on the shell script directly in your DE (eg: Dolphin) or run export TERM=xterm after which the script executes via console.
I mainly mention this since while looking up what’s happening, some articles suggested this works fine in Ubuntu. So I wasn’t sure if Manjaro is doing something unique that can be resolved, like setting a different fallback terminal or whatever it is affected scripts expect.