You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>“<strong>Screen</strong> is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells)… Programs continue to run when their window is currently not visible and even when the whole screen session <strong>is detached from the user’s terminal</strong>.”</p>
75
75
<p><strong>PyRadio</strong> users <atarget="_blank" href="https://github.com/Wikinaut">Wikinaut</a> and <atarget="_blank" href="https://github.com/aleksandr-sabitov">aleksandr-sabitov</a> on <atarget="_blank" href="https://github.com/coderholic/pyradio/issues/184">github</a> have come up with the idea to use this approach to run the application on their headless Raspberry Pi, so kudos to them!</p>
76
76
<h3id="usage">Usage</h3>
77
-
<p>After the program is started, the only way to interact with it is through its integrated web server. Please refref to the relevant document for more info on the <ahref="server.html">remote control server</a>.</p>
77
+
<p>After the program is started, the only way to interact with it is through its integrated web server. Please refer to the relevant document for more info on the <ahref="server.html">remote control server</a>.</p>
78
78
<p>The web server can be accessed either through a terminal (address <strong>http://ip:port</strong>) using wget or curl, or through a web browser (address <strong>http://ip:port/html</strong>).</p>
79
79
<p>The ip and port will be set using the <strong>–headless</strong> command line option.</p>
80
80
<p>The ip can either be:</p>
@@ -84,14 +84,16 @@ <h3 id="usage">Usage</h3>
84
84
<li><strong>lan</strong><br/>
85
85
The server will be accessible by any system on the LAN. The ip is the one assigned to the network interface of the system.</li>
86
86
<li>An actual <strong>IP</strong><br/>
87
-
This is in case when a machine has more than one network interfaces and the **lan* setting is ambigous.</li>
87
+
This is in case when a machine has more than one network interfaces and the <strong>lan</strong> setting is ambiguous.</li>
will make the web server listen to the IP 192.168.122.101, port 4567.</p></li>
94
+
will make the web server listen to the IP 192.168.122.101, port 4567.<br/>
95
+
<br/>
96
+
If the IP is not assigned to any network interfaces, the default (<strong>localhost:1111</strong>) will be silently used; please always check the server’s address with the command: <strong>pyradio –addr</strong>.</p></li>
will make the web server listen to 127.0.0.1, port 23456</p></li>
97
99
<li><p>using <strong>–headless auto</strong><br/>
@@ -121,6 +123,7 @@ <h3 id="how-it-works">How it works</h3>
121
123
<li><p>we cannot start a second headless server, and</p></li>
122
124
<li><p>we can get info about the server running.</p></li>
123
125
</ul>
126
+
<p>The “headless server lock file” is saved as <em>~/.config/pyeadio/data/server-headles.txt</em> and will contain the IP address and port the servers is listening to. This is especially useful in case a user script needs to get this info (instead of parsing the output of the command <strong>pyradio –addr</strong>).</p>
124
127
<h2id="installation">Installation <spanstyle="padding-left: 10px;"><supstyle="font-size: 50%"><ahref="#" title="Go to top of the page">Top</a></sup></span></h2>
125
128
<p>By the term “installation”, we mean that we set up things in such a way, that after we log into the system, we find <strong>PyRadio</strong> ready to accept connections.</p>
126
129
<p>So, the installation can be as easy as adding a line in a configuration file (or the startup section of the <em>desktop environment</em>) or as hard as adding a system service.</p>
Copy file name to clipboardExpand all lines: docs/headless.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Now, **PyRadio** is a **terminal application**; it actually **needs** a terminal
39
39
40
40
### Usage
41
41
42
-
After the program is started, the only way to interact with it is through its integrated web server. Please refref to the relevant document for more info on the [remote control server](server.md).
42
+
After the program is started, the only way to interact with it is through its integrated web server. Please refer to the relevant document for more info on the [remote control server](server.md).
43
43
44
44
The web server can be accessed either through a terminal (address **http://ip:port**) using `wget` or `curl`, or through a web browser (address **http://ip:port/html**).
45
45
@@ -52,15 +52,17 @@ The server will be accessible only by programs running in the system. The `ip` i
52
52
2.**lan**\
53
53
The server will be accessible by any system on the LAN. The `ip` is the one assigned to the network interface of the system.
54
54
3. An actual **IP**\
55
-
This is in case when a machine has more than one network interfaces and the **lan* setting is ambigous.
55
+
This is in case when a machine has more than one network interfaces and the **lan** setting is ambiguous.
56
56
57
57
For example:
58
58
59
59
- using **--headless lan:12345**\
60
60
will make the web server listen to the network interface IP address, port 12345.
61
61
62
62
- using **--headless 192.168.122.101:4567**\
63
-
will make the web server listen to the IP 192.168.122.101, port 4567.
63
+
will make the web server listen to the IP 192.168.122.101, port 4567. \
64
+
\
65
+
If the IP is not assigned to any network interfaces, the default (**localhost:1111**) will be silently used; please always check the server's address with the command: **pyradio --addr**.
64
66
65
67
- using **--headless localhost:23456**\
66
68
will make the web server listen to 127.0.0.1, port 23456
@@ -109,6 +111,8 @@ It will create a "headless server lock file", though, so that
109
111
110
112
- we can get info about the server running.
111
113
114
+
The "headless server lock file" is saved as *~/.config/pyeadio/data/server-headles.txt* and will contain the IP address and port the servers is listening to. This is especially useful in case a user script needs to get this info (instead of parsing the output of the command **pyradio --addr**).
115
+
112
116
## Installation
113
117
114
118
By the term "installation", we mean that we set up things in such a way, that after we log into the system, we find **PyRadio** ready to accept connections.
<li><ahref="#text-vs.-web-commands">Text vs. Web commands</a></li>
55
56
</ul></li>
@@ -69,7 +70,7 @@ <h2 id="remote-control-server">Remote Control Server <span style="padding-left:
69
70
<li><p><strong>Server IP</strong><br/>
70
71
This can either be <strong>localhost</strong> (the server will be accessible from the current system only) or <strong>LAN</strong> (the server will be accessible from any PC on the local network).<br/>
71
72
<br/>
72
-
If the machine has more that one interface (network card), the actual IPs will be available for selection.</p></li>
73
+
If the machine has more that one interface (network card), the actual IPs will be available for selection as well.</p></li>
73
74
<li><p><strong>Server Port</strong><br/>
74
75
This is the port the server is listening to. Any free port number between 1025 and 65535 can be set here (default value is 9998).</p></li>
75
76
<li><p><strong>Auto-start Server</strong><br/>
@@ -160,6 +161,8 @@ <h3 id="using-the-text-server">Using the Text Server</h3>
160
161
/search_radio_browser/x /srb/x execute search item x
161
162
(x comes from /lrb)</pre>
162
163
<p>The “<strong>Restricted Commands</strong>” will not work in <strong>Playlist mode</strong>; the “<strong>Global Commands</strong>” will work everywhere.</p>
164
+
<h3id="server-lock-file">Server lock file</h3>
165
+
<p>When the server is up and running, a “server lock file” will be created; the file is named <strong>~/.config/pyradio/data/server.txt</strong> and contains the IP address and port the server is listening to; this is especially useful for user scripts that want to get hold of this information.</p>
163
166
<h3id="examples">Examples</h3>
164
167
<p>The following commands will increase / decrease the volume and mute the player:</p>
<h3id="text-vs.-web-commands">Text vs. Web commands</h3>
210
214
<p>On first glance, the difference between a <strong>Text</strong> and a <strong>Web</strong> command is the <em>/html</em> part that exists in the later.</p>
Copy file name to clipboardExpand all lines: docs/server.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
*[Using the Web Server](#using-the-web-server)
8
8
* [Web Interface buttons](#web-interface-buttons)
9
9
*[Using the Text Server](#using-the-text-server)
10
+
*[Server lock file](#server-lock-file)
10
11
*[Examples](#examples)
11
12
*[Text vs. Web commands](#text-vs.-web-commands)
12
13
@@ -29,7 +30,7 @@ The options one can set are:
29
30
1.**Server IP**\
30
31
This can either be **localhost** (the server will be accessible from the current system only) or **LAN** (the server will be accessible from any PC on the local network). \
31
32
\
32
-
If the machine has more that one interface (network card), the actual IPs will be available for selection.
33
+
If the machine has more that one interface (network card), the actual IPs will be available for selection as well.
33
34
34
35
2.**Server Port**\
35
36
This is the port the server is listening to. Any free port number between 1025 and 65535 can be set here (default value is 9998).
The "**Restricted Commands**" will not work in **Playlist mode**; the "**Global Commands**" will work everywhere.
159
160
161
+
### Server lock file
162
+
163
+
When the server is up and running, a "server lock file" will be created; the file is named **~/.config/pyradio/data/server.txt** and contains the IP address and port the server is listening to; this is especially useful for user scripts that want to get hold of this information.
164
+
160
165
### Examples
161
166
162
167
The following commands will increase / decrease the volume and mute the player:
0 commit comments