Project Category: OpenSimulator

  • opensim-debian

    OpenSim Debian Distribution

    Version: 2.0.0

    This is an framework to facilitate installation and use of OpenSim with Debian.

    https://www.speculoos.world/opensim-debian-installation-framework/

    Features

    ./install/install.sh

    • create basic directory structure, download OpenSim and other needed libraries
    • read Robust default configuration, ask a few questions and build a working configuration in etc/robust-d

    opensim start

    • Start all instances, first in etc/robust-enabled, then in etc/simulators-enabled

    opensim start instance1 [instance2] [...]

    • Start only specified instances The config will be the first match in etc/robust.d/.ini or etc/opensim.d/.ini

    opensim stop [now] [instance1] [instance2] [...]

    opensim restart [now] [instance1] [instance2] [...]

    • Stop/Restart all instances or matching instances
    • If first parameter is "now", stops the simulator immediately, otherwise send reminders to leave during 2 minutes then stop

    opensim status

    • Show active instances, per instance and global memory and cpu usage

    Installation

    git clone --recursive https://git.magiiic.com/opensimulator/opensim-debian.git
    # use --recursive to download git submodules
    # if you don't use recursive, they will be downloaded during installation
    sudo mv opensim-debian /opt/
    export PATH=$PATH:/opt/opensim-debian/bin
    cd /opt/opensim-debian
    ./install/install.sh

    Answer the common setting questions.

    Configuration should be working as is, but you will probably want to adjust

    • ./etc/opensim/opensim.conf (main database configuration)
    • ./etc/opensim/robust.d/*.ini (robust settings)
    • ./etc/opensim/opensim.d/*.ini (simulators settings)
    opensim start

    To enable bash completion:

    sudo apt update
    sudo apt install bash-completion
    sudo ln -s /opt/opensim-debian/lib/bash_completion.d/opensim /etc/bash_completion.d/

    Main motivation

    In a software application, particularly a complicate one like OpenSim, some thing should never be stored at the same place. Essentially, there is a place for static files (executables, libraries), a place for preferences, and a place for data created by the application (permanent or temporary).

    This way, you can

    • easily update the software without touching preferences and data
    • backup the data without duplicating the software
    • avoid duplicating the application if you need to run several instances…

    So, we reorganised the files and folders, matching the general Linux standards.

    • The whole thing is stored in /opt/opensim-debian (could become /usr/share/opensim if we make a package), refferred as OSDDIR below
    • Scripts and utilities are in /OSDDIR/bin/
    • The main code (latest stable OpenSim release) is located in /OSDDIR/core/opensim (no, not in bin, because they are not directly executable on all OSes, and they rely on lot of other files around them)
    • Preferences are read from /OSDDIR/etc/ /etc/ and ~/etc/, each one overriding the precedent
    • Cache is stored in /OSDDIR/var/cache
    • Logs in /OSDDIR/var/logs
    • Databases (if using sqlite) should be store in var/db (but we don’t use sqlite, so this could be added or not later)
    • Git clone and other works in progress should go in dev/

    It was important to achieve this without altering the main OpenSim code. So we created some scripts which:

    • read the preferences in etc/
    • looks for instances to start in etc/robust.d and etc/opensim.d
    • tells OpenSim where to save data, cache and logs

    We have developed and used this setup for several years in Speculoos Grid and wanted to share. Although this was working for us, we don’t push the whole thing as is, as we want to make sure the methods are as globals as they can.

  • Gudule’s Teleport Board 2

    Get the latest version: https://git.magiiic.com/opensimulator/Gudz-Teleport-Board-2

    Features:

    • Single or Multi-columns teleport buttons
    • Destinations statuses are checked at start and every hour to avoid TP to inactive regions
    • Local destinations can be written as HG links and are automatically converted to local links for teleport, so the same board works inside and outside your grid
    • Destination source can be set from a notecard or from a web server
    • Immediate TP or map (change USE_MAP in config)
    • Different colors for current region (green) or offline regions (red), customizable
    • Optional background texture
    • Can be formatted with titles (text without url), spacer (|) and column jump (-)
    • Configuration in a separate notecard to allow easy upgrades
    • Long click by the owner to force a full reload

    Setup

    The destination list can be set by 3 ways

    • from an external website: put the URL in prim description (only the first 2048 bytes will be loaded)
    • from a specific notecard: put "card://CardName" in the description
    • fallback if none of the two first method: read the first notecard found.

    In previous versions, the destination list used 5 values. We accept this old format for backward compatibility but we recommend the simplified format:

    • Displayed Name|your.grid:port
    • or Displayed Name|your.grid:port:Region Name
    • or Displayed Name|your.grid:port:Region Name|x,y,z

    Comments and formatting:

    • Empty lines are ignored
    • Lines beginning wish "#" are ignored
    • Lines commented with "//" are sent as message to the owner during initializaton
    • Lines containing only a string (and no url) are drawn as simple text (section titles)
    • Lines containing only a separator ("|") are drawn as an empty line (spacer)

    Although commenting lines is useful to disable them temporarily (#) or display help messages (//), it slows down the initialization, so it is better to avoid it as much as possible.

    Required OSSL Functions:

    • osGetGridGatekeeperURI
    • osGetNotecard
    • osTeleportAgent
    • osSetDynamicTextureDataBlendFace and related (osDrawFilledRectangle, osDrawRectangle, osDrawText, osGetDrawStringSize, osMovePen, osSetFontName, osSetFontSize, osSetPenColor, osSetPenSize)
  • Offline-Messages-mail-forwarding

    Offline messages (IM) mail forwarding for OpenSimulator https://github.com/GuduleLapointe/offline-mail-forwarding

    GNU AFFERO GENERAL PUBLIC LICENSE (see LICENSE file)

    Warning

    This forwarder might look easy to setup, but it is not an easy job. Mail forwarding will expose your server. So you ABSOLUTELY need to have a secured server to avoid being hacked or used by spammers.

    Among other things:

    • use SSL, disallow unencrypted access to this script
    • if you have a mail relay installed on your server, deny relay from non authenticated users;
    • avoid allowing group messages relaying if possible;
    • keep watching your OpenSimulator, mail and web server logs to detect any abuse.

    Features

    • Forward instant messages by mail when the user is offline
    • Replacement for the usual offline message script, so it also handles local delivery

    Caveats

    It is an external script. It is called where the sender stands by the region simulator, because that’s where you can call an external offline message script.

    This means:

    • if somebody sends a message from another grid, it will not be forwarded because the other grid has no access to HG users email and IM preferences
    • if it is sent from a region where the script it is not installed, the message will not be forwarded either

    This can be good, as it limits possible abuses, but a better approach would be to intercept the message on the grid level (in Robust instance), and from there allow or disallow forwarding from HG senders, but this would need changes in OpenSimulator core software.

    So this project is, and will stay, a workaround, not perfect but useful until we or somebody else develop the core module.

    Installation

    On your webserver

    You webserver needs access to the OpenSimulator database.

    • copy the content in a folder called "offline" (or whatever you like) in your webroot directory.
      git clone https://github.com/GuduleLapointe/offline-mail-forwarding.git offline
    • inside this directory, compy the example config file and adjust to your settings
      cp config.php.example config.php

    In OpenSimulator (grid or standalone)

    • In OpenSim.ini file adjust or add these setting under section [Messaging]. On a grid, this has to be set for every region.
      [Messaging]
      OfflineMessageModule = OfflineMessageModule
      ; OfflineMessageModule = "Offline Message Module V2"
      OfflineMessageURL = http://your.server/offline/offline.php
      StorageProvider = OpenSim.Data.MySQL.dll
      MuteListModule = MuteListModule
      MuteListURL = ${Const|BackOffice}/mute.php
      ForwardOfflineGroupMessages = false

      In the viewer

    Now mail forwarding is active on the server, but users wanting to enable it have to do it from viewer preferences (in Chat or Communication tab).

  • Gudz Free Land Rental Script

    This script is designed for managing free land rentals in OpenSimulator, ensuring tenants maintain a regular presence to prevent users from making land unavailable without actually using it.

    In the future, this script will be adjusted to also handle paid rentals.

    Features

    • Free Land Rentals: Allows users to rent land for free, requiring them to click regularly on the rental panel to keep the parcel.
    • Full Ownership: The land is technically sold to the user, giving them full ownership and control over their parcel without needing group tricks.
    • Automatic Reclaim: Expired or abandoned land is sold back to the vendor owner.

    Requirements

    The script requires these functions to be enabled for Estate Owners in OpenSimulator configuration:

    • osDrawText
    • osGetDrawStringSize
    • osGetGridGatekeeperURI
    • osGetGridLoginURI
    • osGetNotecard
    • osInviteToGroup
    • osKey2Name
    • osMovePen
    • osSetDynamicTextureDataBlendFace
    • osSetFontName
    • osSetFontSize
    • osSetParcelDetails
    • osSetPenColor

    Usage

    For Tenants

    1. Initial Rental: Click on the sign, read the rental conditions, and confirm the rental.
    2. Renewal: Before the end of each term, click on the sign to renew the rental.

    For Region Owners

    1. Estate Settings: Make sure to disable land join, split, and resell in your Estate settings.
    2. Placement: Place the terminal outside the rented land, around 1 meter from the parcel border and adjust until the positioning beacon is inside the parcel and appears green.
    3. Confirmation: A confirmation message appears. Check the rental conditions (see configuration below) and start renting.

    Configuration

    Do not modify the script directly, any change would be overriden on next update. Use the notecard or a web URL config file instead.

    Using a Notecard

    Create a notecard named .config including these settings:

    
    configURL = https://yourgrid.org/rental/example.txt
    // If set, the config will be read from the URL and the rest of the notecard will be ignored.

    // Base config (required)

    duration = 30 // number of days, can be decimal for shorter periods maxDuration = 365 // number of days, can be decimal for shorter periods renewable = TRUE maxDuration = 3650 expireReminder = 7 expireGrace = 7

    // Optional

    fontname = fontSize = lineHeight = margin = textColor = textBackgroundColor = position = cropToFit = textureWidth = textureHeight = textureSides =

    Using Object Description (deprecated)

    Put these values, in this order, in the main prim description, separated by commas. Duration, max duration, expire reminder, and expire grace are in number of days.

    DURATION,MAX_DURATION,,RENEWABLE,EXPIRE_REMINDER,EXPIRE_GRACE

    The empty third field used to be set to MAX_PRIMS, but it is now calculated from the parcel data. It can be left empty to save space (keeping two commas for backwards compatibility).

    To Do

    1. Fix current functionalities:
      • √ Fix rental not restored after updates (fixed in 1.6.5)
      • √ Fix messages not sent to HG avatars when offline (added notification queue)
      • √ Fix position not saved in rent data, causing new check triggered on reset
      • Keep notification queue after script reset
      • Clear rent data (object desc) if owner changed
      • Clear rental status if parcel changed
      • Shorter rental data format (only save in object desc the live rental data, not settings that are now handled by config file)
      • Also notify owner to clean terrain when abandoned (currently only on rental expiration)
    1. Add new functionalities:
      • √ New feature: restore rental, based on prims found in the parcel (1.6.6)
      • Use different prims for sign and renter name, hide and show accordingly, to avoid resizing single prim and allow more creative designs
      • allow setting times in years, months, days, hours
      • Option to limit to local grid avatars
      • Option for maximum number of parcels per user, or maximum area
      • Check that the owner has estate rights before activating
      • Centralized management
        • List available terrains
        • Centralized rental via in-world board
        • Centralized rental via web page
      • Advanced features (requires grid-side API)
        • Option to update terrain for sale status
        • Option to set objects auto return after rental end
    1. Add payment system:
      • With local currency
      • On website (via w4os or WooCommerce)

    License

    This script is provided under the GNU Affero General Public License version 3. See the LICENSE file for more details.

  • 2do HYPEvents (meta project)

    2do is an ecosystem of tools allowing to manage events in an OpenSimulator. It is composed of several elements, depending of the way you want to implement it.

    This repository contains no code, only the information about the related projects.

    1. 2do-board

    This is were it all began. A scripted object in-world, displaying ongoing and upcoming events, allowing teleport. By default, it is set to use 2do.directory service, but it can be customize with the tools below. It can be used on any region, regardless of the implementation of search or not on the grid, but requires OSSL draw functions to be function.

    2. 2do.directory

    The easiest way to enable in-world search (including events) is to configure the simulators to use 2do.directory services. It only requires the addition of OpenSimSearch.dll in OpenSimulator bin folder and a few configuration lines in OpenSim.ini. Search is provided by 2do.directory website and allow sharing of hypergrid destinations. It avoids the need to install helpers.

    3. OpenSim Helpers

    Installing your own helpers allow to use your own databases for search and events. It is relevant for private or associated grids, or to setup and alternate shared directory. Currently, due to OpenSimulator and/or viewer limitations, searching classifieds require a direct access to the Robust database, so to enable them, installing helpers specific to the grid is necessary.

    A local installation of OpenSimulator helpers can be combined with the use of an external events provider like 2do.directory.

    4. 2do-aggregator

    To providde your own events server. Collects events from different sources and made them available to the search engine and in-world boards. It is usually not necessary to install your own implementation, the service is offered by 2do.directory.

    Deprecated

    • 2do-server: the previous aggregator, written in python 2.7 and forked from Tom Frost’s HypEvents abandonned project, replaced by 2do-aggreagator
    • 2do-search: another implementation of search engine, focused on events. Replaced by opensim-helpers
  • 2DO board

    In-word teleporter board for 2DO events server.

    Installation from sources

    • Put the content of the "2DO board.lsl" in a script file and name it "2DO board"
    • Put the content of the "2DO Read me" in a notecard named "2DO Read me"
    • Put the content of one of the themes files in a notecard named "Configuration"
    • Let the magic happen

    Licence and copyright

    (c) 2018-2022 Gudule Lapointe gudule@speculoos.world. Based on the work of Tom Frost tomfrost@linkwater.org.

    Licence: GPLv3

  • 2DO Aggregator

    Version 0.2.0 Stable 0.2.0 Requires PHP 7.3 License AGPLv3

    The PHP port of python 2do-server.

    Before download or install : the easiest way to use this is to get the teleport board in-world (hop://speculoos.world:8002:Lab) and ask us to include your calendar in 2do.directory.

    Aggregator is a tool to fetch events from various sources and export them on several format, for use by 2do Board and other applications related with 2do Events project.

    Import formats:

    • [x] iCal (ics, iCalendar)
    • Custom web parsers:
      • [x] opensimworld
      • [x] thirdrock
      • gridtalk (to do)
      • OpenSim Fest (to do)

    Export formats:

    • [x] HYPEvent (legacy 2do/HYPEvent format)
      • [x] events.lsl2 (for current versions of 2do-board)
      • [x] events.lsl (old format, now includes only a deprecation notice)
    • [x] JSON (events.json) compatible with events parsers (provided by w4os or Flexible Helper Scripts)
    • [x] iCal (events.ics) iCalendar format, compatible with web, mobile and desktop calendars
    • [x] Light html web calendar page for standalone use

    This is a side PHP application intended to provide the same functionality as 2do-server, the original events fetcher of 2do project and the original HYPEvents code, but in a more modular and maintainable way, and with better integration with other tools of 2do Events, w4os and Flexiple Helper Scripts projects.

    • 2do-board: the in-world board to display the calendar

    For grid owners :

    • W4OS: a WordPress plugin to manage OpenSimulator grids and provide external helpers, including 2do Events
    • Flexible Helper Scripts: a standalione collection of scripts providing the same helpers, without the web interface

    Getting started (recommended)

    Don’t install this app. Seriously. In most cases you don’t need to install it, you can use ours.

    • as a parcel owner, you only need the the in-world board, which is intended to be used on any grid. It is available here:
    • as grid or region owner, you can use 2do.directory (https://2do.directory) service to enable events search on your grid with a simple straight-forward configuration

    Jump directly to "Calendar conventions" below for the events format.

    Installation

    Installation of this server is only relevant if you want to provide a custom-curated list calendar. If you really need to manage your own calendars collection, follow these instructions.

    Clone this repository and put it in a convenient place like /opt/2do-aggregator (not inside the website root folder).

    Install libraries.

      cd /opt/2do-aggregator
      composer install --no-dev

    Why outside the website directory? This is a script intended to be run from terminal or via a cron job, there is no point allowing random users or bots to run it from outside and risk overloading the server.

    Copy config/ical.gfg.example and add your calendar sources.

      cp config/sources.csv.example config/sources.csv

    Calendar conventions

    Events must have

    • A title
    • A start and end date/time
    • A location composed of the region HG url (e.g. yourgrid.org:8002:My_Region)

    They might also include

    • A description (optional but recommended)
    • A category (optional), following standards recognized by the viewers:
      • discussion
      • sports
      • live music
      • commercial
      • nightlife/entertainment
      • games/contests
      • pageants
      • education
      • arts and culture
      • charity/support groups
      • miscellaneous
      • These aliases are also recognized as variants of standard categories:
      • art (art and culture)
      • lecture (art and culture)
      • litterature (art and culture)
      • fair (nightlife/entertainment)
      • music (life music)
      • roleplay (games/contests)
      • social (charity/support groups)

    How to export Google Calendar as .ics

    To get the url of your calendar in iCal format, move your mouse above the calendar you want to share, a three dots icon appears, select "Settings and Sharing" and scroll the page down to find Public iCal format adress. This is the value you need to copy as calendar ics url.

    Running

    Run the script manually

      /opt/2do-aggregator/aggregator.php /var/www/html/events/

    Create a cronjob to run automatically (below example would run it every 4 hours)

      0 */4 * * * /opt/2do-aggregator/aggregator.php /var/www/html/events/

    Assuming /var/www/html is your website root directory, and http://www.yourgrid.org/, this would create:

    • http://www.yourgrid.org/events/ a basic web calendar page
    • http://www.yourgrid.org/events/events.lsl2 the source url for 2do Board
    • http://www.yourgrid.org/events/events.json the source url for events parsers

    Related projects

    Events parsers for in-world search:

    • w4os Web interface for OpenSimulator WordPress plugin for OpenSim grid management, providing also a collection of tools and helpers, including 2do services, It uses 2do.directory (see below) as default events source.
    • Flexible Helper Scripts standalone collection of helpers included in w4os, without web management interface, including in-world search engine, currency, events, offline messaging. It uses 2do.directory as default events source.

    Public calendars to use without installing this app: