User talk:Tampa

From OpenSimulator

Jump to: navigation, search

Hello Tampa

On the Dependencies/fr page, at the end of the “On Linux” section, I added this paragraph. I don't know if it's necessary or correct. I had this error on my computer and corrected it this way.

« Possible error under Linux:

When running the `opensim.sh` script, the following error may appear:

-bash: ./opensim.sh : /bin/sh^M :  bad interpreter: No file or directory of this type

This error indicates that there is a problem with the file format, often caused by incompatible line endings (e.g., Windows-style carriage returns).

To resolve this issue, you need to convert the file using the `dos2unix` command. Install dos2Unix:

sudo apt install dos2unix

Run the following command in the simulator's bin folder:

dos2unix opensim.sh

» Acryline



The problem is likely that on your system /bin/sh doesn't exist. These days the proper shebang should be /bin/bash so that's something to be fixed in the script itself, which can thankfully be edited easily through nano or vim.

dos2unix is not meant for that.

All opensim.sh really does is run dotnet OpenSim.dll which it does just on the terminal, so the moment that's closed the process is killed. Using screen or tmux is probably better advice to give to users, but that's sort of basic linux admin 101 so should know that already.

bin/sh is meant to be a symlink to the currently configured shell, so something is wrong on your system if that's not set. Debian and Ubuntu will point to dash, but that should still work fine given the commands in the script are normally available to all shells from zsh to bash.

Tampa


However, I use screen, and running dos2unix on the script solved the problem. But I only used it once. Now, opensim.sh launches fine.

I will delete the paragraph on the wiki page.

Acryline


Here is a version that calls bash instead:

#!/bin/bash

ulimit -s 1048576
ulimit -Hn 999999
ulimit -Sn 999999
dotnet OpenSim.dll

You can manage screen sessions through bash scripts and essentially handle all administrative tasks through that, start, stop, running commands etc. That's a bit beyond the scope of what should be delivered though. Only reason the script is included is to make it ever so slightly easier to run multiple commands at once. Really if you set the ulimits globally doing dotnet OpenSim.dll works just as well.

I'll make a proposal to update the script in the binary to something a bit more useful, but it'll essentially be the same. Not sure if assuming or requiring bash is best, it is the most compatible of the shells I have used, but for example mac os uses zsh or a fork of that, though usually bash comes preinstalled there as well. Could be wrong but I think it's available on pretty much all the mainline distros and it's even available on windows through git bash.

The linux instructions are in a bit of flux at the moment given the uncertain nature of the libgdiplus dependency, hence why I changed them. Hopefully in future it'll be much easier when the bugs are fixed and using the vendor builds is an option again. If not may have to explore other options.

If you have questions regarding those things feel free to reach out over discord or IRC :)

Tampa

Personal tools
General
About This Wiki