Author Topic: Fluxbox Install How-to  (Read 8633 times)

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Fluxbox Install How-to
« on: July 23, 2009, 10:29:04 am »
Here's my simple how-to for installing Fluxbox on an N810 with Mer. N800 users may want to stay away, as this disables the built-in keyboard.

1. Install and remove some packages:

Code: [Select]
sudo apt-get remove osso-xterm
sudo apt-get install fluxbox xterm

2. Make Fluxbox start up instead of Hildon stuff:

Code: [Select]
sudo rm /etc/alternatives/x-session-manager
sudo cp /usr/bin/startfluxbox /etc/alternatives/x-session-manager

3. Edit some files for usability:

Code: [Select]
#~/.fluxbox/keys

#Fullscreen button on top and window-switch button on face
F16 :NextWindow
Shift F6 :FullScreen

# fullscreen button, -, and + (in that order); chenges mouse buttons
F6 :exec xmodmap -e "pointer = 1 2 3";xsetroot -cursor_name left_ptr
F8 :exec xmodmap -e "pointer = 3 2 1";xsetroot -cursor_name right_ptr
F7 :exec xmodmap -e "pointer = 2 1 3";xsetroot -cursor_name hand2

#Requires chmodding, not necessary if you don't FUBAR / uninstall all of the Hildon stuff
Shift F7 :exec echo  0 > /sys/class/leds/keyboard/brightness
Shift F8 :exec echo 30 > /sys/class/leds/keyboard/brightness

Control Mod1 Left :PrevWorkspace
Control Mod1 Right :NextWorkspace

# click on the desktop to get menus
#Very nice to not have to change mouse buttons
OnDesktop Mouse1 :HideMenus
OnDesktop Double Mouse1 :RootMenu

#whatever else you want to stick here

Code: [Select]
! ~/.Xmodmap
! A little strange, but more usable than the default

clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5

! Top row
keycode 24 = q Q 1 F1
keycode 25 = w W 2 F2
keycode 26 = e E 3 F3
keycode 27 = r R 4 F4
keycode 28 = t T 5 F5
keycode 29 = y Y 6 F6
keycode 30 = u U 7 F7
keycode 31 = i I 8 F8
keycode 32 = o O 9 F9
keycode 33 = p P 0 F10

! Middle row
keycode 38 = a A exclam exclam
keycode 39 = s S quotedbl quotedbl
keycode 40 = d D  at at
keycode 41 = f F numbersign numbersign
keycode 42 = g G backslash backslash
keycode 43 = h H slash slash
keycode 44 = j J parenleft parenleft
keycode 45 = k K parenright parenright
keycode 46 = l L asterisk asterisk
keycode 48 = slash apostrophe question question

! Bottom row
keycode 52 = z Z grave grave
keycode 53 = x X asciicircum asciicircum
keycode 54 = c C asciitilde asciitilde
keycode 55 = v V percent percent
keycode 56 = b B ampersand ampersand
keycode 57 = n N dollar dollar
keycode 58 = m M bar bar
keycode 47 = semicolon colon
keycode 20 = minus quotedbl underscore underscore
keycode 21 = plus numbersign equal equal

! Others (backspace, return, etc.)
keycode 22 = BackSpace
keycode 36 = Return
keycode 50 = Shift_L
keycode 105 = Control_L
keycode 60 = period greater bracketright braceright
keycode 59 = comma less bracketleft braceleft
keycode 65 = space
keycode 135 = Alt_L
keycode 108 = Mode_switch

! Keypad, menu, and screen keys
keycode 70 = Tab
keycode 104 = Return
keycode 111 = Up Prior
keycode 114 = Right End
keycode 116 = Down Next
keycode 113 = Left Home
keycode 71 = F16
keycode 9 = Escape


add mod1 = Alt_L
add mod2 = Mode_switch

Code: [Select]
# ~/.fluxbox/startup

#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.

# Change your keymap:
xmodmap ~/.Xmodmap

gksudo nm-applet &
xterm &

#Left and down don't autorepeat by default
xset r 116 &
xset r 113 &
#gksudo /etc/init.d/ssh start &

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.

exec fluxbox

4. Reboot

Code: [Select]
sudo reboot
You should boot into Fluxbox after that.

EDIT: Added N810 package (eg, compiled with N810 CFLAGS)

EDIT2: Corrected the path for x-session-manager
« Last Edit: July 24, 2009, 10:48:59 am by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

mars

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Fluxbox Install How-to
« Reply #1 on: July 23, 2009, 10:38:41 am »
 Thanks! I'll try this out later today and let you know how it goes.
C-3100 (reaquainting myself with Cacko) / Nokia 810 / Nokia N800 / Asus eeePC
Previously owned: SL-5500 / SL-5600 / SL-6000L / C-860 / Nokia 770 / Pepperpad 3

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Fluxbox Install How-to
« Reply #2 on: July 23, 2009, 10:40:30 am »
No problem. Note that there's now a .deb (no idea how much extra speed you get, but it can't hurt )
« Last Edit: July 23, 2009, 10:40:45 am by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

mars

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Fluxbox Install How-to
« Reply #3 on: July 24, 2009, 08:48:47 am »
Everything seemed to work on mer 0.15 and an N810, except for:

Code: [Select]
sudo rm /etc/default/x-session-manager
sudo cp /usr/bin/startfluxbox /etc/default/x-session-manager

There was no x-session-manager in /etc/default . So the N810 will still boot into hildon.

There was a start-hildon but putting the contents of starfluxbox in that file doesn't work.
C-3100 (reaquainting myself with Cacko) / Nokia 810 / Nokia N800 / Asus eeePC
Previously owned: SL-5500 / SL-5600 / SL-6000L / C-860 / Nokia 770 / Pepperpad 3

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Fluxbox Install How-to
« Reply #4 on: July 24, 2009, 10:39:34 am »
Hmm... I was doing that off the top of my head. You could try to just copy startfluxbox to /usr/bin/x-session-manager. That's where it needs to go anyway, but I figured I'd keep the symlink intact.

EDIT: It should be /etc/alternatives/x-session-manager
« Last Edit: July 24, 2009, 10:46:39 am by Capn_Fish »
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

mars

  • Full Member
  • ***
  • Posts: 145
    • View Profile
Fluxbox Install How-to
« Reply #5 on: July 24, 2009, 11:35:22 pm »
Quote from: Capn_Fish
EDIT: It should be /etc/alternatives/x-session-manager

That did the trick. It boots into fluxbox now. Thanks. One more quick question, before I go off to familiarize myself with fluxbox:

How would I set it up so that the network manager starts up with the system and docks on the toolbar? I can run nm-applet works from the command line which seems to work fine, but it might be more convenient to have it automatically show up.

Edit: Capn_Fish I see you added your write-up to the maemo mer wiki.  
« Last Edit: July 24, 2009, 11:48:09 pm by mars »
C-3100 (reaquainting myself with Cacko) / Nokia 810 / Nokia N800 / Asus eeePC
Previously owned: SL-5500 / SL-5600 / SL-6000L / C-860 / Nokia 770 / Pepperpad 3

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Fluxbox Install How-to
« Reply #6 on: July 25, 2009, 09:55:14 am »
Add it to your ~/.fluxbox/startup file (see the example above). You may also want to add it as "nopasswd" in /etc/sudoers.

Note that if you want it to remember keys, you also need to start gnome-keyring-something-or-other.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo