|
Tuesday I decided to migrate from xfwm to openbox because xfwm was crashing too frequently. I always liked the clean interface of xfce but wanted to give a try to openbox. Openbox is simply wonderfull!! I like it very much. The problem is that openbox has no panel or desktop functionality. So I found myself with a real fast environment (after login it took 2 to 3 seconds to be up and running) but without menu/panels. I decided to stick with xfce-panel because I like the easiness of editing it offers and also the number of plugins available. The only thing I was missing were the wallpapers. So I wrote a little app to change them randomly! You can find this app in the Code section, its called changebg! It is a simple application but it does the work. Ok, now a little resume of what I did to get it all working. I’m using Debian lenny so installation was just an apt-get install openbox . I suggest also installing obconf so you can configure themes, settings and much more just right-clicking on the background and selecting ObConf. Then you must configure openbox for your user. The files you are looking for are under ~/.config/openbox/ . If autostart.sh or menu.xml are not there you can copy them from /etc/xdg/openbox . This is the file modified by ObConf. The only thing you cannot set with ObConf are shortcuts but you probably want to set them. Just look for the < keybord > part and you will see a couple of examples. I personally added tons of shortcuts: eg. Just for reference: W = windows key, A = Alt , C = Ctrl This script is launched when you login. Make sure it is executable. I added just few lines to launch xfce-panel and changebg: I created /var/wallpapers and made it a public directory using the sticky bit (so more user can share and add wallpapers… otherwise it would be boresome). Then copied the changebg.sh and the changebg program under /usr/local/bin. changebg.sh starts changebg every minute unless a file called “changebg.disable” exists under ~/.config/ (I added this feature because I wanted an easy way to deactivate it). The main problem I faced was that some images were small and I didn’t want them stretched. So I added those defines to the source: So now I have a randomic wallpaper every minute! Minor fix: This setup was working but I couldn’t shutdown the computer because the action button on xfce panel didn’t worked anymore. So I added my user to sudoers with a nopasswd on shutdown, and added two launchers to the panel. Easy fix. Ok, that’s all, now I have my new enviroment!
On a lark (not a lart) I decided to waste a few minutes and installed the Debian funny-manpages and asr-manpages .deb packages. I tried the obvious Some quick digging into To save you the work and serve up the funny, I’ve posted them here.
1432 Elevator Model (on CD) Appendix H 111 112 // get current Door on Floor 113 Door currentFloorDoor = location.getDoor(); 114 115 // determine if Door on Floor is open 116 try { 117 118 boolean doorOpen = currentFloorDoor.isDoorOpen(); 119 120 // if Door on Floor is closed 121 if ( !doorOpen ) { 122 123 // press Floor Button 124 sendPersonMoveEvent( PERSON_PRESSING_BUTTON ); 125 pauseThread( 1000 ); 126 127 // register for Floor Door’s doorOpen event 128 this ); 129 130 // press Floor’s Button to request Elevator 131 Button floorButton = getLocation().getButton(); 132 floorButton.pressButton( getLocation() ); 133 134 // wait for Floor’s Door to open 135 sleep( TIME_WAITING ); 136 137 // unregister with Floor’s Door if too long 138 this ); 139 } 140 141 // if Door on Floor is open, ride Eelevator 142 else 143 enterAndRideElevator(); 144 } 145 146 // handle exception when interrupted from waiting 147 catch ( InterruptedException interruptedException ) { 148 149 // Person unregisters for Floor’s Door doorOpen event 150 this ); 15 15 // enter and ride Elevator when Door on Floor opens, 15 pauseThread( 1000 ); 15 enterAndRideElevator(); 15 } 15 15 // waiting for Elevator’s Door to open takes a second 15 pauseThread( 1000 ); 15 160 // begin walking away from Elevator 161 setMoving( true ); 162 Fig. H.13 Class Personrepresents the Personthat rides the Elevator. The Personoperates asynchronously with other objects (part 4 of 7).
|
|