XFree run single program fullscreen?
I saw a thread (yes, I searched for a while for it) here a while ago which I thought was cool, but discounted it cuz I didn't have any specific use for it. Now I have to make a kiosk-type linux box which essentially runs mozilla ONLY. What I would like to know, from all you generous cognoscenti out there, is what the command is (assume I'm in a fresh install of Slackware for instance, where X does not start by default) to start X with a specific program as a parameter, causing it to run that program in full screen, no window decorations or anything. something like
/usr/X11R6/bin/X --prog=/opt/MozillaFirebird/MozillaFirebird though I know that's not what it was. Also, if there were some way to run it as a different user, so that I could somewhat securely add it to /etc/rc.d/rc.local, so when the power goes out and they have to restart the box it comes straight back to where it was. Thank you so much for any help in accomplishing this, LQ has given me so much information, I wish people would ask more questions I could answer! TIA B. |
This is not from the Kiosk-HOWTO, but here's what I do. Two files necessary.Prereq is a functioning /usr/X11R6/bin/startx which loads /etc/X11/xinit/xinitrc which in turn loads ~/.Xclients or ~/.Xclients-default.
1. Touch ~/.Xclients or ~/.Xclients-default. Add this: Code:
test -f $HOME/.wm_style && WMSTYLE=$(cat $HOME/.wm_style | tr [A-Z] [a-z]) 2. Now "echo qw > ~/.wm_style; startx" loads QuakeWorld, "echo bb > ~/.wm_style; startx" loads BlackBox and anything else defaults to having a single xterm. "Startx" is either your basic alias to start X11 or a Bash script that takes care of presenting xinit the user and server args. I wish people would ask more questions I could answer! OK. Did you harden your boxen appropriately? |
Thank you, you may have saved my bacon.
Quote:
Thanks again, B. :D :D :D |
Very simple method:
Code:
X :1 |
wow, that IS easy. Thanks. Works perfectly.
B. |
A few points:
1) Don't put it in rc.local, make a script and call that script from inittab: that way it will restart if the user knows about ctrl-alt-backspace or something bad happens to the X server. 2) Remember to prefix it with a "su normaluser", but make sure that normaluser has some mozilla profiles and so forth. How much wiping you want to do in between usage sessions is purpose-dependant. 3) Think about hacking some stuff out of mozilla (XUL, so relatively trivial) - right now if the user clicks the little envelope or something, things can get rather confusing without a windowmanager running. 4) Don't forget that the user can still pretty much run arbitrary programs. It wouldn't take a world-class hax0r to produce a shell out of mozilla, probably. |
thanks much. I have made a VERY unprivileged user, and I had already messed with the browser.jar (I ended up using firebird) to remove context menus, bookmark support, the address bar (;)), and just about every keyboard command. I have been testing it, it seems that a ctrl-alt-backspace don't screw it up, and for some (very good) reason, X11 doesn't detach from the text console so that when it starts, if you ctrl-alt-f1 it shows you text console, but doesn't allow you to ctrl-c, ctrl-d, or log in (and the other consoles 2 through 6 have disappeared, but I probably sound like an idiot for pointing those things out). And as well the KB isn't even gon be connected, it uses a touchscreen and a mouse-only HTML/ECMAScript interface I made so this is all assuming someone brings a mouse and crowbar from home, breaks the metal housing for the box itself, plugs in a keyboard, and THEN tries those things. Unlikely I think.
oh and it's official, you guys saved my bacon. So thank you. I've answered 4 or 5 questions since posting this for karma. B. |
All times are GMT -5. The time now is 03:22 PM. |