Linux kde kubuntu how to check ssd crucial lifetime


Run this , i have sda like dev you could have sdb etc etc

sudo smartctl -a /dev/sda

grepping for crucial : 0x0031

sudo smartctl -a /dev/sda| grep 0031

You should get this

Percent_Lifetime_Used   0x0031   096   096   000    Pre-fail  Offline- 4

means i used 4 % of CRUCIAL LIFETIME

Advertisements

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 an email via bash terminal linux


sendemail works!
just enable when needed in this page :
https://www.google.com/settings/security/lesssecureapps

then you can do your silly stuff

 

SENDER="myaccount@gmail.com"
MAILTO="receiver@gmail.com"
PASSWORD="yoursillypassword"
TITLE="e-MAIL SENT WITH SENDMAIL"
MESSAGE="Hello this is a mail from my linux terminal"
sendemail -o tls=yes -f "$SENDER" -t "$MAILTO" -s smtp.gmail.com:587 -xu "$SENDER" -xp "$PASSWORD" -u "$TITLE" -m "$MESSAGE"

if you want add an attachment you need to do :

SENDER="myaccount@gmail.com"
MAILTO="receiver@gmail.com"
PASSWORD="yoursillypassword"
TITLE="e-MAIL SENT WITH SENDMAIL"
ATTACHMENT="/path/tofile"
MESSAGE="Hello this is a mail from my linux terminal"
sendemail -o tls=yes -f "$SENDER" -t "$MAILTO" -s smtp.gmail.com:587 -xu "$SENDER" -xp "$PASSWORD" -u "$TITLE" -m "$MESSAGE" -a "$ATTACHMENT"