Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 17, 2012 11:03AM

To our javascript developers :

Using Xulrunner as the gecko engine, it is possible to
build a browser using javascript only, without using c++ .
An interesting example is the Conkeror browser (not to be
mistaken for Konqueror), which works in Linux and in
Windows as well. It is a purely keyboard-oriented browser,
but icons can be enabled in the Linux version already,
and adding macros using javascript should probably
also be possible. Xulrunner 9.0.1 has the current
Firefox gecko and can be updated furthermore.
This could be a possibility to go on developing K-Meleon.
Have a look at the Conkeror website. here :

http://conkeror.org

Conkeror can be downloaded here:
http://repo.or.cz/w/conkeror.git?a=snapshot;h=master;sf=tgz
The browser download itself is only 275 kB.

Xulrunner 9.0.1 can be downloaded here :
http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/9.0.1/runtimes/xulrunner-9.0.1.en-US.win32.zip

The browser can be started executing the command

/PathTo/xulrunner.exe /PathTo/application.ini in the conkeror folder

This can also be a link in an icon on the desktop.

Fred

Re: Is using Xulrunner an alternative ?
Posted by: JamesD
Date: January 18, 2012 08:37AM

@ Fred

OK, I have the Xulrunner extracted to my hard drive. What do I do with the Conkeror file? It is a tar.gz and 7Zip says its host OS is unix.

Re: Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 18, 2012 11:05AM

I have an older version of 7-zip, but I think that
it still opens tar.gz packages.
These files are packed twice.
If you unpack with 7-zip, it first unpacks the tar.gz
to a folder "conkeror-master.tar" .
Inside this folder is the real tar package.
7-zip will unpack this package to a folder "conkeror" .
Copy this folder then to a location where you want it to be.
You can put the unpacked "xulrunner" folder inside
the "conkeror" folder, or also keep these two folders
separate.
It is important to start the application.ini of conkeror
with xulrunner.exe .
The configuration file is named ".conkerorrc" and should
by default be in the user folder where also the profile
of Firefox is.

This is an example, how ".conkerorrc" could look with some added functions.
Adjust the path to your homepage.

=============================================================================

interactive("colors-toggle", "toggle between document and forced colors",
function (I) {
var p = "browser.display.use_document_colors";
if (get_pref(p))
session_pref(p, false);
else session_pref(p, true);
});
define_key(content_buffer_normal_keymap, "f6", "colors-toggle");
interactive("javascript-toggle", "toggle javascript",
function (I) {
var p = "javascript.enabled";
if (get_pref(p))
session_pref(p, false);
else session_pref(p, true);
});
define_key(content_buffer_normal_keymap, "f8", "javascript-toggle");
require("clicks-in-new-buffer.js");
add_hook("create_buffer_late_hook",
function (buffer) {
buffer.top_frame.scrollbars.visible = true;
});
add_hook("mode_line_hook", mode_line_adder(buffer_count_widget), true);
load_paths.unshift("chrome://conkeror-contrib/content/");
require("mode-line-buttons.js");
mode_line_add_buttons(standard_mode_line_buttons, true);
define_key(content_buffer_normal_keymap, "C-right", "forward");
define_key(content_buffer_normal_keymap, "C-left", "back");
define_key(content_buffer_normal_keymap, "C-down", "kill-current-buffer");

define_browser_object_class(
"history-url", null,
function (I, prompt) {
check_buffer (I.buffer, content_buffer);
var result = yield I.buffer.window.minibuffer.read_url(
$prompt = prompt, $use_webjumps = false, $use_history = true, $use_bookmarks = false);
yield co_return (result);
});

interactive("find-url-from-history",
"Find a page from history in the current buffer",
"find-url",
$browser_object = browser_object_history_url);

interactive("find-url-from-history-new-buffer",
"Find a page from history in the current buffer",
"find-url-new-buffer",
$browser_object = browser_object_history_url);

define_key(content_buffer_normal_keymap, "h", "find-url-from-history-new-buffer");
define_key(content_buffer_normal_keymap, "H", "find-url-from-history");

interactive("open-homepage", "open-homepage", "follow",
$browser_object = "file:///PATH TO YOUR HOMEPAGE");
define_key(content_buffer_normal_keymap, "C-up", "open-homepage");

function history_clear () {
var history = Cc["@mozilla.org/browser/nav-history-service;1"]
.getService(Ci.nsIBrowserHistory);
history.removeAllPages();
}
interactive("history-clear",
"Clear the history.",
history_clear);
define_key(content_buffer_normal_keymap, "C-0", "history-clear");

require("tab-bar.js");

user_pref("extensions.checkCompatibility", false);
user_pref("extensions.checkUpdateSecurity", false);

