Linux Programmer | RHCE | RHCSA

Search This Blog

Tuesday, 29 November 2016

Make your keyboard “special keys” (Alt+Gr, Up,Down,..) working when using XRDP

- xkbevd

$sudo apt-get install xbindkeys

$xbindkeys --defaults > /home/username/.xbindkeysrc

now "xbindkeys -k" command for choosing key press combination
$xbindkeys -k

( press the key combination for e.g. Ctrl+Alt+Space)

- copy the key combination
m:0x14 + c:28

paste into  /home/username/.xbindkeysrc

"/usr/bin/script.sh"  (path of the script you want to run on some key combination)
m:0x14 + c:28

run below command for starting xbind key start
$xbindkeys

to make it permenant add this command into .Xsession of into users home file

Wednesday, 16 November 2016

use of dd command

dd if=/dev/sr0 of=myCD.iso bs=2048 
conv=noerror,sync
Creates an ISO disk image from a CD-ROM; in some cases the created ISO image may not be the same as the one that was used to burn the CD-ROM.
dd if=system.img of=/dev/sdc bs=4096  
conv=noerror
Restores a hard disk drive (or an SD card, for example) from a previously created image.
dd if=/dev/sda2 of=/dev/sdb2 bs=4096  
conv=noerror
Clones one partition to another.
dd if=/dev/ad0 of=/dev/ad1 bs=1M  
conv=noerror
Clones a hard disk drive "ad0" to "ad1".

Monday, 14 November 2016

bash: file not Found error

bash: file not found error occured even file is exists 

solution:

32-bit executable file is not execute in linux 64-bit systems

so you have to install i386 32-bit architecture 

try this :

1. open terminal  ( ctrl + alt+ T)

2. sudo dpkg --add-architecture i386

 sudo apt-get update

 sudo apt-get install libc6:i386

 sudo apt-get install libncurses5:i386
 
 sudo apt-get install libstdc++6:i386



Saturday, 12 November 2016

Fix Broken initrd.img in linux

error : file /boot/initrd.img-3.10.12-generic' not found

if error found during booting system
follow the steps below

1.Boot your machine with a Live Media

2. open terminal and get partition 

fdisk -l

3. mount Filesystem
sudo mount /dev/sda1 /mnt
 
sudo mount --bind /proc /mnt/proc
sudo mount --bind /dev /mnt/dev
sudo mount --bind /sys /mnt/sys

4.Chroot /mnt and creating a Backup of the initrd image

sudo chroot /mnt

ls /boot/initrd*

or ls /lib/modules

mv /boot/initrd.img-3.11.0.12-generic /boot/old-initrd.img-3.11.0.12-generic-old

5. Building initrd.img

mkinitrd /boot/initrd.img-3.11.0.12-generic 3.11.0.12-generic-old

update-initramfs -c -k 3.11.0.12-generic

 

6. Finalizing Grub loader and unmounting

grub2-mkconfig -o /boot/grub2/grub.cfg

update-grub

 sudo unmount /mnt/proc

sudo unmount /mnt/sys

sudo unmount /mnt/dev

sudo unmount /mnt

init 6

M3 Button not working in Wayland

Mouse M3 button not working in wayland - ubuntu 26.04 1. Check your desktop Run: echo $XDG_SESSION_TYPE echo $XDG_CURRENT_DESKTOP 2. If...