How to set super key win key like shortcut for kde menu or other kubuntu launcher ONLY PLASMA5.8


Hello now that i am going to plasma5 series i am updating some articles and here it is you wanna just press the silly WIN key and get the kde menu on the screen ?!!

here it is

kate ~/.config/kwinrc

now add this shit 😀

[ModifierOnlyShortuts]
Meta=org.kde.plasmashell,/PlasmaShell,org.kde.PlasmaShell,activateLauncherMenu
Shift=
Alt=
Control=

some interesting thing you could just link shift withfor example

  org.kde.krunner,/App,,display

cloning partitions (windows 8) with gpt table from linux kubuntu acronis


 

WARNING
I DO NOT TAKE ANY RESPONSIBILITY FOR LOSS OF DATA AND PARTITIONS. THIS ARTICLE IS PUBBLIC BUT IT’S MADE FOR MY OWN USE ONLY.

IF YOU LOST DATAS AND PARTITIONS IT’S NOT MY FAULT, THIS ARTICLE IS NOT FOR NOOBS, PLEASE BE CAREFULL WITH DD .

All the article it’s just based on these commands :

BACKUP

sudo dd if="/dev/sdXY_INPUT_DEVICE" of="OUTPUTFILE" bs=4096 conv=notrunc,noerror

RESTORE

sudo dd  if="INPUT_FILE_NAME" of="/dev/sdXY_OUTPUT_DEVICE"

so for example if you don’t trust my code do :

BACKUP sdb1 partition

sudo dd if="/dev/sdb1" of="$HOME/sdb1_image.img" bs=4096 conv=notrunc,noerror

RESTORE sdb1 partition

sudo dd  if="$HOME/sdb1_image.img" of="/dev/sdb1"

NOWARDEV BASHRC RESTORE AND BACKUP FUNCTIONS

now i am lazy so i have created my own bashrc with nice progress bar (that require pv program )

backup_partitions

THIS IS MY OWN EXPERIENCE SO IF YOU ARE DOING THE SAME STUFF I AM NO RESPONSIBLE OF ANY DATA LOST

i have created 2 bashrc functions to help me to backup and restore

backup_partition
restore_partition

to use these functions you need of :

pv
dd

pv it’s only to monitor dd work and to print % but probably you are missing it so :

sudo apt-get install pv

1)put this code on ~/.bashrc file that it’s in your home

backup_partition(){

#Copyright (C) 2015 nowardev nowardev@gmail.com

#This file is part of kde-peace-settings.

#kde-peace-settings is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program.  If not, see <http://www.gnu.org/licenses/>.

if [[ "$1" == -* ]]; then
	case "$1" in
		-h) echo "backup_partition input_dev ouput_dev" ; return ;;
	esac
fi
echo
if [[ ! -z $(ls /dev | grep "${1##*/}") &&  -d  "$2"  ]] ; then
	if [[ ! -z $(grep "$1" /proc/mounts) ]]; then
		echo $"$1 it's mounted please umount it before."
		return
	else
		date="$(date +"%d-%m-%y")"
		outname="$2/${1##*/}_$date.img"
		outname=${outname/\/\//\/} #remove potential // problem
		echo $"do you want execute \"sudo dd if=\"$1\" of=\"$outname\" bs=4096 conv=notrunc,noerror\" (y\n) ?"
		read
		echo "$REPLY"
		case "$REPLY" in
			[yY]|[yY][eE][sS])

				sudo pv -p -t "$1" | dd  of="$outname" bs=4096 conv=notrunc,noerror

			;;

			[nN]|[nN][oO])
				echo $"user exit"
				return
			;;
		esac

	fi
else
	echo $"$1 it's a valid partition ? and $2 it's really folder ?"

fi
}

restore_partition(){
#Copyright (C) 2015 nowardev nowardev@gmail.com

#This file is part of kde-peace-settings.

#kde-peace-settings is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program.  If not, see <http://www.gnu.org/licenses/>.

if [[ "$1" == -* ]]; then
	case "$1" in
		-h) echo "restore_partition  output_device  INPUT_FILE" ; return ;;
	esac
fi

if [[ ! -z $(ls /dev | grep "${1##*/}") &&  -e  "$2"  ]] ; then
	if [[ ! -z $(grep "$1" /proc/mounts) ]]; then
		echo $"$1 it's mounted please umount it before."
		return
	else
		echo $"doing sudo dd of="$1" if="$2" ?  (y\n) "
		read   

		echo $REPLY
		case "$REPLY" in

		[yY]|[yY][eE][sS])

		sudo pv -p -t "$2" | dd   of="$1"  

		;;

		[nN]|[nN][oO])
		echo $"user exit"
		return
		;;
		esac

	fi
else
	echo $"$1 it's a valid partition ? and $2 it's really a file ?"

fi

}

2)do , in a terminal , where you will perform every commands:

source ~/.bashrc 

