[Gambas-user] gb.Desktop and Gnome Keyring
Benoît Minisini
gambas at ...1...
Thu May 26 02:21:24 CEST 2011
> Hi!
>
> I wanted to know how is the keyring accessed using Gambas. I found on
> the gb.Desktop component a Gambas class (_DesktopPasswords) and a C
> component when the desktop enviroment is Gnome. but i couldn't find any
> info regarding it's usage. The _DesktopPasswords is exported as a static
> class, but it isn't loaded outside the component, the same with the C
> component. How could i do to be able to get and set passwords?
>
> Also, will the component ask the user to unlock the keyring or will it
> fail (with an error)? and how is the name of the key defined?
>
> Thanks all!
To store a password:
Desktop.Passwords[Key] = Password
"Key" is a way to identify your password inside the password storage system.
To read a password:
Password = Desktop.Passwords[Key]
What happens exactly depends on the password storage system. As I don't use
Gnome, you will tell me!
The Gnome keyring is accessed through the gb.desktop.gnome hidden component.
Look at the source in ./gb.desktop/src/gnome to see which code is executed
exactly to access the keyring.
Regards,
--
Benoît Minisini
More information about the User
mailing list