Accessing the KDE Wallet from the command line kde 5 version


I was trying to read some password ON KDE5 from google-chrome through kwallet and it was a bit a pain with qdbusviewer , actually i can’t get it right now,but i found  luckly an old blog entry for kwallet 4 so … here it is a simply scheme to create write and read password for my silly application kde-service-menu-nowardev-scanner

#create a wallet folder kde-service-menu-storage
qdbus org.kde.kwalletd5 /modules/kwalletd5 createFolder "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "kde-service-menu-nowardev-scanner" 
#write an entry for password 
qdbus org.kde.kwalletd5 /modules/kwalletd5 writeEntry "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "mymail@gmail.com" test 1 "kde-service-menu-nowardev-scanner" 
#write the pasword
qdbus org.kde.kwalletd5 /modules/kwalletd5 writePassword "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "mymail@gmail.com" "silly" "kde-service-menu-nowardev-scanner"
#list the folders
 qdbus org.kde.kwalletd5 /modules/kwalletd5 folderList "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-nowardev-scanner"
#read the entry
qdbus org.kde.kwalletd5 /modules/kwalletd5 entryList "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "kde-service-menu-nowardev-scanner"
#read the password 
 qdbus org.kde.kwalletd5 /modules/kwalletd5 readPassword "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "mymail@gmail.com" "kde-service-menu-nowardev-scanner"

location plasma 5 kde 5 service menu


Well wtf i use often service menu on kde and they changed the location

before it was :

$HOME/.kde/share/kde4/services/ServiceMenus

AND NOW :

$HOME/.local/share/kservices5/ServiceMenus/

So you need to copy your stuff.desktop oin that folder