It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hey, guys!

I recently had a problem with my PC, so I installed Linux on another HDD as a temporary fix. I was interested in how well gaming works in Linux. While FTL works perfectly, I can't get Terraria to run. When I run "./start.sh" in the terminal, I get the following message:

Running Terraria
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
ALSA lib conf.c:3366:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
OpenAL Device Error: A005

I'm running Ubuntu Budgie (based on Ubuntu 16.10) and already installed all the canberra modules. Any ideas?
avatar
Fesin: Hey, guys!

I recently had a problem with my PC, so I installed Linux on another HDD as a temporary fix. I was interested in how well gaming works in Linux. While FTL works perfectly, I can't get Terraria to run. When I run "./start.sh" in the terminal, I get the following message:

Running Terraria
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
ALSA lib conf.c:3366:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
OpenAL Device Error: A005

I'm running Ubuntu Budgie (based on Ubuntu 16.10) and already installed all the canberra modules. Any ideas?
I haven't upgraded beyond 14.04 LTS yet, but a quick search for "Cannot open shared library libasound_module_conf_pulse.so" suggests that you are either missing libasound2-plugins or the installation is broken and you need to sudo apt-get install --reinstall it.

Terraria is offered as a 64-bit binary (at least on my install), so it shouldn't matter if you're missing libasound2-plugins:i386.

If that doesn't work, the suggestion is to try resetting your PulseAudio config with rm -r ~/.config/pulse
Post edited February 01, 2017 by ssokolow
avatar
ssokolow: I haven't upgraded beyond 14.04 LTS yet, but a quick search for "Cannot open shared library libasound_module_conf_pulse.so" suggests that you are either missing libasound2-plugins or the installation is broken and you need to sudo apt-get install --reinstall it.

Terraria is offered as a 64-bit binary (at least on my install), so it shouldn't matter if you're missing libasound2-plugins:i386.

If that doesn't work, the suggestion is to try resetting your PulseAudio config with rm -r ~/.config/pulse
Okay, so I tried your suggestions, without success, but after I did sudo apt-get install libasound2-plugins:i386 I don't get any error message anymore when I try to ./start.sh, just Running Terraria, even though it doesn't start Terraria.

The weird thing is: When I tried rm -r ~/.config/pulse I get the message "rm: cannot remove '/home/[user]/.config/pulse': No such file or directory" - which is true, there is no pulse directrory in that place.
So I tried to sudo apt-get install pulseaudio and sudo apt-get install --reinstall pulseaudio, and while the latter reinstalled it, there still isn't a pulse directory in /.config/.

EDIT: Running Terraria looks like this, btw.:

[user]:~/GOG Games/Terraria$ ./start.sh
Running Terraria
[user]:~/GOG Games/Terraria$
Post edited February 01, 2017 by Fesin
avatar
ssokolow: I haven't upgraded beyond 14.04 LTS yet, but a quick search for "Cannot open shared library libasound_module_conf_pulse.so" suggests that you are either missing libasound2-plugins or the installation is broken and you need to sudo apt-get install --reinstall it.

Terraria is offered as a 64-bit binary (at least on my install), so it shouldn't matter if you're missing libasound2-plugins:i386.

If that doesn't work, the suggestion is to try resetting your PulseAudio config with rm -r ~/.config/pulse
avatar
Fesin: Okay, so I tried your suggestions, without success, but after I did sudo apt-get install libasound2-plugins:i386 I don't get any error message anymore when I try to ./start.sh, just Running Terraria, even though it doesn't start Terraria.

The weird thing is: When I tried rm -r ~/.config/pulse I get the message "rm: cannot remove '/home/[user]/.config/pulse': No such file or directory" - which is true, there is no pulse directrory in that place.
So I tried to sudo apt-get install pulseaudio and sudo apt-get install --reinstall pulseaudio, and while the latter reinstalled it, there still isn't a pulse directory in /.config/.

EDIT: Running Terraria looks like this, btw.:

