Category Archives: Development

How to download the latest oneye SVN

Hello everybody,
it can be useful for you to know the simple steps to install on your server the latest oneye SVN version, to have a look at all the new features that have been implemented since the latest release, so here I write a very short tutorial.
Please note that SVN snapshots are not supported by the team, so don’t expect the release version to have automatic updaters from the SVN snapshots! If you find a bug, please report it using the appropriate section of the forum!
So, here you are the 6 simple steps:

  1. Download the latest oneye SVN tarball;
  2. Uncompress the tarball and move all the content of the “1.9” folder inside the folder that you want to be the eyeos installation root;
  3. Rename the “eyeOS” folder to a name which is enough difficult to guess for a user but not exagerated long, as for example “eyeOS43h49d98g8jdfn”;
  4. Now edit /settings.php adjusting the REAL_EYE_ROOT constant to the folder name you just chose at point 3. In case you wish to use the “real” VFS module instead of the “virtual” default one, please also change the VFS_MODULE constant;
  5. Now edit /eyeOSxxxxxxx/system/conf/system.xml and set EYEOS_DEBUG_MODE from 3 to 0 (unless you are a developer and you want to keep the debug mode on). You can leave all the other configurations to their default value, since you will be able to change them from the oneye system, via the System preferences;
  6. You are ready! Please make sure that the oneye folder and all the files are writable by the web server user and then go with your browser to the new installation URL, login with “root/root”, open the System preferences, change the root password and edit all the configurations to fit your needs! If you have questions, please ask them on the forums.

Integrate webapps into oneye via eyeIframize

I’m sure that some of you don’t know the power of eyeIframize, a great application of oneye/eyeOS series 1.x.
With eyeIframize, even a kid can integrate an existing webapp into oneye in a minute. Since eyeOS SVN 7258, eyeIframize supports 5 input parameters, while before it only supported one, the URL. These parameters are:

  1. URL: If not specified, a dialog will appear asking the user the address and all the following parameters will be ignored
  2. TITLE: This is the title of the Window. If not specified or set to 0, it will default to “eyeIframize”
  3. WIDTH: The window width, in pixels. If not specified or set to 0, it will default to 75% of the eyeApp screen width
  4. HEIGHT: The window height, in pixels. If not specified or set to 0, it will default to 75% of the eyeApp screen height
  5. START MAXIMIZED: If it is set to 1, the window will be opened maximized (100% of eyeApp screen area). If the user presses the maximize button of the window, it will be resized to WIDTH and HEIGHT, if they have been specified (otherwise, it will be resized to 75% of the screen area)

To take advantage of the improved eyeIframize, you can either install the patch on your existing eyeOS 1.9.x installation, or make a brand new install, by downloading the latest eyeOS 1.x SVN. If you use the original eyeOS 1.9.x eyeIframize you can still open iframes, but you can’t specify the title and the window size.

For example, to integrate Wikipedia into oneye, you just have to right click on an empty space on your oneye desktop and choose “New launcher”:


In the command line, I typed: Wikipedia 900  500 1
So my application will open the page, will have the title “Wikipedia” and will be opened maximized. 900 and 500 pixels is the size of the window if the user presses the “Maximize” button of the window.

On the desktop we have now the Wikipedia launcher and the site is perfectly integrated into the oneye system:


LESS is more

Normally we are intended to use “less” in conjunction with “free time”, just as “less free time for hobbies” or even “earning less money”, but in this case “LESS” means a great way to make content style sheets (css) dynamic.

When writing styles sheets we normally need to repeat and repeat and repeat the same stuff, reuse colors or calculate a lot values depending on others. Using LESS this is done dynamically. And the best: Its syntax follows valid css, so you don’t need to change any line of your code to port.

The official LESS framework is available as client-side JavaScript project. But on github I found a nice PHP implementation, called less.php, which can be used either from the command line or directly on the server. But why do I prefer a not-yet ready PHP implementation over the official and even quite nice JavaScript one?

When working on so-called static websites JavaScript is not well seen and using it in major places would hide all users, that don’t activate JavaScript for default.

Another point is about minimizing web requests. Style sheets created with LESS won’t need to open up new connections – except for images and external fonts – , cause all imported style sheets will automatically be attached on the server side and reduce the page load.

Thanks to its simple structure usage is really easy (showing just the basics):

$less = new LESS(); // initialising
$less->setBasePath(); // (optionally) setting a base path for absolute imports
$less->setRestrictPath(); // (optionally) setting a path, which restricts import paths to outside
$less->parse($content); // parse $content
$less->parseFile($file); // parse the content of $file
echo $less->output();