This forum has been archived. All content is frozen. Please use KDE Discuss instead.

amarok and kwallet

Tags: None
(comma "," separated)
User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS

Re: amarok and kwallet

Mon Oct 12, 2009 10:55 pm
Kryten2X4B wrote:I was thinking more along the lines of "It's possible to get the non-annoying behavhior today without patching the sources (which most people wouldn't know how to do - especially if they're using binary packages most of the time) or waiting for an update where the plain-text option may, or may not, be implemented".

Well, I hope that developer fix this problem because if he lost his time adding ignoreWallet option I think that it was his original intention.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: amarok and kwallet

Tue Oct 13, 2009 4:49 am
Ignacio Serantes wrote:I don't know who write lastFM service but there is a bug with ignoreWallet configuration option.

This option is totally ignored because LastFmServiceConfig::LastFmServiceConfig() has incorrect logic.

The line

if( KWallet::Wallet::isEnabled() )

must be changed for

if( config.hasKey( "ignoreWallet" ) && ( config.readEntry( "ignoreWallet", QString() ) == "no" ) && KWallet::Wallet::isEnabled() )

or something similar. I include "config.hasKey( "ignoreWallet" )" because I don't know how to do a typecast in C.

With this change the line:

KConfigGroup config = KGlobal::config()->group( configSectionName() );

must be moved before the if.


Thanks. Would you mind providing us a patch for this bug? That would be perfect :)


--
Mark Kretschmann - Amarok Developer
User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS

Re: amarok and kwallet

Tue Oct 13, 2009 9:44 am
Ok, as soon as I can I send the patch to amarok's mailing list. But, a simple question, call

(config.readEntry( "ignoreWallet", QString() ) == "no" )

is safe if "ignoreWallet" don't exists? If this method returs a null and not an empty string then I need config.hasKey( "ignoreWallet" ) but if method returns empty string then I don't need it.

Sorry but I don't have any C skills.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: amarok and kwallet

Wed Oct 14, 2009 4:09 am
It is completely safe to read a variable that does not exist, that is what the default value ( QString() in your case, or "" ). You may wish to use a boolean instead.

Code: Select all
config.readEntry( "ignoreWallet", QVariant(false) ).toBool()


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS

Re: amarok and kwallet

Wed Oct 14, 2009 4:53 pm
bcooksley wrote:It is completely safe to read a variable that does not exist, that is what the default value ( QString() in your case, or "" ). You may wish to use a boolean instead.

Code: Select all
config.readEntry( "ignoreWallet", QVariant(false) ).toBool()

Oh, thank you but if its safe and string is returned I don't need any more. I must learn a few of C++ but, sadly, I do not like work with compilers.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: amarok and kwallet

Thu Oct 15, 2009 8:32 am
Come on, someone please make a patch ;)

A bug report on bugs.kde.org would also be good. And then attach a patch there. Or at least create the report.


--
Mark Kretschmann - Amarok Developer
User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS

Re: amarok and kwallet

Thu Oct 15, 2009 10:29 pm
I send the patch this weekend.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS

Re: amarok and kwallet

Sat Oct 31, 2009 8:58 am
Any news about this?

I send the patch to the list two weeks ago but I don't know if patch was commited or not.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: amarok and kwallet

Sat Oct 31, 2009 12:33 pm
Ignacio Serantes wrote:Any news about this?

I send the patch to the list two weeks ago but I don't know if patch was commited or not.


I'm sorry, we forgot about it. That's simply because the guy who was meant to review it (Leo Franchi) is very busy currently.

I can commit it today, and if it's wrong, someone will protest I guess. That ok?


PS: Please tell me where to find the patch.


--
Mark Kretschmann - Amarok Developer
User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS

Re: amarok and kwallet

Sat Oct 31, 2009 12:42 pm
I'm compiling Amarok so for me there is no problem and I'm not a C++ programmer so, I could miss something important.

If Leo is really busy and nobody is complain about the same problem I think that the best is wait for Leo to avoid solve a problem but create a new one.

It's a minor bug so there is no need to hurry up.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
HmpfCBR
Registered Member
Posts
80
Karma
0
OS

Re: amarok and kwallet

Sat Oct 31, 2009 1:01 pm
Kryten2X4B wrote:Actaully, you can make it non-annoying even without removing/disabling amarok's support/need for kwallet. Okay, it's annoying the first time but after that it's seamless.

What you do is create an additonal wallet within kwallet manager, and set it to be password-less. After that, you make sure amarok (and other apps where you think a plain-text password is secure enough) uses this insecure wallet rather than the one with a strong password. Additionally, as soon as amarok tries to use this insecure wallet you tell kwallet to "Allow always".

It's possible to do, although the UI of kwallet makes it harder to accomplish than what it needs to be. I always have to experiment a bit before I remember how to do it...


Hi, I usually use this approach for other programms, but somehow this seems not to work with Amarok. It still asks specifically for kdewallet, also I have moved the passwords to the less secure wallet.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: amarok and kwallet

Sat Oct 31, 2009 2:39 pm
Ignacio Serantes wrote:I'm compiling Amarok so for me there is no problem and I'm not a C++ programmer so, I could miss something important.

If Leo is really busy and nobody is complain about the same problem I think that the best is wait for Leo to avoid solve a problem but create a new one.

It's a minor bug so there is no need to hurry up.


No, the problem is that Leo might forget about it entirely. Please make a "Merge Request" on Gitorious, that's the best way for us:

http://gitorious.org/amarok/amarok


--
Mark Kretschmann - Amarok Developer
User avatar
Ignacio Serantes
Registered Member
Posts
453
Karma
1
OS

Re: amarok and kwallet

Sat Oct 31, 2009 3:04 pm
markey wrote:No, the problem is that Leo might forget about it entirely. Please make a "Merge Request" on Gitorious, that's the best way for us:
http://gitorious.org/amarok/amarok

Sorry if I feel stupid but what steps must I do to doing "Merge Request".

I register but I can't see an "add button" or something similar in "Merge Request" page.


Ignacio Serantes, proud to be a member of KDE forums since 2008-Nov.
User avatar
Prodigious Penguin
Registered Member
Posts
2
Karma
0
OS

Re: amarok and kwallet

Fri Mar 26, 2010 8:19 pm
Any word on the status of this? I updated to Amarok 2.3.0 the other day and still bumped into this issue.
User avatar
ændrük
Registered Member
Posts
3
Karma
0
OS

Re: amarok and kwallet

Sat Mar 27, 2010 1:56 am
When I first ran Amarok I chose to use plain text passwords, but I don't have a strong opposition to using KWallet if it is required for the Last.fm service to work. How can I make Amarok start using KWallet password storage instead?

Setting ignoreWallet=no in ~/.kde/share/config/amarokrc didn't appear to do anything.

I'm using the latest PPA package 2:2.3.0-0ubuntu1~karmic1~ppa2.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]