============================================================================

Regards

Fred

Re: Is using Xulrunner an alternative ?
Posted by: snuz2
Date: January 18, 2012 02:31PM

This is very interesting idea Fred. But it removes MFC classes from the browser completely I would guess. Essentially, it is then Firefox without all their "chrome" and we could start over. What is it that makes Kmeleon Kmeleon then? The macro language? The user community? Would it still load quicker than FF ( and their load time seems to have gone down quite a bit these days )?

I am asking these questions for a lot of reasons. One of them being that I am a C++ developer, and a javascript developer, and I am unemployed at the moment. I have thought somewhat about whether to volunteer to take up the development of Kmeleon and what direction I would take it if I did that. In order not to hijack this possibly important thread please see my other posting for my comments on the future of kmeleon.

Re: Is using Xulrunner an alternative ?
Posted by: JamesD
Date: January 18, 2012 10:17PM

@ Fred

Thanks for the info. I have it running. Don't think I like it much. I do 99% of my browsing with the mouse. This keys business is driving me nuts. Also it did not use current plugin for some movie/flash. Wanted to load another player. I did not do that. I have no idea how many bookmarks I may have set using b when I needed to use B. It does not use Favorites so far as I can find.

Re: Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 19, 2012 03:38AM

There is already a button bar to be enabled in Linux. look here:

http://conkeror.org/Tips#Modelinebuttonsforbasicbrowsercontrol

I don't know why this does not work in Windows. I think
the icons are not found in Windows xulrunner.

Conkeror is only a proof of concept, that a browser written
in javascript works with xulrunner.
It seems possible that javascript toolbars can be created as
modules by an experienced javascript programmer.
Existing modules of Conkeror could be used or adapted.
It may be easier to make a browser with javascript modules
than exes.
Macros could be converted to javascript modules.

I think that K-Meleon's biggest advantage is that functions
can be easily added by adding macros. This could be done
by javascript modules as well.

Fred

Re: Is using Xulrunner an alternative ?
Posted by: JamesD
Date: January 19, 2012 04:54AM

I can find the "mode-line-buttons.js" but I cannot find the "chrome://conkeror-contrib/content/" item. That is where you think the button should be?

Re: Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 19, 2012 05:48AM

The Conkeror files are the same for Windows and Linux.
The buttons work in Linux, but not in Windows.
I presume, that the buttons are in Xulrunner, which is
different for Linux and Windows.

Fred

Re: Is using Xulrunner an alternative ?
Posted by: alnertna
Date: January 19, 2012 10:01PM

thanks for the help

Re: Is using Xulrunner an alternative ?
Posted by: JujuLand
Date: January 20, 2012 07:39PM

Fred,

I have tried it under wine (with xulrunner for windows).

I want to try it with xulrunner for Linux, but I have an amd64 install. Does the 32 bits will work, or I will have to compile it ?

A+


Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:31.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/75.0

Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr




Re: Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 20, 2012 11:24PM

@ Jujuland

I have just tried it on Kanotix 64 bit, and it worked
allright.
It seems to work better with Xulrunner 64 bit than 32 bit.
I do not know for sure for other Linux 64 bit distros.
I would install everything into /opt.
This would avoid damaging the system, because simply
deleting the folder would be sufficient, if it should not
work correctly.

Download the 64 bit version here :

http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/9.0.1/runtimes/xulrunner-9.0.1.en-US.linux-x86_64.tar.bz2

It has also the button bar then.

The ".conkerorrc" configuration file must be in the home directory.
My given example above should enable the buttons too, and some
easier keyboard shortcuts.

Regards

Fred

Re: Is using Xulrunner an alternative ?
Posted by: JujuLand
Date: January 23, 2012 07:42PM

@fred,

Thanks for the link, but it fails to run.

Here are the errors in console:
alain@ebi-jujuland:~/Bureau/mozilla-1.9.2$ /opt/TuxPrograms/xulrunner/xulrunner /opt/TuxPrograms/conkeror/application.ini
/opt/TuxPrograms/xulrunner/xulrunner-bin: 1: Syntax error: Unterminated quoted string

alain@ebi-jujuland:~/Bureau/mozilla-1.9.2$ /opt/TuxPrograms/xulrunner/xulrunner "/opt/TuxPrograms/conkeror/application.ini"
/opt/TuxPrograms/xulrunner/xulrunner-bin: 1: Syntax error: Unterminated quoted string

alain@ebi-jujuland:~/Bureau/mozilla-1.9.2$ /opt/TuxPrograms/xulrunner/xulrunner-bin "/opt/TuxPrograms/conkeror/application.ini"
bash: /opt/TuxPrograms/xulrunner/xulrunner-bin : fichier binaire impossible à lancer

