This section contains my documentation for generic features that are typically common across different Ubuntu versions.
Using Apt, one can install many different packages for a purpose using the meta-packages. For example, the different developer packages (gcc, make, bison, etc) required for compiling most different open source projects can be installed using build-essential:
root@saturn:~# apt-get install build-essential Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: binutils cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 libc6-dev libstdc++6-4.1-dev linux-libc-dev make patch Suggested packages: binutils-doc cpp-doc gcc-4.1-locales debian-keyring gcc-4.1-doc lib64stdc++6 manpages-dev autoconf automake1.9 libtool flex bison gdb gcc-doc libc6-dev-amd64 lib64gcc1 glibc-doc libstdc++6-4.1-doc make-doc diff-doc Recommended packages: libmudflap0-dev The following NEW packages will be installed: binutils build-essential cpp cpp-4.1 dpkg-dev g++ g++-4.1 gcc gcc-4.1 libc6-dev libstdc++6-4.1-dev linux-libc-dev make patch 0 upgraded, 14 newly installed, 0 to remove and 35 not upgraded. Need to get 12.9MB of archives. After unpacking 49.7MB of additional disk space will be used. Do you want to continue [Y/n]? y
A brief (and incomplete) list of meta-packages follows:
Use the following procedure to swich the CTRL with the CAPSLOCK on a standard PC keyboard.
# dumpkeys > /usr/share/keymaps/defkeymap.kmap # cp /usr/share/keymaps/defkeymap.kmap /usr/share/keymaps/ctrlcaps_switch.kmap # vi /usr/share/keymaps/ctrlcaps_switch.kmap # diff /usr/share/keymaps/defkeymap.kmap /usr/share/keymaps/ctrlcaps_switch.kmap 1342c1342 < keycode 29 = Control --- > keycode 29 = Caps_Lock Caps_Lock Caps_Lock Caps_Lock 2575c2575,2576 < keycode 58 = Caps_Lock Caps_Lock Caps_Lock Caps_Lock --- > keycode 58 = Control > # loadkeys /usr/share/keymaps/ctrlcaps_switch.kmap
Naturally, the loadkeys command at the end needs to be run each time one logs in. Simply add this to the .bashrc to make the change automatic. (It may be advisable to not add the loadkeys command to root's .bashrc, just in caseā¦
Alternatively, xmodmap can be used in Xwindows. The man page gives the exact details but basically put the lines
! ! Swap Caps_Lock and Control_L ! 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
in a file (.xmodmap is good). Then add the line xmodmap ~/.xmodmap in your .bash_profile or some other file that is run when you login or start x.
The ndiswrapper package can be used to install a wireless adapter, using the Windows drivers provided by the manufacturer. The following example was done using the TrendNET Wireless NIC. The Win2K drivers were copied from the CD supplied with the card and the following procedure was executed:
# ndiswrapper -i Mrv8000c.INF
installing mrv8000c ...
# ndiswrapper -m
adding "alias wlan0 ndiswrapper" to /etc/modprobe.d/ndiswrapper ...
# ndiswrapper -l
mrv8000c : driver installed
device (11AB:1FAA) present
modprobe wlan0
The last step only needs to be done for the current boot session. Because ndiswrapper adds it to /etc/modprobe.d/ndiswrapper, the kernel module created in the first step will be loaded automatically on reboot.
Add the appropriate configuration to the /etc/network/interfaces file, for example (be sure to add wlan0 to the auto line):
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
# automatically added when upgrading
auto lo wlan0
iface lo inet loopback
iface wlan0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.10
Edit the /etc/wlan/wlan.conf file to add the SSID for your network.
It may be necessary to edit the following two files:
/etc/network/if-pre-up.d/linux-wlan-ng-pre-up /etc/network/if-post-down.d/linux-wlan-ng-post-down
The TrendNET card had issues with the wlanctl-ng command. Commenting out the section where wlanctl-ng was run and changing the modprobe statement to specifically reference wlan0:
if ! modprobe wlan0; then
echo "Failed to load wlan0." >&2
exit 1
fi
# NOTE: We don't explicitly insmod the card driver here. The
# best thing to do is to specify an alias in /etc/modules.conf.
# Then, the first time we call wlanctl with the named device,
# the kernel module autoload stuff will take over.
# But, if you prefer, you could modprobe it here.
# Bring the card up into an operable state.
#result=`$WLANCTL $IFACE lnxreq_ifstate ifstate=enable`
#if [ $? = 0 ] ; then
# eval $result
# if [ $resultcode != "success" ]; then
# echo "Failed to enable the device, resultcode=" $resultcode "." >&2
# exit 1
# fi
#else
# echo "Failed to enable the device, exitcode=" $? "." >&2
# exit 1
#fi
#
Add the following lines to /etc/network/interfaces
up route add -net 172.16.0.0/24 gw 172.16.4.1 dev eth0
apt-get install libpcap0.8-dev bison libwrap0-dev flex