LTSP Internet kiosk project... one last thing holding back my success :(

Booty

Senior member
Aug 4, 2000
977
0
0
I've got ltsp installed and configured, 4 thin-clients network booting from it, etc etc... everything's happy. The last step is to have the clients boot straight to a web browser in full-screen mode so we effectively have a kiosk-mode running. I added a session to gdm for this and mozilla comes up, just as it should, but for some reason you can't type anything... no filling in text boxes, surfing to other pages, etc. Is this because there's no window manager loaded, or...? This is more or less the last issue holding this project back, so if anyone has any ideas, that'd be great.
 

Booty

Senior member
Aug 4, 2000
977
0
0
bump... Firefox and Mozilla both have the no-typing issue... Opera works, but the free version has ads and that's no good.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Huh. That's weird. I don't really know what ltsp is or understand your setup though. Not having a window manager loaded shouldn't hurt anything, but I have noticed mozilla flaking out with keyboard focus before. Maybe it's some sort of race condition? Maybe you could delay mozilla's startup by a second or two with a call to sleep?
 

Booty

Senior member
Aug 4, 2000
977
0
0
Originally posted by: BingBongWongFooey

Huh. That's weird. I don't really know what ltsp is or understand your setup though. Not having a window manager loaded shouldn't hurt anything, but I have noticed mozilla flaking out with keyboard focus before. Maybe it's some sort of race condition? Maybe you could delay mozilla's startup by a second or two with a call to sleep?


LTSP = Linux Terminal Server Project. It's used for setting up thin-client type networks. So ltsp sits on the 'server', a more powerful machine, and the thin clients boot from it using PXE or Etherboot... it uses NFS, so the clients (the workstations) can be completely diskless... no hard drive, floppy, cdrom, etc.
LTSP Home page

So if I'm going to delay mozilla's startup, what exactly do I need to add to that section in /etc/X11/xdm/XSession? Just add a line 'sleep() &'? I'm pretty new to a lot of this stuff and have mainly gotten all this running by looking off of how-tos and other people's config files posted on mailing lists... I'm about 3 days into the project, so I don't know a lot about how all this stuff works together. I'm assuming, though, that this part of it should work the same as if I was just setting it up without ltsp being involved, so... if I wanted a kiosk session for just a normal linux box, is that what I would add in the XSession file?
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
something like "sleep 2; mozilla", instead of just "mozilla" (where 2 is the number of seconds). Are you sure that keyboard input works on other apps?

edit: er, nevermind. forgot about what you said about opera
 

Booty

Senior member
Aug 4, 2000
977
0
0
nope, no dice... I even tried sleeping for 10 seconds just to make sure.

under the session in XSession I have

...
kiosk) #session name
sleep 10;
exec mozilla;
;;
next session)
etc...

Which gives me the behavior I want... if they exit the browser, it knocks them back out to the login screen. (Ideally, it'd just start up the browser again, but I'll work on that next). If I leave off the 'exec' before mozilla, it starts up the same, but if they exit the browser it goes ahead and loads gnome. I don't really understand why it does that, but that's what it does. Once gnome is started, I can run mozilla and everything works just fine.

And yeah, like I said, Opera works okay. I haven't tried any other browswers yet (going to try Konquerer next maybe), but it seems fairly safe to assume that it's an issue with Mozilla-based browsers. I'm also downloading Knoppix right now because apparantly ltsp is built in to the cd, so it would give me an alternate ltsp installation to test to see whether it's a problem with Red Hat 9 or just mozilla in general (I've used a couple different versions of mozilla as well).

Any other ideas?
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Do you have anything against running a window manager? Metacity by itself is pretty neutered, and can't do anything except draw window decorations. Hmm, actually, by default it does handle the key binding for bringing up the gnome "run" dialog, but you can disable that in gconf-editor somewhere (along with other keybindings). Anyways, you could do this:

kiosk) #session name
metacity &
exec mozilla;
;;

As for what "exec" does, type "help exec" in your shell and that should clear it up for ya.

And as for re-spawning mozilla when it gets closed, you could exec a script which launches mozilla in an infinite loop, although that could make it difficult to log out when you really want to. I imagine there's some way you could create a keybinding to launch gnome's session control thingie so that you could log out manually.

Also, be aware that in mozilla's preferences, you can tell it to launch any shell command for a given file type, so people could launch an xterm or something (I don't really know how locked down it needs to be).
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I reproduced the error with my setup.

My Session config was:

#!/bin/bash


exec /etc/X11/Xsession /usr/bin/mozilla-firebird

And that screwed mozilla up. Keyboard lost focus and such.

So I installed ratpoison, which is a completely minimalist window manager. It forces everything in full screen mode ALWAYS. Then you switch between fullscreen windows with a combination of ctrl-t + a keypunch. (much like emacs or pico style keycombos)
#!/bin/bash

/usr/bin/mozilla-firebird &
exec /etc/X11/Xsession /usr/bin/ratpoison

That worked. You can configure the keypunches to different keys to have people aviod accidently going to another window.

Also for the window closing stuff you can probably call Mozilla from a script with a infinate loop. Something like this:

while ps
do
/usr/bin/mozilla-firebird
sleep 10
done

