AudioPhile Linux
  • Email
  • Google+
  • Linkedin
  • Twitter
Follow us on Twitter @AudiophileLinux
  • Home
  • News
  • Documentation
  • Screenshots
  • Download
  • Articles
  • About
  • FAQ
  • Contact
Navigation
Search the site...

Playing your music without monitor and mouse

January 26, 2013 / Marko / Documentation

Screenshot_2013-01-26-17-44-58

This article is obsolete.

Since Linux was born on network, you can use the network to control the music playback without having monitor or TV connected to your PC. We’ll show you how to do it via mpd – Music Player Daemon, a flexible and powerful server-side application for music playback. MPD’s plugins and libraries enable the processing of various audio files, while being controlled by the network protocol. For more information, read about what mpd is and is not.

You must have:

– Wireless network in your home
– Smartphone or tablet PC or Mac

Enable automated login and jackd startup

Go to XFCE desktop environment and enable auto login.
Go to Menu – System – Login Window – Security Tab
tick “Enable Automatic Login” and select your username. Open qjackctl program and go to setup and select Misc tab. Tick “Start JACK audio server on application startup” Click OK. Try to start jack to see if everything is OK. When you are satisfied with your jack configuration close qjackctl.

Edit startup configuration files

Now we have to edit some files, but first we need to change the appearance of the desktop, because it’s hard to edit anything in Gedit with this theme. Don’t know why this theme is set by default. Go to Menu – Settings – Appearance and change style to something better like “Mist”. Click close and open terminal (Menu – Terminal emulator). In terminal type:

gedit .fluxbox/startup

after conky line add this
qjackctl&

And save the config with File-Save and then quit gedit editor.

Install the mpd server. In terminal type:

sudo apt-get install mpd

Hit enter and wait for installation to complete.

Congratulations, you have installed mpd. Now you have to edit mpd.conf file. You have to tell mpd server where are your music files. MPD will then create some database with your music on disk. If you have your music files for example in /home/your-username/Music then you will put this in mpd.conf.

In terminal type:

sudo gedit /etc/mpd.conf

And add this to your mpd.conf. (Delete the rest).

music_directory    "/home/my-username/Music"
playlist_directory "/home/my-username/Music/playlists"
db_file            "/home/my-username/Music/mpd.db"
log_file           "/home/my-username/Music/mpd.log"
pid_file 	   "/home/my-username/Music/mpd.pid"
state_file	   "/home/my-username/Music/mpd_state"
sticker_file 	   "/home/my-username/Music/sticker.sql"
user		   "my-username"
bind_to_address    "192.168.1.150" # replace with your IP

# Careful with this!
follow_outside_symlinks "yes"
follow_inside_symlinks  "yes"

# Don't let your neighbours play music instead of you
password 		"yourpassword@read,add,control,admin"

audio_output {
type "jack"
name "my USB DAC name"
}

id3v1_encoding "UTF-8"

Now just create directory for playlists.

mkdir /home/your-username/Music/playlists

 

mpdroid-horiz

Reboot your machine and see if you have automated login with Fluxbox and qjackctl up and running. Qjackctl shoud be automaticly started and mpd server also in the background. Go to your app market and search for mpd client. We used android and MPDroid app. You can use any other client on Windows/Linux/Mac to test it. Enter your IP and password in settings and connect to mpd server. When you add music to your “music” directory, select “Update” in your mpd client to update database. That’s it. Happy listening.

Checklist For Buying a New Mattress

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

mpd

