Praveen’s Journal

July 23, 2008

Completely clueless

Filed under: General — Tags: , , — Praveen Kumar @ 1:59 pm

On my OpenSolaris. What could be more exciting than this?

praveen@athena:~$ /opt/sfw/bin/emacs
Fatal error (11).Segmentation Fault (core dumped)

praveen@athena:~$ file core
core:           ELF 32-bit LSB core file 80386 Version 1, from 'emacs'

praveen@athena:~$ gdb -c core /opt/sfw/bin/emacs
GNU gdb 6.3.50_2004-11-23-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11"...(no debugging symbols found)

Core was generated by `/opt/sfw/bin/emacs'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /opt/sfw/lib/libXaw3d.so.5...(no debugging symbols found)...done.
Loaded symbols for /opt/sfw/lib/libXaw3d.so.5
Reading symbols from /usr/lib/libXmu.so...done.
Loaded symbols for /usr/lib/libXmu.so
Reading symbols from /usr/lib/libXt.so.4...done.
Loaded symbols for /usr/lib/libXt.so.4
Reading symbols from /usr/lib/libSM.so.6...done.
Loaded symbols for /usr/lib/libSM.so.6
Reading symbols from /usr/lib/libICE.so.6...done.
Loaded symbols for /usr/lib/libICE.so.6
Reading symbols from /usr/lib/libXext.so.0...done.
Loaded symbols for /usr/lib/libXext.so.0
Reading symbols from /usr/lib/libtiff.so.3...done.
Loaded symbols for /usr/lib/libtiff.so.3
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libpng12.so.0...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libm.so.2...done.
Loaded symbols for /lib/libm.so.2
Reading symbols from /opt/sfw/lib/libungif.so.4...done.
Loaded symbols for /opt/sfw/lib/libungif.so.4
Reading symbols from /usr/lib/libXpm.so.4...done.
Loaded symbols for /usr/lib/libXpm.so.4
Reading symbols from /usr/lib/libX11.so...Segmentation Fault (core dumped)

praveen@athena:~$ file core
core:           ELF 32-bit LSB core file 80386 Version 1, from 'gdb'

June 14, 2008

Modifying Control and Caps Lock keys under OpenSolaris and Linux

Filed under: General — Tags: , , , — Praveen Kumar @ 4:07 pm

Since I started using Emacs, I started using the Control key more than I had used it before. That is when I started using my Caps Lock key as Control key. In the beginning, I swapped the Control key and the Caps Lock key. However while doing pair programming on my computer, my colleagues found this setup a bit unfriendly. So, I decided to give up my Caps Lock key and started using Caps Lock as an additional Control key. Under Linux, Gnome has an option to do this using the “Keyboard Preferences” application. However I was not able to find this option in OpenSolaris Gnome. So, I have to take the old xmodmap way of doing this. This works under Linux as well. I hope that this would work on all UNIX variants that uses xmodmap. But I haven’t verified it personally.

To make Caps Lock key as an additional Control key, add the following to .Xmodmap file in your home directory. This configuration is automatically applied when you restart your X (Gnome) session. For the first time, you can manually apply this by running xmodmap ~/.Xmodmap.

!
! Make Caps Lock as an additional Control.
!
remove Lock = Caps_Lock
add Control = Caps_Lock

Please note that ! is the commenting character for xmodmap files.

But if you want to retain the Caps Lock function and swap it back to Control key, add the following to your .Xmodmap file.

!
! Swap Caps Lock and Control.
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

Powered by WordPress