Category: Linux

ELF-dependency-walker is a tool to view the dependencies of an ELF object/executable

ELF-dependency-walker is a tool to view the dependencies of an ELF object/executable, you can use it to analyst what libraries is an ELF depending to. If you are doing operating system development and trying to port a library from linux to your os, first thing you know is that you need to know how deep of that library is depending to. It is complete open source and free to use. Just download it from https://sourceforge.net/projects/elf-dependency-walker/ and run it by

java -jar elf-dependency-walker-XXX.jar

elf1

elf2

read count : 186

enable paste command in xterm for mac and linux

MAC:

enable paste command in xterm for mac, create ~/.Xdefaults

*VT100.translations: #override  Meta <KeyPress> V:  insert-selection(PRIMARY, CUT_BUFFER0) \n

Linux:
edit /etc/X11/app-defaults/XTerm , add “*selectToClipboard: true" to the bottom, highlight is copy text, shift-insert is paste.

read count : 10

ubuntu 12.04 vnc startup script for fallback mode

#!/bin/sh

DISPLAY=:1 xmodmap -e 'keysym Alt_L = Alt_L'
DISPLAY=:1  xmodmap -e 'keysym Alt_R = Alt_R'
DISPLAY=:1 xmodmap -e 'keycode 255 = Meta_L'
DISPLAY=:1  xmodmap -e 'keycode 254 = Meta_R'
DISPLAY=:1  xmodmap -e 'keycode 253 = Super_L'
DISPLAY=:1  xmodmap -e 'keycode 252 = Super_R'
DISPLAY=:1  xmodmap -e 'add mod3 = Super_L Super_R'
DISPLAY=:1  xmodmap -e 'add mod4 = Meta_L Meta_R'

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &

read count : 198

Fixed ubuntu vnc keymap problem

ubuntu 12.04 vnc keymap has trouble, D become minimize all windows and S become start menu, run these to fix it.

DISPLAY=:1 xmodmap -e 'keysym Alt_L = Alt_L'
DISPLAY=:1  xmodmap -e 'keysym Alt_R = Alt_R'
DISPLAY=:1 xmodmap -e 'keycode 255 = Meta_L'
DISPLAY=:1  xmodmap -e 'keycode 254 = Meta_R'
DISPLAY=:1  xmodmap -e 'keycode 253 = Super_L'
DISPLAY=:1  xmodmap -e 'keycode 252 = Super_R'
DISPLAY=:1  xmodmap -e 'add mod3 = Super_L Super_R'
DISPLAY=:1  xmodmap -e 'add mod4 = Meta_L Meta_R'

read count : 217

tomcat auto startup script

just save this to /etc/init.d/tomcat and link to /etc/rc5.d/S99tomcat

#!/bin/bash
#
# tomcat        
#
# chkconfig: 
# description: 	Start up the Tomcat servlet engine.

# Source function library.
. /etc/init.d/functions


RETVAL=$?
CATALINA_HOME="/home/tomcat.kingofcoders.com/www/"

case "$1" in
 start)
        if [ -f $CATALINA_HOME/bin/startup.sh ];
          then
	    echo $"Starting Tomcat"
            /bin/su tomcat $CATALINA_HOME/bin/startup.sh
        fi
	;;
 stop)
        if [ -f $CATALINA_HOME/bin/shutdown.sh ];
          then
	    echo $"Stopping Tomcat"
            /bin/su tomcat $CATALINA_HOME/bin/shutdown.sh
        fi
 	;;
 *)
 	echo $"Usage: $0 {start|stop}"
	exit 1
	;;
esac

exit $RETVAL

read count : 315