[The Gimp] clashes with REBOL on Windows 2000
[1/30] from: apwing::zonnet::nl at: 2-May-2004 16:30
Hi all, when I tried to install The Gimp on Windows 2000 I found out that there is a clash with REBOL. I've set the environment variable HOME to point to the REBOL/View executable. However, The Gimp seems to take HOME as it's place to write user dependent info and tries to create directories and files at that place. Does anybody know whether there is an alternative name for HOME to point to the REBOL stuff, or to direct The Gimp elsewhere? I already tried to remove HOME temporarily, then letting The Gimp create it's stuff (now in an appropriate user dependent place). When I then start The Gimp later it works fine. However, when I reintroduce HOME, The Gimp gets lost again and wants to use HOME again. Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/
[2/30] from: bry:itnisk at: 2-May-2004 19:12
well this is sort of weird, I don't have a home environment variable, and rebol seems to work fine.
[3/30] from: moliad:aei:ca at: 3-May-2004 4:33
what you are looking for is: REBOL_HOME I *THINK* Rebol puts more importance to this than system home. HTH! -MAx
[4/30] from: apwing:zonnet:nl at: 3-May-2004 12:35
Hi Max, some time ago I had problems with my user.r file not being used. Than I got some advice in the list to use the HOME environment variable. That variable is documented in REBOL/Core User Guide Chapter 1.2. I'll now try REBOL_HOME. Where is it documented? Thanks! Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/
[5/30] from: g:santilli:tiscalinet:it at: 3-May-2004 15:20
Hi Arie, On Sunday, May 2, 2004, 4:30:41 PM, you wrote: AvW> when I tried to install The Gimp on Windows 2000 I found out that there is a AvW> clash with REBOL. AvW> I've set the environment variable HOME to point to the REBOL/View AvW> executable. I think you can use REBOL_HOME (or was it REBOL-HOME?) for REBOL. Anyway you shouldn't really need it for /View, since it should be using the registry anyway. (You'd still need it for /Core if you don't always start it from its dir, i.e. if you start it from a DOS command prompt etc.) I don't have HOME set up here and REBOL works correctly. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/
[6/30] from: maximo:meteorstudios at: 3-May-2004 9:21
in the rebol docs... I use the old 2.3 pdf guide and its still the most feasible rebol source of info... I love the search capabilities... having things on html means you have to search throughout more than one page... not always very usefull... I wish the guide where put up to date, to core 2.5.6. -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.
[7/30] from: maximo:meteorstudios at: 3-May-2004 9:47
> -----Original Message----- > From: Gabriele Santilli [mailto:[g--santilli--tiscalinet--it]]
<<quoted lines omitted: 4>>> Anyway you shouldn't really need it for /View, since it should be > using the registry anyway.
that is true sometimes... but I've found that the moment you install your second version of view ALL HELL BREAKS LOOSE and your user.r becomes out of control. what is it with the install tool copying rebol.exe and the user.r in A home directory !? running a rebol in a shell and running one in an icon can be different,creating your own aplication icon will point to the rebol you point to, yet the registry points to a copy in your profile or home dir, yet the installer asks for an install dir... why !?. really, I wish rebol/view would let you do a dumb install (or at least ask you) and NOT play around with the registry... especially when it has to be installed on several computers at once, and they all share the same network path... maybe RT could just package on rebol view which does not include the installer (like the beta versions :-)... for those of us who know how rebol works... I've said it before so I'll shut up now... everyone is tired of me saying it... ;-) ciao!
[8/30] from: apwing:zonnet:nl at: 3-May-2004 16:18
Hi Max and Gabriele, thanks for your help! In the REBOL Language FAQ I found a reference to REBOL_HOME, but I couldn't find references anywhere else! There are however references to the HOME variable in de Core Users Guide. As you say Gabriele, indeed I found a variable HOME in the registry, pointing to the correct directory. My problem however is that my user.r doesn't get executed without a correct HOME environment variable! Replacing HOME with REBOL_HOME just makes that user.r doesn't get executed anymore, which is bad! What is also important is that it did work without problems (without an environment variable), when I had the regular REBOL/View version running. The problem started when I switched to the latest View Beta (rebview1246031.exe). I then could solve it with a HOME env. var to get user.r executed again. But now the Gimp really needs (another) HOME var and clashes with REBOL. Using REBOL_HOME doesn't work AFAICS Any ideas? BTW, I really do not understand why RT doesn't package View beta releases in exactly the same way as regular releases!!! Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/
[9/30] from: maximo:meteorstudios at: 3-May-2004 11:00
but did you put a user.r file in the REBOL_HOME path? it might help you if you put the following in ALL your user.r files: probe what-dir this will at least tell you WHICH user.r is being run... also remember that if you create an icon and give it a startup directory, it will be looking for an user.r directory THERE first. -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.
[10/30] from: antonr:lexicon at: 4-May-2004 1:14
I am using latest View beta 1.2.46 without using a HOME variable. (I see it in the registry though, don't know how old it is). I have my rebview1246031.exe and all the other versions in the same directory, which works just fine. The user.r is executed no problem. You are right, though, if a home variable is set to, say, C:\, then system/options/home is set there and user.r is looked for there. I'll mention this issue on Rebol-View world and add it to the bug tracker. I'd prefer if releases were more consistent in packaging too. Anton.
[11/30] from: apwing:zonnet:nl at: 3-May-2004 17:37
Hi Max, when I first checked the Core Users Guide I looked at http://www.rebol.com/docs/core23/rebolcore-2.html#section-2.10 where only an env. var HOME is introduced. Like you, however, I also have my printed copy of that manual and there in section 2.10 HOME is exchanged with REBOL_HOME in the text ! Might it be the case that the RT online version is more up-to-date and that REBOL_HOME is obsolete in favor of HOME ???? Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/
[12/30] from: apwing:zonnet:nl at: 3-May-2004 19:14
Hi Max, in fact I only have 1 user.r file in the correct dir and I do display what-dir from it. It does display correct when I use the HOME variable but right after switching to REBOL_HOME (with exactly the same contents as HOME had) there's no display, so user.r was not loaded. I don't know when the new View will finally be available - perhaps I should wait till then ;-D Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/ ----- Original Message ----- From: "Maxim Olivier-Adlhoch" <[maximo--meteorstudios--com]> To: <[rebol-list--rebol--com]> Sent: Monday, May 03, 2004 5:00 PM Subject: [REBOL] Re: [The Gimp] clashes with REBOL on Windows 2000
> but did you put a user.r file in the REBOL_HOME path? > > it might help you if you put the following in ALL your user.r files: > > probe what-dir > > this will at least tell you WHICH user.r is being run... also remember
that if you create an icon and give it a startup directory, it will be looking for an user.r directory THERE first.
[13/30] from: maximo:meteorstudios at: 3-May-2004 14:35
strange indeed... :-( -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.
[14/30] from: lmecir:mbox:vol:cz at: 4-May-2004 7:20
>in fact I only have 1 user.r file in the correct dir and I do display >what-dir from it. >It does display correct when I use the HOME variable >but right after switching to REBOL_HOME (with exactly the same contents as >HOME had) there's no display, so user.r was not loaded. >
I am using more than one %user.r without any problem and without using any _HOME variable at all. I just start the interpreter in the directory, where the proper %user.r is. -L
[15/30] from: apwing:zonnet:nl at: 4-May-2004 13:08
Hi Ladislav, due to the fact that several experienced people (like you) told me that it works fine w/o an environment variable, I decided to deinstall the whole REBOL stuff, including a clean-up of the registry and the environment vars. When I had the problems some time ago, I also had deleted the "working directory" in the properties of my REBOL desktop item. I now have restored it. Having done all that, I reinstalled the regular REBOL/View release, which works fine and obviously loads the user.r (I've got a print of what-dir in it). After that I replaced the REBOL.EXE with the latest beta and voila that works fine as well and also loads user.r!!!! Now I'm baffled, since I really have tried everything except this total cleanup and reinstall. But'I'm very glad :-)) I'm sorry to have bothered you all with a problem that now seems not to exist :-( Thanks to all of you who pointed me in the right direction!! Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/
[16/30] from: maximo:meteorstudios at: 4-May-2004 12:04
> Now I'm baffled, since I really have tried everything except > this total > cleanup and reinstall. But'I'm very glad :-)) > > I'm sorry to have bothered you all with a problem that now > seems not to > exist :-(
eh well, I consider it a problem that if you DO have a home, it *can* changes rebol's behavior. startup and install are rebol's weekest points mainly because it cannot rely on anything being set the same way. that is one reason, I find rebol/core to work fine and dandy without installer.
> Thanks to all of you who pointed me in the right direction!!
that's what the list is for. -MAx
[17/30] from: antonr:lexicon at: 5-May-2004 2:26
Perhaps it was an issue with the desktop link having its "Start in:" field set to a wrong directory ? (I just tested it, and it shows the bad behaviour.) Anton.
[18/30] from: apwing:zonnet:nl at: 4-May-2004 20:05
Hi Anton, it surely has to do with the whole problem I had. I didn't have a wrong (working) directory specified, but had the (working) directory completely blanked out from my desktop REBOL shortcut(s). In order to let REBOL still find the appropriate directory, I had the environment variable HOME point to it. And it worked fine, until I started to use a View beta. But, as I wrote earlier, it now works fine after de- / reinstall! Thanks for your help! Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/
[19/30] from: brian:hawley at: 6-May-2004 23:58
Hi Ari! You've run into a problem that tripped me up for a while: REBOL doesn't put its data in the proper places on Windows 2000 and above - in other words, it is not "logo-compliant". REBOL's default install puts its program file and data files in a directory under Program Files. Since Windows security settings prevent a standard user from writing to these program directories, only a "Power User" or administrator has sufficient permissions to use REBOL/View by default. Fortunately you can hack a REBOL/View install manually to make it mostly logo-compliant, and thus allow it to be used by ordinary users without being a security risk. Here's a quick overview, assuming a standard install of Windows 2000 or above and REBOL/View 1.2.1 to 1.2.8 (please bear with me if you know some of this, I'm trying to make it useful to others that have the same problem): First, let REBOL/View install itself into some central place such as "C:\Program Files\REBOL\View". This will set up most of the global settings in the registry and some of the local ones. Close REBOL. REBOL may have downloaded some files to this directory for the desktop - if this is a new install, you can delete everything but the program files. Next you need to create the local user settings. These are stored in the user profile directory, sort of like a user's home directory on Unix. Windows 2000 and above store their profiles in directories under "C:\Documents and Settings", earlier versions of NT under C:\WINNT\Profiles. If you have trouble finding your profile an environment variable named USERPROFILE points to it automatically - this is like the Unix variable HOME, which is not defined by default on Windows. The Gimp uses USERPROFILE on Windows by default. Now, you'll need to repeat this for each user that already has a user profile created. Find the "Application Data" folder in the profile directory. It will be hidden. If you aren't sure where it is, there is an environment variable APPDATA that points to it. Create a REBOL subdirectory in that folder. That will be your REBOL home folder - make a note of where it is, it's time to hack the registry. Open a registry editor and find the key: HKEY_CURRENT_USER\Software\REBOL\View Under that key there will be a string value named HOME, which will contain a REBOL-format directory name without the % - change that value to match the REBOL home folder you created earlier, for example: /C/Documents and Settings/Ari/Application Data/REBOL/ You should be set now. When you start REBOL now it will start the program in "C:\Program Files\REBOL\View" and use your REBOL home as its working directory. If you moved over your data to that folder it should work right away; otherwise REBOL will download the files it needs. Now here comes the tricky part. You may have noticed that in under that same registry key there is another string value named Product. That key is the marker that REBOL uses to determine whether it is installed and current. The problem is that this key is in absolutely the wrong place - it should be under HKEY_LOCAL_MACHINE, as it is a global setting, and treated as such by REBOL. It is a global setting because REBOL associates .r files with the REBOL executable, something that can only be done globally, and also registers an uninstaller with the Add/Remove Programs control panel (which can be done in a per-user way but they don't). Since this setting is under HKEY_CURRENT_USER every user that runs REBOL for the first time triggers a reinstall, which then messes up the registry settings for everyone. This key can't be moved to the right place either, because REBOL looks for it where it is. This is a long-standing REBOL bug. All this means that you need to create REBOL directories and REBOL\View registry keys for every user on the system and for the default user as well, just to make sure that none of the other users can mess up anyone's settings by accident. If you are an administrator you can find the registry settings in the subkeys of HKEY_USERS that don't end in _Classes - just replicate the Software\REBOL\View settings, adjusting HOME accordingly, and don't forget Product. The default user's profile folder is the hidden Default User folder in the profiles directory. Be sure to create a REBOL folder in its "Application Data" as well, so it will be copied to new user profiles. While you're at it, you might as well get rid of the uninstall reference to REBOL in the registry too - it doesn't do much and isn't secured against use by Users. REBOL is easy to uninstall manually anyway, except the plugin version. I hope this info helps. It should even be enough to aid in the creation of a installer script if anyone is so inclined. This method will even work on Windows 9x, but you'll need to follow the registry key versions of the environment variables that 9x doesn't define - ask me for details if you need to. I'd be quite happy to rewrite the REBOL built-in installer script if anyone would be interested. Good luck, Ari! Brian Hawley At 04:30 PM 5/2/04 +0200, Arie van Wingerden wrote:
[20/30] from: apwing:zonnet:nl at: 7-May-2004 12:11
Hi Brian, thanks for your impressive answer! At the moment I can live again with my REBOL installation (as I wrote earlier) but surely I will save your e-mail in order to be able to use it when any such problem comes up again. Luckily enough I use an account with administrator rights and I don't use REBOL from any other accounts currently. That makes the case a lot less complicated for me then. Your suggestion to create a full-proof install-script sounds like a great idea. Perhaps it would be even better to also have the script clean-up any old REBOL installs before it does a new install? (In fact RT should also improve the install part or, perhaps even better, remove "installation" as it is done now.) All in all a very good idea Brian! I think it could help a lot of people. Thanks again. Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/
[21/30] from: greggirwin:mindspring at: 7-May-2004 7:27
Excellent info Brian, Can we add it to REBOL.org somewhere (with due credit of course)? If people think that would be a good thing, could a couple other people review it as well? Thanks! -- Gregg
[22/30] from: brian:hawley at: 7-May-2004 10:28
Hey Gregg, At 07:27 AM 5/7/04 -0600, Gregg wrote:
>Excellent info Brian, > >Can we add it to REBOL.org somewhere (with due credit of course)? > >If people think that would be a good thing, could a couple other >people review it as well?
Sure, although I'd like to be one of those people. I've had a lot of time to give this problem thought - years, actually. If you want I have more detail on the registry settings from an email I wrote to this list on 16-Aug-2002, and more about directories from a feedback about the subject I sent in Sep-2000. Unfortunately this installation problem is a bit of a pet peeve for me. That's why my emails on the subject have been a bit more impressive (thanks Ari!) than I would like. If I could afford to buy the SDK I would have rewritten the installer years ago and submitted my changes to RT. I have offered to do so before, no charge, but I need the existing installer source first.
>Thanks! > >-- Gregg
No problem! Brian Hawley
[23/30] from: greggirwin:mindspring at: 7-May-2004 15:05
Hi Brian, Thanks very much! It would be really terrific if you could do your review and coordinate a couple other volunteers (anyone willing?) then give us a ping when you think it's ready. I'll also take any input you have as I'm working on an installer project, and I do have the SDK. Thanks again! -- Gregg
[24/30] from: brian:hawley at: 7-May-2004 22:16
Sure! Give me an idea of what you have in mind (script, tutorial, essay) and I'll do what I can. I've been writing installer scripts of various forms since the Win 3.1 days and I'd be interested in an excuse to see what changes the last couple of years have brought. Brian Hawley At 03:05 PM 5/7/04 -0600, Gregg wrote:
[25/30] from: apwing:zonnet:nl at: 8-May-2004 13:24
Hi Brian and Gregg, if you need volunteers for the "REBOL/View install project" I'm happy to join. If you're gonna script, I think you should keep a few things in mind: 1. RT delivers stable releases with installer (or can you persuade RT to not ship with an installer???) 2. RT delivers beta releases without installer 3. is the installing userid a user with or without admin rights? 4. should an installation concern all users on a given system or not? So, in case 1 one has to install at first the RT way. Only after installing your script comes round the corner and has to: - clean up the "mess" created by RT installer - do a proper (re)install In case 2 the script could be used right away BTW Brian, AFAIK the default directory where REBOL installs is C:\REBOL\VIEW and not C:\Program Files ;-) Thanks so much for the effort you are willing to put in this project! Met vriendelijke groet / with kind regards, Arie van Wingerden http://home.zonnet.nl/rebolution/
[26/30] from: brian:hawley at: 8-May-2004 15:02
Hello again Ari, At 01:24 PM 5/8/04 +0200, you wrote:
>Hi Brian and Gregg, > >if you need volunteers for the "REBOL/View install project" I'm happy to >join. > >If you're gonna script, I think you should keep a few things in mind: > 1. RT delivers stable releases with installer (or can you persuade RT to >not ship with an installer???)
Better yet, persuade RT to fix theirs, or even better, let us do so.
> 2. RT delivers beta releases without installer > 3. is the installing userid a user with or without admin rights?
So far, installing REBOL/View requires at least "Power User" rights. Perhaps it the installer can bail out for regular users and run as if the --noinstall option was selected - it should do this anyway for security reasons. Of course no such restrictions would have to be followed if the system is running on FAT filesystems, signaling that security isn't a concern. Keep in mind that all Win9x users have admin rights though.
> 4. should an installation concern all users on a given system or not?
As long as the installer is setting up associations for .r file types, it does concern all users on the system. The important thing to remember here is REBOL's sandbox security. We need to prevent ordinary users from having write access to the installed REBOL executable without prompting and the easiest way to do that is to put it in a different directory than their data. This will prevent downloaded scripts from replacing the executable with something nasty. Even on FAT systems and for admin users we should pretend that this distinction exists. Security matters, even on Windows.
>So, in case 1 one has to install at first the RT way. Only after installing >your script comes round the corner and has to: > - clean up the "mess" created by RT installer > - do a proper (re)install >In case 2 the script could be used right away
Yup. That will deal with all problems except those posed by the registry use by the existing RT installer.
>BTW Brian, AFAIK the default directory where REBOL installs is C:\REBOL\VIEW >and not C:\Program Files ;-)
So it is. That would be the first thing to fix then.
>Thanks so much for the effort you are willing to put in this project! > >Met vriendelijke groet / with kind regards, > Arie van Wingerden >http://home.zonnet.nl/rebolution/
Of course - this is fun! Brian Hawley
[27/30] from: greggirwin:mindspring at: 8-May-2004 14:33
Hi Brian, BH> Give me an idea of what you have in mind (script, tutorial, essay) BH> and I'll do what I can. I've been writing installer scripts of BH> various forms since the Win 3.1 days and I'd be interested in an BH> excuse to see what changes the last couple of years have brought. For starters, just basically what you posted here about what issues there are with the current installer and how to avoid/work-around them. 'tutorial is probably closest to that; kind of a 'how-to. If you wanted to write a little REBOL script that could tell you what your current setup is, and offered an easy way to configure things per your recommendations, that would be waaaaay cool. :) -- Gregg
[28/30] from: antonr:lexicon at: 10-May-2004 0:18
I just tried opening a copy of my rebol.exe, named rebolblah.exe and within the rebol console to delete %rebolblah.exe. This produces a write access error. As far as I know you can't modify a running executable. That's on WindowsXP. I can't remember if Win9x allows that. Anyone ? Anton.
[29/30] from: brian:hawley at: 9-May-2004 15:15
Hi Anton, I just ran REBOL/View from my REBOL home directory to test the default install behavior. I was able to rename rebol.exe to another file name (blah.bak) and then write out a random file downloaded from a remote web site to a file named rebol.exe . You don't have to delete the file for this exploit to work. This is a major security hole. And yes, I was on Windows XP. Keep in mind that I was running in the console though. Scripts started from the REBOL desktop are sandboxed in their folders under public, so it's not as bad as it could be. View scripts started from the desktop actually need Pro or Command features to do more than fill your hard drive; with Library support or call enabled all bets are off though. Brian Hawley At 12:18 AM 5/10/04 +1000, you wrote:
[30/30] from: antonr:lexicon at: 10-May-2004 20:19
Well, I'll be damned! (or should I say infiltrated) Anton.
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted