Solved sysutils/screen: Aliases disabled?

I'm not able to access any of my bash aliases when using sysutils/screen. Do I need to move them to a different file, or is there a config setting I need to use?

My bash aliases currently reside in my /home/.bash_profile file.

Screen is using bash as a shell.
Code:
[localhost ~]$ screen

GNU Screen version 4.06.02 (GNU) 23-Oct-17
...
...
[localhost]$ echo $SHELL
/usr/local/bin/bash
[localhost]$ alias
[localhost]$
 
By default screen(1) will use whatever shell is set on the user's account. If you explicitly set it in ~/.screenrc the shell can be run as a login shell (runs ~/.bash_profile on startup) or not (runs ~/.bashrc on startup).
 
Code:
       shell command

       Set  the	 command to be used to create a	new shell.  This overrides the
       value of	the environment	variable $SHELL.  This is useful if you'd like
       to  run a tty-enhancer which is expecting to execute the	program	speci-
       fied in $SHELL. [b]If the command begins with a '-'	character,  the	 shell
       will be started as a login-shell[/b].
 
Thank you, I noticed all the following examples work. Should I be using any specific one?
Code:
shell -bash
shell -$SHELL
defshell -bash
 
Best is probably not to define it so it automatically uses whatever shell your account it set to.
 
Back
Top