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"

send mail from terminal kubuntu linux


ok you need to send an email properly ? you need to do this

i am using kubuntu so when i test mail or mailx i can do what i want but i get some problems that because i have a wrong version of mailx and so you need to install this one

sudo apt-get install heirloom-mailx 

now we need to create a file in $HOME/.mailrc so :

kate $HOME/.mailrc  

put this stuff here :

account gmail {
set smtp-use-starttls
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
set smtp-auth-user=MYUSERNAME@gmail.com
set smtp-auth-password=MYPASSWORD
set from="NAME OR WHAT YOU WANT"
}

ok now :

echo "my shell email" | mailx -v -A gmail -s "Thi is a title" TARGET_MAIL@gmail.com 

You should see this :

Resolving host smtp.gmail.com . . . done.
Connecting to 74.125.136.108:587 . . . connected.
220 mx.google.com ESMTP mx19sm2120686wic.3 - gsmtp
>>> EHLO sem-SVE1512Y1ESI
250-mx.google.com at your service, 
BLA BLA BLA 
..
..
250 2.0.0 OK 1409139516 mx19sm2120686wic.3 - gsmtp
>>> QUIT
221 2.0.0 closing connection mx19sm2120686wic.3 - gsmtp

instead if you want just test shortly this mail stuff without authentification :

use this :
BUT IT WILL GO IN THE SPAM FOLDER …. SO THIS IS NOT RECCOMENDED

echo "This is the body" | mail -s "This is the subject" TO_USER@gmail.com -- -f FROM_USER@gmail.com

print some info in a debian server


this is the message you get when you do a terminal login. so if you need to edit :

sudo nano /etc/motd