Opera without Sugar

From OLPC
Revision as of 19:20, 14 June 2008 by Howcome (talk | contribs) (added more keyboard mappings)
Jump to: navigation, search

If you want to use your XO for surfing only, you can run the Opera browser without having to run Sugar. This page describes the steps involved. Note that you will lose the function keys and not be able to run the other OLPC activities. You will, however, be able to run other X applications in additions to Opera.

Remove Sugar

To prevent Sugar from starting up, edit /etc/inittab (as root) and comment out this line by adding '#' at the beginning:

x:5:respawn:/usr/sbin/olpc-dm

The line should therefore be:

#x:5:respawn:/usr/sbin/olpc-dm

The machine must be rebooted for the change to take effect. To revert the machine back to normal, remove the '#' and reboot.

Restart network

When the machine is rebooted with the modified /etc/inittab, Sugar will not be started. You will need to login through the tty interface. To get a login prompt, you may need to press ctrl-alt-f1. Login as root, no password is required.

The network must be restarted manually.

For example, these commands will open a connection through an access point with SSID foo:

/sbin/service NetworkManager stop
/sbin/service network stop
/sbin/iwconfig eth0 essid foo
/sbin/dhclient -1 eth0

After having restarted the network, you may want to login to the XO unit through SSH. To do so, first set a password for root:

$ passwd

Then you can login from another machine with a command like:

$ ssh root@10.0.0.101

The IP number to use is reported by the /sbin/dhclient command above.

Download Opera

Now you should download an RPM file with Opera. For example:

$ wget http://get.opera.com/pub/opera/linux/950/final/en/i386/static/opera-9.50.gcc4-static-qt3.i386.rpm

and install it:

$ rpm -i opera-9.50.gcc4-static-qt3.i386.rpm

Edit .xinitrc

To start Opera automatically when the X server is started, edit /root/.xinitrc in the home directory. The file can e.g. look like:

opera -geometry 1200x900+0+0 &
xsetroot -gray &
xterm -geometry 80x50+494+51 &
xmodmap ~/.xmodmap
twm

You can download this and other configuration files from [1], see below.


Start the X server

This command will start the X server and the applications listed in the .xinitrc file:

$ startx

Configuration files

To map keys into sensible positions for the XO, you can download a set of configuration files:

cd /root
wget http://people.opera.com/howcome/2008/olpc/opera-without-sugar.tar.gz
tar zvzf opera-without-sugar.tar.gz

The files are: .xinitrc, .twmrc, .xmodmap, olpc-keyboard.ini

Opera must be told about the last of these. Start opera and go to this address:

opera:config

Search for "keyboard" and give the location of the file as value

/root/olpc-keyboard-ini

By extracting these files, you achieve the following new mappings:

  1. magnifier key: view HTML source code
  2. F2: cycle to the left tab
  3. F3: cycle to the right tab
  4. F5-F8: select zoom level
  5. F9: backlight off
  6. F10: backlight on
  7. windows key: bring lowermost X window to front
  8. rectangle key: focus on address bar to open new URL
  9. wheel up: page up
  10. wheen down: page down
  11. circle game button: new tab
  12. v game button: zoom in
  13. x game button: delete tab
  14. square game button: zoom out

These new mappings come in additions to the many key mappings found in Opera.

Performance

To increase performance, Opera should probably be configured to run without disk caching. To turn it off, select

Tools->Preferences->Advanced->History and set Disk Cache to off.

Due to the high pixel density of the XO, you may want to set the zoom level to 150%.

View->zoom->150%