That way you only have one instance of Mozilla going at once. The loop will wait for Mozilla command to finish, so when it does it simply restarts mozilla again.

Meta city may be a better choice though. Or maybe even something like twm, fluxbox, or even ion.

Also you will have to do something about pop ups and links that open a new window. So you'll have to configure something like "always open links in tabs." and don't forget the fullscreen (F11 key) mode so if you use a window'd manager you can have it fullscreen...

There are some of the more esoteric configs that you may want to look into for mozilla... you can find some extensive documentation at the mozilla website Hopefully something there will be helpfull.

PS....

Looks like their are extensions avaible for firebird that set up tabs for "single window browsing", but unfortunately I can't access the extensions website right now due to the current "period of heavy use". Some of those extensions aren't so hot, though. So you'd want to test before deploying them...

PPS.

here is a place were you can get tabbed extensions for firebird. I just installed them and it seems ok, but I don't know anything about the people who made the extensions..

Does seem to slow things down though. Which isn't good. I think their is a less heavy tabbed extesions aviable that may be more ideal.
 

OutHouse

Lifer
Jun 5, 2000
36,410
616
126
we tried the thin client thing a few years back. We used Netier machines and they were all POS's. i got hourly calls from the call center saying one of their work stations was "acting funny" after about 6 months we pulled out the PII's again and never looked back.
 

Booty

Senior member
Aug 4, 2000
977
0
0
I definately have nothing against running a window manager, I just figured if it could be done this way then I wouldn't even have to worry about locking down the window manager at all. The full version of Opera has a built-in kiosk mode that we might go ahead and try at some point in the future, but for now I'd like to get this working on our demo setup without paying for anything extra.

I'll definately give a window manager a try... I've read a lot of people doing this are using IceWM, but I'm a little more familiar with Fluxbox... I might just go ahead and try metacity first, though.

As for the browser, it will be running in a fullscreen kiosk-type mode, so users shouldn't have access to any of the menus what-so-ever. These things are going to go to only be able to access a couple sites, depending on what session we log them in under (either an application (as in job application) site or a testing site). So I am definately going to want to disable pretty much everything aside from the browser... hotkeys, etc. So the less of that stuff the window manager has built-in by default, the better.

I just need to make sure I can back out to the login screen when I want to switch sessions, but other than that if I can have a more or less constant full-screen browser, that's exactly what we want for this project. If I can have my cake and eat it too, I'm hoping to find a way to get the browser/workstation to 're-initialize' itself after being idle for xx minutes... I've read of some people pulling this off, but haven't gotten into attempting it yet.

Anyway, I'm going to go give a couple of those suggestions a try. It's still weird that Mozilla-based browser act like that (Konqueror worked, btw... is it based on Mozilla code at all?), but oh well... as long as the finished product works and is stable (and fully-compliant) I don't care how we get there. :)
 

Booty

Senior member
Aug 4, 2000
977
0
0
Here's another interesting little quirk... with both Opera and Konqueror I've discovered this... when I start an xsession with just the browser (I'm not specifying that it start in fullscreen mode from the config file yet), it works fine... I go to full screen, still fine... I go back to Windowed, and no typing, just like Mozilla. Go back to full screen and, what do ya know, I can type again. This is all way beyond my realm of expertise, but I just thought it was weird. Drag - can you duplicate this as well?
 

Booty

Senior member
Aug 4, 2000
977
0
0
Thanks for all the help so far guys... here's where we're at...

Running metacity fixed the keyboard issue with Mozilla/firefox, so that's all good. That simple script drag posted also works fine for respawning the browser if the user ends up finding some way to close it. Cool.

Here's the rest of my 'to-do' list... I'm going to be looking into all these, so don't think I'm just wanting you guys to do all the work. I just figured I'd post what I want to get done in case any of you has suggestions that I don't end up finding on my own.

- Mozilla/FireFox fullscreen kiosk-type mode on startup (might have found an answer for this, going to try it next)

- Find/write a script to re-initiailze the browser after being idle for a specified ammount of time (5 minutes or so)... what would also be nice with this is an option to lock this system from re-initializing if we need to. Example - say an applicant gets halfway through applying but needs to go look up some information or, has to hit the can... maybe have them be able to lock the station for a limited ammount of time... it'd be cool to have it require an admin to supply a password to unlock it, so that people didn't abuse this. But the whole lock thing would just be icing on the cake... the re-initialize script is most important.

- I need to set up whatever browser we're using to have the same settings on all workstations... a global profile I guess... so that all workstations have the same homepage, settings, features enabled/disabled, and so that if we add new stations we won't need to do much configuring. As is, each workstation logs on as ws001, ws002, etc., and at this point in testing the setup the first time each particular user runs the browser, it starts up as a normal, windowed browser. I'd like them to start up with the same homepage in a kiosk-type mode, which might be solved by the first thing I mentioned... we'll see how it works. Anyway, being able to change the default browser environment would be a nice thing to have, which I'm sure can be done... just haven't gone out to find how yet.

I think that's about it at this point... pretty darn close to having this system ready for production. Next project after this is figuring out how to set something like this up for people who need to run windows software... I know I can do rdesktop sessions with ltsp, but haven't gotten it working yet. Linux is so freakin' cool, heh ;) ... a year ago I wouldn't have even known half of this stuff was possible.