How do I get GNU screen not to start in my home directory in OS X?
A better way to check what exactly is being run when you type screen
would be to run command -V screen
. This will tell you whether it's running a binary (in which case the full path will be given) or a shell alias, function, etc.
Another thing to check is whether there's a chdir
command in either your ~/.screenrc
or the system-wide screenrc
.
The screen(1)
man page describes the Screen chdir
command.
chdir [directory]
Change the current directory of screen to the specified directory or,
if called without an argument, to your home directory (the value of the
environment variable $HOME). All windows that are created by means of the
"screen" command from within ".screenrc" or by means of "C-a : screen
..." or "C-a c" use this as their default directory. Without a chdir command,
this would be the directory from which screen was invoked. …
My Screen configuration for a programming session includes the command
chdir "$HOME/Projects"
The first step is to make sure that screen isn't an alias.
Type alias
and look for screen
. Be warned that this list could be long. You may want to type alias | grep screen
to separate the wheat from the chaff.
If screen
turns out to be an alias for something like cd ~ && screen
you can remove this using unalias screen
.