Re: AllVersions: Running Cygwin X w/ Registy Entries
Dave, Chris, * Chris Taylor (2005-10-27 10:59 +0100) Dave Korn wrote: Thorsten Kampe wrote: * Chris Taylor (2005-10-26 17:38 +0100) Problem with that is that if the sysadmin knows what he's doing, it only takes about 4 seconds to block off almost all possible ways of actually editing the registry... Definitely not. Oh yes it does. Start-Run-regedit. Right-click the user's tree under HKEY_USERS, choose Permissions, remove their write access leaving them a read-only per-user registry tree. Easily done in 4 seconds by an experienced BOFH, and can't be reversed without admin rights! Thankyou for proving my point Dave. Does anyone else feel Thorsten should let this go now, before we all lose any semblance of respect for him as a person? (Or did that already happen to the rest of you?) You and Dave actually tried that, didn't you?! Of course you did - because, as Dave pointed out in [1]: There's an important point here. Before claiming that a piece of software does or does not exhibit a certain behaviour, DON'T JUST GUESS - TEST IT AND SEE! The bad news is that your whole scenario is absolutely pointless. The registry key under HKEY_USERS is only dynamically loaded from the user's ntuser.dat while he's *logged on*[2]. So an experienced BOFH couldn't just Right-click the user's tree under HKEY_USERS, choose Permissions, remove their write access leaving them a read-only per-user registry tree BECAUSE THERE IS NO SUCH KEY UNDER HKEY_USERS!! It's easy to verify that if you look at [3]. T. [1] http://permalink.gmane.org/gmane.os.cygwin/70828%3E [2] except systemprofile, LocalService and NetworkService which are always loaded [3] HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
Thorsten Kampe wrote: * Chris Taylor (2005-10-26 17:38 +0100) Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). Well, obviously there are a few that don't (mount, cygcheck, ash (?), etc.?) And I think it's easier to just import a reg file than dealing with multiple mount commands... Problem with that is that if the sysadmin knows what he's doing, it only takes about 4 seconds to block off almost all possible ways of actually editing the registry... Definitely not. As a user running programs you are almost constantly changing the registry (your HKEY_CURRENT_USER). So often importing a .reg file is not allowed (by double clicking) and starting regedit in GUI mode. When I say editing the registry, I'm talking about the ability to directly manipulate it with .reg files, regedit, or other registry editing tools. Yes, you are able to make changes to HKCU, but not *directly*. Your method is flawed and destroys the existing setup, which is bad. I disable ALL aspects of regedit and other tools, and I know I'm not alone in this. It's perfectly normal and *common* to do it. A batch file that checks for an existing mount table and saves it, then mounts it according to what you want is far, far better. This batch file is registry editing, too. If you edit the registry or the mount command - that's no difference from a sysadmin's point of view. It's not *directly* editing the registry. As a sysadmin, I'm telling you it *is* different. The (l)user should *never* be allowed to edit the registry themselves. That's a recipe for disaster. In my book, this includes so-called junior sysadmins/techs/whatever. Using a command that alters the registry as part of it's function, but does not allow the user to directly alter it is a very different ballgame. mount would be permissable. Some console app to directly edit the registry would not be. -- Spinning complacently in the darkness, covered and blinded by a blanket of little lives, false security has lulled the madness of this world into a slumber. Wake up! An eye is upon you, staring straight down and keenly through, seeing all that you are and everything that you will never be. Yes, an eye is upon you, an eye ready to blink. So face forward, with arms wide open and mind reeling. Your future has arrived... Are you ready to go? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
Dave Korn wrote: Thorsten Kampe wrote: * Chris Taylor (2005-10-26 17:38 +0100) Problem with that is that if the sysadmin knows what he's doing, it only takes about 4 seconds to block off almost all possible ways of actually editing the registry... Definitely not. Oh yes it does. Start-Run-regedit. Right-click the user's tree under HKEY_USERS, choose Permissions, remove their write access leaving them a read-only per-user registry tree. Easily done in 4 seconds by an experienced BOFH, and can't be reversed without admin rights! cheers, DaveK Thankyou for proving my point Dave. Does anyone else feel Thorsten should let this go now, before we all lose any semblance of respect for him as a person? (Or did that already happen to the rest of you?) Chris -- Spinning complacently in the darkness, covered and blinded by a blanket of little lives, false security has lulled the madness of this world into a slumber. Wake up! An eye is upon you, staring straight down and keenly through, seeing all that you are and everything that you will never be. Yes, an eye is upon you, an eye ready to blink. So face forward, with arms wide open and mind reeling. Your future has arrived... Are you ready to go? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
Thorsten Kampe wrote: * Dave Korn (2005-10-26 19:45 +0100) Thorsten Kampe wrote: * Chris Taylor (2005-10-26 17:38 +0100) Problem with that is that if the sysadmin knows what he's doing, it only takes about 4 seconds to block off almost all possible ways of actually editing the registry... Definitely not. Oh yes it does. Start-Run-regedit. Right-click the user's tree under HKEY_USERS, choose Permissions, remove their write access leaving them a read-only per-user registry tree. Easily done in 4 seconds by an experienced BOFH, and can't be reversed without admin rights! Yea, sure. And how many programms will you be able to run in that configuration? Will you even be able to logon? Anyway: mount won't work in that scenario either (because it modifies the registry). I can't say about mount, but pretty much any program will work, logging on will not be an issue. You just won't be able to change _anything_ in your logins setup that depends on the registry. This is an important point. You'd basically be able to create new favourites (unless said BOFH had disabled that too - not hard), and new documents in your home drive / shared work area. Chris -- Spinning complacently in the darkness, covered and blinded by a blanket of little lives, false security has lulled the madness of this world into a slumber. Wake up! An eye is upon you, staring straight down and keenly through, seeing all that you are and everything that you will never be. Yes, an eye is upon you, an eye ready to blink. So face forward, with arms wide open and mind reeling. Your future has arrived... Are you ready to go? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
Chris Taylor wrote: When I say editing the registry, I'm talking about the ability to directly manipulate it with .reg files, regedit, or other registry editing tools. You can block access to certain known tools like regedit. This does *nothing* to block access to the registry itself, except for amateur users that think regedit is the only way to access the registry. Registry keys are full NT objects each with their own ACL, and so if you *really* want to prevent someone from being able to edit the registry, this is the *only* way. And doing so breaks lots of programs that expect to be able to store their settings in HKCU. I suppose you could allow specific write access to those keys that known programs need to access, and deny everything else. But that would be an enormous amount of work, and by the time you're done you'd have granted access to a large portion of HKCU. The point here is that regedit is only *one* way of arbitrarily manipulating the registry, and a user that knows what he's doing will *always* be able to get around this. Disabling regedit is *not* a form of security, unless you define security as keeping out casual users but nothing else. Yes, you are able to make changes to HKCU, but not *directly*. echo 1 /proc/registry/HKEY_CURRENT_USER/Software/Foobar Oh look, I just edited the registry directly. Okay, so you don't allow Cygwin. So I compile a C program that takes a key+value on the command line and calls RegSetValueEx(). Oh, so you disallow that filename or checksum. So I make a different C program and call it something else. There are an infinite number of programs that I can write and it's impossible to block them all. The point here is that there is no such thing as blocking direct access while still letting some programs write to the registry. Either it's writeable or it's not. If it is, then the user can make arbitrary changes. There's no middle ground. Your method is flawed and destroys the existing setup, which is bad. I disable ALL aspects of regedit and other tools, and I know I'm not alone in this. It's perfectly normal and *common* to do it. You can disable every piece of software that has ever existed in the known universe, and I will still be able to make arbitrary registry changes if I want -- provided that the desired HKCU key is writeable. The (l)user should *never* be allowed to edit the registry themselves. That's a recipe for disaster. If you think it is possible to block direct editing of the registry while still allowing HKCU to be writeable, then you are clearly mistaken at how windows security works. Using a command that alters the registry as part of it's function, but does not allow the user to directly alter it is a very different ballgame. mount would be permissable. Some console app to directly edit the registry would not be. There is absolutely no way for a sysadmin to block one and not the other. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
Chris Taylor wrote: It's not *directly* editing the registry. As a sysadmin, I'm telling you it *is* different. The (l)user should *never* be allowed to edit the registry themselves. That's a recipe for disaster. In my book, this includes so-called junior sysadmins/techs/whatever. No one should be allowed to make software which puts the (l)user in the position of having to use registry tools. But, this will not happen. For example, it is practically impossible to use Windows outside a corporate environment without installing something from SBC which habitually messes up the registry. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
Brian Dessent wrote: Chris Taylor wrote: When I say editing the registry, I'm talking about the ability to directly manipulate it with .reg files, regedit, or other registry editing tools. You can block access to certain known tools like regedit. This does *nothing* to block access to the registry itself, except for amateur users that think regedit is the only way to access the registry. You can, as per your next paragraph. Registry keys are full NT objects each with their own ACL, and so if you *really* want to prevent someone from being able to edit the registry, this is the *only* way. And doing so breaks lots of programs that expect to be able to store their settings in HKCU. I suppose you could allow specific write access to those keys that known programs need to access, and deny everything else. But that would be an enormous amount of work, and by the time you're done you'd have granted access to a large portion of HKCU. Yes, though most programs will silently fail if they can't save their settings. Most don't actually require you to have access of certain levels to function, at least that are commonly used in a corporate environment. Ideally you should have - perhaps restricted to the software key though, and with the Windows section read only. The point here is that regedit is only *one* way of arbitrarily manipulating the registry, and a user that knows what he's doing will *always* be able to get around this. Disabling regedit is *not* a form of security, unless you define security as keeping out casual users but nothing else. Indeed. Hence the ACLs. Yes, you are able to make changes to HKCU, but not *directly*. echo 1 /proc/registry/HKEY_CURRENT_USER/Software/Foobar Oh look, I just edited the registry directly. Okay, so you don't allow Cygwin. So I compile a C program that takes a key+value on the command line and calls RegSetValueEx(). Oh, so you disallow that filename or checksum. So I make a different C program and call it something else. There are an infinite number of programs that I can write and it's impossible to block them all. The point here is that there is no such thing as blocking direct access while still letting some programs write to the registry. Either it's writeable or it's not. If it is, then the user can make arbitrary changes. There's no middle ground. Yes, but it isn't black and white either. As we all agree, you have the joy of acl's, which complicates matters. Then you also have the option of purging all current user registry files on logoff.. Letting them make changes to aspects at runtime, but losing them all at the end of the session. Myself, I feel this is the best compromise. Your method is flawed and destroys the existing setup, which is bad. I disable ALL aspects of regedit and other tools, and I know I'm not alone in this. It's perfectly normal and *common* to do it. You can disable every piece of software that has ever existed in the known universe, and I will still be able to make arbitrary registry changes if I want -- provided that the desired HKCU key is writeable. The (l)user should *never* be allowed to edit the registry themselves. That's a recipe for disaster. If you think it is possible to block direct editing of the registry while still allowing HKCU to be writeable, then you are clearly mistaken at how windows security works. This is why you have application allow lists. Admittedly this also isn't foolproof, but it does make it more difficult. Using a command that alters the registry as part of it's function, but does not allow the user to directly alter it is a very different ballgame. mount would be permissable. Some console app to directly edit the registry would not be. There is absolutely no way for a sysadmin to block one and not the other. Brian Oh, I agree, but Thorsten was under the impression that regedit /s would work when regedit itself was disabled - this is blatantly not the case. Aside from that.. The whole concept of security on windows is a bit of a farce.. A compromise is the best you're ever likely to manage. Anyway.. I think this got rather off-topic :P -- Spinning complacently in the darkness, covered and blinded by a blanket of little lives, false security has lulled the madness of this world into a slumber. Wake up! An eye is upon you, staring straight down and keenly through, seeing all that you are and everything that you will never be. Yes, an eye is upon you, an eye ready to blink. So face forward, with arms wide open and mind reeling. Your future has arrived... Are you ready to go? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Chris Taylor (2005-10-27 12:43 +0100) Brian Dessent wrote: Chris Taylor wrote: Oh, I agree, but Thorsten was under the impression that regedit /s would work when regedit itself was disabled - this is blatantly not the case. That's /exactly/ the case. I've been to Internet Cafes where I couldn't launch regedit - but regedit /s in a batch worked just fine. Where I'm now sitting I cannot launch cmd.exe (This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator. But I'm perfectly able to run /any/ batch script - which just runs cmd.exe (visible in Task Manager). -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On Wed, 26 Oct 2005, Christopher Faylor wrote: On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. Yeah, what's with this mount thing, anyway? I mean, it's got to be, like, at least 10 *KILOBYTES* (gasp)! I don't have that kind of space on my flash drive! And all this command-line scripting -- yuk, much better to use a GUI like regedit! It's not like the mounts aren't currently in the registry, anyway... Besides, importing a .reg file lets me bash right over the existing settings without a care in the world -- mount actually allows *saving* the current config, and who would want THAT? Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. /DA -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). Well, obviously there are a few that don't (mount, cygcheck, ash (?), etc.?) And I think it's easier to just import a reg file than dealing with multiple mount commands... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). Well, obviously there are a few that don't (mount, cygcheck, ash (?), etc.?) And I think it's easier to just import a reg file than dealing with multiple mount commands... Problem with that is that if the sysadmin knows what he's doing, it only takes about 4 seconds to block off almost all possible ways of actually editing the registry... A batch file that checks for an existing mount table and saves it, then mounts it according to what you want is far, far better. -- Spinning complacently in the darkness, covered and blinded by a blanket of little lives, false security has lulled the madness of this world into a slumber. Wake up! An eye is upon you, staring straight down and keenly through, seeing all that you are and everything that you will never be. Yes, an eye is upon you, an eye ready to blink. So face forward, with arms wide open and mind reeling. Your future has arrived... Are you ready to go? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On Wed, Oct 26, 2005 at 05:16:56PM +0100, Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). http://cygwin.com/ml/cygwin/2005-10/msg00855.html http://cygwin.com/ml/cygwin/2005-10/msg00863.html ...but yet you still keep going. Well, obviously there are a few that don't (mount, cygcheck, ash (?), etc.?) All cygwin programs rely on the mount table. And I think it's easier to just import a reg file than dealing with multiple mount commands... I assume that you'll be quite surprised, if/when we either do away with the registry or change the format. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: AllVersions: Running Cygwin X w/ Registy Entries
Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). Well, obviously there are a few that don't (mount, [...SNIP!...] Let me see if I can parse those last two sentences: You didn't know about using mount to manipulate the mount tables because you thought that all cygwin programs depend on the mount tables except for mount, which you already knew didn't depend on the mount tables? This conversation has now descended into self-contradictory gibberish, and as such I find myself forced to run around the room in circles, flapping my arms like a chicken and making clucking noises. Bock-bock-b'gwk! Buk-buk-buk TITTTL! TITTTL! TITTTL! And I think it's easier to just import a reg file than dealing with multiple mount commands... Wow. You're going to just _love_ scripting, when you hear about it! cheers, DaveK -- Can't think of a witty .sigline today -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Igor Pechtchanski (2005-10-26 16:13 +0100) On Wed, 26 Oct 2005, Christopher Faylor wrote: On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. Yeah, what's with this mount thing, anyway? I mean, it's got to be, like, at least 10 *KILOBYTES* (gasp)! I don't have that kind of space on my flash drive! And all this command-line scripting -- yuk, much better to use a GUI like regedit! You can use regedit perfectly without a gui: regedit /s, regedit /e It's not like the mounts aren't currently in the registry, anyway... Besides, importing a .reg file lets me bash right over the existing settings without a care in the world -- mount actually allows *saving* the current config, and who would want THAT? Now guess what: regedit allows the same. Even with a single command and without repeated mount commands. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Svend Sorensen (2005-10-25 23:59 +0100) On 10/25/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I would like to be able to have a portable version of cygwin in my Flash Drive. I have been able to do it but it requires that I enter some registry entries such as: [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/] snip Here are the batch files I use. In their current state, they must exist in the parent directory of the cygwin root, which must be named cygwin. install.bat backs up the current cygwin mount table, then creates a new table for the removable device. It uses the users Windows %TEMP% dir for /tmp, because I wanted to minimize writes to the flash disk. uninstall.bat removes the new mount table, and restores the backed up copy. --begin install.bat-- [...] --begin uninstall.bat-- [...] --end uninstall.bat-- Wow, that's cute. I recently wrote a python script to do the same thing but that batch solution is much simpler (and better): I tried to improve your script a bit. This is the result. (For the record I've included my Python script also)... *** BEWARE: this overwrites all Cygwin settings in the registry *** (it's meant for the average internet cafe user) *** the script *has* to be on the usb drive/stick @ echo off set MOUNT=\cygwin\bin\mount -X -f -u -b REM \cygwin\bin\umount -c REM \cygwin\bin\umount -A reg delete hklm\software\cygnus solutions /f nul 21 reg delete hkcu\software\cygnus solutions /f nul 21 %MOUNT% --change-cygdrive-prefix /cygdrive %MOUNT% %~d0\cygwin/bin /usr/bin %MOUNT% %~d0\cygwin/lib /usr/lib %MOUNT% %~d0\cygwin / %MOUNT% %TEMP% /tmp %MOUNT% %TEMP% /usr/tmp %MOUNT% %TEMP% /var/tmp ** import codecs, \ os, \ re regfile = r'\data\config\cygwin.reg' # 'native=E:\\cygwin' for instance match= r'(?=native=)[A-Z]:(?=cygwin)' newdrive = os.path.splitdrive(os.getcwd())[0] # 'ascii' for non unicode reg files myfile = codecs.open(regfile, 'r', 'utf_16') content = myfile.read() myfile = codecs.open(regfile, 'w', 'utf_16') myfile.write(re.sub(match, newdrive, content)) myfile.close() os.system('regedit /s %s' % regfile) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Chris Taylor (2005-10-26 17:38 +0100) Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). Well, obviously there are a few that don't (mount, cygcheck, ash (?), etc.?) And I think it's easier to just import a reg file than dealing with multiple mount commands... Problem with that is that if the sysadmin knows what he's doing, it only takes about 4 seconds to block off almost all possible ways of actually editing the registry... Definitely not. As a user running programs you are almost constantly changing the registry (your HKEY_CURRENT_USER). So often importing a .reg file is not allowed (by double clicking) and starting regedit in GUI mode. A batch file that checks for an existing mount table and saves it, then mounts it according to what you want is far, far better. This batch file is registry editing, too. If you edit the registry or the mount command - that's no difference from a sysadmin's point of view. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On 10/25/05, Igor Pechtchanski wrote: see a very nice example posted by Svend Sorensen http://cygwin.com/ml/cygwin/2005-10/msg00864.html). The batch files I posted were lifted from Cygwin on portable storage media[*]. He has some other good tips on running cygwin from a USB drive on that website. I think I had to modify the sed line to get it to work. * http://www.dam.brown.edu/people/sezer/software/cygwin/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Christopher Faylor (2005-10-26 17:40 +0100) On Wed, Oct 26, 2005 at 05:16:56PM +0100, Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: * [EMAIL PROTECTED] (2005-10-26 00:45 +0100) Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). http://cygwin.com/ml/cygwin/2005-10/msg00855.html http://cygwin.com/ml/cygwin/2005-10/msg00863.html ...but yet you still keep going. Well, obviously there are a few that don't (mount, cygcheck, ash (?), etc.?) All cygwin programs rely on the mount table. Then mount is obviously not a cygwin program (because it doesn't) And I think it's easier to just import a reg file than dealing with multiple mount commands... I assume that you'll be quite surprised, if/when we either do away with the registry or change the format. Or the default mount tables, or the mount options. Portable Cygwin/Cygwin on a USB stick is a hack. But imho a clean one. And the mount hack is even cleaner than the regedit /s hack, no doubt. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Dave Korn (2005-10-26 17:48 +0100) Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). Well, obviously there are a few that don't (mount, [...SNIP!...] Let me see if I can parse those last two sentences: You didn't know about using mount to manipulate the mount tables because I did not know that I could successfully /use/ the mount program (for creating mount tables when no mount tables are available and hklm/hkcu/cygnus solutions doesn't exist. (When you try to run a cygwin app in that situation it normally complains it cannot find cygwin1.dll and doesn't know where / is Is that so hard to grasp?!) you thought that all cygwin programs depend on the mount tables except for mount, which you already knew didn't depend on the mount tables? I DID NOT KNOW THAT when I created my solution for running Cygwin from a USB drive a year ago. I do not have a computer on my own since February (and don't miss it) and I depend on running Cygwin from USB. This conversation has now descended into self-contradictory gibberish, and as such I find myself forced to run around the room in circles, flapping my arms like a chicken and making clucking noises. Bock-bock-b'gwk! Buk-buk-buk TITTTL! TITTTL! TITTTL! And I think it's easier to just import a reg file than dealing with multiple mount commands... Wow. You're going to just _love_ scripting, when you hear about it! Again: regedit has a scripting/non-interactive mode. And I am /Mr. Scripting/ - in all humble modesty. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On Wed, Oct 26, 2005 at 06:22:22PM +0100, Thorsten Kampe wrote: * Dave Korn (2005-10-26 17:48 +0100) Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). Well, obviously there are a few that don't (mount, [...SNIP!...] Let me see if I can parse those last two sentences: You didn't know about using mount to manipulate the mount tables because I did not know that I could successfully /use/ the mount program (for creating mount tables when no mount tables are available and hklm/hkcu/cygnus solutions doesn't exist. (When you try to run a cygwin app in that situation it normally complains it cannot find cygwin1.dll and doesn't know where / is Is that so hard to grasp?!) Yes, it is hard to grasp because it isn't true. You're apparently making suppositions and drawing flawed inferences from them. I don't know why you're insisting on arguing with people who know this stuff better than you do. You can remove all mounts and still run a program like ls.exe as long as cygwin1.dll is in the same directory as ls.exe or cygwin1.dll is in the path. The cygwin mount table does not affect the loading of cygwin1.dll. Wow. You're going to just _love_ scripting, when you hear about it! Again: regedit has a scripting/non-interactive mode. And I am /Mr. Scripting/ - in all humble modesty. You may be Mr. Scripting but you shouldn't be giving anyone advice about how to use cygwin because you obviously don't get it. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: AllVersions: Running Cygwin X w/ Registy Entries
Thorsten Kampe wrote: * Dave Korn (2005-10-26 17:48 +0100) Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) On Wed, Oct 26, 2005 at 10:26:36AM +0100, Thorsten Kampe wrote: Try regedit /s in a batch (instead of double clicking). This sometimes works. Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). ^^^ Well, obviously there are a few that don't (mount, [...SNIP!...] ^^ ^^ Let me see if I can parse those last two sentences: You didn't know about using mount to manipulate the mount tables because I did not know that I could successfully /use/ the mount program (for creating mount tables when no mount tables are available and hklm/hkcu/cygnus solutions doesn't exist. You didn't? You _said_ that you did, when you wrote I was under the impression that all cygwin programs depend on the mount tables Well, obviously there are a few that don't and listed mount as one of them. That's why I nominate this thread for a TITTTL award: every time you post, you contradict something you said earlier. Sometimes you even manage to contradict yourself just between paragraphs within one post! (When you try to run a cygwin app in that situation it normally complains it cannot find cygwin1.dll and doesn't know where / is Is that so hard to grasp?!) It's only hard to grasp because it's completely incorrect. Look at what you're saying: you claim that the mount tables are necessary to load the cygwin1 dll? But the only thing that can interpret the mount table _is_ the cygwin1 dll! How could the windows DLL loader possibly make use of the cygwin mount table to search for a windows DLL to load? (Answer: it doesn't). Just to prove it: I renamed both the HKCU and HKLM trees on my machine to Cygnuts Solutions and then did this: ---snip--- C:\Documents and Settings\dkregedit [ did renaming. no cygwin apps or services running now. ] C:\Documents and Settings\dkcd \cygwin C:\cygwincd bin C:\cygwin\binbash bash.exe: warning: could not find /tmp, please create! bash-3.00$ ls bash: ls: command not found bash-3.00$ /bin/ls bash: /bin/ls: No such file or directory bash-3.00$ /usr/bin/ls bash: /usr/bin/ls: No such file or directory bash-3.00$ pwd /cygdrive/c/cygwin/bin bash-3.00$ ./ls 822-dategs-x11 ApplySnapshot gs.exe CleanLoggsbj DllPlugInTester.exe gsdj [... snip ...] ---snip--- There's an important point here. Before claiming that a piece of software does or does not exhibit a certain behaviour, DON'T JUST GUESS - TEST IT AND SEE! you thought that all cygwin programs depend on the mount tables except for mount, which you already knew didn't depend on the mount tables? I DID NOT KNOW THAT when I created my solution for running Cygwin from a USB drive a year ago. Yes, but you did know it today, when you wrote the post in which you contradicted yourself I do not have a computer on my own since February (and don't miss it) and I depend on running Cygwin from USB. This conversation has now descended into self-contradictory gibberish, and as such I find myself forced to run around the room in circles, flapping my arms like a chicken and making clucking noises. Bock-bock-b'gwk! Buk-buk-buk TITTTL! TITTTL! TITTTL! This still applies! And I think it's easier to just import a reg file than dealing with multiple mount commands... Wow. You're going to just _love_ scripting, when you hear about it! Again: regedit has a scripting/non-interactive mode. And I am /Mr. Scripting/ - in all humble modesty. You are /Mr. Scripting/? You mean that you are a subdirectory off the file system root? And with a space in your name? That's _begging_ for trouble! cheers, DaveK -- Can't think of a witty .sigline today -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: AllVersions: Running Cygwin X w/ Registy Entries
Thorsten Kampe wrote: * Chris Taylor (2005-10-26 17:38 +0100) Problem with that is that if the sysadmin knows what he's doing, it only takes about 4 seconds to block off almost all possible ways of actually editing the registry... Definitely not. Oh yes it does. Start-Run-regedit. Right-click the user's tree under HKEY_USERS, choose Permissions, remove their write access leaving them a read-only per-user registry tree. Easily done in 4 seconds by an experienced BOFH, and can't be reversed without admin rights! cheers, DaveK -- Can't think of a witty .sigline today -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Dave Korn (2005-10-26 19:45 +0100) Thorsten Kampe wrote: * Chris Taylor (2005-10-26 17:38 +0100) Problem with that is that if the sysadmin knows what he's doing, it only takes about 4 seconds to block off almost all possible ways of actually editing the registry... Definitely not. Oh yes it does. Start-Run-regedit. Right-click the user's tree under HKEY_USERS, choose Permissions, remove their write access leaving them a read-only per-user registry tree. Easily done in 4 seconds by an experienced BOFH, and can't be reversed without admin rights! Yea, sure. And how many programms will you be able to run in that configuration? Will you even be able to logon? Anyway: mount won't work in that scenario either (because it modifies the registry). -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Dave Korn (2005-10-26 19:34 +0100) Thorsten Kampe wrote: * Dave Korn (2005-10-26 17:48 +0100) Thorsten Kampe wrote: * Christopher Faylor (2005-10-26 15:37 +0100) Or, I dunno, if that works, you could just use mount and forget about regedit entirely. It's a crazy idea, I know. I wonder why no one has thought of it before. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). ^^^ Well, obviously there are a few that don't (mount, [...SNIP!...] ^^ ^^ Let me see if I can parse those last two sentences: You didn't know about using mount to manipulate the mount tables because I did not know that I could successfully /use/ the mount program (for creating mount tables when no mount tables are available and hklm/hkcu/cygnus solutions doesn't exist. You didn't? You _said_ that you did, when you wrote I was under the impression that all cygwin programs depend on the mount tables Well, obviously there are a few that don't and listed mount as one of them. That's why I nominate this thread for a TITTTL award: every time you post, you contradict something you said earlier. Sometimes you even manage to contradict yourself just between paragraphs within one post! Dave, you can repeat it one gazillion times but - logically, rhetorically and whatever - there *is no contradiction* in what I wrote. *I* didn't know about it (because I was under the impression that all cygwin programs depend on the mount tables). Translation: I did not know until today (or yesterday) that you can use mount and other utilities standalone. Well, obviously there are a few that don't (mount, cygcheck, ash (?), etc.?) But as of today I know (because I tried it today - encouraged by CGF's encouraging support and Svend Sorensen's batch script). There is no contradiction, except in your fantasy. (When you try to run a cygwin app in that situation it normally complains it cannot find cygwin1.dll and doesn't know where / is Is that so hard to grasp?!) It's only hard to grasp because it's completely incorrect. Look at what you're saying: you claim that the mount tables are necessary to load the cygwin1 dll? Did I say that? I mentioned two common error messages without making any dependencies between them. Just to prove it: I renamed both the HKCU and HKLM trees on my machine to Cygnuts Solutions and then did this: ---snip--- C:\Documents and Settings\dkregedit [ did renaming. no cygwin apps or services running now. ] C:\Documents and Settings\dkcd \cygwin C:\cygwincd bin C:\cygwin\binbash bash.exe: warning: could not find /tmp, please create! bash-3.00$ ls bash: ls: command not found bash-3.00$ /bin/ls bash: /bin/ls: No such file or directory bash-3.00$ /usr/bin/ls bash: /usr/bin/ls: No such file or directory bash-3.00$ pwd /cygdrive/c/cygwin/bin bash-3.00$ ./ls 822-dategs-x11 ApplySnapshot gs.exe CleanLoggsbj DllPlugInTester.exe gsdj [... snip ...] ---snip--- There's an important point here. Before claiming that a piece of software does or does not exhibit a certain behaviour, DON'T JUST GUESS - TEST IT AND SEE! Why should I? *You* tested it for me. And proved me _right_. I said when you try to run a cygwin app in that situation it normally complains it cannot find cygwin1.dll and doesn't know where / is. You tried ls: result as I said. You tried /bin/ls: result as I said. You tried /usr/bin/ls: result as I said. You tried what one normally tries and got my predicted results. Even your ./ls trick (I know it's not a trick) wouldn't have succeeded if you would have tried to run some app in /usr/bin or /usr/local/bin. You know what you would have gotten?: cannot find cygwin1.dll. Amen. Let me repeat: I never said that no cygwin app is ever going to run without a mount table. I just said that they won't work the way they normally work. Apart from your artificially constructed example here is a REAL LIFE example what I get when I try to run my shell without a mount table: [1] you thought that all cygwin programs depend on the mount tables except for mount, which you already knew didn't depend on the mount tables? I DID NOT KNOW THAT when I created my solution for running Cygwin from a USB drive a year ago. Yes, but you did know it today, when you wrote the post in which you contradicted yourself I knew it today in the post in which I didn't contradict myself. But maybe my mistake was that I believed CGF: All cygwin
Re: AllVersions: Running Cygwin X w/ Registy Entries
* Christopher Faylor (2005-10-26 19:26 +0100) On Wed, Oct 26, 2005 at 06:22:22PM +0100, Thorsten Kampe wrote: I did not know that I could successfully /use/ the mount program (for creating mount tables when no mount tables are available and hklm/hkcu/cygnus solutions doesn't exist. (When you try to run a cygwin app in that situation it normally complains it cannot find cygwin1.dll and doesn't know where / is Is that so hard to grasp?!) Yes, it is hard to grasp because it isn't true. You're apparently making suppositions and drawing flawed inferences from them. I don't know why you're insisting on arguing with people who know this stuff better than you do. You can remove all mounts and still run a program like ls.exe as long as cygwin1.dll is in the same directory as ls.exe or cygwin1.dll is in the path. Okay, so when I _normally_ run apps like I _normally_ do ... they will a) not know where /, /bin, /etc, etc.. is and b) error cygwin1.dll not found (unless my app is in /bin or C:\cygwin\bin is in my path (which it is not by default... Thanks. The cygwin mount table does not affect the loading of cygwin1.dll. Did I ever say that? No. Wow. You're going to just _love_ scripting, when you hear about it! Again: regedit has a scripting/non-interactive mode. And I am /Mr. Scripting/ - in all humble modesty. You may be Mr. Scripting but you shouldn't be giving anyone advice about how to use cygwin because you obviously don't get it. I did not give advice in this thread. * Someone had a problem with HKEY_LOCAL_MACHINE and I said he might try HKEY_CURRENT_USER instead. * Someone had a problem importing a .reg file and I said he might try regedit /s .reg instead. That's all. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
AllVersions: Running Cygwin X w/ Registy Entries
Greetings I would like to be able to have a portable version of cygwin in my Flash Drive. I have been able to do it but it requires that I enter some registry entries such as: [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/] native=F:\\cygwin flags=dword:000a [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin] native=F:\\cygwin/bin flags=dword:000a (as simple as double clicking a .reg file, however:) Many computers at my university do not allow access to the registry and modification of it. All I really need is the X server, and I have been able to lean it down to a 23 MB package that runs it (as a background process). An unfinished but working copy at: http://tinyurl.com/8pu2x * Any older versions that do not use the registry but use relative directories? * Would it be possible to wrap the executable and feed it an 'alternate registry'? * Warning: I have (for now) minimal experience and limited resources. George T Gurdell, gtg793x at gatech dot edu -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On Tue, 25 Oct 2005, gtg793x wrote: Greetings I would like to be able to have a portable version of cygwin in my Flash Drive. I have been able to do it but it requires that I enter some registry entries such as: [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/] native=F:\\cygwin flags=dword:000a [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin] native=F:\\cygwin/bin flags=dword:000a (as simple as double clicking a .reg file, however:) Many computers at my university do not allow access to the registry and modification of it. See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. All I really need is the X server, and I have been able to lean it down to a 23 MB package that runs it (as a background process). An unfinished but working copy at: http://tinyurl.com/8pu2x * Any older versions that do not use the registry but use relative directories? No. * Would it be possible to wrap the executable and feed it an 'alternate registry'? User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. * Warning: I have (for now) minimal experience and limited resources. HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. /DA -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On 25 Oct 2005 at 13:55, [EMAIL PROTECTED] wrote: Greetings I would like to be able to have a portable version of cygwin in my Flash Drive. I have been able to do it but it requires that I enter some registry entries such as: [snip] I'd like to add a 'me too' to this request. I have the same issue at work. I don't need to run any services. Wes -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
* [EMAIL PROTECTED] (2005-10-25 18:55 +0100) Greetings I would like to be able to have a portable version of cygwin in my Flash Drive. I have been able to do it but it requires that I enter some registry entries such as: [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/] native=F:\\cygwin flags=dword:000a [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin] native=F:\\cygwin/bin flags=dword:000a (as simple as double clicking a .reg file, however:) Many computers at my university do not allow access to the registry and modification of it. Use the HKEY_CURRENT_USER entries... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
AW: AllVersions: Running Cygwin X w/ Registy Entries
Hi, I use a modified Version of XliveCD (http://xlivecd.indiana.edu/) for this. I putted all the Files on an USB-Stick and deleted one after the other. Well it was a little try and error but it worked well. With my XliveUSB I can go into an Internet-Café, plug it in, establish my ssh-sonnection to my Homeserver, and start KDE-Desktop or only KMail or, Marco Email [EMAIL PROTECTED] -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Wes S Gesendet: Dienstag, 25. Oktober 2005 20:47 An: cygwin@cygwin.com Betreff: Re: AllVersions: Running Cygwin X w/ Registy Entries On 25 Oct 2005 at 13:55, [EMAIL PROTECTED] wrote: Greetings I would like to be able to have a portable version of cygwin in my Flash Drive. I have been able to do it but it requires that I enter some registry entries such as: [snip] I'd like to add a 'me too' to this request. I have the same issue at work. I don't need to run any services. Wes -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On Tue, Oct 25, 2005 at 08:20:29PM +0100, Thorsten Kampe wrote: * gtg793x (2005-10-25 18:55 +0100) Greetings I would like to be able to have a portable version of cygwin in my Flash Drive. I have been able to do it but it requires that I enter some registry entries such as: [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/] native=F:\\cygwin flags=dword:000a [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin] native=F:\\cygwin/bin flags=dword:000a (as simple as double clicking a .reg file, however:) Many computers at my university do not allow access to the registry and modification of it. Use the HKEY_CURRENT_USER entries... This question was asked and answered (correctly) several hours ago: http://sources.redhat.com/ml/cygwin/2005-10/msg00855.html cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On 10/25/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Greetings I would like to be able to have a portable version of cygwin in my Flash Drive. I have been able to do it but it requires that I enter some registry entries such as: [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/] snip Here are the batch files I use. In their current state, they must exist in the parent directory of the cygwin root, which must be named cygwin. install.bat backs up the current cygwin mount table, then creates a new table for the removable device. It uses the users Windows %TEMP% dir for /tmp, because I wanted to minimize writes to the flash disk. uninstall.bat removes the new mount table, and restores the backed up copy. --begin install.bat-- @echo off for /F %%A in ('cd') do set WD=%%A cygwin\bin\mount -m | cygwin\bin\sed s/mount/cygwin\/bin\/mount/ %TEMP%\cygwin-mounts cygwin\bin\umount -c cygwin\bin\umount -A cygwin\bin\mount --binary --force --user %WD%\cygwin / cygwin\bin\mount --binary --force --user %WD%\cygwin\bin /usr/bin cygwin\bin\mount --binary --force --user %WD%\cygwin\lib /usr/lib cygwin\bin\mount --binary --force --user %TEMP%\ /tmp --end install.bat-- --begin uninstall.bat-- @echo off for /F %%A in ('cd') do set WD=%%A cygwin\bin\umount -c cygwin\bin\umount -A cygwin\bin\sh %TEMP%\cygwin-mounts cygwin\bin\rm %TEMP%\cygwin-mounts --end uninstall.bat-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
Quoting Igor Pechtchanski [EMAIL PROTECTED]: See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. I am not able to 'mount' anything since I never run the cygwin environment. Just the x server. And I can only run it after adding info to the registry entries. George T Gurdell -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: AllVersions: Running Cygwin X w/ Registy Entries
On Tue, 25 Oct 2005, gtg793x wrote: Quoting Igor Pechtchanski [EMAIL PROTECTED]: http://cygwin.com/acronyms/#PCYMTNQREAIYR. Thanks. See man mount. Please, please, please don't manipulate the registry directly if you want to stay portable. You can easily create a batch file to reproduce the mounts properly. ... User mounts is the answer. The CURRENT_USER tree is usually writable. Make sure you don't write over the existing settings if they are present. Current XP computers I am trying to run this into give me: Registry Editing has been Disabled by your administrator. even if I try to write to Current_User This is weird. Most applications won't work properly without being able to write to the registry. Are you sure that it isn't simply that the regedit functions are disabled? Are you using another tool to edit the registry? What user do you log in as? What OS do you use? All I am trying to keep portable is the X server thus XWIN.exe is the only executable I have, the only one I execute. After running the X server as the background server I am tunneling the packets using Putty / Securecrt. I am not able to 'mount' anything since I never run the cygwin environment. Just the x server. And I can only run it after adding info to the registry entries. You run a *Cygwin* X server. Which is a Cygwin program. This means that it loads cygwin1.dll, which *is* the Cygwin environment. You may not run a shell, but mount is a separate executable (which is about 10k). Simply include that on your flash drive, and run it directly from that drive (you can also create a batch file for this -- see a very nice example posted by Svend Sorensen http://cygwin.com/ml/cygwin/2005-10/msg00864.html). HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. /DA -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/