Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 168944

Summary: Ksirc and amarok
Product: Gentoo Linux Reporter: Nikola Petrov <nikolavp>
Component: [OLD] KDEAssignee: Gentoo KDE team <kde>
Status: RESOLVED WORKSFORME    
Severity: trivial    
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Nikola Petrov 2007-03-01 22:29:42 UTC
I am just posting this so the developers can fix it for everyone. I dont know if the problem appears only here but amarok 1.4.5-r1 is using the dcop amarok-2 syntax instead of dcop amarok so you should change the last lines in /usr/kde/3.5/share/apps/ksirc/ksirc.pl they look like this:
sub cmd_amarok
{
    $dcop=`dcop amarok`;
    if(! ($dcop =~ /player/) ) {
        &print("Error: Amarok is *not* running");
        return;
    }

    $dcop=`dcop amarok player isPlaying`;
    if(! ($dcop =~ /true/) ) {
        &print("Amarok is not playing anything");
        return;
    }

    $output='is playing "$dcop" with Amarok';
    $dcop= `dcop amarok player nowPlaying` ;
$dcop =~ s/^\s+//;
$dcop =~ s/\s+$//;
    $output=~ s/(\$\w+)/$1/eeg;
    &me( $output );
}
and i think they should be changed like this:
sub cmd_amarok
{
    $dcop=`dcop amarok-2`;
    if(! ($dcop =~ /player/) ) {
        &print("Error: Amarok is *not* running");
        return;
    }

    $dcop=`dcop amarok-2 player isPlaying`;
    if(! ($dcop =~ /true/) ) {
        &print("Amarok is not playing anything");
        return;
    }

    $output='is playing "$dcop" with Amarok';
    $dcop= `dcop amarok-2 player nowPlaying` ;
$dcop =~ s/^\s+//;
$dcop =~ s/\s+$//;
    $output=~ s/(\$\w+)/$1/eeg;
    &me( $output );
}


Reproducible: Always

Actual Results:  
Now i can type /amarok and everything is working like a charm ;)
Comment 1 Dan 2007-03-16 23:00:40 UTC
Thats something weird going on on your system.  Amarok did not change its dcop name for 1.4.5
Comment 2 Ian Monroe 2007-06-07 16:25:27 UTC
yea, it didn't rename itself. You might have ran amarok using amarokapp or had a zombie amarokapp process, the second amarokapp process will register itself as like amarok-2. 

There is some trick to apply a regexp to dcop.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-06-08 19:56:02 UTC
Considering this a local issue.