How to load a local html in Webian-Shell?

38 views
Skip to first unread message

Måns

unread,
Dec 6, 2011, 3:59:33 PM12/6/11
to webian
Hi Ben

For a long time I wanted to create a dedicated xul-application for
TiddlyWiki ( http://tiddlywiki.com )
I used portable Firefox and a config file to be able to run a local
TiddlyWiki file as a homepage. http://tinyurl.com/778cng7

I tried to modify main.js to load my local TiddlyWiki file - I need to
set a relative path to be able to move my customized Webian to an USB
or another computer...
I tried different variations on this: "Create first tab
newTab("file:////MyTW.html" - to no avail...

I'd be very happy if it was possible to set a relative path !

I'd also love to be able to exchange the index.html file with a
TiddlyWiki file - making a TiddlyWiki systemTheme which allows using
it as the controlcenter of the Webian app itself - I guess I have to
turn to the TiddlyWiki google group to get support for that -
Work in progress: http://webian-shell.tiddlyspace.com/#WebianTheme

I wonder which version of FF/Mozilla Webian is based? - For TiddlyWiki
to be able to upload itself - or to be able to import individual
tiddlers from the net - it has to be pre v. 4.0.1...

Thanks for working on this magnificent project!!

Cheers Måns Mårtensson

Sam Black

unread,
Dec 9, 2011, 3:21:27 PM12/9/11
to web...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/12/11 20:59, M�ns wrote:
> Hi Ben
>
> For a long time I wanted to create a dedicated xul-application for
> TiddlyWiki ( http://tiddlywiki.com )
> I used portable Firefox and a config file to be able to run a local
> TiddlyWiki file as a homepage. http://tinyurl.com/778cng7
>
> I tried to modify main.js to load my local TiddlyWiki file - I need to
> set a relative path to be able to move my customized Webian to an USB
> or another computer...
> I tried different variations on this: "Create first tab
> newTab("file:////MyTW.html" - to no avail...
>
> I'd be very happy if it was possible to set a relative path !

https://github.com/samwwwblack/shell/blob/tabsontop/main.js#L481

If you use

var soundpg = url.fromFilename(apps.browserCodeDir +
"/../browser_code/system/sound/sound.html");

it works, so you can set a path relative to apps.browserCodeDir.

>
> I'd also love to be able to exchange the index.html file with a
> TiddlyWiki file - making a TiddlyWiki systemTheme which allows using
> it as the controlcenter of the Webian app itself - I guess I have to
> turn to the TiddlyWiki google group to get support for that -
> Work in progress: http://webian-shell.tiddlyspace.com/#WebianTheme

I'm not sure what you would want to achieve using that, could you
elaborate on your idea with this please?

>
> I wonder which version of FF/Mozilla Webian is based? - For TiddlyWiki
> to be able to upload itself - or to be able to import individual
> tiddlers from the net - it has to be pre v. 4.0.1...

xulrunner for chromeless is 6.0.

>
> Thanks for working on this magnificent project!!
>

> Cheers M�ns M�rtensson


- --
Thanks,

Sam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7ibccACgkQHLRhmt89eyK5pgCbBy3it66lydyOFzOpyFfG9NX+
9eoAn1f1WSUMMoaK/1qXh6JJc2Sx0Iri
=/jvl
-----END PGP SIGNATURE-----

Måns

unread,
Dec 9, 2011, 6:12:13 AM12/9/11
to webian
Sorry - This post is a crossposting which has been waiting a long time
to appear here on the Webian Shell threads.
See date - It was actually my first post.. - don't know why it has
been "hanging" untill now..

Cheers Måns Mårtensson

On 6 Dec., 21:59, Måns <humam...@gmail.com> wrote:
> Hi Ben
>
> For a long time I wanted to create a dedicated xul-application for
> TiddlyWiki (http://tiddlywiki.com)
> I used portable Firefox and a config file to be able to run a local

> TiddlyWiki file as a homepage.http://tinyurl.com/778cng7

Sam Black

unread,
Dec 10, 2011, 5:33:11 AM12/10/11
to web...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Apologies if this arrives multiple times, googlegroups seems to be
swallowing emails instead of delivering them.

On 06/12/11 20:59, M�ns wrote:

> Hi Ben
>
> For a long time I wanted to create a dedicated xul-application for
> TiddlyWiki ( http://tiddlywiki.com )
> I used portable Firefox and a config file to be able to run a local
> TiddlyWiki file as a homepage. http://tinyurl.com/778cng7
>
> I tried to modify main.js to load my local TiddlyWiki file - I need to
> set a relative path to be able to move my customized Webian to an USB
> or another computer...
> I tried different variations on this: "Create first tab
> newTab("file:////MyTW.html" - to no avail...
>
> I'd be very happy if it was possible to set a relative path !

https://github.com/samwwwblack/shell/blob/tabsontop/main.js#L481

If you use

var soundpg = url.fromFilename(apps.browserCodeDir +
"/../browser_code/system/sound/sound.html");

it works, so you can set a path relative to apps.browserCodeDir.

>

> I'd also love to be able to exchange the index.html file with a
> TiddlyWiki file - making a TiddlyWiki systemTheme which allows using
> it as the controlcenter of the Webian app itself - I guess I have to
> turn to the TiddlyWiki google group to get support for that -
> Work in progress: http://webian-shell.tiddlyspace.com/#WebianTheme
>

I'm not sure what you would want to achieve using that, could you


elaborate on your idea with this please?

> I wonder which version of FF/Mozilla Webian is based? - For TiddlyWiki


> to be able to upload itself - or to be able to import individual
> tiddlers from the net - it has to be pre v. 4.0.1...
>

xulrunner for chromeless is 6.0.2

> Thanks for working on this magnificent project!!
>

> Cheers M�ns M�rtensson


- --
Thanks,

Sam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7jNWcACgkQHLRhmt89eyLnxACdHSBI1HePb6Xi+KaZXNuPTkge
664AoJIP/D5raRQzrkWqgvr5T6uzgWsJ
=pSiT
-----END PGP SIGNATURE-----

Måns

unread,
Dec 12, 2011, 1:25:33 PM12/12/11
to webian
Hi Sam

> var soundpg = url.fromFilename(apps.browserCodeDir +
> "/../browser_code/system/sound/sound.html");
>
> it works, so you can set a path relative to apps.browserCodeDir.

Ok Thanks :-)

When I add :
"var soundpg = url.fromFilename(apps.browserCodeDir + "/MyTW.html");
newTab(soundpg, true);"
after:
"// Create first tab
newTab("http://webian.org/shell/welcome/0.1");"

Webian Shell no longer opens i fullscreen mode, MyTW.html is not
opened - nor does any of the Webian nav buttons work as they did
before...

Maybe it's my (win)notepad which changes the code-charset, don't know,
I haven't tried it in Linux yet...


>
> I'm not sure what you would want to achieve using that, could you
> elaborate on your idea with this please?
>

TiddlyWiki is a unique, extremely powerfull and customizable
singlepage html-app. It can save itself back to disk . and all editing
is made from it's own interface directly in the browser.
I use it to create/design all kinds of learning aid applications -
ie.: import csv data for automatic rendering of lists with all kinds
of data, images etc.. which I and my collegues use every day at my
job.
I'm a teacher at an independent boarding school for lower secondary
students. Denmark - "Efterskole"(http://himmerlands-ungdomsskole.dk).

TiddlyWikis ability to work as a local (and editable) webpage makes it
very usable in an educational setting, where I want to hand out
material which will present itself in a "webby" manner - even if it's
executed from a pc even without internet connection... I can link to
files (relative to the TiddlyWiki file) and I can link from one
microcontent area (a socalled "tiddler") of the TiddlyWiki file to
another microcontent area (tiddler) in the same - or another
TiddlyWiki file. Every tiddler can be tagged or have custom fields
appended for all types of aggregation of lists and tables - which is
all we need to make simple a hypertext engine turn into a versatile
database application...

I've started a couple of relatively small projects which might explain
why Webian Shell might be my next attempt to create something which
could be called a portable LMS based on TiddlyWiki :
1) The USB-panel project: http://db.tt/CYxsq2G was about delivering a
menu packaged with open source portable apps to all students via an
USB stick...
1 b - I made a Puppy Linux remaster which was bootable from the same
USB-stick. The panel was available in Puppy Linux and most of the apps
would run via Wine..
2) The TW_OS project:
http://howtoos.tiddlyspace.com/#TiddlyWiki-OS
http://tw-os.tiddlyspace.com/ & http://tw-os-dk.tiddlyspace.com/
http://www.murga-linux.com/puppy/viewtopic.php?p=519247
3) http://tiddlyspace.gir.dk is the place where I test and develop
many different TiddlyWiki apps and designs - most of them will work
offline as well..
http://tiddlyspace.com is the original tiddlyspace service where *a
bunch* of people (3,839 users in less than a year) are working with
TiddlyWiki and other html applications...

Why I want to use Webian Shell:
1) I want to give my students a browser which takes over their
desktops and give them an experience free from the sort distraction
they "enjoy" from their normal browser - (facebook - various games
etc ... AND I want to deliver TiddlyWikis designed and prepared for
education - some of the material packaged with Webian Shell and some
of it is accessed online.
TiddlyWiki has plugins available which allows for browsing the local
filesystem and to run desktop programs directly from the browser -
however some security settings have to be overridden to make them
work, which is why I will make most of the material available as html
or plain text - either iframed or as "standalone" TiddlyWikis, (I
guess it's too difficult to open pdf documents or online google docs
etc - in Webian Shell)...

2) I want to customize/remaster a tiny Puppy Linux distribution which
will open Webian Shell as the primary "desktop environment"
effectively making TiddlyWiki *the* application you use for all tasks
-
a Text editing (plain text with wiki markup - or via CK-editorplugin
WYSIWYG from a local CK-editor directory - tested and working
already!!)
b Calculation (javascript calculator)
c Browsing the net (MiniBrowser plugin for easy bookmarking and maybe
Tiddlysnips browser extension (if it's installable in Webian Shell?) -
links and simple iframes)
d Different TiddlyWiki applications taylored for specialized tasks:
i MGTD (MGSD) - System for getting things done
ii NoteStorm - System for taking and organizing notes
iii DarkEditor clone in TiddlyWiki - for writing without distraction
iv TWYP - creating a YouYube scrapbook from browsing/searching YouTube
videos inline...
v Collaboration via http://willyou.typewith.me documents - organized
in a TW
etc etc etc....

(Only thing I miss in Webian Shell - is the ability to use Google docs
(especially the docs-viewer ) via iframes in TiddlyWiki)

All ideas mentioned in 2) can be implemented in 1) - the Puppy
remaster idea is intended for slow laptops (bloated, virusinfected or
simply overloaded systems like Vista on old hardware etc..) which will
boot from an USB. They will run extremely fast when Puppy is loaded in
RAM. If you have students who are *too easily* distracted when they
have access to their own desktop environment - even when Webian Shell
is loaded as an overlay, - then it might be a good option to be able
to boot into Webian Shell working as an overlay on Puppy Linux :-)

I've tested Webian Shell on Puppy Linux, created a shell-script to
load it as a program on startup - and it works very well :-)