8 comments on “Playing your music without monitor and mouse”

  1. Adrian says:
    February 12, 2013 at 17:58

    Hi,
    i’m very new in Linux but very passionate about audio quality and i installed your Audiophile linux. So far i’ve managed to play music using my smartphone and mpd server but when i try to use jack and my USB external sound card no sound comes out. Can someone help me please?

    PS. of course i’ve followed all the steps from site.

    Greetings,
    Adrian

  2. Adrian says:
    February 13, 2013 at 17:56

    I’ve tested JACK separately by playing music thru Gnome player and choosing JACK for output and it worked with my USB sound card. When i choose JACK under Audacious it does not work.
    What else to check ?
    So MPD works flawlessly without JACK when i choose so listen thru LASA on internal sound card and when i set output like this:

    audio_output {
    type “jack”
    name “my USB DAC name”
    }

    i have no sound and also no errors.

    Thanks,
    Adrian

    • mlerota says:
      February 14, 2013 at 00:51

      I don’t know. When you mess with ALSA config, this thing happens. Leave it as it is. Don’t change default ALSA config. It’s supposed to work without any modification.

  3. husu says:
    March 5, 2013 at 19:53

    I can’t connect with my smartphone, my android says connection refused
    I’ve edited my bind_to_adress to “192.168.1.14”, this is my AP computer IP#

    Mouting the NAS works perfectly now anyways. Just one more step left. =)

    Can you please help me?

    • mlerota says:
      March 6, 2013 at 13:51

      Look what your log file says.
      log_file “/home/my-username/Music/mpd.log”
      You can do it in terminal with “tail -f /path/to/your/logfile.log”
      And don’t forget to restart mpd after you change the config file with
      /etc/init.d/mpd restart

  4. husu says:
    March 6, 2013 at 18:36

    Now I get this problem

    linas tommie # mpd

    listen: bind to ‘0.0.0.0:6600’ failed: Address already in use (continuing anyway, because binding to ‘[::]:6600’ succeeded)
    output: No “audio_output” defined in config file
    output: Attempt to detect audio output device
    output: Attempting to detect a alsa audio device
    ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

    alsa: Error opening default ALSA device: Connection refused
    output: Attempting to detect a oss audio device
    oss: Error opening OSS device “/dev/dsp”: Device or resource busy
    oss: Error opening OSS device “/dev/sound/dsp”: No such file or directory
    output: Attempting to detect a pulse audio device
    Assertion ‘m’ failed at pulse/thread-mainloop.c:232, function pa_threaded_mainloop_get_api(). Aborting.
    Avbruten (SIGABRT)

    linas tommie # /etc/init.d/mpd restart
    Stopping Music Player Daemon: mpd.
    Starting Music Player Daemon: mpdFailed to load database: Failed to open database file “/home/tommie/Musik/mpd.db”: No such file or directory
    Failed to create sticker table: attempt to write a readonly database
    failed!

    The directory is where my nas is mounted and fully working but it seems that mpd is not installed
    properly. My mpd.conf looks like the one you posted except from my music dir and ip.

    Do you got any ideas?

    • mlerota says:
      March 6, 2013 at 22:32

      Don’t use “tommie # mpd” command. Use /etc/init.d/mpd start/stop.

      > The directory is where my nas is mounted and fully working

      Maybe you don’t have enough permissions to write to mounted filesystem. First setup mpd to work only on local file system. Then try on mounted FS.

  5. Audiofili/Hi-Fi. Sculele noastre. Recomandari diferite bugete (sisteme stereo) - Page 445 says:
    March 23, 2013 at 06:15

    […] aceasta solutie pe care am verificat-o personal: AudioPhile Linux | Audio Perfection on Linux Aici Playing your music without monitor and mouse | AudioPhile Linux vezi cum poti folosi tableta sau smartphe-ul sa-ti controlezi serverul multimedia. Si ar mai fi o […]

Recent Posts

  • AP Linux v5 install instructions

    December 20, 2019
  • How to add new disk in AP-Linux

    April 20, 2017
  • AP-Linux-V4 available

    April 16, 2017

Recent Comments

  • neric on AP Linux v5 install instructions
  • Torben Schmidt on AP Linux v5 install instructions
  • Torben Schmidt on AP Linux v5 install instructions
  • Marko on AP Linux v5 install instructions
  • A.R. on AP Linux v5 install instructions

Get in Touch

  • +353 85 7630 316
  • info@ap-linux.com
  • Contact Us
    • Twitter

Made on GNU/Linux

Audiophile Linux is based on Arch Linux distribution. Old versions are based on Linux Mint. It’s absolutely free. Linux operating system and it’s kernel are distributed under GPL license.

Links

RuneAudio Rasp Pi/CuBox
Native DSD Music Store
24bit96.com web site.
GPL License
Fluxbox Window manager

Latest tweets

  • @nixcraft ATM in freeze https://t.co/xylInzNeqk
    September 25, 2018
(c) 2013 Audiophile Linux Distribution - Marko Lerota