[user]:~/GOG Games/Terraria$ ./start.sh
Running Terraria
[user]:~/GOG Games/Terraria$
What I'd probably do in your situation is start with the standard "peel away layers of overrides" approach. Well-packaged Linux games carry along an environment which is basically a cut down analogue to the Steam Runtime but, on occasion, you do run into situations where they only bundled half of a pair of libraries that the developers thought it was safe to update in a breaking way as long as they're updated together. (Even the Steam Runtime suffers from this on rare occasions.)

1. Try running the game/Terraria launcher script to see if GOG's start.sh launcher is having any effect.

2. Look inside the launcher script to see if there's a way to force 32/64-bit operation. If so, try 32-bit in case it behaves differently. (Spoiler: run it with -x86 to force 32-bit operation.)

3. Try running the Terraria.bin.x86_64 and Terraria.bin.x86 binaries directly to see if that changes anything.

4. It's a .NET game, so, if you've got mono-complete installed, try bypassing the bundled Mono by running mono Terraria.exe. (Note: It requires the bundled libmojoshader.so so you'll need to export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;$PWD/lib64" first in order to make it work.)

5. Try renaming some of the libraries in the lib64 folder (or lib if you're trying 32-bit) so it can't find them. The most common cause for this sort of problem is ABI incompatibility between a bundled library and an update Ubuntu released and forcing it to use the system version will fix that.
Post edited February 01, 2017 by ssokolow
avatar
ssokolow: 3. Try running the Terraria.bin.x86_64 and Terraria.bin.x86 binaries directly to see if that changes anything.
YES! This worked, thank you very much! :D

EDIT: So, I wanted to write a .desktop script, so I wouldn't need to go through the entire directory structure every time I want to start the game, but for some reason it can't launch through that?

Looks like this:
[Desktop Entry]
Name = Terraria
Comment = Comment on the program
Exec = /home/[user]/GOG Games/Terraria/game/Terraria.bin.x86_64
Icon = /home/[user]/GOG Games/Terraria/game/Terraria.png
Terminal = false
Type = Application

But when I try to run it through that file, I get "There was an error laucnhing the application."

Any way to get an easy shortcut for that binary?
Post edited February 01, 2017 by Fesin
avatar
ssokolow: 3. Try running the Terraria.bin.x86_64 and Terraria.bin.x86 binaries directly to see if that changes anything.
avatar
Fesin: YES! This worked, thank you very much! :D

EDIT: So, I wanted to write a .desktop script, so I wouldn't need to go through the entire directory structure every time I want to start the game, but for some reason it can't launch through that?

Looks like this:
[Desktop Entry]
Name = Terraria
Comment = Comment on the program
Exec = /home/[user]/GOG Games/Terraria/game/Terraria.bin.x86_64
Icon = /home/[user]/GOG Games/Terraria/game/Terraria.png
Terminal = false
Type = Application

But when I try to run it through that file, I get "There was an error laucnhing the application."

Any way to get an easy shortcut for that binary?
It's probably failing because Linux desktops launch applications with the working directory set to $HOME rather than the folder containing the game. (The Linux approach makes it easier for them to Do The Right Thing™ when choosing where to save files or open load/save dialogs. The Windows approach, which sets the working directory to wherever the application was installed, dates back to before Windows supported multiple user accounts.)

Try adding Path=/home/[user]/GOG Games/Terraria/game/ to your .desktop file. (The full list of valid keys is defined here)

...and, if your desktop ignores it, and some sadly do, create this script in the "game" folder, mark it executable, and have your .desktop file launch it instead:
#!/bin/bash
cd "$(dirname "$(readlink -f "$0")")"
./Terraria.bin.x86_64
(Gotta love shell scripting as an easy way to automate anything that can be typed in the console)

That second line is a useful one to have in your toolkit and means:

1. Take the path the script was called with ($0).
2. Get the absolute path, resolving any symlinks along the way (readlink -f)
3. Strip off the filename, giving us the path to the directory it's in (dirname)
4. cd into that directory

Basically, it's a copy-paste-able "give me Windows-like $PWD behaviour" snippet.
Post edited February 02, 2017 by ssokolow
Mh, sadly didn't work. The script you gave me worked by it's own, but still wouldn't launch through the .desktop script - weird. I should note that I used the script for another program, where it runs without problem.
Here's how it looks now:
[Desktop Entry]
Name = Terraria
Comment = Comment on the program
Path = /home/[user]/GOG Games/Terraria/game/
Exec = /home/[user]/GOG Games/Terraria/game/launch
Icon = /home/[user]/GOG Games/Terraria/game/Terraria.png
Terminal = false
Type = Application
I guess it's not the worst thing in the world if I don't get it to run, it's just really strange that it works for one program, but not for Terraria.

Still, thank you very much. You do your title justice. :D
Post edited February 02, 2017 by Fesin
avatar
Fesin: Mh, sadly didn't work. The script you gave me worked by it's own, but still wouldn't launch through the .desktop script - weird. I should note that I used the script for another program, where it runs without problem.
Here's how it looks now:

[Desktop Entry]
Name = Terraria
Comment = Comment on the program
Path = /home/[user]/GOG Games/Terraria/game/
Exec = /home/[user]/GOG Games/Terraria/game/launch
Icon = /home/[user]/GOG Games/Terraria/game/Terraria.png
Terminal = false
Type = Application
avatar
Fesin: I guess it's not the worst thing in the world if I don't get it to run, it's just really strange that it works for one program, but not for Terraria.
problem with the spaces in the folder name maybe ?
Try renaming the directory from "GOG Games" to just "games" or something like that. And adjust the Path/Exec/Icon key accordingly.

There is probably a way to correctly specify a path containing spaces in a .desktop file (enclosing in double quotes, or escaping the white space or whatever).
But usually it's best to follow the golden rule and avoid spaces in directory names. It will always stir up trouble at some point ;).
avatar
Fesin: I guess it's not the worst thing in the world if I don't get it to run, it's just really strange that it works for one program, but not for Terraria.
In case it wasn't the spaces in the path: launcher - How do I diagnose "There was an error launching the application"? - Ask Ubuntu.
avatar
immi101: problem with the spaces in the folder name maybe ?
Try renaming the directory from "GOG Games" to just "games" or something like that. And adjust the Path/Exec/Icon key accordingly.

There is probably a way to correctly specify a path containing spaces in a .desktop file (enclosing in double quotes, or escaping the white space or whatever).
But usually it's best to follow the golden rule and avoid spaces in directory names. It will always stir up trouble at some point ;).
I really need to catch up on my sleep. I completely missed that.

Yes, it's necessary to put the path in the Exec key in double quotes if it contains spaces because the Exec key follows a syntax similar to what you'd type at the command line in order to permit arguments to be specified.
Yeah, that was it. Thank you, guys! :)
Also, the folder name "GOG Games" was created automatically by the installer. I guess they ought to change that, if it can cause problems with Linux.
Post edited February 03, 2017 by Fesin
avatar
Fesin: Yeah, that was it. Thank you, guys! :)
Also, the folder name "GOG Games" was created automatically by the installer. I guess they ought to change that, if it can cause problems with Linux.
GOG should really clean up their practice, and avoid using spaces in directory names.
avatar
Fesin: Yeah, that was it. Thank you, guys! :)
Also, the folder name "GOG Games" was created automatically by the installer. I guess they ought to change that, if it can cause problems with Linux.
Games are self-contained enough that it's usually not a big deal as long as you're using things which know to escape Exec in .desktop files (as opposed to something like LaTeX document generation, which is not space-safe).

That said, GOG_Games would do nicely.
Did anyone manage to run Lords of Xulima? Not only it crashes on startup on XFS (seems to be the same old and obnoxious LFS lacking bug in a growing list of 32-bit only games), but it also segfaults even when workaround is used (smaller or non XFS partition). Sounds like a major mess.

Given that I got it as a bonus for Torment: Tides of Numenera, I'm not that upset, but the game is rather unplayable in the current form.

I also noticed this:

Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Post edited February 06, 2017 by shmerl
avatar
shmerl: Did anyone manage to run Lords of Xulima? Not only it crashes on startup on XFS (seems to be the same old and obnoxious LFS lacking bug in a growing list of 32-bit only games), but it also segfaults even when workaround is used (smaller or non XFS partition). Sounds like a major mess.

Given that I got it as a bonus for Torment: Tides of Numenera, I'm not that upset, but the game is rather unplayable in the current form.

I also noticed this:

Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
It works for me in Fedora 25 with ext4.