Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

User Journal

Journal: remap capslock to change keyboard layout windows 7

Journal by egork

use http://ahkscript.org/download/ - just download, install and run - you will get the menu where you can chose to open a sample script.
Replace it's content with this

SetCapsLockState, AlwaysOff

this will make CapsLock to send Shift+Ctrl sequence.

Now go to the the "control panel"->"region and language"->"keyboards and languages"->"change keyboards"->"advanced key settings"->"change key sequence between input languages"->"switch keyboard layout". Chose Shift+Ctrl there. It should work now!

User Journal

Journal: replace a disk in mdadm raid array on ubuntu

Journal by egork

# mdadm --manage /dev/md0 --fail /dev/sdb2
# mdadm --manage /dev/md0 --remove /dev/sdb2

Past that point, its just a matter of powering off and replacing the drive at your earliest convenience. Once you got a new drive, pop it in, boot the system up, clone the partition table, and add the new partition to the array:

# sfdisk -d /dev/sda | sfdisk /dev/sdb
# mdadm --manage /dev/md0 --add /dev/sdb2


User Journal

Journal: Logitech diNovo Edge keyboad Ubuntu 12.04 precise pangoline

Journal by egork

You have to follow the same procedure in the file



sudo gedit /lib/udev/rules.d/97-bluetooth-hid2hci.rules

Here is a sum up:

# Logitech devices

KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ RUN+="hid2hci --method=logitech-hid --devpath=%p"


KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ RUN+="hid2hci --method=logitech-hid --devpath=%p"

Just change the word hiddev with hidraw.

That's it! Don't forget to reboot the PC and synchronize both peripherals pressing the bouton connect of each device.

User Journal

Journal: D-Link DWL-G520 in Ubuntu 12.04

Journal by egork

This card's driver is in the blacklist and so it does not get loaded. The card itself is not visible then with lspci.
sudo vi /etc/modprobe.d/blacklist.conf
and comment out the line with "blacklist prism54"
The card will be available after a reboot.
01:08.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Wireless Network Adapter (rev 01)


Journal: Fix too frequent WD Green Caviar Head Parking

Journal by egork

Get FreeDOS image http://www.finnix.org/files/balder10.img
and the utility http://support.wdc.com/product/download.asp?groupid=609&sid=113&lang=en

Add to the /etc/grub.d/40_custom to boot into DOS.

menuentry "FreeDOS (WesternDigital Idle3 tool)" {
insmod ext2
set root=(hd6,1)
search --no-floppy --fs-uuid --set PUT_HERE_UUID_OF_YOUR_DRIVE
linux16 /usr/lib/syslinux/memdisk bigraw
insmod ext2
set root=(hd6,1)
search --no-floppy --fs-uuid --set PUT_HERE_UUID_OF_YOUR_DRIVE
initrd16 /boot/balder10.img

Get this part from /boot/grub/grub.cfg from the section for your disk with /boot.

set root=(hd6,1)
search --no-floppy --fs-uuid --set PUT_HERE_UUID_OF_YOUR_DRIVE

Create FAT partition with Disc Utility from Gnome and formate with mkfs.vfat (fat32)
Reboot into the mode 3 in FreeDOS (wait until system asks you, it can take a few seconds) and with C: you will get to the utility.
Disabling of the timer /D does not help, so just set 5 minutes timeout with /S300.

User Journal

Journal: eSATA PCIe Linux compartible card

Journal by egork

It was not easy to find a eSATA PCIe card that is reported as compartible with Ubuntu Intrepid LInux. DeLock Nr 89143 with the chipset JMB363 JMicron 20360/20363 AHCI Controller (rev 03) works just fine out of the box. Just do not forget to configure the jumpers on the card to be able to use external eSATA ports. Also make sure you unmount the discs before disconnecting them. Otherwise you will have to run fsck in the best case.

User Journal

Journal: Lock screen on KDE4

Journal by egork

Starting from KDE4.3
DISPLAY=:0 /usr/lib/kde4/libexec/kscreenlocker --forcelock >/dev/null 2>&1 &
To map that to a shortcut go to System Settings, Input Actions, add a shortcut and put into the Comand/URL:/usr/lib/kde4/libexec/krunner_lock --forcelock >/dev/null 2>&1 &


Journal: RAID Array in Intrepid

Journal by egork
If the RAID you have created does not start after the reboot, you might wish to add a line in the initramfs-tools/init file:


# to stop a race condition with md

157 maybe_break mount
158 sleep 5
159 log_begin_msg "Mounting root file system..."

sudo /usr/sbin/update-initramfs -uk all

# run to rebuild the image
Make sure if you add it it is to the "mount" line. The line numbers are likely different with your system. You might start with 10 instead of 5, seconds delay. Ubuntu Forum Discussion
known bug in Intrepid has no influence on the creation of the array.

to check the SMART status of the drives do this

for letter in a b c d e f; do echo "############## Below the information for the drive /dev/sd$letter ##########" && sudo smartctl -H -l error /dev/sd$letter ; done

add internal bitmap to reduce rebuild time

sudo mdadm --grow --bitmap=internal /dev/md0

better still add external bitmap to speed up the write speed to compared to internal bitmap

sudo mdadm --grow --bitmap=none /dev/md0 #remove bitmap sudo mdadm -G /dev/md0 -b /media/persistent_temp/md0_intent_var # my /var is mounted into ramdisk

add to /etc/rc.local to further optimize write speed further.

echo 8192 > /sys/block/md0/md/stripe_cache_size

check drive features

for letter in a b c d e ; do echo "Drive /dev/sd$letter" && sudo hdparm -i /dev/sd$letter ; done

Turn of APM and spin down. Set sound management to "fast". APM is not supported on my WD drives.

for letter in a b c d e ; do echo "Drive /dev/sd$letter" && sudo hdparm -B255 -S0 -M254 /dev/sd$letter ; done

Recover sequence

sudo mdadm --assemble --force /dev/md0 --uuid=YOUR_UUID /dev/sd{a,b,c,d,e}1
sudo mdadm --query --detail /dev/md0
sudo fsck.jfs -v /dev/md0
sudo mount /dev/md0
sudo watch cat /proc/mdstat
sudo mdadm /dev/md0 --add /dev/DEVICE_TO_ADD

Q: How many IBM CPU's does it take to execute a job? A: Four; three to hold it down, and one to rip its head off.