ok now you are ready to clone yours partitions in files :

if you type

backup_partition -h

or

restore_partition -h

you will get help :

backup_partition input_dev ouput_dev
restore_partition output_device INPUT_FILE

so let me show you my miserable partitions table with lsblk , i know my partition table and i know that 605GB it’s the folder where i store my files and the 54GB it’s the windows partition , instead sdb1 it’s the uefi stuff .

sdb      8:16   0 698,7G  0 disk
├─sdb1   8:17   0   260M  0 part
├─sdb2   8:18   0   1,5G  0 part
├─sdb3   8:19   0   260M  0 part
├─sdb4   8:20   0   128M  0 part
├─sdb5   8:21   0  54,6G  0 part
├─sdb6   8:22   0 605,4G  0 part
└─sdb7   8:23   0  27,1G  0 part

BACKUP A PARTITION WITH MY BASHRC FUNCTIONS

so now i will use sdb6 to store every sdb1 sdb2 …. etc partitions . i will mount the partition sdb6 into a folder so :

sudo mkdir /media/sem/myownbackuppart

now my sdb6 it’s formated into ntfs so i will use :

sudo mount -t ntfs-3g /dev/sdb6 /media/sem/myownbackuppart

now i will backup the partition with this : MAKE SURE TO SET LIKE FIRT ARGUMENT THE DEVICE !

backup_partition /dev/sdb1 /media/sem/myownbackuppart/

this command will generate a file called sdb1_31-12-14.img here /media/sem/myownbackuppart/

now we will do the same thing for every partition

RESTORE THE PARTITION

restore_partition /dev/sdb1 /media/sem/myownbackuppart/sdb1_31-12-14.img

and you have done , i have tested this method in my computer and it works i hope it will work for you too .

now the bashrc functions that lets you to clone a partition in an img file :

Here i will save the informations to bakcup and restore the partition table

BACKUP PARTITION TABLE GPT

sgdisk -b - /dev/sdb > /mnt/sdb6/gpt-table-windows_hdd

RESTORE PARTITION TABLE GPT

sgdisk -l - Gg /dev/sdb < /mnt/sdb6/gpt-table-windows_hdd

gpt unknown partition table unable to mount “JMicron USA Technology Corp. JMS539 SuperSpeed SATA II 3.0G Bridge”


neither partition manager or gparted was able to correctly show partitions on this hdd

gparted :

invalid argument during seek for read on /dev/sdb and libparted bug

plasma-desktopyq1947

my hdd was connected to kubuntu with a satatousb cable which it’s

152d:2509 JMicron Technology Corp. / JMicron USA Technology Corp. JMS539 SuperSpeed SATA II 3.0G Bridge

now the dmesg it was saying

sdb: unknown partition table

and dolphin was not mounting it . i mean i did not seen even the partitions so …

first of all you need to install gdisk

then you can seee what it says :

sudo gdisk -l /dev/sdb #i used sdb you can use what uyou need for example sdc 

and it says :

Warning! Disk size is smaller than the main header indicates! Loading secondary header from the last sector of the disk! You should use ‘v’ to verify disk integrity, and perhaps options on the experts’ menu to repair the disk.

Warning! One or more CRCs don’t match. You should repair the disk!

now i had my windows 8 on that harddrive and i was scared do “FIX IT ” from linux , but at the end i tried and it went good and here what i did :

SOLUTION

NB THIS STUFF COULD BE DANGEROUS FOR YOUR WINDOWS 8 INSTALLATION IN MY CASE IT WENT WELL BUT I AM NOT SURE IT WILL BE THE SAME FOR YOU SO IF YOU TRY THIS … WELL IT’S YOUR PROBLEM

sudo gdisk /dev/sdb 

now go in thee expert mode with x then press e then press w

e :   stands for relocate backup data structures to the end of the disk
w:    to write this change on the hdd

now we reconnect if needed the hdd to your linux box

but using dolphin i got :

An error occurred while accessing ‘windowsshared’, the system responded: The requested operation has failed: Error mounting /dev/sdb6 at /media/sem/windowsshared: Command-line `mount -t “ntfs” -o “uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177” “/dev/sdb6” “/media/sem/windowsshared”‘ exited with non-zero exit status 14: The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount ‘/dev/sdb6’: Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the ‘ro’ mount option.

and this happend because of Windows 8’s fast startup feature. and you need to disable it, if you don’t want disable this option on windows 8 you can always try this

now to solve this you need to do

sudo ntfsfix /dev/sdb6 #ok i have used sdb6 but yours could change 

and tada …. 😀 the partition can be mounted without problems

IF YOU PREFER DISABLE FAST STARTUP WINDOWS 8

control panel => search for power => choose what the power buttons do =>change settings that are currently unaviable ==> turn on fast startup (reccomended)

for screenshot just search for disable faststartup windows 8

and now partitionmanager show correctly what i have

gptjmicronpartitionmanager