Is it possible to run the existing Self implementation in a headless environment? For example, running a webserver on a remote machine accessed via ssh.
Chris. -- http://www.bluishcoder.co.nz
Hi Chris,
Self's quite happy to run with or without the gui.
Easiest way to create a headless image:-
Start Self from the command line:
Self -s Clean.snap
Then close the desktop:
desktop close desktop stop
Then save:
quit
(and follow prompts to save the snapshot)
When you restart it won't open any windows.
If you make your snapshots executable, you can run them from the shell like applications (assuming you have installed the VM of course!):
./Clean.snap
Cheers,
Russell
On 21/07/2009, at 11:31 AM, Chris Double wrote:
Is it possible to run the existing Self implementation in a headless environment? For example, running a webserver on a remote machine accessed via ssh.
Chris.
On Tue, Jul 21, 2009 at 1:54 PM, Russell Allenmail@russell-allen.com wrote:
Self's quite happy to run with or without the gui. Easiest way to create a headless image:- ...
Great, thanks Russell, I'll give that a try. Would creating an image from scratch using "'small.self' _RunScript" also do the trick or will that leave important stuff out?
Chris.
Not sure. I need to go through all those image building scripts and check they are still working (and maybe refactor them into a single script with parameters).
(Unless you want to do it for me :) :)
If you build an image from scratch with 'all2.self' _RunScript and save it without first doing a 'desktop open' it will also be a 'headless' image. It will have the ui objects in there, but they don't take up much space.
Russell
On 21/07/2009, at 11:57 AM, Chris Double wrote:
On Tue, Jul 21, 2009 at 1:54 PM, Russell Allen<mail@russell- allen.com> wrote:
Self's quite happy to run with or without the gui. Easiest way to create a headless image:- ...
Great, thanks Russell, I'll give that a try. Would creating an image from scratch using "'small.self' _RunScript" also do the trick or will that leave important stuff out?
Chris.
On Tue, Jul 21, 2009 at 2:03 PM, Russell Allenmail@russell-allen.com wrote:
Not sure. I need to go through all those image building scripts and check they are still working (and maybe refactor them into a single script with parameters). (Unless you want to do it for me :) :)
The Linux one needs some tweaks to work on my Linux distro (Arch Linux). I had to change bin/src/makeDeps.cpp:
# ifdef __linux__ -# include <c++/4.1/new> +# include <new> # endif
In /bin/src/MakefileBinList I change the linker line for skipComments and removeUnderscore to use -lfl rather than -ll (I use flex). I also installed tcsh since one of the scripts seems to rely on it.
With those changes Self built fine using the buildLinuxVM shell script. I can prepare a patch or put a commit on github if you want these.
If you build an image from scratch with 'all2.self' _RunScript and save it without first doing a 'desktop open' it will also be a 'headless' image. It will have the ui objects in there, but they don't take up much space.
Thanks, this worked fine.
Chris.
What version of GCC are you using?
-Russell
On 21/07/2009, at 12:08 PM, Chris Double wrote:
On Tue, Jul 21, 2009 at 2:03 PM, Russell Allen<mail@russell- allen.com> wrote:
Not sure. I need to go through all those image building scripts
and check
they are still working (and maybe refactor them into a single
script with
parameters). (Unless you want to do it for me :) :)
The Linux one needs some tweaks to work on my Linux distro (Arch Linux). I had to change bin/src/makeDeps.cpp:
# ifdef __linux__ -# include <c++/4.1/new> +# include <new> # endif
In /bin/src/MakefileBinList I change the linker line for skipComments and removeUnderscore to use -lfl rather than -ll (I use flex). I also installed tcsh since one of the scripts seems to rely on it.
With those changes Self built fine using the buildLinuxVM shell script. I can prepare a patch or put a commit on github if you want these.
If you build an image from scratch with 'all2.self' _RunScript and
save it
without first doing a 'desktop open' it will also be a 'headless'
image. It
will have the ui objects in there, but they don't take up much
space.
Thanks, this worked fine.
Chris.
On Tue, Jul 21, 2009 at 2:18 PM, Russell Allenmail@russell-allen.com wrote:
What version of GCC are you using?
$ gcc --version gcc (GCC) 4.4.0 20090526 (prerelease) Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chris.
Cool. Glad to see it works on the latest. Any problems or warnings compiling?
-Russell
On 21/07/2009, at 12:22 PM, Chris Double wrote:
On Tue, Jul 21, 2009 at 2:18 PM, Russell Allen<mail@russell- allen.com> wrote:
What version of GCC are you using?
$ gcc --version gcc (GCC) 4.4.0 20090526 (prerelease) Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chris.
On Tue, Jul 21, 2009 at 2:32 PM, Russell Allenmail@russell-allen.com wrote:
Cool. Glad to see it works on the latest. Any problems or warnings compiling?
It seems to run ok so far. There are a bunch of warnings during compilation. For example:
../../../vm/src/any/fast_compiler/blist.hh:46: warning: deprecated conversion from string constant to ‘char*’
But nothing major. It'll be interesting to see what Self is like on the headless server. I've only really played around with the GUI before.
Chris.
Hi Chris,
I've merged your changes.
I've also added a new flag: -headless
If you build a new image from the latest sources using 'all2.self' you should be able to start it without the gui by:
Self -headless -s mysnap.snap
Russell
On 21/07/2009, at 12:44 PM, Chris Double wrote:
On Tue, Jul 21, 2009 at 2:32 PM, Russell Allen<mail@russell- allen.com> wrote:
Cool. Glad to see it works on the latest. Any problems or warnings compiling?
It seems to run ok so far. There are a bunch of warnings during compilation. For example:
../../../vm/src/any/fast_compiler/blist.hh:46: warning: deprecated conversion from string constant to ‘char*’
But nothing major. It'll be interesting to see what Self is like on the headless server. I've only really played around with the GUI before.
Chris.
Yahoo! Groups Links
self-interest@lists.selflanguage.org