alain@ebi-jujuland:~/Bureau/mozilla-1.9.2$ /opt/TuxPrograms/xulrunner/run-mozilla.sh "/opt/TuxPrograms/conkeror/application.ini"

run-mozilla.sh: Cannot execute /opt/TuxPrograms/conkeror/application.ini.

I have tried with xulrunner 2.0, but it fails too.

I have tried to load source, but I can't compile.

A+


Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:31.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/75.0

Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr





Edited 1 time(s). Last edit at 01/23/2012 07:42PM by JujuLand.

Re: Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 23, 2012 11:01PM

I only had Kanotix as a 64 bit system, but I have downloaded
now Ubuntu-10.4.3-amd64 to try it again.
It works ok for me with xulrunner 64 bit from my link.
The start string you had was wrong. It starts xulrunner twice
with itself. It should only be, for your folders :

/opt/TuxPrograms/xulrunner/xulrunner /opt/TuxPrograms/conkeror/application.ini

and can be followed by the path to a startpage of your choice.

Did you have the Conkeror tarball from the snapshot archive here ?

http://repo.or.cz/w/conkeror.git?a=snapshot;h=master;sf=tgz

It must not be installed, only unpacked.
The .conkerorrc which I provided goes into /home/ubuntu ,
or, in your case, into /home/alain .

I hope that you can get it working for you.

Fred

Re: Is using Xulrunner an alternative ?
Posted by: JujuLand
Date: January 23, 2012 11:41PM

Thanks Fred, but it always crash.

Here is the syntax and error message:

alain@ebi-jujuland:~$ /opt/TuxPrograms/xulrunner/xulrunner /opt/TuxPrograms/conkeror/application.ini http://kmeleon.sourceforge.net

/opt/TuxPrograms/xulrunner/xulrunner-bin: 1: Syntax error: Unterminated quoted string

As you can see the sysntax is exactly what you said.

I use Ubuntu 11.10 and gnome-shell is installed. The Firefox version is 9.0.1

Yes, I use conkeror from the tarball, and just extract it in a folder.

It seems that there is only a version for all the OS (Windows, and Linux).
To be sure, I have extract again from your link.

I think the problem is due to xulrunner.
Is the version x86_64 compatible with amd64? I have a doubt ? Wouldn't it for Intel 64 bits, instead of amd64 ?

I have also installed xulrunner for Windows, and it works. I just not have found where to put conkerorrc file to use it with Windows xulrunner, as I haven't installed Firefox for Windows.

A+


Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:31.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/75.0

Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr





Edited 2 time(s). Last edit at 01/23/2012 11:44PM by JujuLand.

Re: Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 24, 2012 04:54AM

I thought that you have Ubuntu 10.04 .
I have looked in 10.04 64 bit in synaptic now, and it seems
that xulrunner 1.9.2 is already present by default
in the distro.
This is probably also the case in 11.10 64 bit.
This would make it easier to start xulrunner, just type:

xulrunner /opt/TuxPrograms/conkeror/application.ini

Give the folder conkeror all executable rights for the
user ubuntu, or alain in your case.

There is also a conkeror version in synaptic, but here in 10.04
it has only 0.9.1, which has not included the buttons.

The buttons do also not work for me with xulrunner for Windows.

As far as I remember at the moment, the .conkerorrc for wine
must be in /.wine/drive_c/windows/profiles/alain/Application Data,
but outside of the conkeror configuration folder there.

Fred

Re: Is using Xulrunner an alternative ?
Posted by: JujuLand
Date: January 24, 2012 05:31PM

Quote
Fred
I thought that you have Ubuntu 10.04 .
I have looked in 10.04 64 bit in synaptic now, and it seems
that xulrunner 1.9.2 is already present by default
in the distro.
At home, I use 10.04, but at work, I have a 11.10 installed
My tests were made at work. I haven't tried it under 10.04

Quote
Fred
This is probably also the case in 11.10 64 bit.
This would make it easier to start xulrunner, just type:

xulrunner /opt/TuxPrograms/conkeror/application.ini
No, xulrunner isn't avalaible for 11.10 (apt-get or Logithèque). When I try to install conkeror 0.9.3 from Synaptic, I have this error message:

conkeror:
 Dépend: xulrunner-1.9.2  but it is not installable
 Recommande : conkeror-spawn-process-helper mais ne doit pas être installé

Quote
Fred
There is also a conkeror version in synaptic, but here in 10.04
it has only 0.9.1, which has not included the buttons.
Similary problem under 11.10

The buttons do also not work for me with xulrunner for Windows.

