diff --git a/data/etc/profile b/data/etc/profile index 865d360e0c..74b22693a7 100644 --- a/data/etc/profile +++ b/data/etc/profile @@ -3,7 +3,12 @@ # Place user customizations in /.profile # -echo -e "\nWelcome to the Haiku shell.\n" +ps |& grep -e $PPID |& grep -e $SHELL |& grep -q -e $PPID > /dev/null 2>&1 +if [ $? -eq 1 ] ; then + echo -e "\nWelcome to the Haiku shell.\n" +else + echo -e "\nSwitching to architecture `getarch`\n" +fi export USER=`id -un` export GROUP=`id -gn` diff --git a/src/bin/setarch.cpp b/src/bin/setarch.cpp index 567e7541f4..5f476347d3 100644 --- a/src/bin/setarch.cpp +++ b/src/bin/setarch.cpp @@ -237,13 +237,14 @@ main(int argc, const char* const* argv) } // if no command is given, get the user's shell - const char* shellCommand[2]; + const char* shellCommand[3]; if (commandArgs == NULL) { struct passwd* pwd = getpwuid(geteuid()); shellCommand[0] = pwd != NULL ? pwd->pw_shell : "/bin/sh"; - shellCommand[1] = NULL; + shellCommand[1] = "-l"; + shellCommand[2] = NULL; commandArgs = shellCommand; - commandArgCount = 1; + commandArgCount = 2; } // exec the command