LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2016, 01:27 PM   #1
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Rep: Reputation: 1
Conky won't display MPD info


Hello everyone.

I have recently tried to configure conky to display information about the music that is currently being played. I use mpd together with ncmpcpp to play my music. The portion of my .conkyrc file that pertains to the music configuration looks like this

Code:
${if_mpd_playing}
MUSIC
${hr}
$alignc${mpd_title 15}
$alignc$mpd_artist
$alignc$mpd_album - $mpd_date
$mpd_elapsed/$mpd_length$alignr$mpd_percent%
$alignr${mpd_bar 8,220}
$alignr$mpd_status
$alignr$mpd_vol
$endif
Whether i am using mpd or not, the part that should be displayed when mpd is running is not displayed. I do not receive any error messages whatsoever. The versions of mpd and ncmpcpp are 0.19.1 and 0.5.10, respectively. The distro i use is BunsenLabs Linux.

Any ideas?
 
Old 08-02-2016, 06:01 AM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Do you have the server, port and password variables set?
 
Old 08-02-2016, 06:27 AM   #3
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Original Poster
Rep: Reputation: 1
No, i haven't. After checking the conky man page i discovered these three variables:

- mpd_host
- mpd_password
- mpd_port

I assume they are the ones you are talking about. I'm going to try to figure this out myself and will post as soon as i have made any significant progress. However, if you are willing to give any further help it will be very much welcome.

Thank you very much!
 
Old 08-02-2016, 07:23 AM   #4
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Original Poster
Rep: Reputation: 1
So, i have applied the following changes:

I set these two variables for bash:

- MPD_HOST=127.0.0.1
- MPD_PORT=6601

I got these values from two bottom lines of ~/.mpd/mpd.conf

bind_to_address "127.0.0.1"
port "6601"

In the .conkyrc file, I added the following lines:

mpd_host 127.0.0.1
mpd_port 6601

But the same issue remains...

EDIT: I'm not sure what has happened but now it is working just fine. I won't mark the thread as solved just yet in case the problem shows up again.

Last edited by Johnny_Metal; 08-02-2016 at 10:17 AM.
 
Old 08-02-2016, 01:41 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Johnny_Metal View Post
After checking the conky man page i discovered these three variables:

- mpd_host
- mpd_password
- mpd_port
Quote:
Originally Posted by Johnny_Metal View Post
So, i have applied the following changes:

I set these two variables for bash:

- MPD_HOST=127.0.0.1
- MPD_PORT=6601
conky variables != bash variables.

Show us the whole conkyrc please, not parts of it.
Obfuscate mpd_password

Last edited by Habitual; 08-02-2016 at 01:44 PM.
 
Old 08-02-2016, 02:44 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I cat'd my mpd.conf when I first read this thread (abut 10 hours ago) and what struck me was that mine had brakes '{}' around most things and yours did not.
I seem to recall some issues getting conky to work so I just used lost sand lots of braces and the like and it worked. Sorry, probably not much use but there you go.
 
Old 08-04-2016, 09:38 AM   #7
Johnny_Metal
Member
 
Registered: Feb 2016
Posts: 72

Original Poster
Rep: Reputation: 1
This issue seems to have been solved. Anyways, i'm posting my conkyrc as requested (note that i am not using a password):

Code:
#For commands above TEXT check:
# http://conky.sourceforge.net/config_settings.html
#
# For commands available below TEXT check:
# http://conky.sourceforge.net/variables.html

# Bunsen Labs Conky help threads
# http://crunchbang.org/forums/viewtopic.php?pid=371424#p371424

# beta tested by: smacz
# Enjoy! :)

# pkill -xf "conky -c $HOME/.config/conky/Classic.conkyrc" &
##############################################
# Settings
##############################################
background yes
use_xft yes
xftfont Sans-serif:size=11
#xftfont Liberation Sans:size=11
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type normal #desktop
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
own_window_class Conky
own_window_title Bunsen Labs Classic CrunchBang Conky
double_buffer yes
minimum_size 200 200
maximum_width 240
draw_shades no
default_shade_color 000000
draw_borders no
draw_graph_borders no
#default_color 656667 # Waldorf original colour
#default_color 7a7a7a # Flame  & Bunsen Grey
#default_color 929292 # Labs Grey
##default_color C0C0C0 # Silver
draw_outline no
default_outline_color 828282
alignment top_right
gap_x 20
gap_y 45
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
mpd_host 127.0.0.1
mpd_port 6601
##############################################
#  Output
##############################################
TEXT
S Y S T E M    I N F O
${hr}
$conky_build_arch
Uptime:$alignr$uptime

DISK USAGE ${hr}
Root 
${fs_used /}/${fs_size /}$alignr${fs_used_perc /}%
$alignr${fs_bar 8,220 /}

Home
${fs_used /home}/${fs_size /home}$alignr${fs_used_perc /home}%
$alignr${fs_bar 8,220 /home}

CPU ${hr}
#Avg:$alignr${cpubar cpu0 8,100}
Core 1:$alignr${cpubar cpu1 8,100}
Core 2:$alignr${cpubar cpu2 8,100} 

RAM ${hr}
$mem/$memmax$alignr$memperc%
$alignr${membar 8,220}

${if_mpd_playing}
MUSIC
${hr}
$alignc${mpd_title 30}
$alignc$mpd_artist
$alignc$mpd_album
$alignc$mpd_date

$mpd_elapsed/$mpd_length$alignr$mpd_percent%
$alignr${mpd_bar 8,220}
$alignr$mpd_status
${endif}
 
Old 08-04-2016, 01:46 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Glad it worked out.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Solved] Help with Daylight info script for Conky. mzsade Linux - General 2 11-07-2015 10:00 PM
[SOLVED] mpd won't install on Slackware64 14 Kangatux Slackware 2 05-03-2013 10:05 AM
[SOLVED] MPC and can conky having problems with MPD jens1245 Linux - Newbie 1 10-26-2010 03:52 AM
LXer: Conky-like Desktop Info Application With Html Support (gtk-desktop-info) [Ubunt LXer Syndicated Linux News 0 05-01-2009 11:50 PM
Incoming connections won't display in conky Decalore Slackware 8 09-12-2008 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration