yash069 / puttycyg

Automatically exported from code.google.com/p/puttycyg
0 stars 0 forks source link

Helpful hints for correct prompt #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is actually a hint, not a defect report.

When installing on Windows 7 the following problem may occur. Firstly, the 
group and passwd files may reset. You need to give the local user full access 
permissions to the cygwin tree. On a centrally managed PC this may require the 
administrator to set the permissions.

Secondly, to get the full login prompt the same as from the command line, you 
need to run the following command (I took this from the BATCH file that 
normally starts CYGWIN)

bash --login -i

This will then ensure that the .bash_profile runs, and this in turn calls 
.bashrc

Original issue reported on code.google.com by bkei...@gmail.com on 6 Dec 2010 at 1:45

GoogleCodeExporter commented 9 years ago
PuTTYcyg has no "installation".  How are the group and passwd files resetting 
(and what do you mean by "reset")?

It is already recommended to use "-" as the name of the command to run.  This 
has the effect of using your configured shell (in /etc/passwd, see chsh(1)) in 
login mode (with its argv[0] set to '-bash'), meaning that .bash_profile will 
be sourced.

Original comment by medgar123 on 6 Dec 2010 at 3:54

GoogleCodeExporter commented 9 years ago
I was trying to be helpful, not start a discussion. I have attached a
screenshot. I suspect this is only an issue on centrally managed
windows 7 PCs.

First I run cygwin normally, from the command prompt. Everything is
OK. Then I run putty-cyg. You can see that the passwd file has "reset"
back to how it is when freshly installed. I then have to run the
mkpasswd and mkgroup again. To do this I need admin privileges.

A third running of cygwin (from the command line) confirms that the
passwd file has indeed "reset" and

cat /etc/passwd

shows my username has disappeared.

Original comment by bkei...@gmail.com on 6 Dec 2010 at 4:07

GoogleCodeExporter commented 9 years ago
Starting a discussion _is_ helpful.  :)

Running PuTTYcyg should not modify your Cygwin system's /etc/passwd file.  It 
sounds like you have multiple Cygwin installations.  You can see if this is the 
case by running the 'mount' command to see where / is mounted.  It should be 
the same result when you run bash from cmd.exe (or cygwin.bat) as when you run 
bash from PuTTYcyg.

BTW, I'm afraid that the email interface to code.google.com has eaten your 
attachment (but I'm not sure it would help in this case).

Original comment by medgar123 on 7 Dec 2010 at 3:49