convert cygwin bash into tcsh

how can I be able to convert my cygwin bash into a c Shell. I have tried by changing the .bat file in installation directory like: @echo off @echo ----Welcome NAME---- @echo 'have a nice day' cygdrive\ chdir \ set HOME=\cygwin\home\ tcsh -i please help. Is it right process? though it is working for me a bit... any ideas...?

Answers


To change your Cygwin shell, you can alter the /etc/passwd file. Each line is a delimited list of user accounts, where the last entry is the shell for that user. Simply change the line that reads, for example:

abhisek:[some other stuff]:/usr/bin/bash

to:

abhisek:[some other stuff]:/usr/bin/tcsh

The current version of Cygwin doesn't have an /etc/passwd file, and the system I'm working on has Windows account information in a domain database out of my control. Consequently, chsh is no longer supported.

I also found that bash is not hard-coded into the startxwin script, nor is it hard-coded in any .bat file. Turns out you don't need to fiddle with .bat files at all.

Searching for how to change my shell, I found some advice about mkpasswd

I added it to the mix.

The man-page said:

SYNOPSIS
   mkpasswd [OPTIONS]...

OPTIONS
   Don't use this command to generate a local /etc/passwd file, unless you
   really need one.  See the Cygwin User's Guide for more information.

   -c,--current
          Print current user.

  DESCRIPTION
        The   mkpasswd  program can be used to create a        /etc/passwd
   file.  Cygwin doesn't need  this  file,        because  it  reads  user
   information  from  the Windows account databases,       but you can add
   an  /etc/passwd file, for instance       if your machine is often  dis‐
   connected from its domain controller.

        Note  that this information is static, in contrast to the informa‐
   tion       automatically gathered by Cygwin from  the  Windows  account
   databases.  If        you  change  the user information on your system,
   you'll need to regenerate       the passwd file for it to have the  new
   information.


        For  very  simple needs, an entry for the current user can be cre‐
   ated       by using the option  -c.

(I don't know why the spacing is so "off"...)

I then used the following command:

mkpasswd -c | sed -e 'sX/bashX/tcshX' | tee -a /etc/passwd

and voila! the next time I opened a Cygwin Terminal, it went straight to tcsh

And that's the way (Uh-huh, uh-huh!) I like it.


Need Your Help

c# am I handling multiple threads properly

c# multithreading

I have an winform application that creates 5 threads to connect to and retrieve information from a database on a very slow connection (90 seconds for some queries).Each thread has it's own instance...

How do I generate a HTML table from a two-dimensional list?

python html list html-table

I have the following code that generates the desired HTML. But it prints it at the top of the page, instead of where I want it.