Difference between revisions of "Running Murmur"

From Mumble Wiki
Jump to: navigation, search
(Web-interfaces)
m (Web-interfaces)
Line 168: Line 168:
 
* [http://bitbucket.org/Svedrin/mumble-django/wiki/Home Mumble-Django]: A Murmur config application (using: [http://www.python.org python]+[http://www.djangoproject.com django]+[[dbus]])
 
* [http://bitbucket.org/Svedrin/mumble-django/wiki/Home Mumble-Django]: A Murmur config application (using: [http://www.python.org python]+[http://www.djangoproject.com django]+[[dbus]])
 
* Mumble PHP Interface (WIP) (using: PHP + ICE)
 
* Mumble PHP Interface (WIP) (using: PHP + ICE)
* [http://kissaki.clandooc.de/mumble/interfaces/simpleregister.php simpleregister (PHP + ICE)] <small>This is an extended version from the example packed with mumble/murmur.</small>
+
* [http://kissaki.clandooc.de/mumble/interfaces/simpleregister.php simpleregister] ([http://php.net/ PHP] + [[ICE]]) <small>This is an extended version from the example packed with mumble/murmur.</small>
 
* [https://sourceforge.net/projects/murmurwebadmin/ Murmur WebAdministrator] (PHP) <span style="color:red">Not Recommended</span> <small>(outdated and direct connection to the db instead of the recommended way of using [[ICE]] or [[DBus]], thus may result in data loss)</small>
 
* [https://sourceforge.net/projects/murmurwebadmin/ Murmur WebAdministrator] (PHP) <span style="color:red">Not Recommended</span> <small>(outdated and direct connection to the db instead of the recommended way of using [[ICE]] or [[DBus]], thus may result in data loss)</small>
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Revision as of 00:38, 28 February 2009

Murmur is the server component for Mumble.

  • Please note that in this page there are some commands that are very long. It will go beyond the margin of your screen. Therefore double click the command so it will highlight, and then copy paste it.

Distribution-specific Murmur

By default, murmur is configured to run from a regular user account, and on Windows and OSX this is the only way it works. However, on distributions with prepackaged murmur (Debian/Ubuntu), murmur is configured to run as a sytem service, just like your webserver, mailserver and whatever else you've got running. This "global" installation is a ready, turn-key solution, most of the information here does not apply to you. Most packages also include the 'murmur-user-wrapper' script, which does all of the below for you if you want to run as a regular user (including starting DBus).

So, on these systems, you can still run murmur manually, but you will then not benefit from the extensive care that has gone into preparing those packages.

If you need to register users or change the settings of a virtual server, read the section on Advanced Configuration.

Basic configuration

The default settings for a murmur server are configured in murmur.ini. Here you can configure the welcome text, port number and other settings. However, these are just default settings; if you're running multiple virtual servers, each virtual server has it's own configuration, which is maintained internally by Murmur (see below).

The default port for a Murmur server is UDP and TCP 64738.

Setting the SuperUser password

Until you've set a password for the SuperUser, the account will be disabled. You don't need the SuperUser account to run a simple server, but you do need it if you want to give your regular user account any privileges. To set the password on Linux run

murmurd -supw <password> (or run run sudo dpkg-reconfigure mumble-server if you are on a Debian based Distro)

If you're on Windows, then you set the password by running

"C:\Program Files\Mumble\murmur.exe" -supw <password>

Running Murmur as a regular user

If you are on Win32, you can simply start murmur.exe from the command line, or even easier just start it from the Start Menu.

DBus on Linux/OSX

For full functionality, murmur requires a DBus daemon. We need an isolated daemon, different from the one running under, say, a X11 session, so we specifically spawn our own. The following small shell script will ensure a deamon is ready (copied from murmur-user-wrapper):

#! /bin/bash
DIR=$HOME/murmur
DBUSFILE=$DIR/.dbus.sh
DBUS_SESSION_BUS_ADDRESS=invalid:/
[ -f $DBUSFILE ] && . $DBUSFILE
if ! dbus-send --print-reply --dest=org.freedesktop.DBus --type=method_call / org.freedesktop.DBus.GetId 2> /dev/null > /dev/null; then
  echo "Launching D-Bus session"
  dbus-launch --sh-syntax > $DBUSFILE
  . $DBUSFILE
  if ! dbus-send --print-reply --dest=org.freedesktop.DBus --type=method_call / org.freedesktop.DBus.GetId 2> /dev/null > /dev/null; then
    echo "Failed to launch session DBUS, bailing out."
  fi
fi

Before running this for the first time, make sure ~/murmur exists

mkdir $HOME/murmur

And to use it

source <pathtoscript>

You should always source this script before starting murmur, and you also need to run it before using any DBus commands.

Running the daemon

To run murmur, simply type

murmurd

For debugging, you might want to add -fg -v to the command line, which will stop the program from running in the background and.

By default murmur opens it's configuration file, database file and logfile in your current directory. The configuration file can be overridden with the -ini parameter, and the database and logfile can be set form the ini file.

Advanced Configuration

First, make sure Murmur is running and that you have contact with DBus. For Win32, you don't need to do anything, and on all other platforms, you should run the script above.

Showing the default configuration

This is just to verify we have contact with DBus, and to print out the default configuration.

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.getDefaultConf

(if you're running a system DBus based configuration, add --system before all the other parameters)

This should print out the default configuration.

Virtual Servers

Listing the servers:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.getAllServers

Adding a server:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.newServer

Removing a server:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.deleteServer int32:<serverid>

Starting a server:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.start int32:<serverid>

Stopping a server:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.stop int32:<serverid>

Server configuration

Each virtual server has it's server-specific configuration. If a particular confiuration item is empty, it will fall back to the default configuration, which is specified in the ini file.

Listing the configuration:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.getDefaultConf
dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.getAllConf int32:<serverid>

Setting a configuration item:

dbus-send --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call / net.sourceforge.mumble.Meta.setConf int32:<serverid> string:"<key>" string:"<value>"

User management

If you can run CGI scripts from your user account, the murmur.pl script contains user self-management. Just copy it to your webserver and make it executable (you might need to rename it to murmur.cgi), and it should contain everything needed. If not, this is what you'll need:

Adding a new registration:

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /<serverid> net.sourceforge.mumble.Murmur.registerPlayer string:"<username>"

Fetching an existing registration:

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /<serverid> net.sourceforge.mumble.Murmur.getRegistration int32:<userid>

or

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /<serverid> net.sourceforge.mumble.Murmur.getRegisteredPlayers string:"<username>"

Updating a registration:

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /<serverid> net.sourceforge.mumble.Murmur.setRegistration int32:<userid> string:"<username>" string:"<email>" string:"<password>"

Detailed explanation of user management

  • Note you must be running > 1.1.5 Murmur Stable for these commands to work.
  • If you are running Murmur from a session DBus, then remove the --system from the dbus-send commands


<serverid> is a digit number of the server you have. For instance if you had fifty Murmur servers running, the first server you started would be 1, and the fiftieth server you started would be 50.

<userid> is also a digit number such as 4 or 30, depending on how many people are registered in the database. For instance when you run

 dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.registerPlayer string:"Name"

you will see after you run this command "int32" and some other text. There will be a number to the right of "int32". This number is the user's UserID.


So for instance you want to register a user, that user's name was Name, his password was passwrd, and you have one server running.

On Linux you would run

 dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.registerPlayer string:"Name"

You will then see some text. In it you will see "int32". Let's say you already had 5 users registered^. The number next to "int32" in the terminal would be 6. Remember this number.

Now run

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.setRegistration int32:6 string:"Name" string:"<user's email address>" string:"passwrd"

On Windows you would run

"C:\Program Files\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.registerPlayer string:"Name"

You will then see some text. In it you will see "int32". Let's say you already had 5 users registered^. The number next to "int32" in the command prompt would be 6. Remember this number.

Now run

"C:\Program Files\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.setRegistration int32:6 string:"Name" string:"<user's email address>" string:"passwrd" 

You now have a registered user. "Name" can now login with the username Name and the password passwrd.

If you want to change Name's registration, do the following command: (let's change Name's name to "Unnamed" and his password to "nopasswrd")

For Linux do

dbus-send --system --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.setRegistration int32:6 string:"Unnamed" string:"<user's email address>" string:"nopasswrd"

For Windows do

"C:\Program Files\Mumble\dbus-send.exe" --print-reply --dest=net.sourceforge.mumble.murmur --type=method_call /1 net.sourceforge.mumble.Murmur.setRegistration int32:6 string:"Unnamed" string:"<user's email address>" string:"nopasswrd"

^If you have just started a new Murmur server, the first user you create will have a UserID of 1. The first UserID, 0, is the SuperUser.

Web-interfaces

Have a look at URLs to see how to publish links to your server.

There are several browser based interfaces which can be used to administrate the murmur server:

  • Murmurs script folder contains some basic web-interface examples, there are ICE or DBus based sample scripts.
  • Mumble-Django: A Murmur config application (using: python+django+dbus)
  • Mumble PHP Interface (WIP) (using: PHP + ICE)
  • simpleregister (PHP + ICE) This is an extended version from the example packed with mumble/murmur.
  • Murmur WebAdministrator (PHP) Not Recommended (outdated and direct connection to the db instead of the recommended way of using ICE or DBus, thus may result in data loss)