Hope this answers your question?

Cheers Måns Mårtensson

Sam Black

unread,
Dec 12, 2011, 6:49:08 PM12/12/11
to web...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/12/11 18:25, M�ns wrote:
> Hi Sam
>
>> var soundpg = url.fromFilename(apps.browserCodeDir +
>> "/../browser_code/system/sound/sound.html");
>>
>> it works, so you can set a path relative to apps.browserCodeDir.
>
> Ok Thanks :-)
>
> When I add :
> "var soundpg = url.fromFilename(apps.browserCodeDir + "/MyTW.html");
> newTab(soundpg, true);"
> after:
> "// Create first tab
> newTab("http://webian.org/shell/welcome/0.1");"
>
> Webian Shell no longer opens i fullscreen mode, MyTW.html is not
> opened - nor does any of the Webian nav buttons work as they did
> before...
>
> Maybe it's my (win)notepad which changes the code-charset, don't know,
> I haven't tried it in Linux yet...

Ah. You've taken the next line as well which isn't in the webian code at
all; if you just have "newTab(soundpg);" [no quotes ;) ] instead of
"newTab(soundpg, true);" it should work.

I should also note that apps.browserCodeDir is not your home directory
or any useful directory, its closely associated to your webian
installation; as an example this is my apps.browserCodeDir running my
dev version: '/home/sam/code/git/webian/chromeless/build/Webian
Shell.xul/browser_code'

>>
>> I'm not sure what you would want to achieve using that, could you
>> elaborate on your idea with this please?
>>
> TiddlyWiki is a unique, extremely powerfull and customizable
> singlepage html-app. It can save itself back to disk . and all editing
> is made from it's own interface directly in the browser.
> I use it to create/design all kinds of learning aid applications -
> ie.: import csv data for automatic rendering of lists with all kinds
> of data, images etc.. which I and my collegues use every day at my
> job.
> I'm a teacher at an independent boarding school for lower secondary
> students. Denmark - "Efterskole"(http://himmerlands-ungdomsskole.dk).
>
> TiddlyWikis ability to work as a local (and editable) webpage makes it
> very usable in an educational setting, where I want to hand out
> material which will present itself in a "webby" manner - even if it's
> executed from a pc even without internet connection... I can link to
> files (relative to the TiddlyWiki file) and I can link from one
> microcontent area (a socalled "tiddler") of the TiddlyWiki file to
> another microcontent area (tiddler) in the same - or another
> TiddlyWiki file. Every tiddler can be tagged or have custom fields
> appended for all types of aggregation of lists and tables - which is
> all we need to make simple a hypertext engine turn into a versatile
> database application...
>

I've had a brief look at tiddlywiki, I'm not sure how it stores the
HTML/JS/etc offline, does it rely on the browser cache, downloading the
page and redirecting ... ?

> I've started a couple of relatively small projects which might explain
> why Webian Shell might be my next attempt to create something which
> could be called a portable LMS based on TiddlyWiki :
> 1) The USB-panel project: http://db.tt/CYxsq2G was about delivering a
> menu packaged with open source portable apps to all students via an
> USB stick...

OK, is it like the portableapps.com project?

> 1 b - I made a Puppy Linux remaster which was bootable from the same
> USB-stick. The panel was available in Puppy Linux and most of the apps
> would run via Wine..
> 2) The TW_OS project:
> http://howtoos.tiddlyspace.com/#TiddlyWiki-OS
> http://tw-os.tiddlyspace.com/ & http://tw-os-dk.tiddlyspace.com/
> http://www.murga-linux.com/puppy/viewtopic.php?p=519247

That looks pretty cool.

> 3) http://tiddlyspace.gir.dk is the place where I test and develop
> many different TiddlyWiki apps and designs - most of them will work
> offline as well..
> http://tiddlyspace.com is the original tiddlyspace service where *a
> bunch* of people (3,839 users in less than a year) are working with
> TiddlyWiki and other html applications...
>
> Why I want to use Webian Shell:
> 1) I want to give my students a browser which takes over their
> desktops and give them an experience free from the sort distraction
> they "enjoy" from their normal browser - (facebook - various games
> etc ... AND I want to deliver TiddlyWikis designed and prepared for
> education - some of the material packaged with Webian Shell and some
> of it is accessed online.

I think webian shell works with facebook, although I'd have to ask Ben
as he uses it :P
As an aside, you could edit /etc/hosts.deny in Linux to deny facebook,
twitter etc use rather than use a new browser.

> TiddlyWiki has plugins available which allows for browsing the local
> filesystem and to run desktop programs directly from the browser -
> however some security settings have to be overridden to make them
> work, which is why I will make most of the material available as html
> or plain text - either iframed or as "standalone" TiddlyWikis, (I
> guess it's too difficult to open pdf documents or online google docs
> etc - in Webian Shell)...
>

The filesystem access is on the roadmap and you can get read only access
to the filesystem by using "file://"
Google docs doesn't work at the moment, but something like pdf.js should
work.

> 2) I want to customize/remaster a tiny Puppy Linux distribution which
> will open Webian Shell as the primary "desktop environment"
> effectively making TiddlyWiki *the* application you use for all tasks
> -
> a Text editing (plain text with wiki markup - or via CK-editorplugin
> WYSIWYG from a local CK-editor directory - tested and working
> already!!)
> b Calculation (javascript calculator)
> c Browsing the net (MiniBrowser plugin for easy bookmarking and maybe
> Tiddlysnips browser extension (if it's installable in Webian Shell?) -
> links and simple iframes)

Just use webian shell :P ;)

> d Different TiddlyWiki applications taylored for specialized tasks:
> i MGTD (MGSD) - System for getting things done
> ii NoteStorm - System for taking and organizing notes
> iii DarkEditor clone in TiddlyWiki - for writing without distraction
> iv TWYP - creating a YouYube scrapbook from browsing/searching YouTube
> videos inline...
> v Collaboration via http://willyou.typewith.me documents - organized
> in a TW
> etc etc etc....
>

That should all be doable.

> (Only thing I miss in Webian Shell - is the ability to use Google docs
> (especially the docs-viewer ) via iframes in TiddlyWiki)

Theres a limit for security reasons in the way webian shell has access
to system resources which causes this error. Hopefull Ben's work with
Mozilla will fix this in the near future.

>
> All ideas mentioned in 2) can be implemented in 1) - the Puppy
> remaster idea is intended for slow laptops (bloated, virusinfected or
> simply overloaded systems like Vista on old hardware etc..) which will
> boot from an USB. They will run extremely fast when Puppy is loaded in
> RAM. If you have students who are *too easily* distracted when they
> have access to their own desktop environment - even when Webian Shell
> is loaded as an overlay, - then it might be a good option to be able
> to boot into Webian Shell working as an overlay on Puppy Linux :-)

That sounds a good idea.

>
> I've tested Webian Shell on Puppy Linux, created a shell-script to
> load it as a program on startup - and it works very well :-)
>

Excellent :)

> Hope this answers your question?

Yes, it sounds an interesting project to work on. I'll try to help as
far as my time commitments allow :)

>
> Cheers M�ns M�rtensson


- --
Thanks,

Sam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7mkvQACgkQHLRhmt89eyL5XACeMCQZdpuxxNT3inBrIVu9UNHQ
L3EAoJRLzA/56ufm+tYAKUCkvmQlcyNp
=h8Gt
-----END PGP SIGNATURE-----

Måns

unread,
Dec 13, 2011, 4:12:33 AM12/13/11
to webian
Hi Sam


> Ah. You've taken the next line as well which isn't in the webian code at
> all; if you just have "newTab(soundpg);" [no quotes ;) ] instead of
> "newTab(soundpg, true);" it should work.

Argh - Still same problem. It wont open in fullscreen mode anymore,
buttons dont work and my page doesn't open..
Maybe the problem comes down to the fact that I don't set the filepath
correctly - I will investigate further...

> I've had a brief look at tiddlywiki, I'm not sure how it stores the
> HTML/JS/etc offline, does it rely on the browser cache, downloading the
> page and redirecting ... ?

Maybe the answer is in here somewhere?: http://www.tiddlytools.com/insideTW/#FileSystem.js
Check: http://www.tiddlytools.com/insideTW/#mozillaSaveFile

> As an aside, you could edit /etc/hosts.deny in Linux to deny facebook,
> twitter etc use rather than use a new browser.

Ok - Nice tip! Thanks :-)

> The filesystem access is on the roadmap and you can get read only access
> to the filesystem by using "file://"
> Google docs doesn't work at the moment, but something like pdf.js should
> work.

Ok

> Just use webian shell :P ;)

Thank you :-)

> Theres a limit for security reasons in the way webian shell has access
> to system resources which causes this error. Hopefull Ben's work with
> Mozilla will fix this in the near future.

I look forward to it.

> I'll try to help as far as my time commitments allow :)

Thank you :-)

Cheers Måns Mårtensson

Måns

unread,
Dec 13, 2011, 2:16:08 PM12/13/11
to webian
Hi Sam

This looks very promising (Gtk3 and html5):

http://www.youtube.com/watch?feature=player_embedded&v=AO-qca9ddqg

Server and client should be OS-agnostic from what I'm told...
This indicates that you might be able to run desktop applications
inside the Webian Shell browser, never leaving the browser....?!

Cheers Måns Mårtensson

Reply all
Reply to author
Forward
0 new messages