Relation Between Mount System and The Registry?
Can someone explain to me when the registry keys in "HKLM\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2" and the same in HKCU get read into the mount table? I can find the source for the mount table itself (in "src/winsup/cygwin/mount.cc") but not where the information from the registry is initially read in, or were it gets written out when a new entry is added. -- Sam Hanes elemecca AT gmail DOT com -- 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: Relation Between Mount System and The Registry?
Larry Hall (Cygwin) wrote: > Sam Hanes wrote: >> >> Can someone explain to me when the registry keys in >> "HKLM\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2" and the same in HKCU >> get read into the mount table? I can find the source for the mount >> table itself (in "src/winsup/cygwin/mount.cc") but not where the >> information from the registry is initially read in, or were it gets >> written out when a new entry is added. > > Why do you care? 'mount' currently manipulates the registry but it won't > come 1.7.0. The use of the registry for 'mount' is an implementation > detail. If you're doing something that keys off of this, you may want > to rethink your strategy. You may be better off basing your logic on > 'mount' as opposed to the keys and values in the registry that 'mount' > manipulates. > Oh. I assume 1.7.0 is the one currently in CVS. That would explain why I can't find the logic to write the mount registry keys in the CVS sources. It's not there. Well, that's one less thing I have to think about. Would you mind pointing me to where I should have found that? Reading the ChangeLog in "src/winsup/cygwin" I can see a great many changes from the process of moving over to the new fstab system, but I assume there was an announcement of the change somewhere other than cygwin-developers. As for why I care, I'm looking through the CVS sources to see what needs to be done to make a portable (run from USB key or similar) version of Cygwin, and to familiarize myself with the inner workings of Cygwin in general. The changes that I think are needed to make Cygwin portable (that I've come up with so far; this is far from comprehensive): - Dynamic Calculation of Mountpoints * This seems to be done already in CVS, although to what extent I don't know - Single User System * Stop using the username and domain from Windows. * Instead, use a single user/group, like "cygwin:cygwin" * Use a single homedir regardless of windows user, probably just "/home" * I did this by messing with /etc/profile, but it would be better to change Cygwin itself to not care. - Special Mountpoint for Root of Portable Drive (Optional) * Mount the USB key on something like "/portdrive" or "/cygdrive/portable" * This makes it so you can get to other things on the USB key without knowing the drive letter * For example, I would like to symlink "/home/devel" to "/cygdrive/portable/Devel/" I was trying to work on the first one, but it seems that's been fixed in CVS already. -- 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: use 'insmod' inside cygwin
rike_lin wrote: > > I'm a new member for cygwin. As I known, the cygwin is a unix-like shell > environment for the windows platform. It might not include the function > 'insmod'. Is it correct? Or, is it possible to use 'insmod' inside cygwin > and how to do it? > `insmod` is the POSIX command to load a kernel module into the running kernel. Cygwin is just a POSIX emulation layer on top of Windows, and thus doesn't have a kernel. You can't load modules into a non-extant kernel, so there's no reason to include `insmod`. What are you trying to do that needs `insmod`? The only reason I can think of that you'd need to load modules is for device drivers, and Cygwin doesn't deal directly with hardware. If you want to access your hardware from Cygwin, make sure it works on Windows. Cygwin can't do antyhing Windows can't. -- 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: Problems installing Cygwin
Bryan A. Zimmer wrote: > > Most recently the post-install scripts seem to have run fine, and the > installation was complete, I attempted to start Cygwin. I even took the > precaution of creating the password and group files with the mkpasswd > and mkgroup programs, with the commands: > > $ mkpasswd -l -g > /etc/passwd > $ mkgroup -l > /etc/group > > I have also made sure my home directory in the Windows environment was set > to HOME=C:\cygwin\home\baz and that the CYGWIN environment variable was > set to: CYGWIN=ntsec binmode tty glob (I also tried with "nontsec") > > Having done this, I can press the "Cygwin" icon and get a command console > that LOOKS like Cygwin, but the directory I get places in is /usr/bin, and > there is not even a default path, so that I have to type in things like > "/bin/ls" > or "/bin/mount". > > Doing a "/bin/bash --login -i" has the same effect, as do > all attempt to start the program with Cygwin.bat from a cmd.exe prompt. > > I do not know if I have missed some crucial and recent change, or what. > The same installation process used to work just fine. This year (2008), > I have only had the non-success described above. > I need some more information to help: First, the output of `/bin/mount`, which is a list of all the mountpoints on your system. The most common reason that the shell can't find commands in the PATH is that the mount table has gotten messed up. Second, the output of `/bin/env`, which is a dump of your environment variables. Any nuber of problems result from one or more of these being messed up. Third, the output of `/bin/uname -a`, which is the version information of your Cygwin installation. This is generally useful so we know how it's *supposed* to work. Lastly, please confirm or correct the following info: - Your base install directory is "C:\Cygwin" - The installer (setup.exe) finished without errors -- Sam Hanes Send list replies to ! -- 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: Problems installing Cygwin
I (Sam Hanes) wrote: > > I need some more information to help: > > First, the output of `/bin/mount`, which is a list of all the > mountpoints on your system. The most common reason that the shell > can't find commands in the PATH is that the mount table has gotten > messed up. > > Second, the output of `/bin/env`, which is a dump of your environment > variables. Any nuber of problems result from one or more of these > being messed up. > > Third, the output of `/bin/uname -a`, which is the version information > of your Cygwin installation. This is generally useful so we know how > it's *supposed* to work. > All of the data I requested and more is provided by `cygcheck -s -v -r`, as suggested in the Cygwin problem reporting guidelines at "http://www.cygwin.com/problems.html";. Thanks to Larry Hall for pointing this out. Please run `/bin/cygcheck -svr > cygcheck.out` and attach "cygcheck.out" to a reply. DO NOT put the output in the body of your message because it is extremely long. I do still need you to confirm or correct the following info: - Your base install directory is "C:\Cygwin" - The installer (setup.exe) finished without errors -- Sam Hanes Send list replies to -- 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: un-indenting doesn't work with vim
Robert Latest wrote: > > Thanks folks, I didn't know about Ctrl-D. Of course that's all I'm > gonna use now, because it is so Vim. One thing that I don't understand > is that indents eight spaces whereas Ctrl-D un-indents only > four. I'll check on that. Actually I've got ":set sw=4" in my vimrc, > maybe that has to do with it. > That's because tab indents `tabstop` spaces, and ^D un-indents `shiftwidth` spaces. `tabstop` sets what a literal HT (ASCII 0x09 - Horizontal Tab) means in terms of spaces. This affects what happens what happens when you press the TAB key and how groups of spaces in files are interpreted if you have that feature turned on. `shiftwidth` controls how many spaces VIM considers to be one level of indentation. This affects the auto-indentation system, ^T and ^D, etc. If `tabstop` and `shiftwidth` are set to different values, strange things happen if you use tab to indent. -- Sam Hanes elemecca AT gmail DOT com Freedom is a heavy load, a great and strange burden for the spirit to undertake. It is not easy. It is not a gift given, but a choice made, and the choice may be a hard one. The road goes upward towards the light; but the laden traveler may never reach the end of it. - Ursula K. Le Guin; The Tombs of Atuan -- 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: Freeze with the letter "e"
Christopher Faylor wrote: > > Paul Newell wrote: >> >> Since jrsyangl hasn't written back on this one, I have to take the bait and >> ask "why CRLF and the lowercase 'e'?". >> > > Check the archives with google: > > CRLF .inputrc site:cygwin.com > > Hint: It has nothing to do with 'the letter "e"'. > > Hint: This is Cygwin. It emulates UNIX(tm). Does UNIX like CRLF line > endings? > I think what he's trying to say is that having DOS-style (CR-LF) line endings in a *NIX-style file (which uses LF line endings) can have very strange results, especially involving entries near the end of lines. It should be noted that this is only true if you told setup.exe to use *NIX-style line endings. If you told it to use DOS-style line endings, you'll get the same problem if the file is *NIX-style. The gist of it: If it expects LF and sees CR-LF you have problems, and vice-versa. You can convert between the two styles with `dos2unix` and `unix2dos`. -- Sam Hanes elemecca AT gmail DOT com Freedom is a heavy load, a great and strange burden for the spirit to undertake. It is not easy. It is not a gift given, but a choice made, and the choice may be a hard one. The road goes upward towards the light; but the laden traveler may never reach the end of it. - Ursula K. Le Guin; The Tombs of Atuan -- 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: How to run a bash shell script from cygwin console
akarui wrote: > > Here from the output, I see that "cd", "pwd" and "ls" worked fine. But the > console prompt is not yet changed, means, "cd" didn't permanently changed > the directory, 'cause I get "pwd" as below: > / > $ pwd > /cygdrive/d > / > > Note that, I like to have the console's prompt changed to "/soapui", where > I'll run a program named "testrunner.bat" later. > BASH runs scripts in a sub-shell, and changes made to the environment in the sub-shell do not propagate to the parent shell. To run a script in the current shell so it can change your environment, call it as `. yourscript` instead of just `yourscript`. AFAIK there's nothing that you can put in the script to make it do this all the time. -- Sam Hanes elemecca AT gmail DOT com Freedom is a heavy load, a great and strange burden for the spirit to undertake. It is not easy. It is not a gift given, but a choice made, and the choice may be a hard one. The road goes upward towards the light; but the laden traveler may never reach the end of it. - Ursula K. Le Guin; The Tombs of Atuan -- 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: genisoimage and links. Problems?
Brian Dessent wrote: > It seems perfectly expected to me. When you burn the image and then > attempt to read it on a Windows machine you're not going to see symlinks > because Windows itself doesn't support symlinks. Actually, NTFS does support symlinks, but unfortunately that capability is not exposed in the Windows GUI. There's a command-line tool from SysInternals that can manipulate them. > Cygwin can only emulate symlinks by using these specially crafted .lnk > files. In order to be able to see the link as a symlink in Cygwin you'd > have to create the iso image containing an actual .lnk file and not a > real symlink. Then the symlink in the .iso would then be unreadable as > a symlink by every other OS like Linux or OS X. You can do this by > removing the R attribute from the .lnk file prior to calling > genisoimage, which removes the 'specialness' of the .lnk file so that > it's a regular file in the eyes of Cygwin, and it gets put in the .iso > as such. Since all files read off a CDROM have the R attribute, Cygwin > will treat the .lnk file on the burned/mounted filesystem as a link. > > I don't think it would be a very good idea for genisoimage to do this by > default because again the resulting .iso is Cygwin-specific, all other > operating systems would see these useless .lnk files and no symlinks. ISO9660, the base filesystem used on CD-ROMs (and the namesake of .iso files), does not have native symlink support either. Symlinks are added on top of the normal ISO9660 filesystem in the Rock Ridge metadata, which also includes the UNIX-style long file names, attributes, modes, etc. Microsoft does not support Rock Ridge, and instead uses their own metadata format called Joliet, whick doesn't have symlink support AFAIK. Genisoimage is behaving like the Linux one and encoding the symlinks in Rock Ridge. It seems to me that it should be possible to make Cygwin read the Rock Ridge data from the CD, which should be accessible by reading the CD in raw mode. However, implementing that would require making Cygwin considerably more aware of hardware than it is and thus probably won't happen. -- Sam Hanes elemecca AT gmail DOT com Yes. > Are you sure? >> Because it reverses the logical flow of conversation. >>> Why is replying above the quote annoying? -- 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: emacs open display problem
parminides wrote: > I've tried the following commands in an xterm, all to no avail: > emacs & > emacs -d :0 & > emacs -d 0:0 & I infer from the '-d :0.0' and the XTerm that you're trying to open Emacs in X. Some X applications have problems with specifying the X display on the command line, even if they supposedly support it. Setting the DISPLAY environment variable usually works in these cases. I've never seen an app with this problem go phantom (they usually die saying 'couldn't connect to X server'), but you never know. -- Sam Hanes elemecca AT gmail DOT com Yes. > Are you sure? >> Because it reverses the logical flow of conversation. >>> Why is replying above the quote annoying? -- 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/