Using MPD with Cantata.

One of the common ways in which Linux users have been playing music on their computers has been a traditional way, which would be, with an application that has a GUI, and which runs in their user-space, and which therefore has access to a personal music folder. ‘Clementine’ and ‘Amarok’ are only two out of several applications which do this under Linux. But there is another way to stream music through a Linux computer, in the form of the “Music Player Daemon” (‘MPD’), that can be configured to run in the root file system, as a system process, and in the background, while using up far less RAM or CPU cycles than either of the top-heavy, GUI-driven apps use. And one good place to use such an arrangement is, if we want to have ‘relaxation music’ playing through our life space, but again, without taking up much in the way of resources on whichever computer is generating the sound output.

‘MPD’ itself has no user interface and is configured in a single configuration file, in the case when it is not configured per-user. Therefore, one thing that users and admins alike might do – but mainly plain users – is to install one out of numerous MPD Client programs, and the client program which I chose happens to have a GUI:

Screenshot_20191124_164918

This front-end is named ‘Cantata’.

There already exist good references on the Web, on How to configure an ‘MPD’ system process, just using a Text Editor, and the command-line. (Yes, the stock client is installed with a package named ‘mpc’, and is driven from the command-line.) I think that the article which I just linked to is well-written, and that its author seems very knowledgeable.

The only problem with the article linked to above is, that the author just forgot to explain one fact. Not knowing this fact, and being new to how ‘MPD’ works, cost me several hours close to midnight on one recent day. I found this fact written in exactly one other article on the Web. Just so that other users do not suffer from the distress that can be caused, because they, too may want to run ‘MPD’, but caused, from not knowing this fact, I just decided to create the second spot on the Web that I know of, which mentions it…

(This fact concerns a possible problem in using ‘MPD’, due to which a single user’s private Music Collection does not want to appear.)

(Updated 11/26/2019, 13h05 … )

Continue reading Using MPD with Cantata.

PulseAudio Restart Bug – Solved

I enjoy my Linux computers, and one reason is the fact that many technical issues can be resolved, without having to reboot endlessly. However, in my past usage, there has been an irritating exception to this pattern. It’s common under Linux, that we can simply restart the PulseAudio Server from the command-line, using one out of several methods, and that the subject should be done with. But alas, every time I have ever restarted PulseAudio in this way, or, if the server restarted on its own, afterwards, when looking up the Plasma 5 -generated status display (which is actually referred to as “Phonon”), I’d be missing a Devices List, like so:

Screenshot_20191026_152751

This type of display can be interpreted to mean several things, such as, that the PulseAudio server did restart, but that perhaps, it simply failed to connect to the inter-process, session-unique, message-bus. Therefore, in the past, whenever I had such a display, I eventually did what I thought I had to do, which was, to log out and back in again, or, to reboot. On my system, PulseAudio is configured such, that it runs as one user-name, and not as root.

In fact, a peculiar side effect of this bug was, that the list of available output devices was still being displayed, within ‘pavucontrol‘.

But this ordeal has now become even more inconvenient than it ever was because on the computer which I name ‘Phosphene’, the need may recur more frequently, ‘just to restart the PulseAudio server’.

However, I have finally found the true cause for this malfunction, which was, that when PulseAudio is restarted from within an existing session, it simply fails to load one module, which is also the module that it needs, in order to be able to list the available devices:

 


module-device-manager

 

In fact, there exists a script in ‘/usr/bin‘, that loads a series of X11-related modules.

Therefore, after a restart of this service, I can simply give the following command now:

 


/usr/bin/start-pulseaudio-x11

 

And Eureka! I can now obtain a list of available devices, without ever having to log out and back in, or, without ever having to reboot:

Screenshot_20191026_152853

In fact, I have created a shell-script, which I can click on as user, and which carries out this task, safely.


 

I’ve also discovered that the ‘ProjectM’ music visualization application still works, and detects the beat of the playing music as before. What this means is that theoretically, after ‘ProjectM’ was installed, instead of rebooting, I could have just restarted the PulseAudio server as described here, to get that working.


 

( Edited 2019/10/29, 23h35 … )

I know that there exists an unrelated problem, that just happens to give the same appearance within ‘Phonon’, but that cannot be resolved in this way…

Continue reading PulseAudio Restart Bug – Solved

I now have Linux installed on my Google Pixel C tablet.

As the title of this posting suggests.

I used the Android app “UserLAnd“, which does not require root. The most recent versions of this app offer a VNC Server, which emulates an X-Server within the Linux system. And the implementation of VNC is ‘TightVNC’. Plus, the latest versions of this app offer a built-in VNC Viewer, that I find makes the most, out of the tiny icons that display on the high-res screen, as well as out of the fact that often, users will want to operate the GUI with their fingers, along with the physical keyboard that my Pixel C pairs with (:7) …

Screenshot_20190831-163643

The setup of this Linux Guest System is much easier than my earlier experience was because the basic Linux distribution, the desktop manager, and certain apps can all be installed just by tapping on a few icons. And then, using the ‘sudo apt-get’ command-line, additional Debian packages can be installed.

There is an interesting side effect to this project: When I give the command:

$ cat /etc/debian_version

I obtain the result ‘10.0‘. This would mean that the Linux version which I’m getting, is the new Debian / Buster, which none of my PCs nor my Laptop are even running. However, the repositories that I’m subscribed to are labelled ‘stable’. The CPU is an ‘arm64′. And the desktop manager I chose was ‘LXDE’. I installed a full productivity suite, including LaTeX. But, I found that three Linux applications did not run:

  • LyX – The graphical, WYSIWYM LaTeX Editor (:2).
  • Synaptic – A GUI for apt-get that makes it particularly easy to browse package-repositories, before selecting which packages to install.
  • Latexdraw‘ (:1) (:6).

Everything else I tried seems to work, including “LibreOffice”, “GIMP”, “InkScape”, “Firefox ESR”. On my own, without the aid of simple GUI-buttons, I was also able to install and run “Texmaker”, “Dia”, “Xfig”, “OpenClipArt”, “Maxima” and “wxMaxima”, the Computer Algebra System and its Graphics Front-End. Getting that last item to work properly actually required that I install the package ‘fonts-jsmath’.

The Linux Guest System is currently taking up 5.37GB of my internal storage, and I finally also found out how to share files between the Guest System and the Host System. Within the Guest System, if on the Host System the root of the user folders is ‘/root/<sdcard>’, then this Host System root is mounted at ‘/host-rootfs/<sdcard>’ (within the Guest System). This means that I can open a path directly to this folder in the file-manager ‘PCManFM’, and bookmark it. (:3)

(Updated 9/07/2019, 17h40 … )

Continue reading I now have Linux installed on my Google Pixel C tablet.