(Reorganised DBus session info, added info about using a Docker container for the whole package.)

(14 intermediate revisions by 4 users not shown)

Line 1:

Line 1:

+

{{Iconbox begin|type=warning}}'''WARNING:''' The DBus interface for the server is deprecated and will not be extended any more (and thus is already missing features). Use the [[Ice]] interface instead.{{Iconbox end}}

+

= What is DBus for Murmur =

= What is DBus for Murmur =

D-Bus is a free software project which offers a simple way for applications to communicate with one another.

D-Bus is a free software project which offers a simple way for applications to communicate with one another.

It is developed by Red Hat as part of the freedesktop.org project. - [http://en.wikipedia.org/wiki/D-BUS Wikipedia]

It is developed by Red Hat as part of the freedesktop.org project. - [http://en.wikipedia.org/wiki/D-BUS Wikipedia]

DBus can be used as an RPC method for controlling murmur from another application.

DBus can be used as an RPC method for controlling murmur from another application.

−

−

'''WARNING:''' The DBus interface for the server is deprecated and will not be extended any more. Use the [[Ice]] interface instead.

= Configuring DBus for Murmur =

= Configuring DBus for Murmur =

Line 11:

Line 11:

== A Windows machine ==

== A Windows machine ==

−

+

Since Murmur can't run without an active desktop on windows, you can safely ignore this setup. Just make sure your [[murmur.ini#dbus|murmur.ini]] says

−

Since Murmur can't run without an active desktop on windows, you can safely ignore this setup. Just make sure your murmur.ini says

+

<pre>

<pre>

dbus=session

dbus=session

</pre>

</pre>

−

== Your own machine with root access ==

+

== DBus on Linux/OSX ==

+

+

=== Your own machine with root access ===

If you own the box you're running murmur on, and you have only one murmur process, you'll want to use the system dbus. The first step is creating a new file called ''/etc/dbus-1/system.d/murmurd.conf''

If you own the box you're running murmur on, and you have only one murmur process, you'll want to use the system dbus. The first step is creating a new file called ''/etc/dbus-1/system.d/murmurd.conf''

Line 42:

Line 43:

Then restart the system dbus daemon. Please note that this configuration allows anyone with a user on your machine to control the murmur process, so you might want to tighten security slightly.

Then restart the system dbus daemon. Please note that this configuration allows anyone with a user on your machine to control the murmur process, so you might want to tighten security slightly.

−

In your murmur.ini, make sure it says

+

In your [[murmur.ini#dbus|murmur.ini]], make sure it says

<pre>

<pre>

dbus=system

dbus=system

</pre>

</pre>

−

== A shared machine ==

+

=== A shared machine ===

−

First, we'll have to start a dbus daemon and place the session info somewhere.

+

First, we'll have to start a dbus daemon and place the session info somewhere. For DBus 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''):

Since there can be many session busses on a system, you'll always need to specify which one to use. So for every new shell you open, you should always

+

Since there can be many session busses on a system, you'll always need to specify which one to use. So for every new shell you open, you should always source this script before starting murmur, and you also need to run it before using any DBus commands.

<pre>

<pre>

source ~/.dbus.sh

source ~/.dbus.sh

Line 69:

Line 89:

When using the session bus, only the userid who created the bus can use it. Hence, you have to make sure that any scripts you write run with the same user ID.

When using the session bus, only the userid who created the bus can use it. Hence, you have to make sure that any scripts you write run with the same user ID.

+

+

=== A Docker container ===

+

+

If your host runs [https://www.docker.com/ Docker], you can use [https://hub.docker.com/r/rabidfx/murmur-dbus/ RabidFX's Dockerfile] to create a SSL-capable, fully-autonomous Murmur server in minutes, with DBus capabilities (through the host's system bus).

= Making sure it works =

= Making sure it works =

Line 106:

Line 130:

</pre>

</pre>

For a documentation of all dbus methods have a look at [[DBus Methods]].

For a documentation of all dbus methods have a look at [[DBus Methods]].

−

= Showing the list of users on a webpage =

+

+

= Using DBus =

+

== Showing the list of users on a webpage ==

There is a small perl example called ''scripts/weblist.pl'' in the mumble distribution. It works as a CGI for most systems.

There is a small perl example called ''scripts/weblist.pl'' in the mumble distribution. It works as a CGI for most systems.

−

= Using a PhpBB3 as authentication source =

+

== Manual configuration using DBus ==

+

+

If you are not able to use an additional application for administrating Murmur there is still the possibility of manually communicating with the server using [[DBus]].

+

+

=== Showing the default configuration ===

+

+

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

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:

There is an extended example of how to use the authenticator called ''scripts/dbusauth.pl''. You'll need to configure where your phpBB3 database resides, but once that is done you'll simply have to run the script after starting murmur to allow authentication to be done through the phpBB3 database.

Any group associations the user has on phpBB3 is copied to a temporary group on a root channel (and by default inherited to all subchannels). Please note that this is a temporary group membership and as such will not show up in the Edit ACL dialogs.

+

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.

−

= What DBus is for Mumble =

+

= DBus in the Mumble client =

The Mumble client itself can also be controlled over DBus. At the moment the following functionality is exposed:

The Mumble client itself can also be controlled over DBus. At the moment the following functionality is exposed:

−

* Direct the client to a [[URLs]]

+

* Direct the client to a [[Mumble URL|Mumble URL]]

+

* Get the current [[Mumble URL|Mumble URL]]

+

* Focus the Mumble window

* Mute/Deafen self

* Mute/Deafen self

+

* Fetch self mute/deafen state

−

[[Category:Documentation]]

[[Category:Documentation English]]

[[Category:Documentation English]]

Latest revision as of 21:39, 15 February 2016

WARNING: The DBus interface for the server is deprecated and will not be extended any more (and thus is already missing features). Use the Ice interface instead.

A shared machine

First, we'll have to start a dbus daemon and place the session info somewhere. For DBus 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):

Since there can be many session busses on a system, you'll always need to specify which one to use. So for every new shell you open, you should always source this script before starting murmur, and you also need to run it before using any DBus commands.

source ~/.dbus.sh

You should not put the above into your .bashrc or similar, as most X sessions will have their own and separate session dbus.

When using the session bus, only the userid who created the bus can use it. Hence, you have to make sure that any scripts you write run with the same user ID.

A Docker container

If your host runs Docker, you can use RabidFX's Dockerfile to create a SSL-capable, fully-autonomous Murmur server in minutes, with DBus capabilities (through the host's system bus).

Making sure it works

Start murmur with the options -fg -v, which will run it in the foreground with full debugging. You should see the line "DBus registration succeeded".

If your distribution includes the full Qt4 tools package, you'll have a program called qdbus which can be used to inspect the dbus system. Try running

qdbus --system net.sourceforge.mumble.murmur /

or if you're using the session bus:

qdbus --session net.sourceforge.mumble.murmur /

You should see a long list of function names. You can actually use the simpler functions directly from qdbus. For example, you can set a new superuser password with

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: