After running the above on Windows I just copied over the “publish” folder over to my Linux environment running Pop OS. I’ve barely used Pop OS or any Linux distro for that matter and I have no idea how to actually run the game. There’s no obvious file I gotta double click.
I know it should work because I setup a dev environment on Pop OS and it can run my game from VS Code. But I have absolutely no idea what to do with the distributable folder spit out by MonoGame. I’ve only gotten apps to work that I’ve downloaded through the Pop OS app store thing. I don’t know how you’re supposed to get apps acquired outside of that to work.
If anyone could point me in the right direction that would be great.
The file you are looking for will be your game name without an extension.
Before you start it, you will need to right click and select properties.
On the second tab, give Execute permission on Owner or Owner and Group.
Double click to run or ./gamename in the terminal.
I tried double clicking the same file, instead of running it in the terminal and I’m getting the following error. I’m not sure what it means, and clicking “Search in Software” does nothing as far as I know.
I tried fussing with the permissions in the properties windows but it didn’t seem to change anything.
I’m still not very acquainted with the Linux universe, so I’m not sure if this is the kind of user experience Linux users are expecting. If I just distribute this as is will Linux users be satisfied?
For Windows the thing you download looks like this: Parent folder - Application folder - Double clickable Windows shortcut to .exe file in Application folder
And for Mac it’s even simpler: Parent folder - Double clickable .app "file"
What can I do to fix these problems and to make for a smoother experience on Linux like I’ve tried to do for other platforms?
Did you ever solve this problem? I have a similar issue. If I publish via the Build menu in Visual Studio 2019, it works. If I publish via command line using “dotnet publish”, it doesn’t. I’ve noticed that publishing from the command line creates my main executable as a “shared library” type file, where as publishing from the Build menu creates an “executable”. I can’t find any way of getting the command line publish to create an executable.
Don’t mind these OpenAL erros. I get the same in Monogame and even LibGDX. If I unplug my Headset, and use the speakers, the error will go.
If you export from a Windows machine to Linux, the permission bits will be gone (or not even be set). That means the user has to mark the file as executable again. That’s because the Windows filesystem uses a different permission system.
Yes I understand that the executable flag needs to be set in Linux, but if my project is built on the Windows machine, from the command line, no matter what I do in Linux, I cannot execute the file because it’s “tagged” as a different mime type. If I build from the menu in Visual Studio, then I can set the executable flag and the game runs. So why does the command line build differ from the Visual Studio build? It’s odd.