Fluxbox on the eee.

As is true of many linux users, I like things to be simple, functional and consistent. In the 5 or so years I have been a linux user I have migrated between many distro’s and tried many different window managers. For me to be truly at home though, my system needs to be .deb based (there is nothing ‘yum’ about .rpm’s) and run fluxbox.

Although xandros is new to me, it meets my first criteria. Although the default interface (and even Advanced mode) will be fine for most users, I still found that something was missing… Thanks to apt, I knew (hoped) it would be trivial to install and configure fluxbox, and I’d be right at home.

Firstly, the xandros repository needs to be added to the sources list:

sudo su
echo deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free >> /etc/apt/sources.list

Next, we update these changes and install a few packages:

apt-get update
apt-get install fluxbox fluxconf

Once fluxbox is installed, we need to be able to start it. There are two files that control the startup of the window manager on the eee:

/usr/bin/startsimple.sh   /usr/bin/startfull.sh

startsimple.sh is started each time your eee starts up, and depending on your last login, startfull.sh may be run if the eee is to start in Advanced mode. To run fluxbox, we will need to replace startsimple.sh with a script to start fluxbox.

To allow me to easily switch between the two, I made a script that will toggle between the default and fluxbox. firstly, a few things must be set up though (Are you still root?):

cp /usr/bin/startsimple.sh /usr/bin/simple.sh
kate /usr/bin/flux.sh

Paste the following (Thanks to http://wiki.eeeuser.com/howto:getfluxbox)

#!/bin/shsudo /usr/bin/sessreg -d -l :0.0 -u /var/run/utmp user
xhost + si:localuser:root # Allow local user root only to access the diplay
sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user
(sleep 8; /opt/xandros/bin/start_netserv) &
(sleep 16; /usr/local/bin/asusosd) &
sudo rm /tmp/nologin
[ -f /usr/bin/dispwatch ] && /usr/bin/dispwatch &
exec fluxbox

Save and exit the editor.

kate /usr/bin/switchwm.sh

Paste the following:

if ! [ -f /home/user/.doflux ]; then
        sudo cp /usr/bin/flux.sh /usr/bin/startsimple.sh
        touch /home/user/.doflux
        echo Starting in FluxBox on next reboot
else
        sudo cp /usr/bin/simple.sh /usr/bin/startsimple.sh
        rm /home/user/.doflux
        echo Starting in Simple Mode on next reboot
fi

Save and exit the editor.

chmod +x /usr/bin/switchwm.sh

Now, you can toggle between the original WindowManager and fluxbox by typing:

switchwm.sh

at a command prompt. The WM will change on the next reboot, but that takes less than 30 seconds on our spiffy new eee’s, doesn’t it :).

Now all that’s left to do is to configure fluxbox to suit our eee a little more. Firstly, you will want to make the battery, volume and network monitor apps to run on startup. Open a new console (or drop root privaledges) and do the following:

kate ~/.fluxbox/apps

