On Thu, Nov 12, 2009 at 9:57 AM, Jim Peterson <jim.sokytec...@gmail.com> wrote: > > Hi guys, > > I ran across something useful this morning in fixing a kiosk-type > system. This is a machine that I spec'd to be an always-on, > Firefox-is-the-only-thing-you-can-run desktop for our library to use as > a card catalog system. The problem was that this morning when I booted > it, Firefox opened in a box about 1.5" square in the upper left corner > of the screen. Not usable, and since firefox is invoked at startup, > there are no controls available to drag it to size or maximize or > minimize the window. > > This machine runs on Xubuntu Karmic since I only need a light window > manager, and has been stripped of nearly all the fluff with which *buntu > comes installed. Adding to the pain, Karmic (and Jaunty, I believe) do > things a little different than prior versions, with no /etc/inittab to > edit. My solution: edit the 'exec' line in > the /etc/X11/Xsession.d/99x11-common_start script, and add a bit of > JavaScript to help. By default, the line reads: > > exec $STARTUP > > which boots the standard startup scripts, something we don't want to > happen in this case. All I wanted was for X to start and run Firefox, > with the Firefox window maximized. So now the line reads: > > exec firefox javascript:%20resizeTo\(1024,768\) > > which works perfectly. It invokes Firefox rather than the usual startup > scripts, and through JavaScript's resizeTo function, forces the window > to open at 1024 x 768. > > I don't know if this method would work on earlier versions of *buntu or > Debian & derivatives, but I would imagine that any invoked startup > program could be sized out this way if it can process the JS command. > > Jim Peterson > Technology Coordinator > Goodnight Memorial Library > 203 S. Main St. > Franklin, KY 42134 > (270) 586-8397 > www.gmpl.org > Tweet me @GMLGeek > Library Technology Blog > >
You've hit on one of my favorite features of Firefox: The ability to take command line arguments. I use this to ssh into my home machine and open a url that I might want to view later. #!/bin/bash #Script to load a url in a new Firefox tab. Works remotely. webpage="http://www.google.com/" if [ $# = 1 ]; then webpage="$1" fi DISPLAY=:0 export DISPLAY HOME=/home/donalddelp export HOME firefox --remote "openurl($webpage ,new-tab)" --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "NLUG" group. To post to this group, send email to nlug-talk@googlegroups.com To unsubscribe from this group, send email to nlug-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en -~----------~----~----~----~------~----~------~--~---