Tuesday, August 18, 2015

Upgrade to Windows 8.1 with Gentoo and Ubuntu on Dual-Boot (Triple-Boot actually)

I finally upgraded Windows 8 to 8.1 on my laptop today. Yes, I know Windows 10 is available and I am behind time.

The installation (took almost four hours!) was completed with only one problem: it rendered my boot-loader "rEFInd" temporarily unusable. No panic. Nothing happened to the refind directory and nothing was deleted. The following steps will get refind up and running again: (I just copied and pasted part of the instructions from rEFInd's author Roderick Smith's website)

1. mountvol S: /S in the Administrator Command Prompt window

2. cd EFI\refind

3. bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi

That's all. Basically I just needed to reset rEFInd as the default EFI boot program. 

Tuesday, March 17, 2015

Convert WAV to MP3 using lame

Today I found a most excellent command line from the Ubuntu forums by mc4man. I'm just going to note it down here so that I don't have to go searching for it every time:

mkdir temp && for f in *.wav; do lame --vbr-new -V 3  "$f" ./temp/"${f%.wav}.mp3"; done

Sunday, January 18, 2015

International keyboard layout on Gentoo

This is my keyboard setup for an international layout because I used quite a lot of umlauts and eszett.

Entry from /usr/share/X11/xorg.conf.d/10-evdev.conf:

Section "InputClass"
   Identifier "evdev keyboard catchall"
   MatchIsKeyboard "on"
   MatchDevicePath "/dev/input/event*"
   Driver "evdev"
   Option        "XkbModel" "pc105"
   Option        "XkbLayout" "us_intl"
   Option        "XkbOptions" "compose:menu"
EndSection


The compose key is used to type "ß" because for a long while I couldn't for the life of me figure out how to get "Alt-Gr" to work on Gentoo. And then I found out that all I had to do was to map "Mode_switch" to the right Alt keycode.

Using xev, I found that the keycode for the right Alt is 108. So this is my entry in ~/.Xmodmap

keycode 108 = Mode_switch

And just for fun, this is how to map the "s" key so that you can type the capital eszett ẞ (not ß)

keycode 39 = s S ssharp U1E9E

For those who are curious as to how the keycode format works: here's the explanation I've taken from this website:


keycode  = <1> <2> <3> <4> <5> <6> <7> <8>
 
 
     <1>                           
     <2>                     
     <3>             <"Mode_switch"-key>
     <4>       
     <5>                <"Num_Lock"-key> 
     <6>               -
     <7>  <"Num_Lock"-"Mode_switch"-key>
     <8>