installing+terminal+in+XO+while+travelling

 1. The "standard" font that is used in Emacs is way too small and there didn't seem to be any way to change the font (normal Emacs font commands don't work and it would appear that others have encountered the same problem). I subsequently [|found some ways] to change the console and terminal fonts; however, I still haven't found a way to change the font in a windowed Emacs.  2. When I used the "emacs -nw" startup, the font was much better. However, I soon found that the Control-s and Control-q keys weren't being recognized by Emacs. Initially, I thought this was a [|flow control] problem. The normal way to disable flow control is to do "stty -ixon" before starting Emacs. However, that didn't work. For a while, I just did "M-x enable-flow-control" in Emacs so that the C-s and C-q keys would be remapped to C-\ and C-^. After a bit more digging though, I discovered that [|Sugar] was mapping those keys for the UI. I found [|a way] to disable those mappings (I also disabled a lot of other "standard" Sugar mappings that could potentially interfere with Emacs at the same time), so now I can happily use Emacs on my XO.  1. Terminal opens with the activity bar at the top. This can be removed by pressing Alt-Enter; however, I disliked having to do this each time I started the terminal. Quake opens without the activity bar.  2. You can't create tabbed terminal windows in Terminal. Quake lets you create tabs with C-t and switch between them with C-left/right.  3. The default Terminal "paste" is mouse-3 (which doesn't exist unless you are using a 3-button mouse!). Quake lets you do a paste using either C-S-v or mouse-2.
 * [|Upgraded] to build 653: I initially had some wifi issues but these were resolved by upgrading to the latest stable build. A word of caution: upgrades wipe out your custom installs (e.g. - anything you used "yum install xxx" to install as well as anything that is not in your home directory). Therefore, it's a good idea to set up a script that you can run after an upgrade to re-install all of your customizations.
 * [|Installed the Opera browser] : The customized Firefox browser that comes with the XO is well-suited for collaborative learning; however, it is missing a lot of "standard" browser functionality. In the future, I might drop Opera and move to either [|Firefox] or [|SeaMonkey].
 * Installed Emacs: I "live" in Emacs most of the time, so I had to have Emacs on the XO. This was as simple as "yum install emacs"; however, I soon discovered a number of issues:
 * Installed the [|Quake terminal] : The standard Terminal Activity that comes with the XO is a bit limited. Here are some of the limitations and a description of what Quake provides:
 * Installed [|mplayer] : The video player that OLPC provides only plays [|OGG] videos. Although this is keeping with the OLPC philosophy of support for open standards and software, the reality is that most audio and video content is in non-free formats, so I installed mplayer.
 * Installed some development utilities: Some basic stuff for programming with Lisp and C:

·  yum install gcc

·  yum install glibc-headers

·  yum install make

·  yum install texinfo

·  yum install cvs

·  yum install sbcl

cvs -d :pserver:anonymous:anonymous@common-lisp.net:/project/slime/cvsroot co slime


 * I setup my .emacs file as follows (basically, just some standard customizations that I normally do plus some basic setup for CL and elisp programming):

·  ;;

__ ·   ;;;; Directories

·  (defvar home-dir (concat (expand-file-name "~") "/"))

·  (push (concat home-dir "elisp") load-path)

·  (push (concat home-dir "elisp/slime") load-path)

·  (push (concat home-dir "elisp/slime/contrib") load-path)

·  (push (concat home-dir "projects/emacs/info") Info-default-directory-list)

·  (push (concat home-dir "elisp/info") Info-default-directory-list) ·  ;;__

·  ;;;; System Customizations

·  (require 'cl)

·  (defconst use-backup-dir t)

·  (setq backup-directory-alist (quote ((".*". "~/.backups/")))

·   version-control t  ; Use version numbers for backups

·   kept-new-versions 16  ; Number of newest versions to keep

·   kept-old-versions 2  ; Number of oldest versions to keep

·   delete-old-versions t ; Delete excess backup versions

·   history-delete-duplicates t ; Delete dups in history

·   history-length 100 ; Larger history size than default 30

·   inhibit-splash-screen t ; No initial splash screen

·   dired-listing-switches "-l" ; Don't display dot files

·   dired-recursive-deletes 'top ; Recursive deletes

·   dired-recursive-copies 'top ; Recursive copies

·   backup-by-copying-when-linked t) ; Copy linked files, don't rename

·  (fset 'yes-or-no-p 'y-or-n-p) ;replace y-e-s by y

·  ;; Conventional mouse/arrow movement & selection

·  (pc-selection-mode)

·  (delete-selection-mode t)

·  ;; Display overrides

·  (show-paren-mode 1)

·  (tool-bar-mode nil)

·  (menu-bar-mode nil)

·  (iswitchb-mode)

·  ;; Global key overrides

·  (global-set-key [(control c) (F)] 'ffap)

·  (global-set-key [(control c) (j)] 'join-line)

__ ·   ;;;; Programming - Common Lisp

·  ;; Specify modes for Lisp file extensions

·  (setq auto-mode-alist

·   (append '(

·   ("\.lisp$" . lisp-mode)

·   ("\.lsp$" . lisp-mode)

·   ("\.cl$" . lisp-mode)

·   ("\.asd$" . lisp-mode)

·   )auto-mode-alist))

·  (require 'slime-autoloads)

·  (eval-after-load "slime"

·   '(progn  ·     slime-complete-symbol*-fancy t

·   slime-complete-symbol-function 'slime-fuzzy-complete-symbol

·   slime-when-complete-filename-expand

·   slime-truncate-lines nil

·   slime-autodoc-use-multiline-p t)

·   (slime-setup '(slime-fancy slime-asdf))

·   (define-key slime-repl-mode-map (kbd "C-c ;") 'slime-insert-balanced-comments)

·   (define-key slime-repl-mode-map (kbd "C-c M-;") 'slime-remove-balanced-comments)

·   (define-key slime-mode-map (kbd "C-c ;") 'slime-insert-balanced-comments)

·   (define-key slime-mode-map (kbd "C-c M-;") 'slime-remove-balanced-comments)

·   (define-key slime-mode-map (kbd "RET") 'newline-and-indent)

·   (define-key slime-mode-map (kbd "") 'newline-and-indent)

·   (define-key slime-mode-map (kbd "C-j") 'newline)))

·  (add-hook 'lisp-mode-hook (lambda

·   (cond ((not (featurep 'slime))

·   (require 'slime)

·   (normal-mode)))

·    (modify-syntax-entry ?- "w")))

·  ·   ;;;; Programming - Elisp

·  (add-hook 'emacs-lisp-mode-hook

·    ·     (interactive)

·    (define-key emacs-lisp-mode-map (kbd "RET") 'newline-and-indent)

·    (define-key emacs-lisp-mode-map (kbd "") 'newline-and-indent)

·    (define-key emacs-lisp-mode-map (kbd "C-j") 'newline)

·    (require 'eldoc)

·    (turn-on-eldoc-mode)

·    (modify-syntax-entry ?- "w"))) ; now '-' is not considered a word-delimiter

·  ;;      __

·  ;;;; Initial buffer

(find-file "~/")


 * I setup my .bashrc file as follows (basically just a custom prompt (so that I can easily see when I'm 'root') and some shortcuts):

·  if [ "$INSIDE_EMACS" ]; then

·   export PS1='\w \$ '

·  else

·   PS1error='$( ret=$? ; test $ret -gt 0 && echo "\[\e[41;93m\] [$ret] \[\e[0m\]" )'

·   PS1user='$( test `whoami` == root && echo "\[\e[101m\]root:" )\[\e[0m\]'

·   PS1color='\[\e[1;37;44m\]' # color of working directory

·   PS1="$PS1error$PS1color\w\[\e[0m\] $PS1user$ "

·   export PS1

·  fi

·  export PATH=~/bin:/sbin:/usr/sbin:/usr/local/sbin:$PATH

·  alias ll='ls -l'

·  alias la='ls -la'

·  ·   alias gf='grep-find'

·  alias ff='firefox &'

 1. [|Disabled the automatic border that appears when the mouse pointer touches the sides of the screen]  2. [|Custom ordering of activities in the dock]  3. [|Disabling Alt-Tab to the Journal activity] There are a few things that I still need to do in the next week or so:
 * Fixed a few "minor" annoyances:
 * Get a good PDF viewer. The one that comes with the XO can only be started from the Journal activity (I dislike using the Journal and most of the PDF documents that I would have on the XO wouldn't be accessible from the Journal) and it seems to "choke" on large PDF documents. I tried installing xpdf (using "yum install xpdf"), but the install didn't work. Since I didn't need to have a PDF viewer for the stuff I was doing last week, I just deferred trying to work out what the issues were. I would appreciate it if someone could suggest a PDF viewer that they've been able to successfully install on the XO.
 * I still haven't decided whether to stick with the Opera browser or swap to [|Firefox] or [|SeaMonkey] . Apparently, you have to edit the "/etc/yum.repos.d/olpc-koji-ship2.repo" file to remove firefox/seamonkey from the exclude list at the bottom of the file so that you can use yum to install them.
 * I'm planning to [|install Xubuntu] on a USB stick or SD card. Although I currently intend to keep Sugar as the default UI and Fedora as the default OS, I would like to try out Xubuntu as an alternative as well.
 * I've ordered a [|D-Link USB Ethernet adapter] so that I can use a wired connection with my XO when wifi isn't available.
 * I've setup emulated XO environments on my MacBook Pro using both [|Parallels] and [|QEMU] (Parallels is a commercial product and QEMU is OSS). The Parallels setup seems to run faster but is more complicated to setup and the Internet connection doesn't work. QEMU seems slower but is much easier to setup and the Internet connection does work. Apparently, the OLPC developers mostly use QEMU (the screenshot above is XO build 653 running under QEMU). I'll have to see whether I prefer developing on an Emulated XO or directly on the XO itself. When I'm at home, I have the XO setup as in the picture above - on the document tray of my laptop stand, nicely positioned below the MacBook display. I can easily swap the USB cable (one cable since the USB mouse is connected to the [|Kinesis] keyboard) when I want to switch to/from the MacBook and the XO.