File: terminal.rst

package info (click to toggle)
mopidy 3.4.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,712 kB
  • sloc: python: 16,672; sh: 159; makefile: 127
file content (78 lines) | stat: -rw-r--r-- 2,733 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.. _terminal:

*********************
Running in a terminal
*********************

For most users, it is probably preferable to run Mopidy as a :ref:`service
<service>` so that Mopidy is automatically started when your system starts.

The primary use case for running Mopidy manually in a terminal is that you're
developing on Mopidy or a Mopidy extension yourself, and are interested in
seeing the log output all the time and to be able to quickly start and
restart Mopidy.


Starting
========

To start Mopidy manually, simply open a terminal and run::

    mopidy

For a complete reference to the Mopidy commands and their command line options,
see :ref:`mopidy-cmd`.

You can also get some help directly in the terminal by running::

    mopidy --help


Stopping
========

To stop Mopidy, press ``CTRL+C`` in the terminal where you started Mopidy.

Mopidy will also shut down properly if you send it the ``TERM`` signal to the
Mopidy process, e.g. by using ``pkill`` in another terminal::

    pkill mopidy


Configuration
=============

When running Mopidy for the first time, it'll create a configuration
file for you, usually at :file:`~/.config/mopidy/mopidy.conf`.

The ``~`` in the file path automatically expands to your *home directory*.
If your username is ``alice`` and you are running Linux, the config file will
probably be at :file:`/home/alice/.config/mopidy/mopidy.conf`.

As this might vary slightly from system to system, you can check
the first few lines of output from Mopidy to confirm the exact location:

.. code:: text

    INFO     2019-12-21 23:17:31,236 [20617:MainThread] mopidy.config
      Loading config from builtin defaults
    INFO     2019-12-21 23:17:31,237 [20617:MainThread] mopidy.config
      Loading config from command line options
    INFO     2019-12-21 23:17:31,239 [20617:MainThread] mopidy.internal.path
      Creating dir file:///home/jodal/.config/mopidy
    INFO     2019-12-21 23:17:31,240 [20617:MainThread] mopidy.config
      Loading config from builtin defaults
    INFO     2019-12-21 23:17:31,241 [20617:MainThread] mopidy.config
      Loading config from command line options
    INFO     2019-12-21 23:17:31,249 [20617:MainThread] mopidy.internal.path
      Creating file file:///home/jodal/.config/mopidy/mopidy.conf
    INFO     2019-12-21 23:17:31,249 [20617:MainThread] mopidy.__main__
      Initialized /home/jodal/.config/mopidy/mopidy.conf with default config

To print Mopidy's *effective* configuration, i.e. the combination of defaults,
your configuration file, and any command line options, you can run::

    mopidy config

This will print your full effective config with passwords masked out so that
you safely can share the output with others for debugging.