Quote
Fred
As far as I remember at the moment, the .conkerorrc for wine
must be in /.wine/drive_c/windows/profiles/alain/Application Data,
but outside of the conkeror configuration folder there.
Directly under Application Data ??

A+


Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:31.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/75.0

Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr




Re: Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 24, 2012 06:21PM

I have checked again for wine :
The file ".conkerorrc" must be in the folder
/.wine/drive_c/windows/profiles/alain ,
not in the Application Data folder.
May be the Linux version will work in your
Ubuntu 10.04 at home.

Fred

Re: Is using Xulrunner an alternative ?
Posted by: JujuLand
Date: January 24, 2012 07:31PM

Quote
Fred
I have checked again for wine :
The file ".conkerorrc" must be in the folder
/.wine/drive_c/windows/profiles/alain ,
not in the Application Data folder.

ok, but I presume users, not profile

Quote
Fred
May be the Linux version will work in your
Ubuntu 10.04 at home.

I'll try it

Thanks
A+


Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:31.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/75.0

Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr





Edited 1 time(s). Last edit at 01/24/2012 07:32PM by JujuLand.

Re: Is using Xulrunner an alternative ?
Posted by: JujuLand
Date: January 24, 2012 08:44PM

After having moved conkerorrc to users/alain, I have now a tab which has appeared with K-Meleon's icon.

/opt/Program\ Files/xulrunner/xulrunner.exe "Z:\opt\Program Files\conkeror\application.ini" http://kmeleon.sourceforge.net

I think it has improved something, but I'm not sure this was the only thing added. Am-I wrong ?

A+


Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:31.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/75.0

Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr




Re: Is using Xulrunner an alternative ?
Posted by: Fred
Date: January 24, 2012 10:57PM

I have added F6 to toggle document and forced colors,
and F8 to toggle javascript on/off.
I have enabled tthe scrollbars.
There is a buffer widget showing the number of the
active buffer (tab) in the window.
I have enabled the button bar (up to now, as it seems, only working in Linux).
Added shortcuts for the right Ctrl key :
Ctrl(right)+right arrow for forward ,
Ctrl(right)+Left arrow for back,
Ctrl(right)+Down arrow to close the current buffer.
Ctrl(right)+Up arrow t go to your homepage
(the path must be adapted).
To open an URL from the history, type H and then Tab,
(one after the other !)
To open an URL from the history in new buffer,
type h and then Tab (one after the other !).
To clear the history shortcut Ctrl+0(zero).
I have enabled tabs.

The 9 buttons in Linux can all be replaced by
shortcut combinations :
g opens a new URL,
Ctrl+x and then Ctrl+f opens an URL in a new buffer,
(this could easily be defined for a simpler key),
B page back (or with my defined combination Ctrl(right)+Left arrow),
F page forward (or with my defined combination Ctrl(right)+Right arrow),
r for reload,
q to kill active tab (or with my defined combination Ctrl(right)+Down arrow),
Ctrl+x then Left arrow, for go to previous tab.
Ctrl+x then Right arrow, for go to next tab.
Ctrl+x then i to go to the help page.

All these shortcuts can easily be redefined to other key combinations.
To get an overview of the default key shortcuts,type :
Ctrl+h then b .
Note that Conkeror has been developped for devoted users of
the Linux editor Emacs. That is why it is basically a key driven
text browser, using the basic keyboard commands of Emacs.
The existence of a button bar in the Linux version shows, that it may be
possible for an experienced javascript writer to add many more buttons
with every desired function, which at the moment can only be reached
by keyboard shortcuts. This would mean that a similar functionality
as for conkeror could also be programmed for a K-Meleon with Xulrunner,
using javascript only.

Fred

Re: Is using Xulrunner an alternative ?
Posted by: JujuLand
Date: January 25, 2012 03:51AM

Ubuntu 10.04 has xulrunner already installed:

Mozilla XULRunner 1.9.2.24 - 20111108083758

and it works fine (buttons too)

I have tried with 9.0.1, i686, and it works too.

I'll try to-morrow on 11.10

A+


Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:31.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/75.0

Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr





Edited 3 time(s). Last edit at 01/25/2012 04:56AM by JujuLand.

Re: Xulrunner
Posted by: km2
Date: July 15, 2012 06:46PM

Any noise on this?

So, anyone build package for the test?..

Re: Xulrunner
Posted by: JamesD
Date: July 15, 2012 06:58PM

I have not built anything. I have a version, but I think it is old. Is the engine being upgraded to HTML5 stuff?

Is Javascript the only way to interface with it?

Edit: I don't think the engine is very much newer than the one in KM beta 2.4



Edited 1 time(s). Last edit at 07/16/2012 04:51AM by JamesD.

K-Meleon forum is powered by Phorum.