2011-02-18

FreeBSD - How to change screen to use BASH

Purpose :
Make screen, the virtual terminal program, changes the user's default shell from tcsh to BASH when starting.

Command :
screen



Installation :
  • using portmanager
    portmanager sysutils/screen -l
  • using portupgrade
    portupgrade -Nv sysutils/screen
  • using ports, conventionally
    cd /usr/port/sysutils/screen
    make install clean


Useful switches :
-s == shell with full path for screen to use


Example :
screen -s /usr/local/etc/bash -S new_screen


  • Why :



  • The root's default tcsh shell should never be change to other shells that's not within the base installation. Reason being when booting into single user mode, you won't be able to use other shells in /usr. Also, shells within base uses libraries that comes with base. Less problem would occur when patching or upgrading ports.


    Others :
    The default shell is tcsh, enhanced Berkeley UNIX C shell. To always tell screen to use BASH as the default shell, create an alias. In ~/.cshrc, put the below line :
    alias screen    screen -s /usr/local/bin/bash


    Reference :
    The comprehensive manual of tcsh explain how it works and how to work.

    Shalom !!!

    No comments: