Web Browser Boot-Only Operating System - linux

Is it possible to create an operating system that loads a web browser without menu bars, tabs etc. and that is all it loads.
I do not mean like Chrome OS but I mean all it loads is a html page which can be interacted with like an ordinary web page e.g. google.com, youtube.com.
Also, if this is possible, I would prefer it to be a Linux based OS and Webkit based browser.

You might have to roll your own for something like that...my recommendation would be a small linux distribution and then figure out how to run the surf browser, possibly with the tabbed extension, exclusively. When the x environment starts up just execute those programs. You'd honestly never know the difference.
Here is a screenshot of what this all looks like on my computer, running dwm for window management, and surf + tabbed. This browser is controlled via the keyboard, so you'd have to get use to that.

You don't need to create an operating system, you can use Linux.
A simple implementation would be creating an application using Qt Embedded (qws) with a Widget containing a QWebView only (it's WebKit based), that would load a predefined address.
You could spawn that app from the init scripts (rcS for example) in an endless loop (simple bash script, so if the app crashes it gets loaded again)
You can prototype it with a simple hardware like beagleboard.org or friendlyarm.net boards.

Related

What's the status of the WebExtensions' background page implementations by browser/OS

In Chrome for Win/Mac/Linux it is possible to have browser addon scripts running before the user launches the browser and after they shut the last browser window. In Chrome this is done by claiming the background permission - see the Chrome extensions API docs on background. Other browsers don't seem to support this permission. So my questions:
Is this also possible with other browsers (e.g. by using some other permission/API...) and with other operating systems (specifically Android/iOS)?
What is the behavior of this feature across different operating systems? (I have tried it with Chrome on Ubuntu and while Chrome does continue running and the script keeps performing its task, it doesn't automatically start in background after restarting the OS - I guess one would have to manually add an autostart script for that)
What I'm trying to accomplish is something similar as to what as been asked here: Display a Chrome desktop notification every day at specific time. But I want to learn about cross-browser-and-OS-compatibility before putting too much effort into it. Also an outlook for what's going to be possible in the near future would be nice. :)
(I am aware that something like this could be done using push notifications, but I would also like my app to work offline, so that's not an option.)

How to open new browser instance with specified size and position

From the command line, or from an application, I want to open a NEW browser instance with a specified size and position, and pointed to a specific URL. I want to open a browser that acts like a dialog box. Ideally, I'd like to be able to disable "decorations" (like tabs, bookmarks, etc.). I do not want to open a new tab or pop-up window from an existing browser instance.
I know Electron or Node Webkit do this, but I just want to open a browser as that acts as a GUI front end for whatever back end I'm building.
I'd be happy if it would work for a specific browser; say, Chrome, or Chromium.
So, for instance, a Python app (or C/C++, Java, etc.) could start it's web server, then open a browser of the proper size, pointed to "localhost:xxxx/whatever.html", and serve up data via AJAX.
Kind of a universal single page app front end...
UPDATE (SOLUTION?)
The answer seems to be in two parts: 1) Opening the browser with command line switches, and 2) Resizing the window in JavaScript.
Using chromium (or Chrome), on the command line:
chromium-browser --new-window --app=http://192.168.1.80:8080/index.html
Then, within your JavaScript:
window.resizeTo(800,500)
This will bring up a new window and resize it.
This is great. Now, I can make an app in any language that allows me to open a web server. The user interface is done in HTML, CSS, and JavaScript. The browser is opened from within the application using the proper command line switches.
Electron does simply open up one or multiple browser windows, you can set them to any url via BrowserWindow.loadURL(url) this could be https://google.com https://localhost:1337 (Your backend webserver) or a local HTML file. The BrowserWindow can be created with information such as size and position.
The only alternative would be something like Qt HTML5 applications that use Qt WebEngine, but this does basically the same thing since Electron and Qt WebEngine use chromium.
Also, there is no point in a single page app that runs without JavaScript.

How does App.js/node-webkit Display Window/Graphics?

I am a bit green on Linux in general. I have a BeagleBone that has Angstrom installed. I'd like to strip away as much as I can to get boot times down to a minimum. All I want it to do, is boot up - straight to an App.js or node-webkit (I believe there are pretty much the same?) application, displaying a Twitter Bootstrap HTML/CSS GUI.
A node.js application will be tied to this; and will be serving the very same page up via express.js.
So what does App.js/node-webkit 'need' to display itself? How does it work?
I am from a Microsoft background, so to display anything, in my mind, is you load the OS which has all the API's for display, and then you load the graphical application. Does the Linux kernel itself have this built in? Or do you need other 'packages'?
Would love a detailed answer to this; I've been running around the Internet for days.
If you are going to be running on embedded linux then chromium or other browser plus nodejs is going to be quite heavy -- I would guess around 64 Meg or so. On top of that you will then need to run an x environment / display server so you get the graphical GUI up and running.
If you want to take the easy way out find a ubuntu linux distribution for the board you are developing for. There are many other distributions and you are welcome to try them, but I do find that there are lots of blog posts and help for ubuntu linux. Once you have that working on your device you can then install nodejs and a browser to view it.
If you don't need to have a display connected to the device then you can just run nodejs and surf to the machine which can then run your application on port 80.
If you want to create an "embedded" application and go the more visual studio route then you can look at QT. There is BootToQT which should boot an android like device but then take over the screen and run your application: http://qt.digia.com/Product/Boot-to-Qt/. They also have chromium so it is possible embed an html view in your application http://qt-project.org/. The Qt apps can be built in C++ but I think they also have an xml like structure for defining interfaces. QT Designer gives you an IDE to develop in.

Complete WebBrowser Control On All OSes?

I want to create a new application (which I will sell) that uses web browser control to automatically post things on the internet etc.
I did some research, and it looks like the primary choice for most people is .NET webbrowser control (via an instance of IE).
I don't want to do this because I want customers that own a Mac and Linux to be able to use my software.
With that said, are there any web browser control classes or toolkits available that can work on all OSes (e.g. something that uses Java?)
Thanks in advance!
UPDATE:
Web browser control is basically the ability for a program to act like a human and open a web browser and go to websites, fill out forms, check email (lol) etc.
Firefox, Chrome, Safari. I think virutally everything but IE works on all the OS's. Not suprising really when you think it's made by microsoft.
Selenium libraries let you create scripts (with a GUI or one of the supported languages [it has got most of the popular ones like Java, Python etc.]) for browser automation on all popular browsers (including chrome, which works on all OSes like mentioned by other answers).

Can I embed a browser inside a screensaver? On both Windows and Macs?

Here's the deal. I've animated + coded a variety of 'screensavers' in Actionscript3/Flash. They make extensive use of the timeline, AS3 code, the TweenLite library, and embedded fonts. That's the limit of my programming knowledge. I've tried, to no avail, to convert my .SWFs into screensaver files using a variety of software, such as InstantStorm. Somehow it never works, the code never executes properly, it's a disaster.
So, I'm wondering if it's possible to make a screensaver that simply contains an embedded browser, and have it point to my .SWF file, hosted on my web-server. Basically, imagine a full-screen website acting as a screensaver.
If this is possible, what is the EASIEST and FASTEST way for me to whip up a solution for both PCs and Macs? Language, etc. I'm hoping something that has a library I can simply draw from to embed the browser view :)
My startup is developing a product to do exactly this, it's called Screensaver Ninja and you can find it at https://Screensaver.Ninja.
You can set many different web pages with different timers. The configuration tool allows you log in and navigate to the page you want to display:
It uses WebKit, on Mac OS X it uses Safari's and on Windows it uses Chrome's and in both cases it has a separate session from any other browser installed on the computer.
Here's a small Windows-only solution:
https://github.com/cwc/web-page-screensaver/releases
You could modify this open-source one for the Mac so that it's hard-coded to your URL:
http://www.liquidx.net/blog/2010/11/13/webviewscreensaver-for-mac/
Modify hasConfigureSheet() to return NO and change the URL in kScreenSaverDefaultURL. And change the name!

Resources