Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Help a Conky newbie get going?

  1. #1
    Join Date
    Mar 2009
    Location
    Texas
    Beans
    189

    Help a Conky newbie get going?

    I recently obtained a Conky script that should monitor the current song from a radio stream called Nectarine. So I installed Conky, created my .conkyrc file followed the following steps:

    Code:
    Insert this line at end of .conf file:
    ${execpi 30 ~/nectarine.pl}
    Code:
    and create file nectarine.pl with execute atribute
    #!/usr/bin/perl
    
    # use module
    use XML::Simple;
    use Data::Dumper;
    
    # create object
    $tempfile = "$ENV{HOME}/.conky/nectarine_queue.tmp";
    `wget -O $tempfile "http://www.scenemusic.net/demovibes/xml/queue/"`;
    $xml = new XML::Simple;
    my $xs1 = XML::Simple->new();
    
    # read XML file
    my $doc = $xs1->XMLin($tempfile);
    
    print 'Nectarine $hr '."\n";
    print '${color 000000}Song: ${color}' . $doc->{now}->{entry}->{song}->{content} ."\n";
    print '${color 000000}Artist: ${color}' . $doc->{now}->{entry}->{artist}->{content} . " ( " . $doc->{now}->{entry}->{song}->{length} . " )\n";
    print '${color 000000}Requester: ${color}' . $doc->{now}->{entry}->{requester}->{content} . "\n".'${color 000000}RequestTime: ${color}' . $doc->{now}->{entry}->{request_time} . "\n";
    print "------------------------------------------------------\n";
    
    foreach my $key (keys (%{$doc->{queue}})){
    $len = 10;
    for ($i=0; $i < $len ; $i++){
    print '${color 000000} '.$i.' ${color} ${color FFCCAA}' . $doc->{queue}->{$key}->[$i]->{song}->{content} .'${color} - ';
    print $doc->{queue}->{$key}->[$i]->{artist}->{content} ." ( " .$doc->{queue}->{$key}->[$i]->{song}->{length}. " ) \n";
    }
    }
    So now I have two files ".conkyrc and nectarine.pl".
    .conkyrc is only one line long
    nectarine.pl has all of the scripting info and it has been marked as an executable file.

    Terminal Output:
    Code:
    anthony@anthony-desktop:~$ conky
    Conky: /home/anthony/.conkyrc: 1: no such configuration: '${execpi'
    Conky: missing text block in configuration; exiting
    ***** Imlib2 Developer Warning ***** :
    	This program is calling the Imlib call:
    
    	imlib_context_free();
    
    	With the parameter:
    
    	context
    
    	being NULL. Please fix your program.
    Any idea what's going on here?
    Specs:
    Dell XPS 15 Notebook || 2.3 GHz Intel i5|| 6Gb RAM || NVIDIA GeForce GT 525M
    If I've skipped something, please let me know.

  2. #2
    Join Date
    Mar 2009
    Location
    Texas
    Beans
    189

    Re: Help a Conky newbie get going?

    bump
    Specs:
    Dell XPS 15 Notebook || 2.3 GHz Intel i5|| 6Gb RAM || NVIDIA GeForce GT 525M
    If I've skipped something, please let me know.

  3. #3
    Join Date
    Oct 2009
    Location
    Los Angeles, CA
    Beans
    380
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Help a Conky newbie get going?

    Have you tried removing the ${ and } from the line in your .conkyrc file? ${} is usually used for displaying text in Conky, not to run a program or call another script.
    Main: Intel Core i7 920 D0 @ 4.0GHz | Asus P6X58D Premium | 6 x 2GB Mushkin Redline 1600 7-8-7-24 | EVGA GeForce GTX 560 Ti | 6 x 1TB WD Caviar Black | Mint 15 Cinnamon / OS X 10.7.3
    Portable: Dell Mini 9 | OS X 10.6.7

  4. #4
    Join Date
    Mar 2009
    Location
    Texas
    Beans
    189

    Re: Help a Conky newbie get going?

    Quote Originally Posted by Ginsu543 View Post
    Have you tried removing the ${ and } from the line in your .conkyrc file? ${} is usually used for displaying text in Conky, not to run a program or call another script.
    Hmm. This would make sense. I have modified .conkyrc and the contents look like this:
    Code:
    execpi 30 ~/nectarine.pl
    Terminal Output:
    Code:
    anthony@anthony-desktop:~$ conky 
    Conky: /home/anthony/.conkyrc: 1: no such configuration: 'execpi'
    Conky: missing text block in configuration; exiting
    ***** Imlib2 Developer Warning ***** :
    	This program is calling the Imlib call:
    
    	imlib_context_free();
    
    	With the parameter:
    
    	context
    
    	being NULL. Please fix your program.
    I gather that "execpi" stands for Execute Command Prompt + Interval. It looks like I may be missing a package, but I can't find any package called Execpi.
    Specs:
    Dell XPS 15 Notebook || 2.3 GHz Intel i5|| 6Gb RAM || NVIDIA GeForce GT 525M
    If I've skipped something, please let me know.

  5. #5
    Join Date
    Oct 2009
    Location
    Los Angeles, CA
    Beans
    380
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Help a Conky newbie get going?

    Sorry I can't be more specific in my help... I'm just not very familiar with this particular script. But as I was reading your output, a thought occurred to me. Which version of Conky did you install? Did you install the one in the default Ubuntu repos? If you look for Conky in Synaptic Package Manager, you should be able to see conky, conky-all, conky-cli, and conky-std. If you installed conky, I suggest you try installing the conky-all package instead. It's Conky with all features enabled. Perhaps then your Conky will recognize the execpi command.
    Main: Intel Core i7 920 D0 @ 4.0GHz | Asus P6X58D Premium | 6 x 2GB Mushkin Redline 1600 7-8-7-24 | EVGA GeForce GTX 560 Ti | 6 x 1TB WD Caviar Black | Mint 15 Cinnamon / OS X 10.7.3
    Portable: Dell Mini 9 | OS X 10.6.7

  6. #6
    Join Date
    Mar 2009
    Location
    Texas
    Beans
    189

    Re: Help a Conky newbie get going?

    Heh. Sorry. I've got the conky-all package. Well, thanks for your help. I managed to get a different to show some signs of functionality. I'll keep tweaking until someone can help me out with this particular script. Thank you for your time.
    Specs:
    Dell XPS 15 Notebook || 2.3 GHz Intel i5|| 6Gb RAM || NVIDIA GeForce GT 525M
    If I've skipped something, please let me know.

  7. #7
    Join Date
    Oct 2009
    Location
    Los Angeles, CA
    Beans
    380
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Help a Conky newbie get going?

    Try adding "TEXT" at the beginning of your .conkyrc, like this:
    Code:
    TEXT
    ${execpi 30 ~/nectarine.pl}
    Main: Intel Core i7 920 D0 @ 4.0GHz | Asus P6X58D Premium | 6 x 2GB Mushkin Redline 1600 7-8-7-24 | EVGA GeForce GTX 560 Ti | 6 x 1TB WD Caviar Black | Mint 15 Cinnamon / OS X 10.7.3
    Portable: Dell Mini 9 | OS X 10.6.7

  8. #8
    Join Date
    Mar 2009
    Location
    Texas
    Beans
    189

    Re: Help a Conky newbie get going?

    Okay, that seemed to inject at least some semblance of life into it. I put in the TEXT block and the terminal came up with this:

    Code:
    anthony@anthony-desktop:~$ conky
    Conky: desktop window (1c000ab) is subwindow of root window (c3)
    Conky: drawing to desktop window
    Conky: drawing to single buffer
    Can't locate XML/Simple.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/anthony/nectarine.pl line 4.
    BEGIN failed--compilation aborted at /home/anthony/nectarine.pl line 4.
    It may be helpful to note that other than this one script, I have no other Conky settings. So, I could probably run this using only the nectarine script (but maybe not. I'm not too familiar with Perl).
    Specs:
    Dell XPS 15 Notebook || 2.3 GHz Intel i5|| 6Gb RAM || NVIDIA GeForce GT 525M
    If I've skipped something, please let me know.

  9. #9
    Join Date
    Nov 2007
    Beans
    201

    Re: Help a Conky newbie get going?

    Quote Originally Posted by anthony62490 View Post
    Okay, that seemed to inject at least some semblance of life into it. I put in the TEXT block and the terminal came up with this:

    Code:
    anthony@anthony-desktop:~$ conky
    Conky: desktop window (1c000ab) is subwindow of root window (c3)
    Conky: drawing to desktop window
    Conky: drawing to single buffer
    Can't locate XML/Simple.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/anthony/nectarine.pl line 4.
    BEGIN failed--compilation aborted at /home/anthony/nectarine.pl line 4.
    It may be helpful to note that other than this one script, I have no other Conky settings. So, I could probably run this using only the nectarine script (but maybe not. I'm not too familiar with Perl).
    sudo apt-get install libxml-simple-perl

  10. #10
    Join Date
    Mar 2009
    Location
    Texas
    Beans
    189

    Re: Help a Conky newbie get going?

    Quote Originally Posted by DemonBob View Post
    sudo apt-get install libxml-simple-perl
    Okay, I have installed and reset X Windows. I now got this from my dear terminal:
    Code:
    anthony@anthony-desktop:~$ conky
    Conky: desktop window (1c000ab) is subwindow of root window (c3)
    Conky: drawing to desktop window
    Conky: drawing to single buffer
    /home/anthony/.conky/nectarine_queue.tmp: No such file or directory
    File does not exist: /home/anthony/.conky/nectarine_queue.tmp at /home/anthony/nectarine.pl line 14

    So I created .conky and tried on more time. Now I've got this:
    Code:
    anthony@anthony-desktop:~$ conky
    Conky: desktop window (1c000ab) is subwindow of root window (c3)
    Conky: drawing to desktop window
    Conky: drawing to single buffer
    --2010-08-30 01:17:36--  http://www.scenemusic.net/demovibes/xml/queue/
    Resolving www.scenemusic.net... 188.40.20.83
    Connecting to www.scenemusic.net|188.40.20.83|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [application/xml]
    Saving to: `/home/anthony/.conky/nectarine_queue.tmp'
    
        [ <=>                                   ] 6,742       39.3K/s   in 0.2s    
    
    2010-08-30 01:17:36 (39.3 KB/s) - `/home/anthony/.conky/nectarine_queue.tmp' saved [6742]
    
    Conky: unknown variable co
    Conky: unknown variable co
    Conky: unknown variable co
    --2010-08-30 01:18:06--  http://www.scenemusic.net/demovibes/xml/queue/
    Resolving www.scenemusic.net... 188.40.20.83
    Connecting to www.scenemusic.net|188.40.20.83|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [application/xml]
    Saving to: `/home/anthony/.conky/nectarine_queue.tmp'
    
        [ <=>                                   ] 6,741       42.3K/s   in 0.2s    
    
    2010-08-30 01:18:06 (42.3 KB/s) - `/home/anthony/.conky/nectarine_queue.tmp' saved [6741]
    
    Conky: unknown variable co
    Conky: unknown variable co
    Conky: unknown variable co
    Conky: unknown variable co
    Conky: unknown variable co
    Conky: unknown variable co
    Conky: unknown variable co
    Conky: unknown variable co
    It appears to be working decently, but there are some issues(flickering, position, general feel) If you have any help with these problems, feel free to help ; Otherwise, consider this question solved. Thanks to all.
    Specs:
    Dell XPS 15 Notebook || 2.3 GHz Intel i5|| 6Gb RAM || NVIDIA GeForce GT 525M
    If I've skipped something, please let me know.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •