How does a user configure a server to allow saving a Lively world? Is it
possible to save a world if loading a file directly from the filesystem? Up until now I've been calling my own code from Main.js when working locally - and without persistence. All of the following is based on a checkout I did about a week ago. In brazil.config Changed port to 80. (was 8081) Uncommented proxy lines. In defaultconfig.js Changed port to 80. (was 8081) Ran 'runbrazil.sh' as root. Load index.xhtml Can't load Pen.lkml Can't load finance.google.com Can't load download.finance.yahoo.com Can't load feeds.bbc.co.uk.com I edited brazil.config and added: mime.lkml=text/xml Pen.lkml now loads when I refer to it directly. These are the lines I had uncommented in brazil.config for the proxy handling. proxymap.class=sunlabs.brazil.handler.UrlMapperHandler proxymap.match=^/proxy/(.*) proxymap.replace=http://\\1 proxy.class=sunlabs.brazil.proxy.ProxyHandler Tried to access directly: http://127.0.0.1/trunk/source/kernel/proxy/www.apple.com Got the error: Not Found while trying to obtain /trunk/source/kernel/proxy/www.apple.com Up until now I've been calling my own code from Main.js when working locally. I will keep working in the wiki online but I'd feel like less of a wiki spammer if I get this running locally. I also need to be able to test locally with persistence.@some point I'd also like to be able to host (displaying a Lively badge of course). :-) Errata: Otherwise if I load the world directly from the filesystem and select "publish world as", I see Null value Core.js line 719. Not sure if Lively is meant to work this way though. :-) addSystemDictionary: function(doc) { var dict = lively.data.Wrapper.dictionary; if (!dict) return; var preExisting = doc.getElementById(dict.id); // <----------------------- Core.js line 719 if (preExisting) preExisting.parentNode.removeChild(preExisting); var newDict = dict.cloneNode(true); doc.getElementsByTagName('svg')[0].appendChild(doc.importNode(newDict, true)); }, -------------- next part -------------- An HTML attachment was scrubbed... URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090312/eb792d42/attachment.html |
I've made some more progress.
In brazil.config, change main.handlers to: main.handlers=session proxymap proxy template file In defaultconfig.js: (maybe even localconfig.js) proxyURL: 'http://127.0.0.1/proxy/', (error with http://127.0.0.1:80/proxy/) When I try to authenticate, the WikiNavigator can not be found. This is likely because in Main.js, the WikiNavigator is initialized only if the page/world has serialized contents. If any of this is documented somewhere or if other config files exist I've missed it. On Thu, Mar 12, 2009@11:31 AM, Philip Weaver <[hidden email]> wrote: > How does a user configure a server to allow saving a Lively world? Is it > possible to save a world if loading a file directly from the filesystem? Up > until now I've been calling my own code from Main.js when working locally - > and without persistence. > > All of the following is based on a checkout I did about a week ago. > > In brazil.config > Changed port to 80. (was 8081) > Uncommented proxy lines. > In defaultconfig.js > Changed port to 80. (was 8081) > Ran 'runbrazil.sh' as root. > Load index.xhtml > Can't load Pen.lkml > Can't load finance.google.com > Can't load download.finance.yahoo.com > Can't load feeds.bbc.co.uk.com > > I edited brazil.config and added: mime.lkml=text/xml > Pen.lkml now loads when I refer to it directly. > > These are the lines I had uncommented in brazil.config for the proxy > handling. > proxymap.class=sunlabs.brazil.handler.UrlMapperHandler > proxymap.match=^/proxy/(.*) > proxymap.replace=http://\\1 > proxy.class=sunlabs.brazil.proxy.ProxyHandler > > Tried to access directly: > http://127.0.0.1/trunk/source/kernel/proxy/www.apple.com > Got the error: Not Found > while trying to obtain /trunk/source/kernel/proxy/www.apple.com > > Up until now I've been calling my own code from Main.js when working > locally. I will keep working in the wiki online but I'd feel like less of a > wiki spammer if I get this running locally. I also need to be able to test > locally with persistence.@some point I'd also like to be able to host > (displaying a Lively badge of course). :-) > > Errata: Otherwise if I load the world directly from the filesystem and > select "publish world as", I see Null value Core.js line 719. Not sure if > Lively is meant to work this way though. :-) > > addSystemDictionary: function(doc) { > var dict = lively.data.Wrapper.dictionary; > if (!dict) return; > var preExisting = doc.getElementById(dict.id); // <----------------------- > Core.js line 719 > if (preExisting) > preExisting.parentNode.removeChild(preExisting); > var newDict = dict.cloneNode(true); > doc.getElementsByTagName('svg')[0].appendChild(doc.importNode(newDict, > true)); > }, > An HTML attachment was scrubbed... URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090312/a06c72db/attachment.html |
I tweaked Main.js so the wiki navigator is enabled even if the world has no
serialized contents: if (documentHasSerializedMorphs(document)) { ... snip ... } else { world = new WorldMorph(canvas); // Create an empty world world.displayOnCanvas(canvas); if (Config.showWikiNavigator) { require('LKWiki.js').toRun(function() { console.log('starting WikiNavigator'); WikiNavigator.enableWikiNavigator(); }); } } But console.log('starting WikiNavigator') is never called and I see the following in the console: http://127.0.0.1/trunk/source/kernel/anonymous_module_0 has unloaded requirements: http://127.0.0.1/trunk/source/kernel/LKWiki.js -------------- next part -------------- An HTML attachment was scrubbed... URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090312/88cb2f62/attachment.html |
I realized to look over here:
http://livelykernel.sunlabs.com/repository/lively-wiki/localconfig.jsArgh. This should be somewhere in lively-kernel/trunk as wikiConfig.js or something. What I wrote earlier about moving the code for 'showWikiNavigator' was probably wrong. I'll try to go through all of this again and write some instructions. The main problems I've encountered I think were - configuring brazil.config - localconfig.js for the wiki is not part of: http://livelykernel.sunlabs.com/repository/lively-kernel/trunk/ - and this is where I had checkout from. Finally realized to look in repository/lively-wiki -------------- next part -------------- An HTML attachment was scrubbed... URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090312/64b19e40/attachment.html |
In reply to this post by Philip Weaver
I don't normally save/publish worlds, but@some point I tested and
successfully saved a world using the apache mod_dav. My configuration that looks something like this. ... LoadModule dav_module modules/mod_dav.so LoadModule dav_fs_module modules/mod_dav_fs.so ... Alias /lk "C:/lk" <Location /lk> Dav On # Auth config for this location </Location> ... # I don't use the generic proxy mechanism in LK # I define a proxy for each resource separately <Location /some_prefix/> # Auth config for this location ProxyPass http://destination_host/... </Location> BR, Juhani On Thu, Mar 12, 2009@6:31 PM, Philip Weaver <[hidden email]> wrote: > How does a user configure a server to allow saving a Lively world? Is it > possible to save a world if loading a file directly from the filesystem? Up > until now I've been calling my own code from Main.js when working locally - > and without persistence. > > All of the following is based on a checkout I did about a week ago. > > In brazil.config > Changed port to 80. (was 8081) > Uncommented proxy lines. > In defaultconfig.js > Changed port to 80. (was 8081) > Ran 'runbrazil.sh' as root. > Load index.xhtml > Can't load Pen.lkml > Can't load finance.google.com > Can't load download.finance.yahoo.com > Can't load feeds.bbc.co.uk.com > > I edited brazil.config and added: mime.lkml=text/xml > Pen.lkml now loads when I refer to it directly. > > These are the lines I had uncommented in brazil.config for the proxy > handling. > proxymap.class=sunlabs.brazil.handler.UrlMapperHandler > proxymap.match=^/proxy/(.*) > proxymap.replace=http://\\1 > proxy.class=sunlabs.brazil.proxy.ProxyHandler > > Tried to access directly: > http://127.0.0.1/trunk/source/kernel/proxy/www.apple.com > Got the error: Not Found > while trying to obtain /trunk/source/kernel/proxy/www.apple.com > > Up until now I've been calling my own code from Main.js when working > locally. I will keep working in the wiki online but I'd feel like less of a > wiki spammer if I get this running locally. I also need to be able to test > locally with persistence.@some point I'd also like to be able to host > (displaying a Lively badge of course). :-) > > Errata: Otherwise if I load the world directly from the filesystem and > select "publish world as", I see Null value Core.js line 719. Not sure if > Lively is meant to work this way though. :-) > > addSystemDictionary: function(doc) { > var dict = lively.data.Wrapper.dictionary; > if (!dict) return; > var preExisting = doc.getElementById(dict.id); // <----------------------- > Core.js line 719 > if (preExisting) > preExisting.parentNode.removeChild(preExisting); > var newDict = dict.cloneNode(true); > doc.getElementsByTagName('svg')[0].appendChild(doc.importNode(newDict, > true)); > }, > > _______________________________________________ > General mailing list > [hidden email] > http://livelykernel.sunlabs.com/mailman/listinfo/general > > An HTML attachment was scrubbed... URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090313/6b38c423/attachment.html |
Thanks Dan and Juhani,
I just posted some server installation instructions on the wiki: - http://livelykernel.sunlabs.com/repository/lively-wiki/server-install.xhtml Eventually this world will be linked up in the wiki. Cheers, Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090316/e3549e55/attachment.html |
Free forum by Nabble | Edit this page |