Pascal Bakker

HomeLinksProjectsResume

How To Setup MOCP Terminal Music Player

2021-02-15

linux, programming


Why use a terminal based music player?

GUI music applications can often be slow, difficult to navigate, and bloated. Terminal based music players offer simplicity: just play the music. Although, simplicity!=easy, it may get some time to setup and to get used to it. However, due to their minimalist design, they are often easily configurable and customizable. GUI based music players require to move your mouse around searching for the right song to click, breaking your flow. But with terminal-based players, everything can be done with a keyboard. I was a skeptic at first, but now I don't really want to go back to GUI. I enjoy moc in particular, it has a nice look to it, and the keyboard commands are intuitive.

This tutorial will go over how to setup moc after you install it

First, run the following commands after installation.

	cp /usr/share/doc/moc/config.example ~/.moc/config
	mkdir ~/.config/mocp/themes
	/usr/share/doc/moc/themes/[Desired Theme] ~/.config/mocp/themes

Copy the example config file and desired theme to the moc folder. Then go into config, set the following settings:

	MusicDir: ~/music

	StartInMusicDir = yes

	Theme = nightly_theme

Now for mocicon. Do not download the code from github since its out of date. Instead, get it from sourceforge. If your terminal is not xterm, you must change the mocicon code. Go into mocicon.c and change xterm to your desired terminal.

	case 6:
		g_spawn_command_line_async("xterm -C mocp",NULL);
		break;

Since mine is st...

	case 6:
		g_spawn_command_line_async("st -C mocp",NULL);
		break;

After you're down, just compile:

	sudo make clean install

Now just check that it works:

	mocp

The music icon should show up in your bar. And you're done! Now you can enjoy your terminal music browsing experience.