Unicode

I decided that I wanted to see accented characters, other character sets, and basically move out of the 70s on my terminal screens. So, I went hunting for the settings to make my system think in Unicode. I started here and it seemed to go okay, but I still couldn’t see most of the characters in this. After much tearing of hair and gnashing of teeth, it turns out that Eterm, which I understood to be Unicode compatible, isn’t. At least, mine isn’t. So, I decided to use Urxvt, which is Rxvt with Unicode support.

The funny thing is, once I decided to use urxvt I ended up spending more time configuring it than I ever did getting Unicode (specifically UTF-8) set as my default character set. I’m pretty happy with it now though – you can check out my config file over in the configs section. The only problem left is that I don’t know how to type accented characters, but I figure I’ll figure it out eventually.

Linux Wireless at U of T

U of T is moving towards ubiquitous wireless access on the downtown campus. That means you want access, but the University doesn’t want iSquatters™. To that end they are using WEP and MAC address authentication. I want access via Linux, but the myopic twits are afraid to support anything for fear that it won’t work. Better to inconvenience everyone rather than risk having one unhappy student with a screwball setup. So, in the interest of promoting wireless access at U of T, I wrote up these instructions for accessing the Campus Wireless Network under Linux.

1. Make sure your wireless card is supported in your running kernel.
Contrary to the documentation provided by the Campus Wireless network,
any card supported by Linux and capable of WEP and 802.11b will work.

If your kernel does not support your wireless card, but it is supported
under Linux, you will need to recompile your kernel. This is beyond the
scope of these instructions, so get on the Internet and get some advice.

2. Note the output of iwconfig. It may look something like this:

lo        no wireless extensions.

eth0      IEEE 802.11-DS  ESSID:"UTORwin"  Nickname:"Prism  I"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:01:F4:6B:0E:CC
          Bit Rate:11 Mb/s   Tx-Power=15 dBm   Sensitivity:1/3
          Retry min limit:8   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=46/92  Signal level=-78 dBm  Noise level=-149 dBm
          Rx invalid nwid:0  Rx invalid crypt:15  Rx invalid frag:2
          Tx excessive retries:2  Invalid misc:0   Missed beacon:0

The key fields are ESSID, Access Point, and Link Quality and the name of
the interface (eth0, eth1, etc.). If the Access Point field is
44:44:44:44:44:44 and the Link Quality is reasonably high, then you have
not been authenticated by the Access Point.

3. As root, log onto an access point with the following command:
iwconfig eth0 essid UTORwin enc s:UToronto1home
The only difference will be the interface name. You may wish to alias
this command to something convenient, or set it as the default for the
interface.

4. Log onto a web browser, and any page you receive will redirect you
to the Campus Wireless Network, where you will have to register the
MAC address of your wireless card and then authenticate yourself based
on your UTORID.

Getting a UTORID I leave as an exersize for the reader.

bashrc

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

export LANG="en_CA.UTF-8"

# If running interactively, then:
if [ "$PS1" ]; then

    # don't put duplicate lines in the history. See bash(1) for more options
    # export HISTCONTROL=ignoredups

    # enable color support of ls and also add handy aliases
    eval `dircolors -b`
    alias ls='ls --color=auto'
    alias ll='ls -hl'
    alias la='ls -Ah'
    alias x='startx > /var/log/x.log 2>&1'
    alias clear='clear;fortune -ae'
    alias nstll='sudo apt-get install '
    alias upgrade='apt-get update && apt-get dist-upgrade'
    alias rmv='sudo apt-get remove '
    alias apt-get='sudo apt-get'
    alias dpkg='sudo dpkg'
    alias vi='vim'
    alias vii='sudo vim '
    alias reboot='sudo reboot'
    alias halt='sudo halt -p'
    alias card="mount /dev/sda1;ls /mnt/card"
    alias uncard="umount /mnt/card"
    alias key="mount /dev/sda;ls /mnt/key"
    alias unkey="umount /mnt/key"
    alias dos2unix="flip -uv "
    alias unix2dos="flip -mv "
    alias spmlearn='sa-learn --mbox --spam /home/willyyam/Mail/spam;rm /home/willyyam/Mail/spam;touch /home/willyyam/Mail/spam'
    alias pal="pal -r 5"
    alias xconsole="Eterm -t xconsole &"
    alias flug="ssh ohiggins@flug.fis.utoronto.ca"
    alias frozen-bubble="frozen-bubble -ns"

    # set a fancy prompt
    PS1='\[\033[0;32m\]\t \[\033[1;31m\]\w \[\033[0;32m\]]\[\033[0m\] '
  #PS1='\[\033[1;33m\]\t \[\033[1;34m\]\w \[\033[1;33m\]]\[\033[0m\] '

    case $TERM in
    Eterm*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    urxvt*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    xterm*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    xfce4-terminal*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    rxvt*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
        ;;
    *)
    esac

    # enable programmable completion features (you don't need to enable
    # this, if it's already enabled in /etc/bash.bashrc).
    #if [ -f /etc/bash_completion ]; then
    #  . /etc/bash_completion
    #fi
fi