Rotate Virtual Terminal SDDM desktop manager and X Display

There are  multi-levels of rotation.

  • rotate VIRTUAL TERMINAL ( the terminals you get with : CTRL ALT F1   ,CTRL ALT F7 is the default to get back if you did 😀 )
  • rotate the DESKTOP MANAGER , kdm sddm lighdm etc.., where you login
  • rotate X display , the session and the application you usually use

If you want get the virtual terminal rotated at the login you can edit this file: (edit with nano\vim is better…for security issues.)

kdesudo kate /etc/default/grub

add this :

#uncomment to reset to default rotation display before login

where you can specify

  • 0 – Normal rotation
  • 1 – Rotate clockwise
  • 2 – Rotate upside down
  • 3 – Rotate counter-clockwise

after that

sudo update-grub

Now if you login with Kde for example and ssd you will not note any changes but if you do CTRL ALT F3 you WILL NOTE the rotation…



If you want rotate the desktop manager before you login you have to edit a specific file to achieve that  . Depending from your distro the location could change anyway i use kubuntu 17.04 and for sddm it’s (NOTE THE LINE IS CORRECT!! this way is better than kdesudo kate … )

EDITOR=kate  sudo -e /usr/share/sddm/scripts/Xsetup

now you have to put your xrandr solution at the bottom , that of course i recommend to test on your terminal first

example : turn off the laptop monitor , turn on the hdmi port and rotate it on left …

xrandr --output LVDS --off --output HDMI-0 --auto --rotate  left


 --rotate left
  --rotate right
  --rotate normal
  --rotate inverted

and you should get this stuff for example


now if you want to rotate X , and with that i mean your desktop when you are workin with your apps you just can rotate it with the systemsettings you get in your desktop but …. you can even do that with xrandr and a script, because i use kde i write down here how to do that ..
you have just to create a (must be!) file with your xrandr command for example this just restore to normal the rotation of HDMI and turn off laptop screen

xrandr --output LVDS --off --output HDMI-0 --auto --rotate  normal

save that file like in your ~/bin ($HOME/bin) give it the executable permission (chmod +x $HOME/bin/ set it like pre-kde startup

Now you have done! restart and you should get everything rotated like you wanted!

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

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 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 kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "" test 1 "kde-service-menu-nowardev-scanner" 
#write the pasword
qdbus org.kde.kwalletd5 /modules/kwalletd5 writePassword "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "" "silly" "kde-service-menu-nowardev-scanner"
#list the folders
 qdbus org.kde.kwalletd5 /modules/kwalletd5 folderList "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 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 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 kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "" "kde-service-menu-nowardev-scanner"