Sunday, February 21, 2010

Setting up MySQL for OpenSim

At the moment, OpenSim fails to start when using SQLite with mono 2.4.3 or higher (at least up to 2.6.1). So here's a quick guide to switching it to use MySQL, which does still work. This assumes you already have a MySQL server running on your local machine.

Log in to MySQL:

mysql -u root -p

Create the OpenSim database and user:

CREATE DATABASE opensim;
GRANT ALL PRIVILEGES on opensim.* TO 'opensim'@'localhost' IDENTIFIED BY 'your-password-here';

Back in the shell, create the OpenSim.ini file:

cd bin
cp OpenSim.ini.example OpenSim.ini
cd ..


Open bin/OpenSim.ini in a text editor and change a few things to MySQL:
  • Comment out storage_plugin and storage_connection_string (lines 131, 132).
  • Set storage_plugin and storage_connection_string (lines 139, 140).
  • Change inventory_plugin to MySQL (lines 309, 310)
  • Change inventory_source to MySQL (lines 313, 315)
  • Change userDatabase_plugin to MySQL (lines 325, 326)
  • Change user_source to MySQL (lines 329, 331)
Back in the shell, create the StandaloneCommon.ini file:

cd bin/config_include
cp StandaloneCommon.ini.example StandaloneCommon.ini

cd ../..


Open bin/config_include/StandaloneCommon.ini in a text editor and change one thing:
  • Change StorageProvider and ConnectionString (lines 8 and 9) to MySQL.

Wednesday, September 30, 2009

Using doc-view-mode on Mac OS X

Included with emacs 23 is a new feature called DocView, which lets you view PDF, PS, and DVI files (via conversion to PNG) directly in emacs. However, it does not work on Mac OS X out of the box. If you try to open a PDF, you get an error of the form "No PNG support available or some conversion utility for pdf files is missing."

There seems to be little information on the web about this, but if you read the file header, it tells you what you need:
doc-view.el requires GNU Emacs 22.1 or newer. You also need Ghostscript, `dvipdf' (comes with Ghostscript) or `dvipdfm' (comes with teTeX or TeXLive) and `pdftotext', which comes with xpdf (http://www.foolabs.com/xpdf/) or poppler (http://poppler.freedesktop.org/).
You can install these via MacPorts:
sudo port install ghostscript xpdf
Then you must restart emacs to get DocView to register the availability of the new commands.