User talk:Tampa
From OpenSimulator
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
Thank you very much for your reply.
I just edited opensim.sh. I had already done so, but I hadn't seen the line #!/bin/sh. For me, it was #!/bin/bash. Sorry for my carelessness and thank you for the new script. :)
I used this configuration for ubODE, is that right?
ulimit -s 262144
Next time I'll try to come on IRC, but since I'm not fluent in English, I often use a translator, I'm always a little afraid of not being able to respond quickly enough in a conversation. I prefer exchanges that give me a little time.
For the same reasons, I don't attend the Tuesday meetings, and I write reports on the OpenSim meetings in French to better understand the software's development. I share them here: https://cogito.no-ip.info/cogito/OSWiki/index.php/Log_des_chats_des_réunions
Acryline
The ulimit mainly has to do with caches and other open files that can cause problems if it runs out of. There is supposed to be an infinite number available if it is set to that, but realistically you never need more than what is set. I have only ever seen it once or twice that the limits were reached causing problems so for most it's a non-issue.
No one will be mad if you take longer to respond, half of the folks at the meeting speak English as their second language as well, so nothing to be afraid of. On IRC or discord chances are it takes hours before you get a reply anyways, cause some of us have sleep cycles that are way off normal :) If you have questions feel free to drop in and ask them, always enjoy explaining things.
Tampa
Thanks :)
Acryline