Paste the following (Thanks to http://wiki.eeeuser.com/howto:getfluxbox)

[startup] {networkmonitor ath0 eth0}
[startup] {powermonitor}
[startup] {wapmonitor}
[startup] {minimixer}

Save and exit the editor.

Next, we need to modify our menu. Although it tries it’s hardest, the default menu created when fluxbox is installed is atrocious. I have created one that contains most of the major software (minus the games, and links to sites such as wikipedia, etc…) that comes preinstalled. Here is mine (feel free to change it to suit yourself):

sudo kate /etc/X11/fluxbox/fluxbox-menu

Paste the following:

[begin] (Fluxbox)
   [exec] (Bash) { x-terminal-emulator -T “Bash” -e /bin/bash –login} <>
   [exec] (Firefox) {/usr/bin/firefox} <>
   [separator]
   [submenu] (OpenOffice) {}
      [exec] (OpenOffice.org Writer) {/usr/bin/oowriter} </usr/share/icons/gnome
/32×32/apps/openofficeorg-20-writer.xpm>
      [exec] (OpenOffice.org Calc) {/usr/bin/oocalc} </usr/share/icons/gnome/32x
32/apps/openofficeorg-20-calc.xpm>
      [exec] (OpenOffice.org Impress) {/usr/bin/ooimpress} </usr/share/icons/gno
me/32×32/apps/openofficeorg-20-impress.xpm>
      [exec] (OpenOffice.org Math) {/usr/bin/oomath} </usr/share/icons/gnome/32x
32/apps/openofficeorg-20-math.xpm>
      [exec] (OpenOffice.org Draw) {/usr/bin/oodraw} </usr/share/icons/gnome/32x
32/apps/openofficeorg-20-draw.xpm>
      [exec] (OpenOffice.org Base) {/usr/bin/oobase} </usr/share/icons/gnome/32x
32/apps/openofficeorg-20-base.xpm>
   [end]
   [submenu] (Applications) {}
      [exec] (Bash) { x-terminal-emulator -T “Bash” -e /bin/bash –login} <>
      [exec] (amaroK) {/usr/bin/amarok} <>
      [exec] (SMPlayer) {/usr/bin/smplayer} <>
      [exec] (Acrobat Reader) {/usr/bin/acroread} <>
      [exec] (KGhostView) {/usr/bin/kghostview} <>
      [exec] (Kate) {/usr/bin/kate} <>
      [exec] (KCalc) {/usr/bin/kcalc} <>
      [exec] (KolourPaint) {/usr/bin/kolourpaint} <>
      [exec] (Konqueror) {/usr/bin/konqueror –profile webbrowsing} <>
      [exec] (KSnapshot) {/usr/bin/ksnapshot} <>
   [end]
   [submenu] (Net) {}
      [exec] (Firefox) {/usr/bin/firefox} <>
      [exec] (Pidgin) {/usr/bin/pidgin} <>
      [exec] (Skype) {/usr/bin/skype} <>
      [exec] (Krdc) {/usr/bin/krdc} <>
      [exec] (Krfb) {/usr/bin/krfb} <>
    [end]
   [submenu] (System) {}
      [exec] (fluxconf) {/usr/bin/fluxconf} <>
      [exec] (fluxkeys) {/usr/bin/fluxkeys} <>
      [exec] (fluxmenu) {/usr/bin/fluxmenu} <>
      [exec] (KControl) {/usr/bin/kcontrol} <>
      [exec] (KDE System Guard) {/usr/bin/ksysguard} <>
      [exec] (KFind) {/usr/bin/kfind} <>
      [exec] (Kicker) {/usr/bin/kicker} <>
      [exec] (KPrinter) {/usr/bin/kprinter} <>
      [exec] (Synaptic Package Manager) {/usr/bin/su-to-root -X -c /usr/sbin/syn
aptic} <>
   [end]
   [separator]
   [config] (Configuration)
   [submenu] (Styles) {}
      [stylesdir] (/usr/share/fluxbox/styles)
      [stylesdir] (~/.fluxbox/styles)
   [end]
   [workspaces] (Workspaces)
   [reconfig] (Reconfigure)
   [restart] (Restart)
[end]

Save and exit the editor.

Lastly there are a few settings I’ve change, such as auto-hiding the toolbar, setting its width to 100%, changing to a nicer theme, etc… Rather than pick out my changes, here is my config file:

kate ~/.fluxbox/init

Paste the following:

session.screen0.window.focus.alpha:     255
session.screen0.window.unfocus.alpha:   255
session.screen0.overlay.lineWidth:      1
session.screen0.overlay.lineStyle:      LineSolid
session.screen0.overlay.joinStyle:      JoinMiter
session.screen0.overlay.capStyle:       CapNotLast
session.screen0.menu.alpha:     255
session.screen0.iconbar.deiconifyMode:  Follow
session.screen0.iconbar.iconTextPadding:        10l
session.screen0.iconbar.iconWidth:      70
session.screen0.iconbar.wheelMode:      Screen
session.screen0.iconbar.alignment:      Relative
session.screen0.iconbar.usePixmap:      true
session.screen0.iconbar.mode:   Workspace
session.screen0.toolbar.onhead: 0
session.screen0.toolbar.height: 0
session.screen0.toolbar.tools:  workspacename, prevworkspace, nextworkspace, iconbar, systemtray, prevwindow, nextwindow, clock
session.screen0.toolbar.placement:      BottomCenter
session.screen0.toolbar.onTop:  False
session.screen0.toolbar.layer:  Top
session.screen0.toolbar.maxOver:        false
session.screen0.toolbar.alpha:  255
session.screen0.toolbar.visible:        true
session.screen0.toolbar.widthPercent:   100
session.screen0.toolbar.autoHide:       true
session.screen0.tab.placement:  Top
session.screen0.tab.rotatevertical:     True
session.screen0.tab.height:     16
session.screen0.tab.width:      64
session.screen0.tab.alignment:  Left
session.screen0.slit.direction: Vertical
session.screen0.slit.alpha:     255
session.screen0.slit.onhead:    0
session.screen0.slit.maxOver:   false
session.screen0.slit.placement: BottomRight
session.screen0.slit.autoHide:  false
session.screen0.slit.onTop:     False
session.screen0.slit.layer:     Dock
session.screen0.windowScrollReverse:    false
session.screen0.clickRaises:    true
session.screen0.windowMenu:
session.screen0.colPlacementDirection:  TopToBottom
session.screen0.windowPlacement:        RowSmartPlacement
session.screen0.focusModel:     ClickFocus
session.screen0.focusLastWindow:        true
session.screen0.showwindowposition:     true
session.screen0.imageDither:    false
session.screen0.menuMode:       Delay
session.screen0.desktopwheeling:        true
session.screen0.workspaceNames: one,two,three,four,
session.screen0.resizeMode:     Bottom
session.screen0.autoRaise:      false
session.screen0.antialias:      true
session.screen0.decorateTransient:      false
session.screen0.workspacewarping:       true
session.screen0.menuDelayClose: 0
session.screen0.edgeSnapThreshold:      0
session.screen0.tabFocusModel:  ClickToTabFocus
session.screen0.followModel:    Ignore
session.screen0.workspaces:     4
session.screen0.menuDelay:      0
session.screen0.fullMaximization:       false
session.screen0.strftimeFormat: %l:%M
session.screen0.windowScrollAction:
session.screen0.opaqueMove:     false
session.screen0.focusNewWindows:        true
session.screen0.sloppywindowgrouping:   true
session.screen0.rootCommand:
session.screen0.rowPlacementDirection:  LeftToRight
session.titlebar.left:  Stick
session.titlebar.right: Minimize Maximize Close
session.useMod1:        true
session.keyFile:        ~/.fluxbox/keys
session.tabsAttachArea: Window
session.ignoreBorder:   false
session.numLayers:      13
session.imageDither:    True
session.slitlistFile:   ~/.fluxbox/slitlist
session.tabs:   true
session.cacheLife:      5l
session.styleFile:      /usr/share/fluxbox/styles/Nyz
session.colorsPerChannel:       4
session.tabPadding:     0
session.forcePseudoTransparency:        false
session.menuFile:       ~/.fluxbox/menu
session.cacheMax:       200l
session.focusTabMinWidth:       0
session.appsFile:       ~/.fluxbox/apps
session.autoRaiseDelay: 250
session.opaqueMove:     False
session.groupFile:      ~/.fluxbox/groups
session.iconbar:        true
session.doubleClickInterval:    250

Save and exit the editor.

So, that’s it. You’ll now have a working and usable fluxbox install!

A few things for new users before you go (yes, I know this article is rather long… Almost done, I swear.):

> By middle click (left+right click) dragging the top of a window, and dropping it onto another window’s, the two merge and become ‘tabbed’. If you alt+tab when the window has focus, you will switch tabs, not windows.
> alt+f1 to alt+f4 switch between the 4 workspaces. Windows can be dragged from one to the next by dragging past the edge of the screen.
> The fluxbox desktop is not used for icons, etc… Get used to using konqeror/whatever and storing things in your home directory! (I think it keeps things clean and uncluttered, but that’s just my opinion)

Although it may not suit everyone, fluxbox is a light and clean WindowManager which, if given the time, I’m sure you will come to love! So, give it a try and comment on any other tips you have for users (both new and old).

Comments (8)

  1. kevwalker wrote:

    First off - thanks for the post…I personally love this window manager.
    But when I set up to switch between easy mode and the fluxbox environment - startup gets stuck in a loop. I never get to either desktop, and have to start my Recovery Console in order to restore startsimple.sh from my backup.
    Any thoughts?

    Wednesday, February 13, 2008 at 3:05 pm #
  2. Sherman wrote:

    Ok, the first thing I suggest doing is backing up startsimple.sh then overwrite it with the script I use for flux.sh. We’ll make sure that fluxbox starts fine by itself, etc… and move from there?
    Also, in a terminal type ‘whoami’. Is your username still ‘user’? (you havent changed it, have you?)

    So, if you’ve just recovered:
    Add repositories.
    sudo su
    apt-get install fluxbox fluxconf
    mv /usr/bin/startsimple.sh /usr/bin/startsimple.sh.BAK
    kate /usr/bin/startsimple.sh

    ***** paste me in *****
    #!/bin/shsudo /usr/bin/sessreg -d -l :0.0 -u /var/run/utmp user
    xhost + si:localuser:root # Allow local user root only to access the diplay
    sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user
    (sleep 8; /opt/xandros/bin/start_netserv) &
    (sleep 16; /usr/local/bin/asusosd) &
    sudo rm /tmp/nologin
    [ -f /usr/bin/dispwatch ] && /usr/bin/dispwatch &
    exec fluxbox
    ***** end paste *****

    Save and exit.
    Restart your eee.

    You should have a running copy of fluxbox now. If not, we have issues ;) Granted, the menu will be all wrong and there’ll be a few other things not configured, but this will let us know if the problem lies in the install or configuration.

    Let me know if this works and we’ll work on it from there.

    Sherman

    Thursday, February 14, 2008 at 4:39 am #
  3. kevwalker wrote:

    thanks, I retraced my steps and got it working!
    now if only I can figure out how to build gkt-chtheme in fluxbox, i can switch up my default styles. and end up with something really pretty as a sleek option to easy mode.
    i can’t seem to build from an extracted tarball; make returns some funny errors.
    thanks for the guide, however, maybe next a guide on customizing fluxbox (crosses fingers)?

    Thursday, February 14, 2008 at 7:07 pm #
  4. kevwalker wrote:

    ooh, forgot to ask - can we add the switchwm.sh to the right-click menu as “Easy Mode” that way, we don’t have to invoke a terminal to switch managers. I suppose this could be a nice tray icon or shutdown menu option in easy mode as well, but will probably take a bit more work.

    Thursday, February 14, 2008 at 7:11 pm #
  5. kevwalker wrote:

    okay, i was wrong - this worked switching from fluxbox to easy mode, but not the other way around. after running switchwm.sh from easy mode, in order to switch to fluxbox, and rebooting, X gets caught in a loop and keeps restarting. i can see the cursor for half a second and then it reboots again.

    Friday, February 15, 2008 at 5:56 am #
  6. kevwalker wrote:

    I fixed it by replacing the contents of flux.sh with:

    ***code***
    sudo /usr/bin/sessreg -d -l :0.0 -u /var/run/utmp user
    xhost + si:localuser:root # Allow local user root only to access the diplay

    sudo /usr/bin/sessreg -a -l :0.0 -u /var/run/utmp user
    [ -f /usr/bin/dispwatch ] && /usr/bin/dispwatch &
    for i in /sys/block/s[dr]?/uevent ; do
    sudo /bin/sh -c “echo add > $i”
    done
    (sleep 8; /opt/xandros/bin/start_netserv) & #added
    (sleep 16; /usr/local/bin/asusosd) & #added
    sudo rm -f /tmp/nologin #changed
    exec fluxbox
    ***code***

    is there any problem with the above? it works for me.

    Friday, February 15, 2008 at 6:10 am #
  7. sean tilson wrote:

    i know it was a bit stupid, but i went through and did all of the main entry and got the same error. i could not figureoout how to fix it, and ended up restoring to factory settings. Then i went and tried to update my repos again like before, regarding codecs and downgrading the mplayer, but those did not work at all, could not find the install for 1.0~rc—etc as per the wiki on the subject. the first time i tried to go through all of this i could not get the fluxconf, couldnt find it, like i cant find the mplayer downgrade now. any ideas? also, what is the status of this upgrade proceedure, what steps do i follow when? i am very anxious for a reply, i followed the wiki on how to switch to fluxbox, but i am completely new to linux nd so i could not figure out how to navigate the thing. I look forward to your reply!

    Tuesday, February 19, 2008 at 5:12 am #
  8. Mask wrote:

    A little question for you, but i can’t get fluxbox’s slit to go right or left on my eeepc, only top or bottom. Any hints?

    Friday, March 7, 2008 at 11:11 am #