LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-25-2012, 03:43 PM   #1
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 396

Rep: Reputation: 22
Cool Looking for example of software, OS, Web browser etc


I just recalled an old memory here.
I got a task at work setting a small Linux machine up that is supposed to only show one intranet web page and as far as I know right now no Java or that stuff, just plain html.
When the OS is started the web browser is supposed to start automatically and immediately show the intranet web page.

The web browser is supposed to be shown in full page, not even the address bar should be shown
so they can't enter other stuff in there. Hopefully it can't be ended with ALT-X or other key combinations that might shut it down letting them into the OS, if so hopefully it can be restarted again without manual interaction.
All this should be as small as possible and be placed in a small HP "thin client" that only runs Linux (and that's where I come in)

I've tried FF but I can't get it to be shown automatically in full screen without the address bar and I can shut it down with ALT-X.

Since the web page, as far I know right now, only shows pure html any type of browser will do that can do the above listed things.


so... is there anybody out there that knows anything of this?

Last edited by Basher52; 01-25-2012 at 03:44 PM.
 
Old 01-25-2012, 06:00 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,965

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
Something like webconverger or another kiosk mode or xpud?
 
1 members found this post helpful.
Old 01-26-2012, 05:53 AM   #3
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
Quote:
Originally Posted by Basher52 View Post
When the OS is started the web browser is supposed to start automatically and immediately show the intranet web page.
How about a webkit browser implemented in Python?

Make sure you have python-gtk2, python-webkit, python-gobject, and some ttf-* font packages installed, and you can use this script as a browser:
Code:
#!/usr/bin/env python

import signal
import gtk      # package python-gtk2
import webkit   # package python-webkit
import gobject  # package python-gobject

rooturl = "http://www.linuxquestions.org/questions/"

# Signal handler: reload the root URL.
def handler(signum, frame):
    global browser, rooturl
    browser.open(rooturl)

# Set SIGHUP handler: send a HUP signal to reload root URL.
signal.signal(signal.SIGHUP, handler)

# Instead of closing the window, reload the root URL.
def onclose(widget, event):
    global browser, rooturl
    browser.open(rooturl)
    return True

# Create a fullscreen window
gobject.threads_init()
window = gtk.Window()
window.fullscreen()

# Handle window close events using onclose() defined above
window.connect("delete-event", onclose)

# Create a widget adding scrollbars
view = gtk.ScrolledWindow(None, None)
view.set_border_width(0)
view.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
window.add(view)

# Create a new webkit browser
browser = webkit.WebView()
browser.open(rooturl)

# Set browser settings to your liking
settings = webkit.WebSettings()
settings.set_property("default-font-family", "Serif")
settings.set_property("serif-font-family", "Serif")
settings.set_property("sans-serif-font-family", "Sans")
settings.set_property("monospace-font-family", "Monospace")
settings.set_property("default-font-size", 14)
browser.set_settings(settings)

# Show the browser
view.add(browser)
window.show_all()

# and let the browser handle it all.
gtk.main()
If you save it as browser.py, you can run it using python browser.py URLor just ./browser.py URL.

The script expands to fullscreen, and is a real webkit-based browser. Just try it

You cannot close the browser window from itself. Try, and it will just reload the starting URL.

You can make the browser reload the original page externally, by sending the process the HUP signal:
Code:
kill -HUP $(ps -C python -o pid=,cmd= | awk '($3 ~ /(^|\/)browser\.py$/) { print $1 }')
and you can close the browser window by sending it a TERM signal:
Code:
kill -TERM $(ps -C python -o pid=,cmd= | awk '($3 ~ /(^|\/)browser\.py$/) { print $1 }')
The latter also means that if you shut down the machine, the browser window will gracefully quit.

(In the both above cases, the part following the signal name will evaluate to the process IDs of the python interpreter running browser.py file.)

Application shortcuts still work. You can even change to another virtual terminal using Alt+F1, Alt+F2, ..., Alt+Left, and Alt+Right keys. I suggest you start another terminal before running the script, so you can close the browser.

It is possible to capture the keyboard altogether (disabling even application shortcuts), but in your case I suggest a simpler alternative: Create a dedicated user account with a plain X11 environment, with only the browser.py script in the X session. No toolbars, no desktop, no panels.

That way you don't have any application shortcuts to worry about (since none of the desktop environment is running, your script is the only one), but you can still switch to a virtual terminal (command-line prompt) using ALT+F1, login, and do changes if the network is down. Obviously, you should have an SSH server running, so you could login remotely and do whatever maintenance (if any!) is needed.
 
1 members found this post helpful.
Old 01-26-2012, 11:31 AM   #4
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 396

Original Poster
Rep: Reputation: 22
thx guys/gals I'll try those out

I'll get back later on with a result of the tests but it might take a while though :P

thanks again
 
Old 01-31-2012, 07:18 AM   #5
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 396

Original Poster
Rep: Reputation: 22
Yo, Nominal Animal
You got an example for an OS for this too?
Seems very neat so I' gonna start testing this but need an OS for it all.
Needs to be as small as possible
 
Old 01-31-2012, 11:43 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,349

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Linux Kiosk ?
eg
http://www.techrepublic.com/blog/doi...k-software/521
http://wiki.koha-community.org/wiki/Linux_Kiosk
http://kiosk.mozdev.org/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ajaxterm- A web based terminal that help you use ssh from a web browser LXer Syndicated Linux News 0 10-13-2010 09:20 PM
browser plugin for Konqueror web browser (linspire) Tracianddwayne Linux - Newbie 1 01-01-2005 02:15 PM
favorite web browser and email software for lowend pc's Goatdemon Linux - Software 13 05-01-2003 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration