summaryrefslogtreecommitdiff
path: root/content/2022/music_server.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/2022/music_server.md')
-rw-r--r--content/2022/music_server.md34
1 files changed, 18 insertions, 16 deletions
diff --git a/content/2022/music_server.md b/content/2022/music_server.md
index 287dbbc..81b3456 100644
--- a/content/2022/music_server.md
+++ b/content/2022/music_server.md
@@ -43,33 +43,34 @@ Served music is so small, that this does not add any noticeable overhead for the
First, I needed to install NFS support. I use Arch, so:
-```
+{{< highlight shell>}}
# pacman -S nfs-utils
-```
+{{</highlight>}}
Then I checked if the share actually exists. My server's address is 10.0.1.200.
-```
+{{< highlight shell>}}
$ showmount -e 10.0.1.200
------------------
Export list for 10.0.1.200:
/volume2/music 10.0.1.10
-```
+{{</highlight>}}
VoilĂ ! Next step: check if it works
-```
+{{< highlight shell>}}
# mkdir /mnt/music
# mount 10.0.1.200:/volume2/music /mnt/music/
# cd /mnt/music
# ls
-```
+{{</highlight>}}
And listing worked. Noice. To automate it for future, and to allow non-root users to actually mount the drive I added a new mount to /etc/fstab:
-```
+{{< highlight shell>}}
10.0.1.200:/volume2/music /mnt/music nfs _netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,timeo=14,users,x-systemd.idle-timeout=1min 0 0
-```
+{{</highlight>}}
+
After the first user accesses /mnt/music, the drive will be mounted.
@@ -80,21 +81,22 @@ We have access to the files, let's play it. Every modern music player for Linux
[CMUS webpage](https://cmus.github.io/)
-```
+{{< highlight shell>}}
# pacman -S cmus
-```
+{{</highlight>}}
After we open cmus, we need to add music. It's done similarly to VIM, via an ex command.
-```
+{{< highlight shell>}}
:add /mnt/music/
-```
+{{</highlight>}}
+
And a few seconds later, the music is visible in the player. Using CMUS requires reading the manual
-```
+{{< highlight shell>}}
$ man cmus-tutorial
-```
+{{</highlight>}}=
but the basics I needed to play something from Artist/Album view were:
@@ -118,9 +120,9 @@ I have no idea how to auto mount a server on MacOS, so after every reboot or net
On Mac I also use CMUS, so all of the above apply as well. One difference is adding the files due to different location
-```
+{{< highlight shell>}}
:add /Volumes/music
-```
+{{</highlight>}}
## Next up