r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Linux] group for linux REBOL users

Izkata
18-Apr-2010
[3623]
I don't have any environment variable set, and my user.r is running 
fine in ~/.rebol/view/user.r (for View 2.7.6)
BrianH
18-Apr-2010
[3624x3]
Guess I don't recall correctly :(
Wait, that is the HOME directory. That is a fallback that is checked 
after looking for REBOL-HOME.
And the last fallback is the current directory (on Windows, someone 
should test this on Linux). Not very secure.
Janko
18-Apr-2010
[3627]
It seems env. variables can't have - on linux? I tried REBOLHOME 
and REBOL_HOME without lucj so far
BrianH
18-Apr-2010
[3628x2]
Unfortunately R2 only does the search for %rebol.r and %user.r once, 
not once each. This means that you can't have a %rebol.r in REBOL-HOME 
and a %user.r in HOME, so it's not very secure or multi-user friendly. 
Fixed in R3 though: %rebol.r is only loaded from the same directory 
as the executable, nowhere else, no environment variables necessary.
Apparently it's supposed to be spelled REBOL_HOME, and it needs to 
be a full path.
Janko
18-Apr-2010
[3630x2]
I can't get anything to run today as it is supposed to :/
I tried every combination I could think of

export REBOL_HOME=/usr/share/cheyenne/ (this is how I set variable, 
and without _ and without export and as string)
Maxim
18-Apr-2010
[3632x2]
quite the opposite for me ,    ;-P
(running stuff today ;-)
BrianH
18-Apr-2010
[3634]
Which version of REBOL? Which type of program (/Core, /View, etc.)?
Janko
18-Apr-2010
[3635x2]
REBOL/Core 2.7.6.4.2, debian linux (same with rebpro) .. it works 
in in view and core and rebpro on windows
I don't want to steal your time any more.. I will try this again 
.. sometimes when you return to the problem after a whike you solve 
it imediatelly
BrianH
18-Apr-2010
[3637]
/Pro executes the startup scripts? Didn't expect that to work...
Janko
18-Apr-2010
[3638x2]
it does
on windows
BrianH
18-Apr-2010
[3640]
I'm so glad we fixed this stuff in R3. R2's behavior sucks, even 
when it works.
Janko
18-Apr-2010
[3641x2]
I am having all this because I want to run source version of cheyenne 
 on linux. So now that I can do all those mezz/prot files set-net 
works, I added those do-s at the start of cheyenne.r and in includes 
it but when I load the page I still get "Set-Net not provided." http://www.invoice.ly/manage/sign-in.html
. My asumption is that because cheyenne starts multiple workers those 
workers didn't include/do all the mezz/prot files so that's why warning 
still happens event though if I halt the main cheyenne.r it has this 
included now. Thats why I wanted to add user.r to rebol so hopefully 
worker processes would load that too.
(the page didn't work before because I was hacking the server/now 
does)
Janko
19-Apr-2010
[3643x4]
Sorry folks, I am still at this.. how to autorun user.r rebol.r on 
linux with rebol/core (REBOL/Core 2.7.6.4.2)
to not do something stupid wrong. I created a user.r file with REBOL 
[] print "123456" . 
- I put it in same folder as rebol executable
- I put it in ~/.rebol and ~/.rebol/core
- I put it in the folder where rebol script is that I run
- I set REBOLHOME and REBOL_HOME to these 
  - export REBOLHOME=/usr/share/cheyenne/
  - export REBOL_HOME=/usr/share/cheyenne/
  - export REBOL_HOME="/usr/share/cheyenne/"
  - export REBOLHOME="/usr/share/cheyenne/"
  - export REBOL_HOME=/usr/share/cheyenne
  - export REBOLHOME=/usr/share/cheyenne
  - export REBOL_HOME="/usr/share/cheyenne"
  - export REBOLHOME="/usr/share/cheyenne"
I don't know what else I could try
I looked at rebol --help if there was some commandline option for 
this and it seems it isn't
Pekr
19-Apr-2010
[3647]
so user.r is not loaded at all?
Janko
19-Apr-2010
[3648]
it doesn't print 123456 when I start. I am a little insane on all 
this, so at the end it will probably some very stupid mistake on 
my part
Graham
19-Apr-2010
[3649]
don't know the answer ... but just alter cheyenne.r to run your user.r 
script
Janko
19-Apr-2010
[3650]
I did, but the "Set-Net not.." was still on page. I assume because 
cheyenne starts multiple processes and those didn't load mezz and 
prot needed for set-net ? That is at least my assumption , because 
in cheyenne.r process the set-net then worked (I added halt ant tried 
in commandline), but page still has "Set-Net..."
Pekr
19-Apr-2010
[3651x2]
set-net message is printed, because it is printed even if you start 
bare-bones rebpro kernel. This is imo a bug. But - couldn't you use 
other kernel?
or just temporarily - use core or view, those contain freed /library 
component now, no?
Graham
19-Apr-2010
[3653x3]
since you're running core, it doesn't need to load protocols
and set-net should be in the core you use to run Cheyenne
What core are you using??
Janko
19-Apr-2010
[3656x2]
I am running core to solve the user.r prbolem (which could then be 
also maybe solved in rebpro in same way) .. I am trying this with 
core, because I assume more people have it and I can't start user.r 
in core on linux either.
REBOL/Core 2.7.6.4.2
Graham
19-Apr-2010
[3658]
and when you start up this core, doesn't it have set-net???
Janko
19-Apr-2010
[3659]
Petr: I don't think other kernels on linux give me access to /Library 
(pdf/Sqlite). I can't run View because it's a VPS server without 
X.
Graham
19-Apr-2010
[3660]
And what do you want set-net anyway for?  It's a mezzanine and so 
you can just look at the source
Janko
19-Apr-2010
[3661x2]
Core has set-net. Rebpro that I need for cheyenne with sqlite/pdf 
bindigs needs set-net (I need to load the mezzaines). But I can start 
user.r in either core or rebpro so I tried to first solve user.r 
in core.
hm.. it's not very elegant, but I could probably just load the set-net 
mezzaine in cheyenne rsp pages.
Graham
19-Apr-2010
[3663x2]
I just encap everything I need into cheyenne....
rebpro came with sdk or with view/pro ?
Janko
19-Apr-2010
[3665]
sdk.. thanks Graham .. you asking me about it gave me the obvious 
idea that I can just load mezz before calling set-net in my webapp. 
I think this should work
Pekr
19-Apr-2010
[3666x3]
Graham - the thing is, that when you start Rebpro, it errors out 
on missing set-net kind of funcs. That is why Janko tries to load 
it somewhere in user.r, to prevent the bug.
This is what I get:

Script: "User Preferences" (6-Jan-2009/21:58:59+1:00)
Set-Net not provided.
** Script Error: set-user-name has no value
** Near: set-user-name "Petr Krenzelok"
if (not none? system/view) [
    system/view/screen-face/options: none
]
Janko - no rebcmd in your SDK?
Janko
19-Apr-2010
[3669x3]
there is rebcmd.. when I run it it shows

/usr/share/cheyenne/rebol-sdk-276/tools/rebcmd: error while loading 
shared libraries: libstdc++.so.5: cannot open shared
 object file: No such file or directory

is rebcmd the "main" reb pro VM?
wow!! it seems to work (I installed libstdc++5 and ran with rebcmd)!!!!
because I couldn't make it work even with loading mezz / prots before 
on-page-start .. I was still figuring it out and trying .. but this 
works!!
Pekr
19-Apr-2010
[3672]
great! :-)