* default shell
@ 2014-04-24 17:01 Dawid Ferenczy
2014-04-25 23:35 ` Andrey Repin
0 siblings, 1 reply; 5+ messages in thread
From: Dawid Ferenczy @ 2014-04-24 17:01 UTC (permalink / raw)
To: cygwin
Hi,
it's not a big deal, I just wonder what to execute, if I would like to
execute user's default shell (defined in /etc/passwd). For example in cmd.exe,
ConEmu or Console2. I don't want to hardcode a shell anywhere (in console
emulator configuration, some batch file etc.), I just want to auto detect
user's default shell and execute it. If it's possible :) Exactly the same what
does mintty.
Thank you and have a nice day!
--
Dawid Ferenzy
http://twitter.com/DawidFerenczy
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: default shell
2014-04-24 17:01 default shell Dawid Ferenczy
@ 2014-04-25 23:35 ` Andrey Repin
0 siblings, 0 replies; 5+ messages in thread
From: Andrey Repin @ 2014-04-25 23:35 UTC (permalink / raw)
To: Dawid Ferenczy, cygwin
Greetings, Dawid Ferenczy!
> it's not a big deal, I just wonder what to execute, if I would like to
> execute user's default shell (defined in /etc/passwd). For example in cmd.exe,
> ConEmu or Console2. I don't want to hardcode a shell anywhere (in console
> emulator configuration, some batch file etc.), I just want to auto detect
> user's default shell and execute it. If it's possible :) Exactly the same what
> does mintty.
The answer depends on what you actually trying to do.
Else, there's no simple answer. Default "default" shell is bash, but user can
pick any other, and mintty does some trickery to find it out.
You can try something like
USERSHELL=$( XXX=$( getent passwd $USER ) echo ${XXX##*:} )
but there's no easy equivalent for *NIX scripting in CMD, that does this.
Soo.... back to the original question. What you are trying to do, for what
mintty isn't sufficient?
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 26.04.2014, <03:00>
Sorry for my terrible english...
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Default shell
@ 2001-03-15 16:08 Stein M. Eliassen
2001-03-16 5:25 ` Earnie Boyd
0 siblings, 1 reply; 5+ messages in thread
From: Stein M. Eliassen @ 2001-03-15 16:08 UTC (permalink / raw)
To: cygwin
Hi again,
Is it wise to replace the default cmd.exe with bash in NT?
"Old" bat-files will work okay regardless, don't they?
And is the correct registry-setting for this:
\localmachine\system\currencontrolset\control\session
manager\environment\comspec?
Maybe this subject could make it into the FAQ sometimes...
Regards
Stein
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Default shell
2001-03-15 16:08 Default shell Stein M. Eliassen
@ 2001-03-16 5:25 ` Earnie Boyd
2001-03-16 6:57 ` Stein M. Eliassen
0 siblings, 1 reply; 5+ messages in thread
From: Earnie Boyd @ 2001-03-16 5:25 UTC (permalink / raw)
To: Stein M. Eliassen; +Cc: cygwin
"Stein M. Eliassen" wrote:
>
> Hi again,
>
> Is it wise to replace the default cmd.exe with bash in NT?
>
> "Old" bat-files will work okay regardless, don't they?
>
> And is the correct registry-setting for this:
> \localmachine\system\currencontrolset\control\session
> manager\environment\comspec?
>
> Maybe this subject could make it into the FAQ sometimes...
>
Are you asking if it is ok or are you saying that you've tried it and it
works for you.
Earnie.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Default shell
2001-03-16 5:25 ` Earnie Boyd
@ 2001-03-16 6:57 ` Stein M. Eliassen
0 siblings, 0 replies; 5+ messages in thread
From: Stein M. Eliassen @ 2001-03-16 6:57 UTC (permalink / raw)
To: cygwin
Earnie Boyd wrote:
>
> Are you asking if it is ok or are you saying that you've tried it and it
> works for you.
>
At the time I was asking, I was asking for advise to do it or not, and possible
how.
But now, several hours later and after changing the comspec from the
controlpanel;
I don't think the change had any effects.
The reason I asked was because I was messing around with the at-command and
thought it might could make some difference to have bash as default-shell.
For the time being I'm running at-commands like "c:\cygwin\bin\bash --login -i
script_to_run_including_path.sh"
Is this the preferred way of running at-commands with bash?
Regards
Stein
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-25 23:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24 17:01 default shell Dawid Ferenczy
2014-04-25 23:35 ` Andrey Repin
-- strict thread matches above, loose matches on Subject: below --
2001-03-15 16:08 Default shell Stein M. Eliassen
2001-03-16 5:25 ` Earnie Boyd
2001-03-16 6:57 ` Stein M. Eliassen
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).