public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: cyg Simple <cygsimple@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Multiple problems (probably) starting up new installation
Date: Mon, 22 Oct 2018 14:43:00 -0000	[thread overview]
Message-ID: <19b8c26f-f80b-2fe5-af45-890484b81762@gmail.com> (raw)
In-Reply-To: <CAOC2fq_WRuenwF+KqVYH=NM=QS_EA-XW3hri+edSzXAxC+F-6g@mail.gmail.com>

On 10/21/2018 6:24 PM, Michael Enright wrote:
> I have a few files that I want to compile and run in a new Windows 10 setup.
> I setup cygwin64 and copied the files to a subdirectory of my home directory.
> I noticed that my prompt indicated that my home directory was
> "/home/Mike Enright". I decided that in the long run that would be
> bad.
> So I followed a tip from Stack Overflow [1]to use /etc/passwd to fix
> this. Apparently the idea is to map the Windows SID to my desired user
> name "menright" instead of "\"Mike Enright\"".
> And also rename the created home directory accordingly.
> So now I have /home/menright and some files under there and
> /etc/password contains a line that maps an SID to menright.
> 

Rather than using /etc/passwd just create another account as menright
and install Cygwin in the global user space.  I have 3 accounts on my
system and use three files to login to one or the other one.  Advantage
is that you can separate different projects based on user.

<file name="/usr/local/bin/start">
#! /bin/bash
cmd /c start `cygpath -w -- "${@//&/^&}"`
</file>

<file name="/usr/local/bin/sudosu">
#! /bin/sh
start sudosu.bat $1
</file>

<file name="/usr/local/bin/sudosu.bat">
c:\windows\system32\runas /user:%1  "c:\opt\cygwin64\bin\mintty.exe -e
/usr/bin/bash -il"
exit
</file>

<example>
sudosu menright
sudosu '"Mike Enright"'
</example>

HTH
-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

      parent reply	other threads:[~2018-10-22 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-21 22:25 Michael Enright
2018-10-21 22:50 ` Andrey Repin
2018-10-22  1:09   ` Michael Enright
2018-10-22 12:05     ` Andrey Repin
2018-10-22 14:43 ` cyg Simple [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19b8c26f-f80b-2fe5-af45-890484b81762@gmail.com \
    --to=cygsimple@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).